pinctrl: bcm2712 pinctrl/pinconf driver
authorPhil Elwell <phil@raspberrypi.com>
Wed, 9 Jun 2021 14:48:28 +0000 (15:48 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:33:41 +0000 (11:33 +0000)
commitcc85c2529d4c914757a3a3a020693f7e43a52288
treeef3e45767534acdf17ba14fb1742f57540f764a7
parent1b010883c8dba915abe01766c1cf9e91b7bbc334
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: Phil 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: Jonathan Bell <jonathan@raspberrypi.com>
pinctrl: bcm2712: on C0 the regular GPIO pad control register moves too

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
pinctrl: bcm2712: Implement (partially) pinconf_get

Signed-off-by: Phil 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: Phil 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: Phil Elwell <phil@raspberrypi.com>
pinctrl: bcm2712: Guard against bad func numbers

Signed-off-by: Phil 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: Phil 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: Phil Elwell <phil@raspberrypi.com>
drivers/pinctrl/bcm/Kconfig
drivers/pinctrl/bcm/Makefile
drivers/pinctrl/bcm/pinctrl-bcm2712.c [new file with mode: 0644]