On 9/9/23 04:45, Mikhail Kalashnikov wrote: > From: iuncuim <iuncuim@xxxxxxxxx> > > Some SoCs from the H616 family (such as the T507) have the same die but > more output pins that are used for additional peripherals. The T507 SoC > don't have a built-in multiphy like the AC200 or AC300 connected ti the typo: to > bank A. With the T507 these pins can be freely used for any other application. > This patch adds the missing muxes on banks A, D and E. > > Signed-off-by: Mikhail Kalashnikov <iuncuim@xxxxxxxxx> > --- > drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c | 380 +++++++++++++++++++- > 1 file changed, 366 insertions(+), 14 deletions(-) > > diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c > index d6ca720ee..10d4e1ef1 100644 > --- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c > +++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h616.c > @@ -16,33 +16,81 @@ > #include "pinctrl-sunxi.h" > > static const struct sunxi_desc_pin h616_pins[] = { > - /* Internal connection to the AC200 part */ > + /* Internally connected to the AC200 part in the H616 SoC */ > SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0), > - SUNXI_FUNCTION(0x2, "emac1")), /* ERXD1 */ > + SUNXI_FUNCTION(0x0, "gpio_in"), > + SUNXI_FUNCTION(0x1, "gpio_out"), > + SUNXI_FUNCTION(0x2, "emac1"), /* ERXD1 */ > + SUNXI_FUNCTION(0x4, "i2c0"), /* SCK */ > + SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)), /* PA_EINT0 */ > SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1), > - SUNXI_FUNCTION(0x2, "emac1")), /* ERXD0 */ > + SUNXI_FUNCTION(0x0, "gpio_in"), > + SUNXI_FUNCTION(0x1, "gpio_out"), > + SUNXI_FUNCTION(0x2, "emac1"), /* ERXD0 */ > + SUNXI_FUNCTION(0x4, "i2c0"), /* SDA */ > + SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)), /* PA_EINT1 */ > SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2), > - SUNXI_FUNCTION(0x2, "emac1")), /* ECRS_DV */ > + SUNXI_FUNCTION(0x0, "gpio_in"), > + SUNXI_FUNCTION(0x1, "gpio_out"), > + SUNXI_FUNCTION(0x2, "emac1"), /* ECRS_DV */ > + SUNXI_FUNCTION(0x4, "i2c1"), /* SCK */ > + SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)), /* PA_EINT2 */ > SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3), > - SUNXI_FUNCTION(0x2, "emac1")), /* ERXERR */ > + SUNXI_FUNCTION(0x0, "gpio_in"), > + SUNXI_FUNCTION(0x1, "gpio_out"), > + SUNXI_FUNCTION(0x2, "emac1"), /* ERXERR */ > + SUNXI_FUNCTION(0x4, "i2c1"), /* SDA */ > + SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)), /* PA_EINT3 */ > SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4), > - SUNXI_FUNCTION(0x2, "emac1")), /* ETXD1 */ > + SUNXI_FUNCTION(0x0, "gpio_in"), > + SUNXI_FUNCTION(0x1, "gpio_out"), > + SUNXI_FUNCTION(0x2, "emac1"), /* ETXD1 */ > + SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 4)), /* PA_EINT4 */ > SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 5), > - SUNXI_FUNCTION(0x2, "emac1")), /* ETXD0 */ > + SUNXI_FUNCTION(0x0, "gpio_in"), > + SUNXI_FUNCTION(0x1, "gpio_out"), > + SUNXI_FUNCTION(0x2, "emac1"), /* ETXD0 */ > + SUNXI_FUNCTION(0x3, "h_i2s0"), /* DOUT0 */ For H616 we chose[1] to remove the "h_" prefix from the I2S function names, even though the interfaces are part of the audio hub and not discrete devices. Please remove it here as well for consistency. Regards, Samuel [1]: https://lore.kernel.org/linux-arm-kernel/20201214094430.m6h3pzhkm3kjl2cl@gilmour/