Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
From: Vicente Bergas <vicencb@gmail.com>
To: Kever Yang <kever.yang@rock-chips.com>
Cc: "Mark Rutland" <mark.rutland@arm.com>,
	"Alexis Ballier" <aballier@gentoo.org>,
	"Soeren Moch" <smoch@web.de>,
	"Hugh Cole-Baker" <sigmaris@gmail.com>,
	"Andy Yan" <andyshrk@gmail.com>,
	"Katsuhiro Suzuki" <katsuhiro@katsuster.net>,
	linux-rockchip@lists.infradead.org,
	"Pragnesh Patel" <Pragnesh_Patel@mentor.com>,
	"Peter Robinson" <pbrobinson@gmail.com>,
	"Nick Xie" <nick@khadas.com>,
	devicetree@vger.kernel.org,
	"Elaine Zhang" <zhangqing@rock-chips.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Akash Gajjar" <akash@openedev.com>,
	"Ezequiel Garcia" <ezequiel@collabora.com>,
	linux-arm-kernel@lists.infradead.org,
	"Andrius Štikonas" <andrius@stikonas.eu>,
	heiko@sntech.de, linux-kernel@vger.kernel.org,
	"Oskari Lemmela" <oskari@lemmela.net>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Vivek Unune" <npcomplete13@gmail.com>
