Skip to content
Commit af7e60a3 authored by Phil Elwell's avatar Phil Elwell Committed by Phil Elwell
Browse files

pinctrl: bcm2712 pinctrl/pinconf driver



pinctrl: bcm2712: Reject invalid pulls

Reject attempts to set pulls on aon-sgpios, and fix pull shift
values.

pinctrl: bcm2712: Add 7712 support, fix 2712 count

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>

pinctrl-bcm2712: add EMMC pins so pulls can be set

These pins have pad controls but not mux controls. They look enough like
GPIOs to squeeze in at the end of the list though.

pinctrl: bcm2712: correct BCM2712C0 AON_GPIO pad pull control offset

Signed-off-by: default avatarJonathan Bell <jonathan@raspberrypi.com>

pinctrl: bcm2712: on C0 the regular GPIO pad control register moves too

Signed-off-by: default avatarJonathan Bell <jonathan@raspberrypi.com>

pinctrl: bcm2712: Implement (partially) pinconf_get

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>

pinctrl: bcm2712: Convert to generic pinconf

Remove the legacy brcm,* pin configuration support and replace it with
a proper generic pinconf interface, using named functions instead of
alt function numbers. This is nicer for users, less error-prone, and
immune to some of the C0->D0 changes.

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>

pinctrl: bcm2712: Remove vestigial pull parameter

Now the legacy brcm, pinconf parameters are no longer supported, this
custom pin config parameter is not needed.

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>

pinctrl: bcm2712: Guard against bad func numbers

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>

pinctrl: bcm2712: A better attempt at D0 support

The BCM2712D0 sparse pinctrl maps play havoc with the old GPIO_REGS
macro, so make the bit positions explicit. And delete the unwanted
GPIO and pinmux declarations on D0.

Note that a Pi 5 with D0 requires a separate DTS file with "bcm2712d0"
compatible strings.

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>

pinctrl: bcm2712: Delete base register constants

BCM2712D0 deletes many GPIOs and their associated mux and pad bits,
so much so that the offsets to the start of the pad control registers
changes. Remove the constant offsets from the *GPIO_REGS macros,
compensating by adjusting the per-GPIO values.

Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>
parent 22ae3b2e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment