U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: Linus Walleij <linusw@kernel.org>
Cc: u-boot@lists.u-boot-project.org, Tom Rini <trini@konsulko.com>,
	Stefan Hansson <newbyte@postmarketos.org>
Subject: Re: [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support
Date: Mon, 24 Aug 2026 15:45:22 +0200	[thread overview]
Message-ID: <aoxK8lN6OIkBgipH@linaro.org> (raw)
In-Reply-To: <20260823-ux500-external-sdcard-v5-7-07ca794e2b94@kernel.org>

On Sun, Aug 23, 2026 at 10:39:26PM +0200, Linus Walleij wrote:
> Add regulator support for LDO AUX3 on AB8500 and AB8505 PMICs.
> AUX3 supplies the removable SD card on the upstream Ux500 Samsung
> device trees.
> 
> Support the AB8505-specific 3.05 V selector override and clear it after
> programming an ordinary voltage. Treat both normal and low-power modes
> as enabled and select the supported voltage closest to a requested
> target. AB8500 cut 2.0 or later is assumed.
> 
> Imply the regulator core for ARCH_U8500 so the driver can instantiate
> from the upstream device trees.
> 
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
>  MAINTAINERS                      |   1 +
>  arch/arm/Kconfig                 |   2 +
>  drivers/power/pmic/ab8500.c      |   1 +
>  drivers/power/regulator/Kconfig  |   7 ++
>  drivers/power/regulator/Makefile |   1 +
>  drivers/power/regulator/ab8500.c | 168 +++++++++++++++++++++++++++++++++++++++
>  6 files changed, 180 insertions(+)
> 
> [...]
> diff --git a/drivers/power/regulator/ab8500.c b/drivers/power/regulator/ab8500.c
> new file mode 100644
> index 000000000000..4eab7fcd0f40
> --- /dev/null
> +++ b/drivers/power/regulator/ab8500.c
> @@ -0,0 +1,168 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/* ST-Ericsson AB8500/AB8505 LDO AUX3 regulator */
> +
> +#include <dm.h>
> +#include <dm/lists.h>
> +#include <linux/errno.h>
> +#include <power/ab8500.h>
> +#include <power/pmic.h>
> +#include <power/regulator.h>
> +
> +#define AB8500_VAUX3_REGU	AB8500_REGU_CTRL2(0x0a)
> +#define AB8500_VAUX3_SEL	AB8500_REGU_CTRL2(0x21)
> +#define AB8500_VAUX3_EN_MASK	GENMASK(1, 0)
> +#define AB8500_VAUX3_REGU_EN	BIT(0)
> +#define AB8500_VAUX3_SEL_MASK	GENMASK(2, 0)
> +#define AB8505_VAUX3_SEL3	AB8500_REGU_CTRL2(0x01)
> +#define AB8505_VAUX3_SEL3_MASK	BIT(4)
> +#define AB8505_VAUX3_SEL3_UV	3050000

I'm a bit confused by this list now, please either have all register
addresses (AB8500_REGU_CTRL2(...)) at the top, followed by the bitmasks
or make it interleaved (probably better for readability), i.e.

+#define AB8500_VAUX3_REGU	AB8500_REGU_CTRL2(0x0a)
+#define AB8500_VAUX3_EN_MASK	GENMASK(1, 0) /* <-- would be also good
					to rename this for consistency */
+#define AB8500_VAUX3_REGU_EN	BIT(0)
+#define AB8500_VAUX3_SEL	AB8500_REGU_CTRL2(0x21)
+#define AB8500_VAUX3_SEL_MASK	GENMASK(2, 0)
+#define AB8505_VAUX3_SEL3	AB8500_REGU_CTRL2(0x01)
+#define AB8505_VAUX3_SEL3_MASK	BIT(4)
+#define AB8505_VAUX3_SEL3_UV	3050000

Am I blind or do we have no support for the AB8505 3.05V in the Linux
regulator driver?

Thanks,
Stephan

  reply	other threads:[~2026-08-24 13:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
2026-08-23 20:39 ` [PATCH v5 01/13] pinctrl: Add compact Nomadik pin controller Linus Walleij
2026-08-24 13:17   ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 02/13] mmc: arm_pl180: Configure Ux500 signal direction Linus Walleij
2026-08-23 20:39 ` [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks Linus Walleij
2026-08-24 13:25   ` Stephan Gerhold
2026-08-24 19:50     ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 04/13] power: regulator: Add driver voltage clamp callback Linus Walleij
2026-08-23 20:39 ` [PATCH v5 05/13] mmc: arm_pl180: Set initial supply voltages Linus Walleij
2026-08-23 20:39 ` [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff Linus Walleij
2026-08-24 13:30   ` Stephan Gerhold
2026-08-24 20:01     ` Linus Walleij
2026-08-25  7:43       ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support Linus Walleij
2026-08-24 13:45   ` Stephan Gerhold [this message]
2026-08-24 20:04     ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 08/13] arm: u8500: Enable SD card regulators Linus Walleij
2026-08-23 20:39 ` [PATCH v5 09/13] configs: stemmy: Boot EFI from external SD card Linus Walleij
2026-08-24 13:46   ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 10/13] arm: u8500: Switch Stemmy to upstream Janice device tree Linus Walleij
2026-08-24 13:55   ` Stephan Gerhold
2026-08-24 20:21     ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 11/13] ARM: dts: ux500: Make panel regulators have unique names Linus Walleij
2026-08-23 20:39 ` [PATCH v5 12/13] ARM: dts: ux500: Harmonize GPIO key names Linus Walleij
2026-08-23 20:39 ` [PATCH v5 13/13] arm: u8500: Package Stemmy device trees in FIT Linus Walleij
2026-08-24 13:59   ` Stephan Gerhold

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=aoxK8lN6OIkBgipH@linaro.org \
    --to=stephan.gerhold@linaro.org \
    --cc=linusw@kernel.org \
    --cc=newbyte@postmarketos.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.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