[PATCH 7/7] pinctrl: sunxi: add support for the Allwinner A733

Alastair D'Silva alastair at d-silva.org
Wed Nov 25 03:57:03 PST 2026


Hi Andre,

Two issues showed up while testing this A733 pinctrl series on the
OrangePi 4 Pro:

1. PIO_POW_MOD_SEL (0x0040) on A733 uses 2 bits per bank instead of
   1 bit. With BIAS_VOLTAGE_PIO_POW_MODE_SEL, banks are written at the
   wrong bit offset and left misconfigured (for example, bank H stays in
   1.8V mode when supplied at 3.3V, breaking RGMII Gigabit TX).
   Adding a 2-bit variant (writing 0b01 per bank with mask
   0x3U << (2 * bank)) enables hardware auto-detect from PIO_POW_VAL
   and fixes 3.3V RGMII TX (also addressed in Vinicius Pedrosa's
   follow-up series).

2. PA has 0 pins on A733, so PB..PK are hardware banks 1..10 while
   irq_banks = 10 maps logical IRQ banks 0..9. Without .irq_bank_map
   and sunxi_irq_hw_bank_num() in sunxi_irq_base_reg(), logical IRQ
   bank 0 (PB) accesses PA's IRQ registers (0xc0) instead of PB's
   (0x140). Adding:
     static const unsigned int a733_irq_bank_map[] = {
             1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
     };
   and using sunxi_irq_hw_bank_num(pctl->desc, bank) inside
   sunxi_irq_base_reg() fixes the bank offset.

Also, in patch 4/7, sunxi_grp_config_reg() takes an unused
`const struct sunxi_pinctrl *pctl` parameter that can be dropped.

Tested on OrangePi 4 Pro (Allwinner A733).

Thanks,
Alastair



More information about the linux-arm-kernel mailing list