Linux-RISC-V Archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: plr.vincent@gmail.com
Cc: robh+dt@kernel.org, Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, krzysztof.kozlowski@canonical.com,
	qiuwenbo@kylinos.com.cn,  devicetree@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	david.abdurachmanov@sifive.com
Subject: Re: [PATCH v3 5/6] riscv: dts: sifive unmatched: Fix regulator for board rev3
Date: Thu, 02 Dec 2021 13:42:09 -0800 (PST)	[thread overview]
Message-ID: <mhng-25baa8a5-d7c1-4a37-8489-123fd12499f0@palmer-ri-x1c9> (raw)
In-Reply-To: <537742e7af4a21baf79429469ba7c30947ddca7a.1637362542.git.plr.vincent@gmail.com>

On Fri, 19 Nov 2021 14:55:41 PST (-0800), plr.vincent@gmail.com wrote:
> The existing values are rejected by the da9063 regulator driver, as they
> are unachievable with the declared chip setup (non-merged vcore and bmem
> are unable to provide the declared curent).
>
> Fix voltages to match rev3 schematics, which also matches their boot-up

There's a few references to rev 3 here.  I'm not sure if that means we 
should have multiple device trees -- this one seems pretty benign, but 
some of the regulator stuff worries me there, where anything rev 3 
specific might not be safe on other revisions.

Did any previous revisions make it out of the lab?

