Hello! I can't seem to able to make SPI0 come out on GP35-39 (as ALT0) on my CM4S. Datasheet /RP-008177-DS-cm4s-datasheet-1.pdf says it works.
gpio=35-39=a0 does not work
writing custom overlays does not work
including a dtsi that redefines spi0_pins and spi0_cs_pins when building bcm2711-rpi-cm4s.dtb does not work fully (it changes SPI0 CS0 and CS1
I can of course change the defs from user space ( # raspi-gpio set 35-39 a0 , or something) but they don't work when I do. My dtsi file currently is:Anyone got any ideas? Thankful for any input on this.
I suspect it might have something to do with the ethernet but this pin setup worked on CM1 and I thought they were compatible ?
Rgrds
gpio=35-39=a0 does not work
writing custom overlays does not work
including a dtsi that redefines spi0_pins and spi0_cs_pins when building bcm2711-rpi-cm4s.dtb does not work fully (it changes SPI0 CS0 and CS1
Code:
# raspi-gpio get 35-39GPIO 35: level=1 fsel=4 alt=0 func=SPI0_CE1_N pull=DOWNGPIO 36: level=1 fsel=4 alt=0 func=SPI0_CE0_N pull=DOWNGPIO 37: level=1 fsel=0 func=INPUT pull=NONEGPIO 38: level=1 fsel=0 func=INPUT pull=NONEGPIO 39: level=1 fsel=0 func=INPUT pull=NONECode:
$ cat output/build/linux-custom/arch/arm/boot/dts/broadcom/spi0-gpio35.dtsi // SPI0 on GPIO 35-39 with ALT0 function&gpio { spi0_pins: spi0_pins { brcm,pins = <37 38 39>; brcm,function = <4>; // alt0brcm,pull = <0>; }; spi0_cs_pins: spi0_cs_pins {brcm,pins = <35 36>;brcm,function = <4>;brcm,pull = <1>; };};&spi0 { #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&spi0_pins &spi0_cs_pins>; status = "okay"; spidev@0 { compatible = "spidev"; reg = <0>; #address-cells = <1>; #size-cells = <0>; spi-max-frequency = <10000000>; status = "okay"; }; spidev@1 { compatible = "spidev"; reg = <1>; #address-cells = <1>; #size-cells = <0>; spi-max-frequency= <10000000>; status = "disabled"; };};I suspect it might have something to do with the ethernet but this pin setup worked on CM1 and I thought they were compatible ?
Rgrds
Statistics: Posted by wcl55 — Tue Jul 22, 2025 11:56 am