Thanks for your answers !
I've followed your recommendation : I've used only overlay available on RPi5. So, It's now working with the 3CS on SPI1 and 2CS on SPI0.
Then, I'm trying to create an overlay to have 4CS on SPI0. I modified one of the .dts file available and added the CS need like this :
I added this overlay to the config.txt and removed the MCP251xFD overlay to just see if I could get all the spidev and I get :
So I'm assuming my overlay is not messing with spi0-0 and spi0-1 but I can't see spi0-2 and spi0-3.
I've followed multiple tutorials and tried multiple different files and none of them seems to be working to add this 2CS, which are mentionned on datasheet as hardware CS.
I've followed your recommendation : I've used only overlay available on RPi5. So, It's now working with the 3CS on SPI1 and 2CS on SPI0.
Then, I'm trying to create an overlay to have 4CS on SPI0. I modified one of the .dts file available and added the CS need like this :
Code:
/dts-v1/;/plugin/;/* * spi0‑4cs.dts – enable 4 GPIO‑controlled chip‑select lines on SPI0 * * Default CS‑GPIO mapping * CS0 → GPIO 8 (SPI0_CSn[0] – hardware CS) * CS1 → GPIO 7 (SPI0_CSn[1] – hardware CS) * CS2 → GPIO 3 (SPI0_CSn[2] – hardware CS) * CS3 → GPIO 2 (SPI0_CSn[3] – hardware CS) * * Use dtparam=csX_pin=YY on the kernel command line to move any CS * to another GPIO without touching the source. */ / {compatible = "brcm,bcm2835";/* ---------- pinctrl for the CS lines ---------- */fragment@0 {target = <&spi0_cs_pins>;frag0: __overlay__ {brcm,pins = <8 7 3 2>;};};/* ---------- update the SPI0 controller ---------- */fragment@1 {target = <&spi0>;frag1: __overlay__ {cs-gpios = <&gpio 8 1>, <&gpio 7 1>, <&gpio 3 1>, <&gpio 2 1>; num-cs = <4>;status = "okay";};};/* ---------- optional: “no_miso” helper ---------- */fragment@2 {target = <&spi0_pins>;__dormant__ {brcm,pins = <10 11>;};};/* ---------- dtparam overrides ---------- */__overrides__ {cs0_pin = <&frag0>,"brcm,pins:0", <&frag1>,"cs-gpios:4";cs1_pin = <&frag0>,"brcm,pins:4", <&frag1>,"cs-gpios:16";cs2_pin = <&frag0>,"brcm,pins:8", <&frag1>,"cs-gpios:28";cs3_pin = <&frag0>,"brcm,pins:12", <&frag1>,"cs-gpios:40";no_miso = <0>,"=2"; };};Code:
/dev/spidev0.0 /dev/spidev1.0 /dev/spidev1.1/dev/spidev0.1 /dev/spidev10.0 /dev/spidev1.2I've followed multiple tutorials and tried multiple different files and none of them seems to be working to add this 2CS, which are mentionned on datasheet as hardware CS.
Statistics: Posted by DrStown — Tue Jul 29, 2025 8:32 am