raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.2k stars 5.03k forks source link

dtoverlays: enable SPI CS active-high #6477

Closed ikerexxe closed 6 days ago

ikerexxe commented 1 week ago

The documentation isn't very clear explaining how to enable SPI CS active-high and it takes a long time to understand it. Adding a specific overlay as a simple example on how to invert this signal can help understand the solution.

Link: https://forums.raspberrypi.com/viewtopic.php?t=378222

ikerexxe commented 1 week ago

CC'ing @martinezjavier

pelwell commented 1 week ago

You would be better off submitting your PR to rpi-6.6.y, from where we can forward port it. Otherwise you are in danger of having rpi-6.12.y rebased under your feet - which is what has just happened.

ikerexxe commented 1 week ago

You would be better off submitting your PR to rpi-6.6.y, from where we can forward port it. Otherwise you are in danger of having rpi-6.12.y rebased under your feet - which is what has just happened.

Done!

pelwell commented 1 week ago

You'll need to fix these problems: https://github.com/raspberrypi/linux/actions/runs/11895664817/job/33146805156?pr=6477#step:4:559

The syntax error occurs because you aren't including <dt-bindings/gpio/gpio.h>, which you need for GPIO_ACTIVE_HIGH.

ikerexxe commented 6 days ago

You'll need to fix these problems: https://github.com/raspberrypi/linux/actions/runs/11895664817/job/33146805156?pr=6477#step:4:559

The syntax error occurs because you aren't including <dt-bindings/gpio/gpio.h>, which you need for GPIO_ACTIVE_HIGH.

Ok, thank you for the information.

pelwell commented 6 days ago

The syntax error wasn't the only problem: https://github.com/raspberrypi/linux/actions/runs/11895664817/job/33146805156#step:4:561

The overlay itself is now fine, but you need entries in the README and the Makefile.

You may find it helpful to install overlaycheck from our utils repo: https://github.com/raspberrypi/utils/tree/master/overlaycheck

ikerexxe commented 6 days ago

Yeah, that helped a lot