pinout-xyz / Pinout.xyz

Source files for the Raspberry Pi Pinout documentation website.
http://pinout.xyz/
Creative Commons Attribution Share Alike 4.0 International
695 stars 197 forks source link

SPI1 on RazPi Zero 2 W doesn't exist #438

Open cjfman opened 2 years ago

cjfman commented 2 years ago

I don't think the Zero 2 W has a second SPI controller. I just got RaspberryPi 2 W, fresh install of Raspberry Pi OS and updated. I used this library to send data over SPI. When I went to open controller 1, I got a file handle error. I looked in/dev/ there were file handles for SPI0 device 0 and 1, but nothing for SPI1.

lurch commented 2 years ago

The Raspberry Pi Zero 2 W uses the same SoC (internally) as the Raspberry Pi 3 https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#spi-overview

If you're not seeing the devices you expect in /dev/ you've probably not got the right DT overlays set up? See https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/README#L3137 for more info.

hotrungnhan commented 2 years ago

@lurch how about adding a specific layout for Zero 2 ư?

lurch commented 2 years ago

@hotrungnhan I'm not sure what you're asking for, but https://pinout.xyz/ applies to the Pi Zero 2 W, exactly the same as it does for the Pi Zero, Pi 2B, Pi 3A+, etc. etc.

hotrungnhan commented 2 years ago

@hotrungnhan I'm not sure what you're asking for, but https://pinout.xyz/ applies to the Pi Zero 2 W, exactly the same as it does for the Pi Zero, Pi 2B, Pi 3A+, etc. etc.

oh im sorry , i show the issue in wrong github repo <> i mean this lib https://gpiozero.readthedocs.io/en/stable/cli_tools.html

lurch commented 2 years ago

Ahhh! The pinout command has nothing to do with this repo, and actually comes from https://github.com/gpiozero/gpiozero - see https://gpiozero.readthedocs.io/en/stable/cli_tools.html#pinout

Support for the Raspberry Pi Zero 2 W has been added there https://github.com/gpiozero/gpiozero/pull/1004 but unfortunately there's not been a packaged release of GPIO Zero for ages.

lurch commented 2 years ago

There's now an issue at https://github.com/gpiozero/gpiozero/issues/1031 , if anyone else comes across the same problem.