Describe the bug
I've been debugging usb port power switching using libusb and rpi5 (another topic/issue). While researching how and if the vbus may be switched with rp1, I came upon the usb_vbus_pins definition in bcm2712-rpi-5-b.dts.
Gpio 42 appears to switch the vbus for all USB ports at once, whereas GPIO 43 appears to detect overcurrent. If I query gpio 43, the Raspberry Pi 5 enters overcurrent protection and all USB ports are disabled. Even though this appears to be correct, it could be a problem because the typical Pi user has access to all gpio pins, and a rogue application can block all USB ports.
I don't know where the usb_vbus_pins are used, but maybe a gpio hog for at least the over current pin can prevent further damage?
Steps to reproduce the behaviour
Straight to over current: gpioget 4 43
or just some switching: gpioset 4 42=0
Device (s)
Raspberry Pi 5
System
Raspberry Pi reference 2023-10-10
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 962bf483c8f326405794827cce8c0313fd5880a8, stage4
2024/01/05 15:57:40
Copyright (c) 2012 Broadcom
version 30cc5f37 (release) (embedded)
Linux pi5 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
Logs
No response
Additional context
No response
Describe the bug
I've been debugging usb port power switching using libusb and rpi5 (another topic/issue). While researching how and if the vbus may be switched with rp1, I came upon the
usb_vbus_pinsdefinition inbcm2712-rpi-5-b.dts.Gpio 42 appears to switch the vbus for all USB ports at once, whereas GPIO 43 appears to detect overcurrent. If I query gpio 43, the Raspberry Pi 5 enters overcurrent protection and all USB ports are disabled. Even though this appears to be correct, it could be a problem because the typical Pi user has access to all gpio pins, and a rogue application can block all USB ports.
I don't know where the
usb_vbus_pinsare used, but maybe a gpio hog for at least the over current pin can prevent further damage?Steps to reproduce the behaviour
Straight to over current:
gpioget 4 43or just some switching:
gpioset 4 42=0Device (s)
Raspberry Pi 5
System
Logs
No response
Additional context
No response