Subject: Re: [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log
Date: Wed, 13 Nov 2019 18:50:57 +0100
Message-ID: <977a15a9-8469-4821-ba13-8c2c59a145e7@gmail.com> (raw)
In-Reply-To: <20191111005158.25070-3-kever.yang@rock-chips.com>

On Monday, November 11, 2019 1:51:58 AM CET, Kever Yang wrote:
> Since there is no devfreq used for vdd_log, so the vdd_log(pwm regulator)
> will be 'enable' with the dts node at a default PWM state with high or low
> output. Both too high or too low for vdd_log is not good for the board,
> add init voltage for driver to make the regulator get into a know output.
>
> Note that this will be used by U-Boot for init voltage output, and this
> is very important for it may get system hang somewhere during system
> boot up with regulator enable and without this init value.

Hi, just for reference: doing the math based on the Sapphire board
schematic, the values for vdd_log are:
|------|-------|
| PWM  | Volts |
|------|-------|
| Hi-Z | 1.136 |
|   0% | 1.356 |
| 100% | .9167 |
|------|-------|
The datasheet states that the acceptable range for vdd_log is 0.8 .. 1.0
So, an option could be to configure GPIO1_C3 as output high and vdd_log
would be at the range's center.

Aside from math on paper, it has been tested. Setting GPIO1_C3 as output
high gives a vdd_log of 0.922 measured volts and the board, so far, works
fine.

Regards,
  Vicente.

> CC: Elaine Zhang <zhangqing@rock-chips.com>
> CC: Peter Robinson <pbrobinson@gmail.com>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
>  arch/arm64/boot/dts/rockchip/rk3399-evb.dts          | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-firefly.dts      | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts   | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts    | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts     | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts       | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts    | 1 +
>  arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi    | 1 +
>  9 files changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts 
> b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
> index 77008dca45bc..fa241aeb11b0 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb.dts
> @@ -65,6 +65,7 @@
>  		regulator-name = "vdd_center";
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		regulator-always-on;
>  		regulator-boot-on;
>  		status = "okay";
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts 
> b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
> index 92de83dd4dbc..4e45269fcdff 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
> @@ -208,6 +208,7 @@
>  		regulator-boot-on;
>  		regulator-min-microvolt = <430000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		vin-supply = <&vcc_sys>;
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts 
> b/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts
> index c133e8d64b2a..692f3154edc3 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-hugsun-x99.dts
> @@ -100,6 +100,7 @@
>  		regulator-name = "vdd_log";
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		regulator-always-on;
>  		regulator-boot-on;
>  	};
> diff --git 
> a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi 
> b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
> index 4944d78a0a1c..c2ac80d99301 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-khadas-edge.dtsi
> @@ -79,6 +79,7 @@
>  		regulator-boot-on;
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		vin-supply = <&vsys_3v3>;
>  	};
>  
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts 
> b/arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts
> index 73be38a53796..c32abcc4ddc1 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-leez-p710.dts
> @@ -101,6 +101,7 @@
>  		regulator-boot-on;
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		vin-supply = <&vcc5v0_sys>;
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts 
> b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
> index 0541dfce924d..9d674c51f025 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts
> @@ -164,6 +164,7 @@
>  		regulator-boot-on;
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		vin-supply = <&vcc_sys>;
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts 
> b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts
> index 19f7732d728c..7d856ce1d156 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dts
> @@ -129,6 +129,7 @@
>  		regulator-boot-on;
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		vin-supply = <&vcc3v3_sys>;
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts 
> b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> index e544deb61d28..8fbccbc8bf47 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> @@ -174,6 +174,7 @@
>  		regulator-boot-on;
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1700000>;
> +		regulator-init-microvolt = <950000>;
>  		vin-supply = <&vcc5v0_sys>;
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi 
> b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
> index 1bc1579674e5..f8e2cb8c0624 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
> @@ -133,6 +133,7 @@
>  		regulator-boot-on;
>  		regulator-min-microvolt = <800000>;
>  		regulator-max-microvolt = <1400000>;
> +		regulator-init-microvolt = <950000>;
>  		vin-supply = <&vcc_sys>;
>  	};
>  };


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

  parent reply index

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11  0:51 [PATCH 1/3] arm64: dts: rockchip: Fix min voltage for rk3399-firefly vdd_log Kever Yang
2019-11-11  0:51 ` [PATCH 2/3] arm64: dts: rk3399-rock960: add vdd_log Kever Yang
2019-11-11  5:22   ` Manivannan Sadhasivam
2019-11-11  5:26     ` Manivannan Sadhasivam
2019-11-12  8:10     ` Kever Yang
2019-11-12 17:17       ` Manivannan Sadhasivam
2019-11-13  2:44         ` Kever Yang
2019-11-13  3:21           ` Manivannan Sadhasivam
2019-11-11  0:51 ` [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log Kever Yang
2019-11-11  8:42   ` Soeren Moch
2019-11-12  8:04     ` Kever Yang
2019-11-12  8:10       ` Heiko Stübner
2019-11-13  3:21         ` Kever Yang
2019-11-18  1:05           ` Heiko Stuebner
2019-11-12  8:16       ` Markus Reichl
2019-11-12  8:44         ` Sören Moch
2019-11-12  8:51           ` Markus Reichl
2019-11-12 10:02         ` Kever Yang
2019-11-12 10:19           ` Soeren Moch
2019-11-12 11:06             ` Markus Reichl
2019-11-12 11:42             ` [PATCH] arm64: dts: rockchip: Fix vdd_log on rk3399-roc-pc Markus Reichl
2019-11-18  1:03               ` Heiko Stuebner
2019-11-13 17:01   ` [PATCH 3/3] arm64: dts: rk3399: Add init voltage for vdd_log Doug Anderson
2019-11-14  1:53     ` Kever Yang
2019-11-13 17:50   ` Vicente Bergas [this message]
2019-11-18  1:04 ` [PATCH 1/3] arm64: dts: rockchip: Fix min voltage for rk3399-firefly vdd_log Heiko Stuebner

Reply instructions:

You may reply publically 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=977a15a9-8469-4821-ba13-8c2c59a145e7@gmail.com \
    --to=vicencb@gmail.com \
    --cc=Pragnesh_Patel@mentor.com \
    --cc=aballier@gentoo.org \
    --cc=akash@openedev.com \
    --cc=andrius@stikonas.eu \
    --cc=andyshrk@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@collabora.com \
    --cc=heiko@sntech.de \
    --cc=katsuhiro@katsuster.net \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=nick@khadas.com \
    --cc=npcomplete13@gmail.com \
    --cc=oskari@lemmela.net \
    --cc=pbrobinson@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sigmaris@gmail.com \
    --cc=smoch@web.de \
    --cc=zhangqing@rock-chips.com \
    /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

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git