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!
Solved! Go to Solution.
Thank you! I have already ported it.
The main problem is my carelessness, I did not open the ecspi1 in dts.
There is no driver for 'adc108' in kernel 4.1.15.
In mainline kernel there is drivers/iio/adc/ti-adc108s102.c and the binding is described at: Documentation/devicetree/bindings/iio/adc/ti-adc108s102.txt
So you should use a newer kernel or backport the mainline driver to 4.1.15.
Thank you! I have already ported it.
The main problem is my carelessness, I did not open the ecspi1 in dts.
Hi Joe
seems it is necessary to add "spidev" to dts, as in example
spi loaded at /dev/spidev32765.0?
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Setting the compatible to be "spidev" is helpful.
But, the main reason is absence of status = "okay";
Anyway, thank you for your quick response!