I am trying to enable SPI2 and/or SPI3 on the expansion port but not sure how to go about it.
In looking at the riotboard dts file I see SPI1 enabled like this:
&ecspi1 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio4 9 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1_2 &pinctrl_ecspi1_cs_2>;
status = "okay";
touch: ads7846@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "ti,ads7846";
interrupt-parent = <&gpio3>;
interrupts = <24 2>;
spi-max-frequency = <1500000>;
reg = <0>;
ti,settle-delay-usec = /bits/ 16 <150>;
ti,keep-vref-on = /bits/ 16 <1>;
ti,swap-xy = /bits/ 16 <1>;
ti,x-min = /bits/ 16 <0>;
ti,x-max = /bits/ 16 <4095>;
ti,y-min = /bits/ 16 <0>;
ti,y-max = /bits/ 16 <4095>;
ti,debounce-rep = /bits/ 16 <1>;
ti,debounce-tol = /bits/ 16 <5>;
ti,debounce-max = /bits/ 16 <10>;
linux,wakeup;
pendown-gpio = <&gpio3 24 GPIO_ACTIVE_LOW>;
};
};
The "touch:" stuff I assume is being used to enable the touch screen controller so I can skip that part and I assume all I need to replicate is the initial part with something along these lines:
&ecspi2 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpioXX ?? ??>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2_1 &pinctrl_ecspi2_CS_??>;
status = "okay";
}
However I am not sure what to use for the cs-gpios nor for the chip select group in the pinctrl-0. The imx6qdl.dtsi file does not define the chip select pins for ecspi2 or 3.
This is all fairly new to me so please be gentle .
thanks.