zx279128s pinmux questions

Stefan Dösinger stefandoesinger at gmail.com
Sun Nov 22 04:23:02 PST 2026


Hi,

Am Samstag, 21. November 2026, 13:16:15 Ostafrikanische Zeit schrieb Agustin 
Santiago Isasmendi:
> Hi Stefan,
> 
> A follow-up to my earlier mail, with the details behind it.  No mux
> field on the ZX279128S controls more than one pin: each pin has its
> own field, so nothing is linked together and a pinmux = <pin function>
> binding works for us too.  The fields are just not in pin order, so the
> driver needs a table of where each pin's field is.  This is what we
> have so far.

Thanks, this looks very similar to zx297520v3. I'll write the driver in the 
next days and send an RFC when I have something working for my board. Then we 
can see what changes to the infrastructure are necessary for yours.

I expect the general outline to look like this:

1) Board specific .yamls

2) A zte,zx specific, but SoC independent header that contains a generic macro 
similar to dt-bindings/pinctrl/stm32-pinfunc.h

3) board-specific macros that define the possible configurations for each pin

4) Board specific driver tables that define the register locations of each pin

5) A generic driver that binds it all together

Am Samstag, 21. November 2026, 12:26:01 Ostafrikanische Zeit schrieben Sie:
> - 0x94200000 + 0x00..0x0c hold the mux, one field per pin, 2 bits
>   where the pad has several functions and 1 bit (function or GPIO)
>   where it has one.  E.g. bits 2k+1:2k of +0x00 are GPIO k for
>   k = 0..10, and +0x08 holds the NAND/SPI-NAND pads.
> - +0x30..+0x38 have one bit per pin; clearing it makes the pin read 0,
>   so probably an input enable.
> - +0x50..+0xa4 have a 6-bit config field per pin, five per word.
>   Bits 1:0 are the pull (01 up, 10 down); I haven't decoded the rest.

My hardware is similar, although it has 3 muxes:

1) "AON" (presumably means "always on")
2) "TOP"
3) "PDCFG"

Whatever is selected in AON is connected to the pin, period. If TOP is 
enabled, it additionally connects something else - either a hardwired function 
or whatever is selected in PDCFG.

The result is that two devices can be connected to the same pin at the same 
time. To prevent them from stepping on each other's toes, it is necessary to 
set AON to select GPIO and configure the GPIO to input. This also allows 
snooping on other devices via GPIO - I used this to measure the frequencies of 
clk0, clk1 and clk2 and confirm how the clock tree works.

The reverse is possible too, on paper. E.g. both Pins 33 and 122 can select 
UART2_TXD. But in my testing neither pin is connected if I try to do that, so 
the muxes likely have some checks built into hardware.

There is of course also electrical configuration. It either has 2 bits (bias 
enable, bias direction) or 8 (bias, input enable, Schmitt trigger, drive 
strength, slew rate)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 870 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261122/4e9ba10b/attachment-0001.sig>


More information about the linux-arm-kernel mailing list