Hi,
I’m working on a platform based on the ccimx6ulstarter and am interested in utilization of the spi devices as /dev/spi.
I have the following in my dts file:
&ecspi1 {
// PPTEST
fsl,spi-num-chipselects = <1>;
//cs-gpios = <&gpio4 26 GPIO_ACTIVE_LOW>;
//num-cs = <1>;
// PPTEST END
pinctrl-names = “default”;
status = “okay”;
/*
* Configure the GPIO that you selected as 'slave select'.
*/
//cs-gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;
/*
* ECSPI1 (as master)
*/
pinctrl-0 = <&pinctrl_ecspi1>;
/*
* Reference block.
*
* Add your slave devices here. Next is an example of spidev.
* Expect a harmless kernel warning if you enable spidev as slave.
*/
spidev@0 {
reg = <0>;
compatible = "linux,spidev";
spi-max-frequency = <1000000>;
};
};
&ecspi4 {
// PPTEST
//fsl,spi-num-chipselects = <1>; not mentioned in iomux
num-cs = <1>;
cs-gpios = <&gpio4 17 GPIO_ACTIVE_LOW>;
// PPTEST END
pinctrl-names = “default”;
status = “okay”;
/*
* Configure the GPIO that you selected as 'slave select'.
*/
//cs-gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;
/*
* ECSPI4 (as master)
*/
pinctrl-0 = <&pinctrl_ecspi4>;
/*
* Reference block.
*
* Add your slave devices here. Next is an example of spidev.
* Expect a harmless kernel warning if you enable spidev as slave.
*/
spidev@0 {
reg = <0>;
compatible = "linux,spidev";
spi-max-frequency = <1000000>;
};
};
yet, I only get:
/dev/spidev2.0 after
modprobe spidev
but I’d expect /dev/spidev1.0 and /dev/spidev4.0, why is this?
The complete dts can be seen here: https://pastebin.com/C9MxJLCg
I’ve copied it to:
tmp/work-shared/ccimx6ulstarter/kernel-source/arch/arm/boot/dts/imx6ul-ccim
x6ulstarter-id129.dts and invoked:
. dey-setup-environment
bitbake -c compile -f linux-dey
bitbake -C compile virtual/kernel
bitbake dey-image-qt
bitbake core-image-base
to rebuild.