]> git.ipfire.org Git - thirdparty/openwrt.git/commit
airoha: add pinctrl fixes for AN7581 and AN7583 main master 24267/head
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tue, 2 Jun 2026 11:59:56 +0000 (13:59 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 29 Jul 2026 07:28:32 +0000 (09:28 +0200)
commitd0110a25edf1854813fcb8f03f38d65679bd6378
tree5602b487033a999ec599cfdd566afe219341acb0
parent79da6837d7cd6a0f311db3ee4564ab06f839556f
airoha: add pinctrl fixes for AN7581 and AN7583

Fix and improve support for AN7583. Muxing of SPI, MDIO and I2C is
now fully supported and working.

Fix I2C1 in master mode on AN7581. (this allows to replace the i2c-gpio
driver on Nokia Valyrian with the proper i2c-mt7621 driver).

Fix non-working switching of GPIO direction if GPIO control register were
already modified by bootloader and pinctrl would create a reserved
state. All GPIO control registers have two bits per GPIO but the driver
only set one which is now fixed.

Fix problem were a pinmux config or GPIO mode cannot be applied if pin
control register were already modified by bootloader. The driver expects
all pin control registers to have their reset default value. Now the
driver forces that reset default value during probe.

Worth to mention that on AN7583 the GPIO mode and alternate pin modes
are reversed in the reset default value. To achieve same behaviour as on
AN7581 (GPIO mode by default, board DTS applies pinmux), the default
value enforced during probe enables all GPIO mode bits. As consequence
all AN7583 board DTS need to explicitely activate mdio0 or spi pin
groups.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24267
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/airoha/dts/an7583-evb-emmc.dts
target/linux/airoha/dts/an7583-evb.dts
target/linux/airoha/dts/an7583-nokia_xg-040g-mf-common.dtsi
target/linux/airoha/patches-6.18/203-01-pinctrl-airoha-fix-setting-of-GPIO-direction.patch [new file with mode: 0644]
target/linux/airoha/patches-6.18/203-02-pinctrl-airoha-reset-SCU-IOMUX-registers-at-probe.patch [new file with mode: 0644]
target/linux/airoha/patches-6.18/203-03-pinctrl-airoha-fix-I2C1-pin-mux-config-for-AN7581.patch [new file with mode: 0644]
target/linux/airoha/patches-6.18/203-04-pinctrl-airoha-fix-I2C-pin-mux-config-for-AN7583.patch [new file with mode: 0644]
target/linux/airoha/patches-6.18/203-05-pinctrl-airoha-fix-AN7583-MDIO-pin-mux-config.patch [new file with mode: 0644]
target/linux/airoha/patches-6.18/203-06-pinctrl-airoha-fix-AN7583-SPI-pin-mux-config.patch [new file with mode: 0644]
target/linux/airoha/patches-6.18/203-07-pinctrl-airoha-remove-nonexistent-AN7583-PCM-SPI-groups.patch [new file with mode: 0644]