[PATCH v2] pinctrl: bcm283x: Fix GPIO pull state register values for BCM2711

Cibil Pankiras cibil.pankiras at egym.com
Mon Mar 9 09:53:55 CET 2026


On Fri, Feb 6, 2026 at 11:47 AM Cibil Pankiras <cibil.pankiras at egym.com> wrote:
>
> BCM2711 has different pull-up/down register values compared to BCM2835
>
> - BCM2835: NONE=0, DOWN=1, UP=2
> - BCM2711: NONE=0, UP=1, DOWN=2
>
> This patch fixes the pull state register values for BCM2711.
>
> Fixes: 2c39d975f87c ("pinctrl: bcm283x: Add GPIO pull-up/down control for BCM2835 and BCM2711")
> Signed-off-by: Cibil Pankiras <cibil.pankiras at egym.com>
> ---
> Changes in v2:
> - Moved pull value swap logic to bcm2711_gpio_set_pull()
> - Updated the function header comment for bcm2711_gpio_set_pull()
> ---
>  drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
> index 4ecc8bac645a..90eee88eb137 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);
>
> --
> 2.43.0
>

Hello Matthias,

Could you please review this patch when you have time?

Warm Regards,
Cibil

-- 
EGYM SE, Einsteinstraße 172, 81677 München
Geschäftsführende Direktoren: 
Patrick Meininger, Philipp Roesch-Schlanderer, Florian Sauter
Gerichtsstand 
München | Amtsgericht München HRB 303509 | USt.-Id. DE275313632


More information about the U-Boot mailing list