Giter Site home page Giter Site logo

Comments (5)

notro avatar notro commented on July 18, 2024

modalias is used for autoloading driver modules.
Make sure that the device has been added (this is for another driver) and that the modalias matches the one in the driver:

$ cat /sys/bus/spi/devices/spi0.0/modalias
spi:mi0283qt

$ modinfo mi0283qt
[...]
alias:          spi:mi0283qt
[...]

from fbtft.

qNnOtTk avatar qNnOtTk commented on July 18, 2024

it isn't, but i have added it in /etc/modules anyway and it works fine now
even though fbtft works now, ads7846 doesn't want to
I keep getting this error in dmesg

ads7846: probe of spi3.0 failed with error -22

*if you're wondering why its looking for spi3.0, that's because im not using a raspberry pi, but a rock CM3 from radxa. I have connected it to the cm4io board, and the spi3 bus is located on the 40 gpio pin headers which im using for the screen, more on the cm3: https://wiki.radxa.com/Rock3/CM/CM3 *

its connected to CS0, this is the dts file i used

``
/dts-v1/;
/plugin/;

/ {
compatible = "radxa,radxa-cm3-io", "rockchip,rk3566";

    fragment@0 {
            target = <&spi3>;
            __overlay__ {
                    #address-cells = <1>;
                    #size-cells = <0>;
                    ads7846@0 {
                            compatible = "ti,ads7846";
                            reg = <0>;
                            pinctrl-names = "default";
                            pinctrl-0 = <&spi3m0_cs0 &spi3m0_pins>;
                            spi-max-frequency = <50000000>;
                            interrupts = <255 2>;
                            interrupt-parent = <&gpio0>;
                            pendown-gpio = <&gpio0 18 0>;
                            ti,x-min = [00 00];
                            ti,y-min = [00 00];
                            ti,x-max = [0f ff];
                            ti,y-max = [0f ff];
                            ti,pressure-min = [00 00];
                            ti,pressure-max = [ff ff];
                            ti,x-plate-ohms = [01 90];
                    };
            };
};

};
``

from fbtft.

notro avatar notro commented on July 18, 2024

You run the SPI clock at 50MHz, I don't think the chip can handle that. The rPi overlay uses 2MHz.

from fbtft.

qNnOtTk avatar qNnOtTk commented on July 18, 2024

I have realized that the reason it can't probe spi is because of this
image

Pin gpio4-6 (a.k.a. SPI3 CS0) is already occupied

from fbtft.

qNnOtTk avatar qNnOtTk commented on July 18, 2024

nevermind touchscreen works now, here is overlay i used
`
/dts-v1/;
/plugin/;

/ {
compatible = "radxa,radxa-cm3-io", "rockchip,rk3566";

    fragment@0 {
            target = <&spi3>;

            __overlay__ {
                    status = "okay";
            };
    };



    fragment@1 {
            target = <&gpio0>;
                    __overlay__{
                            ads7846_pins: ads7846_pins {
                                    rockchip,pins = <0 18 0 &pcfg_pull_up>;
                                    };
                    };
            };

    fragment@2 {
            target = <&spi3>;
            __overlay__ {
                    /* needed to avoid dtc warning */
                    #address-cells = <1>;
                    #size-cells = <0>;

                    ads7846: ads7846@0 {
                            compatible = "ti,ads7846";
                            reg = <0>;
                            spi-max-frequency = <2000000>;
                            interrupts = <18 2>; /* high-to-low edge triggered */
                            interrupt-parent = <&gpio0>;
                            pendown-gpio = <&gpio0 18 0>;

                            /* driver defaults */
                            ti,x-min = /bits/ 16 <0>;
                            ti,y-min = /bits/ 16 <0>;
                            ti,x-max = /bits/ 16 <0x0FFF>;
                            ti,y-max = /bits/ 16 <0x0FFF>;
                            ti,pressure-min = /bits/ 16 <0>;
                            ti,pressure-max = /bits/ 16 <0xFFFF>;
                            ti,x-plate-ohms = /bits/ 16 <400>;
                    };
            };
    };

};
`

from fbtft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.