]> git.ipfire.org Git - thirdparty/u-boot.git/commit
pinctrl: mediatek: support mediatek,pctl-regmap property
authorDavid Lechner <dlechner@baylibre.com>
Tue, 6 Jan 2026 22:05:19 +0000 (16:05 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 12 Jan 2026 19:41:17 +0000 (13:41 -0600)
commit424ceba18bfb4c9bc324618fc572066833e38d88
treec3657b8fae7f6966001b193978e78506e54e20ec
parent75a5404a588938d2803e07acb9977e3dfe29693e
pinctrl: mediatek: support mediatek,pctl-regmap property

Add support for the mediatek,pctl-regmap devicetree property to the
common MediaTek pinctrl driver.

In upstream devicetrees from Linux, the pinctrl nodes may be on the
interrupt controller register address space rather than the pinctrl
register address space. In this case, there is a syscon node linking to
the actual pinctrl registers. This uses a common property name of
mediatek,pctl-regmap for the phandle to the syscon node.

The logic here is that if this property is present, we look up the
syscon node and use it's address as the base address of the pinctrl
registers and ignore the pinctrl node's own reg property. (Support
for interrupts could be added later if needed.)

There is also at least one SoC in Linux that has two syscon phandles
in this property. This implementation support parsing this, but doesn't
do anything with the second syscon yet (the 2nd syscon is for interrupts
which we are saving for later).

Signed-off-by: David Lechner <dlechner@baylibre.com>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c