Hi All,
I need to add spi device device with user-defined gpio as a cs.
I have made changes in the dts file as shown below.
File path: openwrt-19.07.7/target/linux/ramips/dts/LINKIT7688.dts
spidev@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "linux,spidev";
reg = <1>;
cs-gpios = <&gpio1 13 1>;
spi-max-frequency = <40000000>;
};
In my device spidev is getting recoganised but not showing userdefined gpio as cs-gpio as shown below.
root@ABCD:/# ls /dev/spidev0.1
/dev/spidev0.1
root@ABCD:/#
root@ABCD:/# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/10000600.gpio, 10000600.gpio:
gpio-11 ( |bootstrap ) out lo
gpiochip1: GPIOs 32-63, parent: platform/10000600.gpio, 10000600.gpio:
gpio-38 ( |reset ) in hi
gpio-44 ( |linkit-smart-7688:or) out lo
gpiochip2: GPIOs 64-95, parent: platform/10000600.gpio, 10000600.gpio:
As shown above the spi cs GPIO not visible. Can you please let me know how can we get the gpio confiured as cs-gpio.
Thanks & Regards,
Lad Dhawal Umesh