The min/max value of vdd_log is decide by pwm IO voltage and its
resistors, the rk3399-firefly board's pwm regulator circuit is designed
for IO voltage at 1.8V, while the board actually use 3.0V for IO, which
at last lead to the min-microvolt to '430mV' instead of '800mV'.
Signed-off-by: Kever Yang <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399-firefly.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
index c706db0ee9ec..92de83dd4dbc 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-firefly.dts
@@ -206,7 +206,7 @@
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
- regulator-min-microvolt = <800000>;
+ regulator-min-microvolt = <430000>;
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc_sys>;
};
--
2.17.1
Add vdd_log node according to rock960 schematic V13.
Signed-off-by: Kever Yang <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
index c7d48d41e184..73afee257115 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
@@ -76,6 +76,18 @@
regulator-always-on;
vin-supply = <&vcc5v0_sys>;
};
+
+ vdd_log: vdd-log {
+ compatible = "pwm-regulator";
+ pwms = <&pwm2 0 25000 1>;
+ regulator-name = "vdd_log";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-init-microvolt = <950000>;
+ vin-supply = <&vcc_sys>;
+ };
};
&cpu_l0 {
--
2.17.1
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.
CC: Elaine Zhang <[email protected]>
CC: Peter Robinson <[email protected]>
Signed-off-by: Kever Yang <[email protected]>
---
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>;
};
};
--
2.17.1
Hi Kever,
On Mon, Nov 11, 2019 at 08:51:57AM +0800, Kever Yang wrote:
> Add vdd_log node according to rock960 schematic V13.
>
> Signed-off-by: Kever Yang <[email protected]>
> ---
>
> arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> index c7d48d41e184..73afee257115 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> @@ -76,6 +76,18 @@
> regulator-always-on;
> vin-supply = <&vcc5v0_sys>;
> };
> +
> + vdd_log: vdd-log {
> + compatible = "pwm-regulator";
> + pwms = <&pwm2 0 25000 1>;
> + regulator-name = "vdd_log";
> + regulator-always-on;
> + regulator-boot-on;
> + regulator-min-microvolt = <800000>;
> + regulator-max-microvolt = <1400000>;
> + regulator-init-microvolt = <950000>;
The default value seems to be 0.9v as per both Rock960 and Ficus schematics.
Other than that,
Acked-by: Manivannan Sadhasivam <[email protected]>
Thanks,
Mani
> + vin-supply = <&vcc_sys>;
> + };
> };
>
> &cpu_l0 {
> --
> 2.17.1
>
On Mon, Nov 11, 2019 at 10:52:32AM +0530, Manivannan Sadhasivam wrote:
> Hi Kever,
>
> On Mon, Nov 11, 2019 at 08:51:57AM +0800, Kever Yang wrote:
> > Add vdd_log node according to rock960 schematic V13.
> >
Forgot to mention that rk3399-rock960.dtsi is common for both Rock960
Model A and Ficus boards. So the commit message should mention it clearly.
Otherwise people will get confused that the patch is only affecting Rock960
boards.
Thanks,
Mani
> > Signed-off-by: Kever Yang <[email protected]>
> > ---
> >
> > arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > index c7d48d41e184..73afee257115 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > @@ -76,6 +76,18 @@
> > regulator-always-on;
> > vin-supply = <&vcc5v0_sys>;
> > };
> > +
> > + vdd_log: vdd-log {
> > + compatible = "pwm-regulator";
> > + pwms = <&pwm2 0 25000 1>;
> > + regulator-name = "vdd_log";
> > + regulator-always-on;
> > + regulator-boot-on;
> > + regulator-min-microvolt = <800000>;
> > + regulator-max-microvolt = <1400000>;
> > + regulator-init-microvolt = <950000>;
>
> The default value seems to be 0.9v as per both Rock960 and Ficus schematics.
>
> Other than that,
> Acked-by: Manivannan Sadhasivam <[email protected]>
>
> Thanks,
> Mani
>
> > + vin-supply = <&vcc_sys>;
> > + };
> > };
> >
> > &cpu_l0 {
> > --
> > 2.17.1
> >
On 11.11.19 01:51, 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.
I think it's a good idea to include this setting in the main dts for the
boards (not in u-boot specific additions as is done now). But there is
(for some reason?) no documented binding for regulator-init-microvolt in
linux.
Regards,
Soeren
>
> CC: Elaine Zhang <[email protected]>
> CC: Peter Robinson <[email protected]>
> Signed-off-by: Kever Yang <[email protected]>
> ---
>
> 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>;
> };
> };
On 2019/11/11 下午1:22, Manivannan Sadhasivam wrote:
> Hi Kever,
>
> On Mon, Nov 11, 2019 at 08:51:57AM +0800, Kever Yang wrote:
>> Add vdd_log node according to rock960 schematic V13.
>>
>> Signed-off-by: Kever Yang <[email protected]>
>> ---
>>
>> arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
>> index c7d48d41e184..73afee257115 100644
>> --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
>> @@ -76,6 +76,18 @@
>> regulator-always-on;
>> vin-supply = <&vcc5v0_sys>;
>> };
>> +
>> + vdd_log: vdd-log {
>> + compatible = "pwm-regulator";
>> + pwms = <&pwm2 0 25000 1>;
>> + regulator-name = "vdd_log";
>> + regulator-always-on;
>> + regulator-boot-on;
>> + regulator-min-microvolt = <800000>;
>> + regulator-max-microvolt = <1400000>;
>> + regulator-init-microvolt = <950000>;
> The default value seems to be 0.9v as per both Rock960 and Ficus schematics.
The default value is 0.9V when pwm-regulator is not enabled, and this
'init-microvolt' suppose to set the
init value when pwm-regulator is enabled. I set this to 950mV because
Peter report that he experience
the system hang during Fedora boot up, and update the vdd_log to 950mV
can fix the issue due to
engineer measure on another rk3399 board puma-Q7.
Thanks,
- Kever
>
> Other than that,
> Acked-by: Manivannan Sadhasivam <[email protected]>
>
> Thanks,
> Mani
>
>> + vin-supply = <&vcc_sys>;
>> + };
>> };
>>
>> &cpu_l0 {
>> --
>> 2.17.1
>>
Hi Kever,
Am Dienstag, 12. November 2019, 09:04:49 CET schrieb Kever Yang:
>
> On 2019/11/11 下午4:42, Soeren Moch wrote:
> > On 11.11.19 01:51, 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.
> > I think it's a good idea to include this setting in the main dts for the
> > boards (not in u-boot specific additions as is done now). But there is
> > (for some reason?) no documented binding for regulator-init-microvolt in
> > linux.
>
>
> Ohh, I forgot the kernel driver does not support this property.
>
> @Heiko, can we add this 'regulator-init-microvolt' without driver
> support but adding document for
>
> it at dt-binding?
In theory yes, but you would still need to get DT maintainers
and Mark Brown (regulator maintainer) involved before that.
Especially as this is a individual property you will need to have
a good excuse why you're not implementing it in the kernel as well.
And of course you will need to keep in mind that it might be
in the kernel in the future.
Heiko
>
>
> Thanks,
>
> - Kever
>
> >
> > Regards,
> > Soeren
> >> CC: Elaine Zhang <[email protected]>
> >> CC: Peter Robinson <[email protected]>
> >> Signed-off-by: Kever Yang <[email protected]>
> >> ---
> >>
> >> 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>;
> >> };
> >> };
>
>
>
On 2019/11/11 下午4:42, Soeren Moch wrote:
> On 11.11.19 01:51, 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.
> I think it's a good idea to include this setting in the main dts for the
> boards (not in u-boot specific additions as is done now). But there is
> (for some reason?) no documented binding for regulator-init-microvolt in
> linux.
Ohh, I forgot the kernel driver does not support this property.
@Heiko, can we add this 'regulator-init-microvolt' without driver
support but adding document for
it at dt-binding?
Thanks,
- Kever
>
> Regards,
> Soeren
>> CC: Elaine Zhang <[email protected]>
>> CC: Peter Robinson <[email protected]>
>> Signed-off-by: Kever Yang <[email protected]>
>> ---
>>
>> 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>;
>> };
>> };
Hi Kever,
have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is
showing 1118 mV.
Is this a danger for the board?
How to fix it?
Btw. vin-supply for this pwm-regulator is ignored and I could not find it
in bindings doc.
Gruß,
--
Markus Reichl
Am 12.11.19 um 09:04 schrieb Kever Yang:
>
> On 2019/11/11 下午4:42, Soeren Moch wrote:
>> On 11.11.19 01:51, 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.
>> I think it's a good idea to include this setting in the main dts for the
>> boards (not in u-boot specific additions as is done now). But there is
>> (for some reason?) no documented binding for regulator-init-microvolt in
>> linux.
>
>
> Ohh, I forgot the kernel driver does not support this property.
>
> @Heiko, can we add this 'regulator-init-microvolt' without driver support but adding document for
>
> it at dt-binding?
>
>
> Thanks,
>
> - Kever
>
>>
>> Regards,
>> Soeren
>>> CC: Elaine Zhang <[email protected]>
>>> CC: Peter Robinson <[email protected]>
>>> Signed-off-by: Kever Yang <[email protected]>
>>> ---
>>>
>>> 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-rockchip mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
On 12.11.19 09:16, Markus Reichl wrote:
> Hi Kever,
>
> have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is
> showing 1118 mV.
> Is this a danger for the board?
I think yes. What I read vdd_log on rk3399 must not exceed 1.0V.
> How to fix it?
You probably need to do something like [1].
[1] https://patchwork.kernel.org/patch/11173465/
Gruß,
Sören
> Btw. vin-supply for this pwm-regulator is ignored and I could not find it
> in bindings doc.
>
> Gruß,
Thanks Sören,
Am 12.11.19 um 09:44 schrieb Sören Moch:
> On 12.11.19 09:16, Markus Reichl wrote:
>> Hi Kever,
>>
>> have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is
>> showing 1118 mV.
>> Is this a danger for the board?
> I think yes. What I read vdd_log on rk3399 must not exceed 1.0V.
>> How to fix it?
> You probably need to do something like [1].
will measure and come up with a patch.
>
> [1] https://patchwork.kernel.org/patch/11173465/
>
> Gruß,
> Sören
>> Btw. vin-supply for this pwm-regulator is ignored and I could not find it
>> in bindings doc.
>>
> Gruß,
--
Markus Reichl
Markus,
On 2019/11/12 下午4:16, Markus Reichl wrote:
> Hi Kever,
>
> have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is
> showing 1118 mV.
The rk3399-roc-pc have the same vdd_log circuit in schematic, so it
should like the patch 1/3 of
this patch set.
I don't understand who is setting this value, maybe the default value
without pwm regulator enabled?
> Is this a danger for the board?
> How to fix it?
The best way is to set correct min/max microvolt of the
regulator(measure with PWM output low and high),
(note that if no driver touch the regulator, the PWM is default input,
not output;)
and set a init-microvolt for U-Boot driver, and I think no kernel driver
touch this regulator now.
Thanks,
- Kever
> Btw. vin-supply for this pwm-regulator is ignored and I could not find it
> in bindings doc.
>
> Gruß,
On 12.11.19 11:02, Kever Yang wrote:
> Markus,
>
>
> On 2019/11/12 下午4:16, Markus Reichl wrote:
>> Hi Kever,
>>
>> have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is
>> showing 1118 mV.
>
> The rk3399-roc-pc have the same vdd_log circuit in schematic, so it
> should like the patch 1/3 of
>
> this patch set.
>
> I don't understand who is setting this value, maybe the default value
> without pwm regulator enabled?
>
>> Is this a danger for the board?
>> How to fix it?
>
> The best way is to set correct min/max microvolt of the
> regulator(measure with PWM output low and high),
I didn't look into the schematic of this board, but if it is similar to
RockPro64, setting the pwm regulator to the max voltage of 1.7V will
probably kill the rk3399 immediately. So I recommend not to do this...
Regards,
Soeren
>
> (note that if no driver touch the regulator, the PWM is default
> input, not output;)
> to
> and set a init-microvolt for U-Boot driver, and I think no kernel
> driver touch this regulator now.
>
>
> Thanks,
>
> - Kever
>
>> Btw. vin-supply for this pwm-regulator is ignored and I could not
>> find it
>> in bindings doc.
>>
>> Gruß,
>
>
Dear Sore, Kever,
Am 12.11.19 um 11:19 schrieb Soeren Moch:
>
>
> On 12.11.19 11:02, Kever Yang wrote:
>> Markus,
>>
>>
>> On 2019/11/12 下午4:16, Markus Reichl wrote:
>>> Hi Kever,
>>>
>>> have a rk3399-roc-pc running mainline U-Boot and kernel and vdd_log is
>>> showing 1118 mV.
>>
>> The rk3399-roc-pc have the same vdd_log circuit in schematic, so it
>> should like the patch 1/3 of
>>
>> this patch set.
>>
>> I don't understand who is setting this value, maybe the default value
>> without pwm regulator enabled?
>>
>>> Is this a danger for the board?
>>> How to fix it?
>>
>> The best way is to set correct min/max microvolt of the
>> regulator(measure with PWM output low and high),
> I didn't look into the schematic of this board, but if it is similar to
> RockPro64, setting the pwm regulator to the max voltage of 1.7V will
> probably kill the rk3399 immediately. So I recommend not to do this...
>
It has to be set to 450mV - 1400mV to give 953mV.
I will come out with a patch that fixes this.
> Regards,
> Soeren
>>
>> (note that if no driver touch the regulator, the PWM is default
>> input, not output;)
>> to
>> and set a init-microvolt for U-Boot driver, and I think no kernel
>> driver touch this regulator now.
>>
>>
>> Thanks,
>>
>> - Kever
>>
>>> Btw. vin-supply for this pwm-regulator is ignored and I could not
>>> find it
>>> in bindings doc.
>>>
>>> Gruß,
>>
>>
>
>
> _______________________________________________
> Linux-rockchip mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
Gruß,
--
Markus Reichl
On rk3399 vdd_log shall not exceed 1.0 V. On rk3399-roc-pc
vdd_log is presently 1118 mV. Fix by setting the min voltage
of the respective pwm-regulator down to 450 mV.
This results in a vdd_log of 953 mV.
Specify the supply to silence warning.
Signed-off-by: Markus Reichl <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
index a31099f7620b..4dac88ef7e72 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
@@ -211,9 +211,9 @@
regulator-name = "vdd_log";
regulator-always-on;
regulator-boot-on;
- regulator-min-microvolt = <800000>;
+ regulator-min-microvolt = <450000>;
regulator-max-microvolt = <1400000>;
- vin-supply = <&vcc3v3_sys>;
+ pwm-supply = <&vcc3v3_sys>;
};
};
--
2.20.1
On Tue, Nov 12, 2019 at 04:10:17PM +0800, Kever Yang wrote:
>
> On 2019/11/11 下午1:22, Manivannan Sadhasivam wrote:
> > Hi Kever,
> >
> > On Mon, Nov 11, 2019 at 08:51:57AM +0800, Kever Yang wrote:
> > > Add vdd_log node according to rock960 schematic V13.
> > >
> > > Signed-off-by: Kever Yang <[email protected]>
> > > ---
> > >
> > > arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
> > > 1 file changed, 12 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > > index c7d48d41e184..73afee257115 100644
> > > --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > > @@ -76,6 +76,18 @@
> > > regulator-always-on;
> > > vin-supply = <&vcc5v0_sys>;
> > > };
> > > +
> > > + vdd_log: vdd-log {
> > > + compatible = "pwm-regulator";
> > > + pwms = <&pwm2 0 25000 1>;
> > > + regulator-name = "vdd_log";
> > > + regulator-always-on;
> > > + regulator-boot-on;
> > > + regulator-min-microvolt = <800000>;
> > > + regulator-max-microvolt = <1400000>;
> > > + regulator-init-microvolt = <950000>;
> > The default value seems to be 0.9v as per both Rock960 and Ficus schematics.
>
>
> The default value is 0.9V when pwm-regulator is not enabled, and this
> 'init-microvolt' suppose to set the
>
> init value when pwm-regulator is enabled. I set this to 950mV because Peter
> report that he experience
>
> the system hang during Fedora boot up, and update the vdd_log to 950mV can
> fix the issue due to
>
> engineer measure on another rk3399 board puma-Q7.
>
okay. Previously we had post-boot hang issue on Rock960 Model A boards when the
performance governor was set as default. So the vdd_log node was removed from
the devicetree. Have you tested that case also?
Here is the commit:
13682e524167 ("arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues")
thanks,
Mani
>
> Thanks,
>
> - Kever
>
> >
> > Other than that,
> > Acked-by: Manivannan Sadhasivam <[email protected]>
> >
> > Thanks,
> > Mani
> >
> > > + vin-supply = <&vcc_sys>;
> > > + };
> > > };
> > > &cpu_l0 {
> > > --
> > > 2.17.1
> > >
>
>
Hi Manivannan,
On 2019/11/13 上午1:17, Manivannan Sadhasivam wrote:
> On Tue, Nov 12, 2019 at 04:10:17PM +0800, Kever Yang wrote:
>> On 2019/11/11 下午1:22, Manivannan Sadhasivam wrote:
>>> Hi Kever,
>>>
>>> On Mon, Nov 11, 2019 at 08:51:57AM +0800, Kever Yang wrote:
>>>> Add vdd_log node according to rock960 schematic V13.
>>>>
>>>> Signed-off-by: Kever Yang <[email protected]>
>>>> ---
>>>>
>>>> arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
>>>> 1 file changed, 12 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
>>>> index c7d48d41e184..73afee257115 100644
>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
>>>> @@ -76,6 +76,18 @@
>>>> regulator-always-on;
>>>> vin-supply = <&vcc5v0_sys>;
>>>> };
>>>> +
>>>> + vdd_log: vdd-log {
>>>> + compatible = "pwm-regulator";
>>>> + pwms = <&pwm2 0 25000 1>;
>>>> + regulator-name = "vdd_log";
>>>> + regulator-always-on;
>>>> + regulator-boot-on;
>>>> + regulator-min-microvolt = <800000>;
>>>> + regulator-max-microvolt = <1400000>;
>>>> + regulator-init-microvolt = <950000>;
>>> The default value seems to be 0.9v as per both Rock960 and Ficus schematics.
>>
>> The default value is 0.9V when pwm-regulator is not enabled, and this
>> 'init-microvolt' suppose to set the
>>
>> init value when pwm-regulator is enabled. I set this to 950mV because Peter
>> report that he experience
>>
>> the system hang during Fedora boot up, and update the vdd_log to 950mV can
>> fix the issue due to
>>
>> engineer measure on another rk3399 board puma-Q7.
>>
> okay. Previously we had post-boot hang issue on Rock960 Model A boards when the
> performance governor was set as default. So the vdd_log node was removed from
> the devicetree. Have you tested that case also?
>
> Here is the commit:
> 13682e524167 ("arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues")
For rk3399, the kernel does not touch this regulator, it should be take
care by bootloader.
So I think we need to update both U-Boot and kernel.
Thanks,
- Kever
>
> thanks,
> Mani
>> Thanks,
>>
>> - Kever
>>
>>> Other than that,
>>> Acked-by: Manivannan Sadhasivam <[email protected]>
>>>
>>> Thanks,
>>> Mani
>>>
>>>> + vin-supply = <&vcc_sys>;
>>>> + };
>>>> };
>>>> &cpu_l0 {
>>>> --
>>>> 2.17.1
>>>>
>>
Hi Kever,
On Wed, Nov 13, 2019 at 10:44:02AM +0800, Kever Yang wrote:
> Hi Manivannan,
>
> On 2019/11/13 上午1:17, Manivannan Sadhasivam wrote:
> > On Tue, Nov 12, 2019 at 04:10:17PM +0800, Kever Yang wrote:
> > > On 2019/11/11 下午1:22, Manivannan Sadhasivam wrote:
> > > > Hi Kever,
> > > >
> > > > On Mon, Nov 11, 2019 at 08:51:57AM +0800, Kever Yang wrote:
> > > > > Add vdd_log node according to rock960 schematic V13.
> > > > >
> > > > > Signed-off-by: Kever Yang <[email protected]>
> > > > > ---
> > > > >
> > > > > arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi | 12 ++++++++++++
> > > > > 1 file changed, 12 insertions(+)
> > > > >
> > > > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > > > > index c7d48d41e184..73afee257115 100644
> > > > > --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > > > > +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi
> > > > > @@ -76,6 +76,18 @@
> > > > > regulator-always-on;
> > > > > vin-supply = <&vcc5v0_sys>;
> > > > > };
> > > > > +
> > > > > + vdd_log: vdd-log {
> > > > > + compatible = "pwm-regulator";
> > > > > + pwms = <&pwm2 0 25000 1>;
> > > > > + regulator-name = "vdd_log";
> > > > > + regulator-always-on;
> > > > > + regulator-boot-on;
> > > > > + regulator-min-microvolt = <800000>;
> > > > > + regulator-max-microvolt = <1400000>;
> > > > > + regulator-init-microvolt = <950000>;
> > > > The default value seems to be 0.9v as per both Rock960 and Ficus schematics.
> > >
> > > The default value is 0.9V when pwm-regulator is not enabled, and this
> > > 'init-microvolt' suppose to set the
> > >
> > > init value when pwm-regulator is enabled. I set this to 950mV because Peter
> > > report that he experience
> > >
> > > the system hang during Fedora boot up, and update the vdd_log to 950mV can
> > > fix the issue due to
> > >
> > > engineer measure on another rk3399 board puma-Q7.
> > >
> > okay. Previously we had post-boot hang issue on Rock960 Model A boards when the
> > performance governor was set as default. So the vdd_log node was removed from
> > the devicetree. Have you tested that case also?
> >
> > Here is the commit:
> > 13682e524167 ("arm64: dts: rockchip: remove vdd_log from rock960 to fix a stability issues")
>
>
> For rk3399, the kernel does not touch this regulator, it should be take care
> by bootloader.
>
> So I think we need to update both U-Boot and kernel.
>
Hmm, okay. I will try to test these patches soon and share the observation here.
Thanks,
Mani
>
> Thanks,
>
> - Kever
>
> >
> > thanks,
> > Mani
> > > Thanks,
> > >
> > > - Kever
> > >
> > > > Other than that,
> > > > Acked-by: Manivannan Sadhasivam <[email protected]>
> > > >
> > > > Thanks,
> > > > Mani
> > > >
> > > > > + vin-supply = <&vcc_sys>;
> > > > > + };
> > > > > };
> > > > > &cpu_l0 {
> > > > > --
> > > > > 2.17.1
> > > > >
> > >
>
>
Heiko,
Could you help to just pick the first patch and drop the other 2
patches?
I think it's better to fix in the U-Boot first so that the
stability issue will be fixed,
and the update in kernel dts is not so urgent for kernel driver actually
not setting
this pwm regulator.
I want to add a patch for rk3399-roc-pc, since Markus Reichl
already send it,
so it's OK for that board, and for rock960/Ficus, the vdd_log is removed
for stability
issue, then we have to update U-Boot first before kernel can add the
vdd_log back.
Thanks,
- Kever
On 2019/11/12 下午4:10, Heiko Stübner wrote:
> Hi Kever,
>
> Am Dienstag, 12. November 2019, 09:04:49 CET schrieb Kever Yang:
>> On 2019/11/11 下午4:42, Soeren Moch wrote:
>>> On 11.11.19 01:51, 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.
>>> I think it's a good idea to include this setting in the main dts for the
>>> boards (not in u-boot specific additions as is done now). But there is
>>> (for some reason?) no documented binding for regulator-init-microvolt in
>>> linux.
>>
>> Ohh, I forgot the kernel driver does not support this property.
>>
>> @Heiko, can we add this 'regulator-init-microvolt' without driver
>> support but adding document for
>>
>> it at dt-binding?
> In theory yes, but you would still need to get DT maintainers
> and Mark Brown (regulator maintainer) involved before that.
>
> Especially as this is a individual property you will need to have
> a good excuse why you're not implementing it in the kernel as well.
>
> And of course you will need to keep in mind that it might be
> in the kernel in the future.
>
>
> Heiko
>
>
>
>>
>> Thanks,
>>
>> - Kever
>>
>>> Regards,
>>> Soeren
>>>> CC: Elaine Zhang <[email protected]>
>>>> CC: Peter Robinson <[email protected]>
>>>> Signed-off-by: Kever Yang <[email protected]>
>>>> ---
>>>>
>>>> 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>;
>>>> };
>>>> };
>>
>>
>
>
>
Hi,
On Sun, Nov 10, 2019 at 4:52 PM Kever Yang <[email protected]> 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.
I'm a tad bit confused here. When U-Boot boots the kernel, how is the
PWM configured?
I remember folks going through a lot of work to make sure that we
could actually _read_ the PWM state that the bootloader gave us and
report it as the initial voltage. If the kernel ends up needing to
configure the PWM regulator's period for some reason, I remember it
would actually pick something close. Is that not working for you?
For instance, on rk3288-veyron when I boot up mainline (no devfreq on
rk3288-veyron on mainline) the vdd_logic reports 1.2 volts because it
read what the bootloader left it as.
...are you saying that U-Boot doesn't configure the PWM and you're
trying to fix it up in the kernel?
-Doug
-Doug
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 <[email protected]>
> CC: Peter Robinson <[email protected]>
> Signed-off-by: Kever Yang <[email protected]>
> ---
>
> 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>;
> };
> };
Hi Doug,
On 2019/11/14 上午1:01, Doug Anderson wrote:
> Hi,
>
> On Sun, Nov 10, 2019 at 4:52 PM Kever Yang <[email protected]> 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.
> I'm a tad bit confused here. When U-Boot boots the kernel, how is the
> PWM configured?
>
> I remember folks going through a lot of work to make sure that we
> could actually _read_ the PWM state that the bootloader gave us and
> report it as the initial voltage. If the kernel ends up needing to
> configure the PWM regulator's period for some reason, I remember it
> would actually pick something close. Is that not working for you?
>
> For instance, on rk3288-veyron when I boot up mainline (no devfreq on
> rk3288-veyron on mainline) the vdd_logic reports 1.2 volts because it
> read what the bootloader left it as.
>
> ...are you saying that U-Boot doesn't configure the PWM and you're
> trying to fix it up in the kernel?
U-Boot will configure the PWM with dts setting(and now U-Boot would like
to sync the dts
from kernel directly):
- no dts node for pwm regulator, it will be default as input IO without
any configure;
- with pwm regulator dts enable, no 'init-microvolt', enable PWM with
default 0% output;
- with pwm regulator dts with 'init-microvolt', enable PWM with
corresponding duty output;
We should leave it not configure(around 0.9V for most of board) or
configure to correct
output(some boards need 0.95V while default is 0.9V for stability issue).
For the rk3399 boards on upstream, some of them do not have a vdd_log in
dts,
and others have dts node but without 'init-microvolt' for init setting,
that's what I want
to fix to make sure all the boards can work correctly.
Thanks,
- Kever
>
> -Doug
>
>
> -Doug
>
> _______________________________________________
> Linux-rockchip mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
Am Dienstag, 12. November 2019, 12:42:09 CET schrieb Markus Reichl:
> On rk3399 vdd_log shall not exceed 1.0 V. On rk3399-roc-pc
> vdd_log is presently 1118 mV. Fix by setting the min voltage
> of the respective pwm-regulator down to 450 mV.
> This results in a vdd_log of 953 mV.
> Specify the supply to silence warning.
>
> Signed-off-by: Markus Reichl <[email protected]>
applied for 5.6 (or maybe still 5.5)
Thanks
Heiko
Am Montag, 11. November 2019, 01:51:56 CET schrieb Kever Yang:
> The min/max value of vdd_log is decide by pwm IO voltage and its
> resistors, the rk3399-firefly board's pwm regulator circuit is designed
> for IO voltage at 1.8V, while the board actually use 3.0V for IO, which
> at last lead to the min-microvolt to '430mV' instead of '800mV'.
>
> Signed-off-by: Kever Yang <[email protected]>
applied for 5.6 (or maybe still 5.5)
Thanks
Heiko
Hi Kever,
Am Mittwoch, 13. November 2019, 04:21:35 CET schrieb Kever Yang:
> Heiko,
>
> Could you help to just pick the first patch and drop the other 2
> patches?
I did as requested now :-)
Heiko