diff options
| author | Tom Rini <trini@konsulko.com> | 2026-03-12 16:10:46 -0600 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2026-03-12 16:10:46 -0600 |
| commit | eefb822fb574e28d49fc9f358328854e17fc8406 (patch) | |
| tree | d0b8e7584b194f2a85facee4eff02dbbffb97e42 /drivers/pinctrl | |
| parent | 4cbb1c4d99780a8b0e476dcd10fb242a5c823bd3 (diff) | |
| parent | c15a791972548150d8c0616a53e70dada1d358ca (diff) | |
Merge tag 'rpi-2026.04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypiHEADmaster
Updates for RPi for 2026.04-rc4:
- board/raspberrypi: add bcm2712d0-rpi-5-b for Raspberry Pi 5
- board/raspberrypi: add multi-FDT support
- rpi: pass the Video Core logs DT parameter through
- pinctrl: bcm283x: Fix GPIO pull state register values for BCM2711
Diffstat (limited to 'drivers/pinctrl')
| -rw-r--r-- | drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c index 4ecc8bac645..90eee88eb13 100644 --- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c +++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c @@ -30,6 +30,11 @@ struct bcm283x_pinctrl_priv { #define MAX_PINS_PER_BANK 16 +/* pull states for BCM2711 */ +#define BCM2711_PULL_NONE 0 +#define BCM2711_PULL_UP 1 +#define BCM2711_PULL_DOWN 2 + static void bcm2835_gpio_set_func_id(struct udevice *dev, unsigned int gpio, int func) { @@ -93,6 +98,17 @@ static void bcm2711_gpio_set_pull(struct udevice *dev, unsigned int gpio, int pu u32 bit_shift; u32 pull_bits; + if (!device_is_compatible(dev, "brcm,bcm2711-gpio")) + return; + + /* BCM2711's pull values differ from BCM2835 */ + if (pull == BCM2835_PUD_UP) + pull = BCM2711_PULL_UP; + else if (pull == BCM2835_PUD_DOWN) + pull = BCM2711_PULL_DOWN; + else + pull = BCM2711_PULL_NONE; + /* Findout which GPIO_PUP_PDN_CNTRL register to use */ reg_offset = BCM2711_GPPUD_CNTRL_REG0 + BCM2711_PUD_REG_OFFSET(gpio); |
