Need to change SPI cs pin in dts file of AI7688 module

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
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

@Openwrt Developer Team,

I am working with Dhawal Lad into same project. Also I would like to add few points regarding same like we have checked into OpenWRT Build configuration and Kernel Config related to SPI Device Driver with DTS mapping but didn't find anything related to it

Also we have checked into reference dts file in which same mechanism has been configured and defined for the same

We have also tried to export other GPIOs into standard GPIO mappings into DTS file which is working fine without any issue

Let us know if anyone has faced this type of issue and has applied solution for the same.

Ritesh Prajapati