MT7628 spi0.1 does not detected

Hi,

Connecting graphic LCD on spi0.1 but device does not bring up.
Loong time ago I have tested and it worked.

Module Hi-link with MT7628AN
Kernel 5.15.102
file: target/linux/ramips/dts/mt7628an.dtsi

               spi0: spi@b00 {
                        compatible = "ralink,mt7621-spi";
                        reg = <0xb00 0x100>;

                        resets = <&rstctrl 18>;
                        reset-names = "spi";

                        #address-cells = <1>;
                        #size-cells = <0>;

                        pinctrl-names = "default";
                        pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;

                        status = "disabled";
                };

file: target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts

&spi0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
[ SKIP ]
        spidev@1 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "linux,spidev";
                reg = <1>;
                spi-max-frequency = <8000000>;
        };
};

Kernel modules
Kernel modules ---> SPI Support ---> <*> kmod-spi-dev
rest of modules are off ( < > kmod-mmc-spi < > kmod-spi-bitbang < > kmod-spi-gpio )

module spidev loaded

device /dev/spi0.1 does not bring up

What I'm doing wrong?
Please help.

Best regards

Hi,

After lots of googling and source code inspecting I still unable to bring device spi0.1 up.
Looks like my knowledge not enough for this task.
Please point me how to debug this problem.

target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts file

&spi0 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
        num-cs = <2>;

        flash@0 {
[ SKIP ]
        };
        spidev@1 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "ralink,mt7621-spi";
                #compatible = "linux,spidev";
                reg = <1>;
                spi-max-frequency = <8000000>;
                status = "okay";
        };
};

I tried to use num-cs but this does not help (hope position of this option are correct?)
Also tested with compatible = "ralink,mt7621-spi"; and compatible = "linux,spidev"; with no effect.
Do I need any extra kernel modules?
Only spidev kernel module are loaded but looks like not used at all.
Thank you

Finally managed to bring up /dev/spidev0.1 device.
Used one of defined names in drivers/spi/spidev.c
file of_device_id spidev_dt_ids[] structure.
Definition in .dts file:

        spidev@1 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "silabs,si3210";
                reg = <1>;
                spi-max-frequency = <8000000>;
        };

/dev/spidev0.1 is detected now and and echo -n "x" > /dev/spidev0.1 transmits data
using CS1 pin.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.