AI Camera (IMX500) RP2040 GPIO bridge becomes unresponsive after ~20-25 power cycles, requires host reboot
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
Línea de trabajo
Run the provided Picamera2 open/start/capture/stop/close loop and capture the kernel log when rp2040_gbdg_wait_until_free fails. Read the rp2040-gpio-bridge paths around rp2040_gbdg_wait_until_free(), rp2040_gbdg_gpio_dir_out(), and rp2040_gbdg_probe(), including commits 8917d44422 and 5c1a0c01ce. Done means establishing a supported recovery procedure or a reproducible driver fix that survives repeated camera cycles without a host reboot.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The RP2040 GPIO bridge chip on the Raspberry Pi AI Camera (IMX500) stops
responding to I2C after roughly 20-25 camera open/close cycles within a
single boot session. Once it happens, every subsequent camera access fails
identically, and only a full host reboot recovers it (a sudo reboot, not
just a driver unbind/rebind of the sensor; untested whether unbind/rebind
of the bridge chip itself recovers it, see below).
Steps to reproduce
Minimal reproducer, no application code involved beyond Picamera2 itself:
from picamera2 import Picamera2
picam2 = Picamera2()
picam2.configure(picam2.create_preview_configuration(main={"size": (960, 720)}))
picam2.start()
picam2.capture_array()
picam2.stop()
picam2.close()
Run this in a loop (I used about 12s between iterations). On a fresh reboot,
cycles 1 through 24 completed cleanly every time, spanning several minutes
with multiple resolutions and timings tested. Cycle 25 failed and every
attempt since failed identically, until the next reboot.
Kernel log at the moment of failure
rp2040-gpio-bridge 10-0040: rp2040_gbdg_i2c_send() rp2040_gbdg_wait_until_free failed
rp2040-gpio-bridge 10-0040: rp2040_gbdg_gpio_dir_out(19, 0) could not ST_CL
rp2040-gpio-bridge 10-0040: rp2040_gbdg_i2c_send() rp2040_gbdg_wait_until_free failed
imx500 10-001a: setup of GPIO led failed: -121
imx500 10-001a: imx500_power_on: failed to get led gpio
rp1-cfe 1f00110000.csi: stream on failed in subdev
Followed shortly after by the well-known secondary symptom:
videobuf2_common: driver bug: stop_streaming operation is leaving buffer 0 in active state
WARNING: ... at drivers/media/common/videobuf2/videobuf2-core.c:2215 __vb2_queue_cancel+...
System
Raspberry Pi 5, AI Camera (IMX500) on CAM/DISP0. uname -r:
6.12.34+rpt-rpi-2712. libcamera0.7/libcamera-v4l2:
0.7.2+rpt20260817-1. libpisp1: 1.7.0-1. python3-picamera2: 0.3.37-1.
RP2040 bridge firmware: fw ver. 15 (per rp2040_gbdg_probe() log line,
matches the latest version referenced in the official RP2040 firmware
update instructions, so this isn't an outdated-firmware problem).
What I've checked so far
Not a resource-contention issue with other I2C/GPIO consumers on the same
board (tested with all other periodic I2C/GPIO-using services on the
system stopped, same result). Not fixed by the RP2040 firmware already
being current (v15). Compared drivers/spi/spi-rp2040-gpio-bridge.ko
between my running kernel (6.12.34, built 2025-06-26) and an
already-installed-but-unbooted newer kernel (6.18.34, built 2026-06-09):
the rp2040_gbdg_wait_until_free failed code path is byte-identical in
both builds, and the driver's commit history (8917d44422, 5c1a0c01ce)
shows only the initial driver and one unrelated MAX_TRANSFER_SIZE
increase, nothing addressing this. cam0_reg (the shared regulator
powering both the IMX500 sensor and the RP2040 bridge, GPIO-backed via
RP1) still shows num_users: 1, state: enabled while wedged; the
physical rail is not being fully cycled by normal Picamera2 stop/start
alone, since the bridge driver's own reference keeps it continuously
enabled independent of streaming.
Question / request
Is this a known failure mode? Is there a supported way to recover the RP2040
bridge (e.g., unbind+rebind the 10-0040 i2c device, which should drop
cam0_reg's use count to 0 and force a real power-cycle) without a full
host reboot? Happy to test and report back if there's a suggested
procedure.
- Lenguaje dominante
- C
- Estrellas
- 13.3k
- Forks
- 5.5k
- Merge medio
- 4 d 10 h
- PR fusionados (30 d)
- 31
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de raspberrypi/linux
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
raspberrypi/linux#7415 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace appAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
raspberrypi/linux#7399 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Documentation update requiredAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
raspberrypi/linux#7357 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
raspberrypi/linux#7054 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
raspberrypi/linux#7770 ·
Los mantenedores suelen responder en 1 día
Todos los issues de raspberrypi/linux
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
A letter from the pastAbiertoslice
Dificultad 2/5 Menos de una hora Aptitud para principiantes 72/100
Life-Framework/Life-Framework#3465 ·
Los mantenedores suelen responder en 1 día