I have a radxa zero 3w. I am able to get spidev3.0 to be available using the overlay for it, rk3568-spi3-m1-cs0-spidev.dtbo. I am trying to use pin 12 or another available gpio as a second chipselect so I can use more than spi device. However I am unable to get it to work.
/dts-v1/;
/plugin/;/ {
metadata {
title = “Enable spidev on SPI3-M1 with CS0 and CS1”;
compatible = “radxa,zero3”;
category = “misc”;
exclusive = “GPIO4_C6”, “GPIO3_A3”;
description = “Enable spidev on SPI3-M1 with hardware CS0 and software CS1.”;
};
};&spi3 {
status = “okay”;
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = “default”, “high_speed”;
pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>;
pinctrl-1 = <&spi3m1_cs0 &spi3m1_pins_hs>;
max-freq = <50000000>;
num-cs = <2>;spidev@0 { compatible = "rockchip,spidev"; reg = <0>; spi-max-frequency = <50000000>; status = "okay"; }; spidev@1 { compatible = "rockchip,spidev"; reg = <1>; spi-max-frequency = <50000000>; cs-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>; status = "okay"; };
};
dtc -@ -I dts -O dtb -o rk3568-spi3m1-cs0-gpio-cs1.dtbo rk3568-spi3m1-cs0-gpio-cs1.dts
Error: rk3568-spi3m1-cs0-gpio-cs1.dts:36.30-31 syntax error
FATAL ERROR: Unable to parse input tree
I keep getting this error though. Has anybody gotten a second chip select working using a gpio pin as it for spidev3?