Hello, kindly ask for help about SPI at an IMX8MP. I tried latest
2023.01. If you can please have a look and check it works on your side?

sspi command returns: Invalid bus 0

Turning on the log-level:

drivers/core/lists.c:201-      lists_bind_fdt() bind node spi@30820000
drivers/core/lists.c:222-      lists_bind_fdt()    - attempt to match
compatible string 'fsl,imx8mp-ecspi'
drivers/core/lists.c:222-      lists_bind_fdt()    - attempt to match
compatible string 'fsl,imx51-ecspi'
drivers/core/lists.c:250-      lists_bind_fdt()    - found match at
'mxc_spi': 'fsl,imx51-ecspi' matches 'fsl,imx51-ecspi'

u-boot=> sspi
drivers/core/uclass.c:338-uclass_find_device_by_seq() 0
drivers/core/uclass.c:346-uclass_find_device_by_seq()    - 1 'spi@30820000'
drivers/core/uclass.c:353-uclass_find_device_by_seq()    - not found
drivers/spi/spi-uclass.c:431- _spi_get_bus_and_cs() Invalid bus 0 (err=-19)

What am I doing wrong or is this a bug? Thanks ahead for any hint.

Best regards,
Elmar



---

Pretty sure my config and devicetree is not wrong as long there are no
changes about in last few month. I attache it below.

my config file:
CONFIG_SPL_DM_SPI=y
CONFIG_CMD_SPI=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_MXC_SPI=y

dt: (tested with both types of cs-gpios)
&ecspi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ecspi1>;
        cs-gpios = <0>, <&gpio5 9 GPIO_ACTIVE_LOW>;
//      cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
        status = "okay";
};

        pinctrl_ecspi1: ecspi1grp {
                fsl,pins = <
                        MX8MP_IOMUXC_ECSPI1_MISO__ECSPI1_MISO 0x00000104
                        MX8MP_IOMUXC_ECSPI1_MOSI__ECSPI1_MOSI 0x00000104
                        MX8MP_IOMUXC_ECSPI1_SCLK__ECSPI1_SCLK 0x00000104
                        MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09 0x00000104
                >;
        };

Reply via email to