> configuration within the chip's available precision.
> Declare bcore1/bcore2 and bmem/bio as merged.
> Set ldo09 and ldo10 as always-on as their consumers are not declared but
> exist.
> Drop ldo current limits as there is no current limit feature for these
> regulators in the DA9063. Fixes warnings like:
>   DA9063_LDO3: Operation of current configuration missing
>
> Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
>
> ---
> Changes since v2:
> - Fix end-of-commit-message separator so change lists do not end up in them.
> Changes since v1:
> - Remove trailing "." on subject line.
> ---
>  .../boot/dts/sifive/hifive-unmatched-a00.dts  | 84 ++++++-------------
>  1 file changed, 24 insertions(+), 60 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> index 6e7775fdae32..1abad0eec02e 100644
> --- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> +++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
> @@ -93,47 +93,31 @@ wdt {
>  		};
>
>  		regulators {
> -			vdd_bcore1: bcore1 {
> -				regulator-min-microvolt = <900000>;
> -				regulator-max-microvolt = <900000>;
> -				regulator-min-microamp = <5000000>;
> -				regulator-max-microamp = <5000000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_bcore2: bcore2 {
> -				regulator-min-microvolt = <900000>;
> -				regulator-max-microvolt = <900000>;
> -				regulator-min-microamp = <5000000>;
> -				regulator-max-microamp = <5000000>;
> +			vdd_bcore: bcores-merged {
> +				regulator-min-microvolt = <1050000>;
> +				regulator-max-microvolt = <1050000>;
> +				regulator-min-microamp = <4800000>;
> +				regulator-max-microamp = <4800000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_bpro: bpro {
>  				regulator-min-microvolt = <1800000>;
>  				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <2500000>;
> -				regulator-max-microamp = <2500000>;
> +				regulator-min-microamp = <2400000>;
> +				regulator-max-microamp = <2400000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_bperi: bperi {
> -				regulator-min-microvolt = <1050000>;
> -				regulator-max-microvolt = <1050000>;
> +				regulator-min-microvolt = <1060000>;
> +				regulator-max-microvolt = <1060000>;
>  				regulator-min-microamp = <1500000>;
>  				regulator-max-microamp = <1500000>;
>  				regulator-always-on;
>  			};
>
> -			vdd_bmem: bmem {
> -				regulator-min-microvolt = <1200000>;
> -				regulator-max-microvolt = <1200000>;
> -				regulator-min-microamp = <3000000>;
> -				regulator-max-microamp = <3000000>;
> -				regulator-always-on;
> -			};
> -
> -			vdd_bio: bio {
> +			vdd_bmem_bio: bmem-bio-merged {
>  				regulator-min-microvolt = <1200000>;
>  				regulator-max-microvolt = <1200000>;
>  				regulator-min-microamp = <3000000>;
> @@ -144,86 +128,66 @@ vdd_bio: bio {
>  			vdd_ldo1: ldo1 {
>  				regulator-min-microvolt = <1800000>;
>  				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <100000>;
> -				regulator-max-microamp = <100000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ldo2: ldo2 {
>  				regulator-min-microvolt = <1800000>;
>  				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <200000>;
> -				regulator-max-microamp = <200000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ldo3: ldo3 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <200000>;
> -				regulator-max-microamp = <200000>;
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ldo4: ldo4 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <200000>;
> -				regulator-max-microamp = <200000>;
> +				regulator-min-microvolt = <2500000>;
> +				regulator-max-microvolt = <2500000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ldo5: ldo5 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <100000>;
> -				regulator-max-microamp = <100000>;
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ldo6: ldo6 {
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> -				regulator-min-microamp = <200000>;
> -				regulator-max-microamp = <200000>;
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ldo7: ldo7 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <200000>;
> -				regulator-max-microamp = <200000>;
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ldo8: ldo8 {
> -				regulator-min-microvolt = <1800000>;
> -				regulator-max-microvolt = <1800000>;
> -				regulator-min-microamp = <200000>;
> -				regulator-max-microamp = <200000>;
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
>  				regulator-always-on;
>  			};
>
>  			vdd_ld09: ldo9 {
>  				regulator-min-microvolt = <1050000>;
>  				regulator-max-microvolt = <1050000>;
> -				regulator-min-microamp = <200000>;
> -				regulator-max-microamp = <200000>;
> +				regulator-always-on;
>  			};
>
>  			vdd_ldo10: ldo10 {
>  				regulator-min-microvolt = <1000000>;
>  				regulator-max-microvolt = <1000000>;
> -				regulator-min-microamp = <300000>;
> -				regulator-max-microamp = <300000>;
> +				regulator-always-on;
>  			};
>
>  			vdd_ldo11: ldo11 {
>  				regulator-min-microvolt = <2500000>;
>  				regulator-max-microvolt = <2500000>;
> -				regulator-min-microamp = <300000>;
> -				regulator-max-microamp = <300000>;
>  				regulator-always-on;
>  			};
>  		};

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2021-12-02 21:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 22:55 [PATCH v3 1/6] riscv: dts: sifive unmatched: Name gpio lines Vincent Pelletier
2021-11-19 22:55 ` [PATCH v3 2/6] riscv: dts: sifive unmatched: Expose the board ID eeprom Vincent Pelletier
2021-11-21 17:23   ` Krzysztof Kozlowski
2021-11-19 22:55 ` [PATCH v3 3/6] riscv: dts: sifive unmatched: Expose the PMIC sub-functions Vincent Pelletier
2021-11-19 22:55 ` [PATCH v3 4/6] riscv: dts: sifive unmatched: Expose the FU740 core supply regulator Vincent Pelletier
2021-11-21 17:24   ` Krzysztof Kozlowski
2021-12-17  5:35   ` Palmer Dabbelt
2021-12-19 21:56     ` Heiko Stübner
2021-12-19 22:14       ` Rob Herring
2021-11-19 22:55 ` [PATCH v3 5/6] riscv: dts: sifive unmatched: Fix regulator for board rev3 Vincent Pelletier
2021-12-02 21:42   ` Palmer Dabbelt [this message]
2021-12-03  3:55     ` David Abdurachmanov
2021-11-19 22:55 ` [PATCH v3 6/6] riscv: dts: sifive unmatched: Link the tmp451 with its power supply Vincent Pelletier
2021-11-21 17:25   ` Krzysztof Kozlowski

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=mhng-25baa8a5-d7c1-4a37-8489-123fd12499f0@palmer-ri-x1c9 \
    --to=palmer@dabbelt.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=david.abdurachmanov@sifive.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=paul.walmsley@sifive.com \
    --cc=plr.vincent@gmail.com \
    --cc=qiuwenbo@kylinos.com.cn \
    --cc=robh+dt@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).