Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* zx279128s pinmux questions
@ 2026-11-20 19:24 Stefan Dösinger
  2026-11-21  9:26 ` Agustin Santiago Isasmendi
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Dösinger @ 2026-11-20 19:24 UTC (permalink / raw)
  To: Navid Ghahremani, Agustin Santiago Isasmendi, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

Hi Navid, Agustin,

My next goal is to clean up my zx297520v3 pin control driver and write a 
proper binding. Before I do that I would like to understand how pinctrl works 
on your board to decide how much code reuse makes sense.

My main question is if the zx27 board can control individual pins or if 
multiple pins need to be controlled together. On zx297520v3 I can set every 
pin individually. Does the same apply to your boards?

The background: There are two ways to write pinctrl bindings and drivers: 
Either exposing a simple pinmux=<int> setting, that sets pin 123 to a 
specified function. The other way is to collect groups of pins and possible 
functions they can be assigned to in the driver. They are controlled via 
strings. I prefer to go via the former one, but as far as I understand it, 
this is not possible if hardware links two or more pins together.

Can you advise me on what you know about your board's pin control?

Cheers,
Stefan

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 870 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: zx279128s pinmux questions
  2026-11-20 19:24 zx279128s pinmux questions Stefan Dösinger
@ 2026-11-21  9:26 ` Agustin Santiago Isasmendi
  0 siblings, 0 replies; 2+ messages in thread
From: Agustin Santiago Isasmendi @ 2026-11-21  9:26 UTC (permalink / raw)
  To: Stefan Dösinger; +Cc: Navid Ghahremani, linux-arm-kernel

Hi Stefan,

On the ZX279128S the pins are individually controllable.

The chip's manual has a table of the pads (GPIO 0-63, in order) with up
to four functions each; e.g. JTAG_TDO can be JTAG_TDO, SIM_VCCEN,
UART1_TXD or GPIO2.  It doesn't give the register bits, so I mapped
those from the stock U-Boot (it writes a per-board table into the
block) and by flipping bits on my H3600 and watching the GPIO inputs:

- 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.

The layout is irregular, though (GPIO 11-21 sit in +0x04, GPIO 36-41 at
the top of +0x00, and the 1-bit pads in +0x0c are out of order), so a
driver needs a table per pin with the mux and config positions, much
like the old pinctrl-zx296718.  With that table, a pinmux = <pin
function> binding like yours should work for us too.

I have the per-pin table (manual functions plus the register positions
found so far, some still unverified) if it's useful to you or Navid.

Agustin


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-21  9:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 19:24 zx279128s pinmux questions Stefan Dösinger
2026-11-21  9:26 ` Agustin Santiago Isasmendi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox