Devicetree
 help / color / mirror / Atom feed
From: Jerome Brunet <jbrunet@baylibre.com>
To: Lee Jones <lee@kernel.org>
Cc: Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	 Chen-Yu Tsai <wens@kernel.org>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	 Mark Brown <broonie@kernel.org>,
	 devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Andre Przywara <andre.przywara@arm.com>
Subject: Re: [PATCH v2 3/3] regulator: axp20x: add support for the AXP318W
Date: Fri, 10 Jul 2026 18:27:02 +0200	[thread overview]
Message-ID: <1j33xqhktl.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <20260710-axp318-regulator-v2-3-ee5f1c56b49f@baylibre.com> (Jerome Brunet's message of "Fri, 10 Jul 2026 18:19:27 +0200")

On ven. 10 juil. 2026 at 18:19, Jerome Brunet <jbrunet@baylibre.com> wrote:

> From: Andre Przywara <andre.przywara@arm.com>
>
> The X-Powers AXP318W is a typical PMIC from X-Powers, featuring nine
> DC/DC converters and 28 LDOs, on the regulator side.
>
> Describe the chip's voltage settings and switch registers, how the
> voltages are encoded, and connect this to the MFD device via its
> regulator ID.
> We use just "318" for the internal identifiers, for easier typing and
> less churn. If something else other than the "AXP318W" shows up, that's
> an easy change, externally visible strings carry the additional letter
> already.
>
> Reviewed-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> Co-developed-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>  drivers/regulator/axp20x-regulator.c | 298 ++++++++++++++++++++++++++++++++++-
>  include/linux/mfd/axp20x.h           |  43 +++++
>  2 files changed, 333 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/regulator/axp20x-regulator.c b/drivers/regulator/axp20x-regulator.c
> index da891415efc0..bc8d3aa2bd67 100644
> --- a/drivers/regulator/axp20x-regulator.c
> +++ b/drivers/regulator/axp20x-regulator.c
> @@ -138,6 +138,31 @@
>  #define AXP313A_DCDC_V_OUT_MASK		GENMASK(6, 0)
>  #define AXP313A_LDO_V_OUT_MASK		GENMASK(4, 0)
>  
> +#define AXP318_DCDC1_V_OUT_MASK		GENMASK(4, 0)
> +#define AXP318_DCDC2_V_OUT_MASK		GENMASK(6, 0)
> +#define AXP318_LDO_V_OUT_MASK		GENMASK(4, 0)
> +#define AXP318_ELDO_V_OUT_MASK		GENMASK(5, 0)
> +#define AXP318_DCDC2_NUM_VOLTAGES	88
> +#define AXP318_DCDC6_NUM_VOLTAGES	128
> +#define AXP318_DCDC7_NUM_VOLTAGES	103
> +#define AXP318_DCDC8_NUM_VOLTAGES	119

Silly me. I was sure I removed this and missed it - will be removed in v3

> +#define AXP318_THRESHOLD_VOLTAGE	1540000
> +/*
> + * FIXME:
> + * Some LDOs of the AXP318 may be fed by different supplies and
> + * the documentation repeatidly warns that output voltage must
> + * be less than the supply, which is the case for any LDO really.
> + *
> + * The best way to let the framework handle this is to set the
> + * min_dropout_uV field. However the AXP318 documentation
> + * does not provide any information about this.
> + *
> + * Realistically, it can't be less than 1uV so use this
> + * for all LDOs until we know more.
> + */
> +#define AXP318_LDO_MIN_DROPOUT		1 /* uV */
> +

  reply	other threads:[~2026-07-10 16:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 16:19 [PATCH v2 0/3] regulator: Add X-Powers AXP318W PMIC support Jerome Brunet
2026-07-10 16:19 ` [PATCH v2 1/3] dt-bindings: mfd: x-powers,axp152: Document AXP318W Jerome Brunet
2026-07-10 16:30   ` sashiko-bot
2026-07-10 16:19 ` [PATCH v2 2/3] mfd: axp20x: Add support for AXP318W PMIC Jerome Brunet
2026-07-10 16:31   ` sashiko-bot
2026-07-10 16:19 ` [PATCH v2 3/3] regulator: axp20x: add support for the AXP318W Jerome Brunet
2026-07-10 16:27   ` Jerome Brunet [this message]
2026-07-10 16:29   ` sashiko-bot
2026-07-10 17:00   ` Mark Brown
2026-07-11 12:37     ` Jerome Brunet
2026-07-10 17:02 ` [PATCH v2 0/3] regulator: Add X-Powers AXP318W PMIC support Jerome Brunet

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=1j33xqhktl.fsf@starbuckisacylon.baylibre.com \
    --to=jbrunet@baylibre.com \
    --cc=andre.przywara@arm.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --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