AnsweredAssumed Answered

Imx6s cannot find spi device in linux

Question asked by 才俊欧 on Sep 12, 2017
Latest reply on Sep 13, 2017 by 才俊欧

Hi, My board have 2 gpio device on spi bus 1, but I failed to find them in linux via the command:

dmesg |grep spi            <no return>

ls /dev/spi*                    <ls: cannot access '/dev/spi*': No such file or directory>

ls /dev/mtd*                   <ls: cannot access '/dev/mtd*': No such file or directory>

kernel is linux-imx-4.1.15.

 

The dts config is as below:

&ecspi1 {
  fsl,spi-num-chipselects = <2>;
  cs-gpios = <&gpio3 19 0>,
                   <&gpio2 30 0>;
  pinctrl-names = "default";
  pinctrl-0 = <&pinctrl_ecspi1>;

 

 adc: adc108@0 {
    #address-cells = <1>;
    #size-cells = <1>;
    compatible = "adc108";
    spi-max-frequency = <1000000>;
    reg = <0>;
  };

  flash: sst25l@1 {
    #address-cells = <1>;
    #size-cells = <1>;
    compatible = "st,sst25vf016b";
    spi-max-frequency = <20000000>;
    reg = <1>;
  };
};

pinctrl_ecspi1: ecspi1grp {
  fsl,pins = <
    MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x0001B0B0 //in old ok
    MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x0001B0B0 //in old ok
    MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x0001B0B0 //in old ok
    MX6QDL_PAD_GPIO_19__ECSPI1_RDY 0x0001B0B0 //in old not defined
    MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x80000000
    MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x80000000

    //MX6QDL_PAD_EIM_D19__ECSPI1_SS1 0x0001B0B0 //
    //MX6QDL_PAD_EIM_EB2__ECSPI1_SS0 0x0001B0B0 //
  >;
};

 

 

The  config is:

CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_REGMAP_SPI=y
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
CONFIG_SPI_FSL_QUADSPI=y
CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_BITBANG=y
CONFIG_SPI_GPIO=y
CONFIG_SPI_IMX=y
CONFIG_SPI_SPIDEV=y
CONFIG_MFD_MC13XXX_SPI=y
CONFIG_SND_SPI=y
CONFIG_SND_SOC_I2C_AND_SPI=y

 

Can somebody help me? Thank you!

Outcomes