From: Andre Przywara <andre.przywara@arm.com>
To: Vinicius Pedrosa <vinicius.eduardo.pedrosa@gmail.com>
Cc: Linus Walleij <linusw@kernel.org>, Chen-Yu Tsai <wens@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>, Yixun Lan <dlan@gentoo.org>,
Enzo Adriano <enzo.adriano.code@gmail.com>,
linux-gpio@vger.kernel.org, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 0/7] pinctrl: sunxi: Add Allwinner A733 support
Date: Mon, 12 Oct 2026 18:18:47 +0200 [thread overview]
Message-ID: <cb32f0e2-3c49-4228-bb45-e1855a992c6b@arm.com> (raw)
In-Reply-To: <20261008194719.328146-1-vinicius.eduardo.pedrosa@gmail.com>
Hi,
thanks for the report!
On 10/8/26 21:47, Vinicius Pedrosa wrote:
> Hi Andre,
>
> While bringing up the Radxa Cubie A7Z on mainline, I went through the
> A733 io-bias code against the user manual (v0.92). The register layout
> doesn't match, on both controllers.
Just for the records: this paragraph above would have been enough, with
that hint it's pretty obvious that it's wrong.
If you have tested it in a before-after/broken-works fashion, you could
mention this, but there is little need in going full bit details on
something that's quite obvious.
So could you show that something doesn't work with the current code, but
got fixed with some changes? Like the eMMC situation on the A523?
> On the main PIO, GPIO_POW_MOD_SEL (0x040) has two-bit fields per supply
> domain: PF is bits 11:10, PK is 21:20, and PB falls under the VCC-IO
> field at 25:24. sunxi_pinctrl_set_io_bias_cfg() treats it as one bit
> per bank, so a PF request writes bit 5 (inside the PC field) and a PK
> request writes bit 10, the low bit of PF.
>
> The R-PIO has the same layout, PL at 1:0 and PM at 3:2. The a733-r
> compatible shares the A523-R descriptor, so it also gets the inverted
> encoding and the RMW at 0x344, which the A733 manual doesn't list.
>
> PL is the case I like least. Running the unmodified helper on the host
> with the R-PIO state I read on my board (SEL 0x000aaaaa, 0x344 = 0) and
> a 3.3 V vcc-pl supply, SEL becomes 0x000aaaab. Per the manual table PL
> goes from 10 (fixed 3.3 V) to 11 (fixed 1.8 V). I haven't run that
> path on the board. With no A733 board DT upstream yet, I don't think
> anyone hits it today.
>
> Locally I set BIAS_VOLTAGE_NONE for the A733 and gave the A733-R its
> own descriptor with NONE, leaving A523/A523-R as they are. That's
> roughly what the vendor BSP does too: its kernel never programs these
> registers and keeps the firmware setup (all auto on the main PIO here,
> PL/PM fixed at 3.3 V).
>
> Tested on one board (the vendor kernel reports SoC version B),
> RAM-booted over FEL, with your pinctrl patches on an integration tree
> and fixed regulators for the 3.3 V PB and PM supplies. With a few
> printks I checked that UART0 (PB9) and a gpio-led on PM2 reach the
> helper on the first request of their bank and that SEL and SEL+4 stay
> unchanged. Same registers without the printks, and UART and the LED
> work. A523 is build-tested only.
>
> Would you be OK with disabling the io-bias programming for A733/A733-R
> as a fix for now, and doing proper voltage mode support later? If so
> I'll send the two patches, with Fixes: tags for 0535bfbfa97b and
> 31d68e10381c.
What is the big problem with just extending the code to use 2 bits, for
the A733? I sketched that here, looks pretty harmless, and is just a few
lines.
The A523-R problem is more annoying, since Allwinner mixes and matches
again here: the A733 register layout, but at an A523 offset. And I
missed that part, which means it effectively breaks compatibility with
the A523-R, so this needs more fixes, including the DT binding.
Cheers,
Andre
prev parent reply other threads:[~2026-10-12 16:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 13:35 [PATCH 0/7] pinctrl: sunxi: Add Allwinner A733 support Andre Przywara
2026-09-10 13:35 ` [PATCH 1/7] pinctrl: sunxi: rename SUNXI_PINCTRL_NEW_REG_LAYOUT Andre Przywara
2026-09-10 13:35 ` [PATCH 2/7] pinctrl: sunxi: only use PortK special handling on A523 Andre Przywara
2026-09-10 14:56 ` Chen-Yu Tsai
2026-09-10 13:35 ` [PATCH 3/7] pinctrl: sunxi: refactor IRQ register accessors Andre Przywara
2026-09-10 13:35 ` [PATCH 4/7] pinctrl: sunxi: support A733 generation MMIO register layout Andre Przywara
2026-09-10 13:35 ` [PATCH 5/7] dt-bindings: pinctrl: add compatible for Allwinner A733 Andre Przywara
2026-09-10 13:35 ` [PATCH 6/7] pinctrl: sunxi: a523-r: add a733-r compatible string Andre Przywara
2026-09-10 13:35 ` [PATCH 7/7] pinctrl: sunxi: add support for the Allwinner A733 Andre Przywara
2026-09-16 17:10 ` [PATCH 0/7] pinctrl: sunxi: Add Allwinner A733 support Linus Walleij
2026-10-08 19:47 ` Vinicius Pedrosa
2026-10-11 20:27 ` Linus Walleij
2026-10-12 16:18 ` Andre Przywara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb32f0e2-3c49-4228-bb45-e1855a992c6b@arm.com \
--to=andre.przywara@arm.com \
--cc=dlan@gentoo.org \
--cc=enzo.adriano.code@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=samuel@sholland.org \
--cc=vinicius.eduardo.pedrosa@gmail.com \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox