Skip to content

Pi 5: Unable to Disable "lg" GPIO Driver via Overlay or Kernel Command Line (HATs Cannot Access GPIO) #6932

Open
@parziblip

Description

@parziblip

Describe the bug

Summary:
On Raspberry Pi 5 running Raspberry Pi OS Bookworm (kernel 6.12.25, aarch64), the new "lg" GPIO driver claims GPIO pins (e.g., 17 and 22) by default. Attempts to disable the "lg" driver using dtoverlay=gpio-no-lg in /boot/firmware/config.txt or gpiolib_lg=0 in /boot/firmware/cmdline.txt have no effect. This prevents HATs like the Pimoroni Inky Impression from working, as they cannot access the required GPIO pins.

Steps to reproduce the behaviour

Steps to Reproduce:

  1. Fresh install of Raspberry Pi OS Bookworm (64-bit) on Raspberry Pi 5.
  2. Add dtoverlay=gpio-no-lg to /boot/firmware/config.txt and reboot.
  3. Alternatively, add gpiolib_lg=0 to /boot/firmware/cmdline.txt and reboot.
  4. Check pin status with gpioinfo | grep -E "17|22".

Device (s)

Raspberry Pi 5

Bootloader configuration.

Expected Result:
GPIO17 and GPIO22 should be unused and available for HATs after disabling the "lg" driver.

Actual Result:
GPIO17 and GPIO22 remain claimed by the "lg" driver, regardless of overlay or kernel command line settings.

Diagnostics:

  • /boot/firmware/config.txt (last lines):
    dtoverlay=i2c1
    dtoverlay=i2c1-pi5
    dtoverlay=spi0-0cs
    dtoverlay=gpio-no-lg
    
  • /boot/firmware/cmdline.txt (added at end of line):
    gpiolib_lg=0
  • uname -a:
    Linux raspberrypi 6.12.25+rpt-rpi-v8 raspberrypi/rpi-eeprom#1 SMP PREEMPT Debian 1:6.12.25-1+rpt1 (2025-04-30) aarch64 GNU/Linux
    
  • cat /etc/os-release:
    PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
    
  • gpioinfo | grep -E "17|22" (after reboot):
    line  17:     "GPIO17"         "lg"  output  active-high [used]
    line  22:     "GPIO22"         "lg"   input  active-high [used pull-up]
    

What I've Tried:

  • Verified correct config file (/boot/firmware/config.txt).
  • Tried both overlay and kernel command line methods.
  • Fully updated OS and firmware.
  • Rebooted after each change.

Impact:
This prevents use of HATs and add-ons that require direct GPIO access on Pi 5 with Bookworm.

Request:
Please advise on a workaround or fix, or clarify if this is a known issue with the current Pi 5/Bookworm stack.

Thank you!

System

No response

Bootloader logs

No response

USB boot

No response

NVMe boot

No response

Network (TFTP boot)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions