All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Norman Herms <dockseed@proton.me>, Jerome Brunet <jbrunet@baylibre.com>
Cc: "Jernej Škrabec" <jernej.skrabec@gmail.com>,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	wens@kernel.org, samuel@sholland.org,
	"Enzo Adriano" <enzo.adriano.code@gmail.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Junhui Liu" <junhui.liu@pigmoral.tech>,
	"Pablo Mazzini" <pmazzini@gmail.com>,
	"Vinicius Pedrosa" <vinicius.eduardo.pedrosa@gmail.com>,
	"Alexander Sverdlin" <alex@sverdlin.org>,
	"Jun Yan" <jerrysteve1101@gmail.com>,
	"Lukas Schmid" <lukas.schmid@netcube.li>,
	"Cristian Filipescu" <filipescu.cristian@gmail.com>
Subject: Re: [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description
Date: Fri, 27 Nov 2026 17:06:54 +0000	[thread overview]
Message-ID: <682cee16-d56c-436a-8661-0cf511fa2e78@arm.com> (raw)
In-Reply-To: <wzwsbUKM-fEhYpTIhswvHly5oyuMCPDOExJEWjbSf-OS3Lrwx2H_l9CUfuMITJUK5CyEz4pNojUFRzjDDczUQmX_LmSWwF7DVSceD34XeHY=@proton.me>

Hi,

On 11/27/26 17:37, Norman Herms wrote:
> Hi Jerome,
> 
> On the PF voltage selector: we have been running UHS-I on the Cubie
> A7S for a while in our own trees (6.18 and mainline based). Here is
> what we ran into, in case it helps whoever models it.
> 
> - The switch: on this board bank PF takes its supply from VCC-IO
>    (3.3 V) or from CLDO5 (1.8 V), selected by GPIO_POW_VAL_SET_CTL
>    bit 0 (1 = 3.3 V). There is no external regulator to switch, so

What do you mean by that? The proper solution is to *create* a new 
regulator driver, either embedded in the pinctrl driver (make the 
pinctrl export a regulator device), or as a separate driver, using some 
pinctrl provided regmap. To be precise, it should be some kind of 
regulator mux, selecting between VCC-IO and VCC18-PF.
And then it should indeed just be a matter of pointing vqmmc-supply to 
that regulator to make it work.
Are you using a different approach? I have seen various downstream 
patches implementing something similar, and they seem to be happy.
And I have seen pinctrl states as well, but think we need a proper vqmmc 
regulator, regardless?

>    vqmmc does not fit, and sunxi-mmc without vqmmc returns -EINVAL for
>    1.8 V.

Do you mean you use vmmc-supply to point to some 1.8V regulator? This is 
indeed bound to fail, as the SD spec requires 3.3V always for the supply 
voltage. And the binding/SD card Linux subsystem allows not providing 
vqmmc, at which point it will assume it's the same as vmmc - but not the 
other way around.

 >    We use two pinctrl states, "sdmmc-3v3" and "sdmmc-1v8" as on> 
Tegra, whose pin groups carry power-source.
> 
> - The withstand mode: with PF in the adaptive mode of
>    GPIO_POW_MOD_SEL (01, which is what the pinctrl automatic voltage
>    detection patch sets), the pads follow the SoC's own supply
>    detector, and on our board that detector now and then reports
>    3.3 V while PF runs at 1.8 V.

Is that a timing issue, maybe? Maybe the sampling happens only so often, 
and you just happen to miss the change, occasionally?

> With one card, 14 of 40 SD rebinds at
>    SDR104 failed: the CMD6 status read gets a data CRC error and the
>    card falls back to high speed; once the card was lost ("error -5
>    whilst initialising SD card"). Setting the PF mode by hand together
>    with the switch gave 0 of 40: 10 (3.3 V) before switching to 3.3 V,

Just to clarify: "0 of 40" means *0 fails* here, so it works?

>    and 11 (1.8 V) after switching to 1.8 V, once GPIO_POW_VAL reports
>    PF at 1.8 V. Our final patch does that and also gave 0 of 40.

Do you mean your patch just badly hacks those two bits to do what you 
want, by treating PortF separately, but it's not something that looks 
nice and upstreamable?

>    Oddly, the fault also goes away while the USB3 combo PHY runs; on
>    this board CLDO5 supplies its analog part too. Another card passed

So according to the A7A schematics VCC18-PF is a separate power supply 
pin on the SoC, and it's supplied by CLDO5. On the A7A CLDO5 is not 
always-on, so you would need to reference it somewhere to be enabled, by 
the SD card node.

>    40 of 40 even in the adaptive mode.
> 
> - The eMMC on bank PC needs no switching, CLDO5 is fixed at 1.8 V.
>    But if the boot chain leaves the PC field at its reset value 10 (the
>    register resets to 0x022aaaa0), HS400 enhanced strobe fails with
>    "mmc_select_hs400es failed, error -110". So on PC, 10 behaves as the
>    3.3 V mode, as in the register table, not as the adaptive mode the

But this is a firmware problem, then? As 0b10 is documented as 3.3V, 
which is wrong if you use a 1.8V eMMC. So doesn't the new pinctrl fix 
patch overwrite this with "auto" (0b01)?
Even if not, firmware should not program the wrong values. I guess 
U-Boot would similarly fail to access the eMMC with that wrong value?

Cheers,
Andre

>    text of 18.14.4.6 gives for C/E/K. 01 and the fixed 1.8 V mode (11)
>    both work.
> 
> We can test patches for this on the A7S, SD and eMMC.
> 
> Built and measured by AI agents (Claude) on my boards.
> 
> Thanks,
> Norman


  reply	other threads:[~2026-11-27 17:07 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26 20:35 [PATCH v6 0/5] arm64: dts: allwinner: add A733 and Radxa Cubie A7 support Enzo Adriano
2026-11-26 20:35 ` [PATCH v6 1/5] dt-bindings: arm: sunxi: document Radxa Cubie A7A, A7S and A7Z Enzo Adriano
2026-11-26 23:16   ` Andre Przywara
2026-12-01  5:18   ` Krzysztof Kozlowski
2026-11-26 20:35 ` [PATCH v6 2/5] arm64: dts: allwinner: add A733 SoC description Enzo Adriano
2026-11-26 20:52   ` sashiko-bot
2026-11-27  4:29   ` Jernej Škrabec
2026-11-27 10:57     ` Andre Przywara
2026-11-27 18:06       ` Enzo Adriano
2026-11-28 14:59         ` Daniel Golle
2026-11-28 20:01           ` Norman Herms
2026-11-30 23:55             ` Enzo Adriano
2026-11-28 20:18           ` Enzo Adriano
2026-11-28 17:38       ` Jernej Škrabec
2026-11-27 11:28     ` Jerome Brunet
2026-11-27 16:37       ` Norman Herms
2026-11-27 17:06         ` Andre Przywara [this message]
2026-11-27 17:54           ` Norman Herms
2026-11-27 11:18   ` Jerome Brunet
2026-11-27 11:23     ` Andre Przywara
2026-11-27 11:26   ` Alastair D'Silva
2026-11-26 20:35 ` [PATCH v6 3/5] arm64: dts: allwinner: add Radxa Cubie A7S board Enzo Adriano
2026-11-26 20:55   ` sashiko-bot
2026-11-27  0:24   ` Andre Przywara
2026-11-27 16:17     ` Norman Herms
2026-11-27 16:30       ` Andre Przywara
2026-11-27 17:00         ` Norman Herms
2026-11-28 20:18         ` Enzo Adriano
2026-11-27 18:07     ` Enzo Adriano
2026-11-27 16:14   ` Norman Herms
2026-11-27 18:07     ` Enzo Adriano
2026-11-26 20:35 ` [PATCH v6 4/5] arm64: dts: allwinner: add Radxa Cubie A7Z board Enzo Adriano
2026-11-26 20:53   ` sashiko-bot
2026-11-27 18:07     ` Enzo Adriano
2026-11-30 11:07       ` Vinicius Pedrosa
2026-11-26 20:36 ` [PATCH v6 5/5] arm64: dts: allwinner: add Radxa Cubie A7A board Enzo Adriano
2026-11-26 20:43   ` sashiko-bot
2026-11-27 11:33   ` Jerome Brunet
2026-11-27 11:56     ` Andre Przywara
2026-11-27 18:07       ` Enzo Adriano
2026-11-27 18:36         ` Andre Przywara
2026-12-01 17:00         ` Andre Przywara
2026-12-01 21:35           ` Enzo Adriano

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=682cee16-d56c-436a-8661-0cf511fa2e78@arm.com \
    --to=andre.przywara@arm.com \
    --cc=alex@sverdlin.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dockseed@proton.me \
    --cc=enzo.adriano.code@gmail.com \
    --cc=filipescu.cristian@gmail.com \
    --cc=jbrunet@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jerrysteve1101@gmail.com \
    --cc=junhui.liu@pigmoral.tech \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=lukas.schmid@netcube.li \
    --cc=mripard@kernel.org \
    --cc=pmazzini@gmail.com \
    --cc=robh@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.