2019-08-28 20:28:43

by Anand Moon

[permalink] [raw]
Subject: [PATCHv1 0/3] Odroid c2 missing regulator linking

Below small changes help re-configure or fix missing inter linking
of regulator node.

Changes based top on my prevoius series.

[0] https://patchwork.kernel.org/cover/11113091/

TOOD: Add support for DVFS GXBB odroid board in next series.

Best Regards
-Anand

Anand Moon (3):
arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0
regulator
arm64: dts: meson: odroid-c2: Add missing regulator linked to
VDDIO_AO3V3 regulator
arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI
supply

.../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 44 ++++++++++++++++---
1 file changed, 38 insertions(+), 6 deletions(-)

--
2.23.0


2019-08-28 20:28:53

by Anand Moon

[permalink] [raw]
Subject: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator

As per shematics VDDIO_AO18, VDDIO_AO3V3/VDD3V3 DDR3_1V5/DDR_VDDC:
fixed regulator output which is supplied by P5V0.

Rename vcc3v3 regulator node to vddio_ao3v3 as per shematics.

Cc: Martin Blumenstingl <[email protected]>
Cc: Jerome Brunet <[email protected]>
Cc: Neil Armstrong <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
.../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 +++++++++++++++++--
1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 792698a60a12..98e742bf44c1 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -104,11 +104,34 @@
regulator-max-microvolt = <1800000>;
};

- vcc3v3: regulator-vcc3v3 {
+ vddio_ao1v8: regulator-vddio-ao1v8 {
compatible = "regulator-fixed";
- regulator-name = "VCC3V3";
+ regulator-name = "VDDIO_AO1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ /* U17 RT9179GB */
+ vin-supply = <&p5v0>;
+ };
+
+ vddio_ao3v3: regulator-vddio-ao3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDIO_AO3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ /* U11 MP2161GJ-C499 */
+ vin-supply = <&p5v0>;
+ };
+
+ vddc_ddr: regulator-vddc-ddr {
+ compatible = "regulator-fixed";
+ regulator-name = "DDR_VDDC";
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-always-on;
+ /* U15 MP2161GJ-C499 */
+ vin-supply = <&p5v0>;
};

emmc_pwrseq: emmc-pwrseq {
@@ -301,7 +324,7 @@
mmc-hs200-1_8v;

mmc-pwrseq = <&emmc_pwrseq>;
- vmmc-supply = <&vcc3v3>;
+ vmmc-supply = <&vddio_ao3v3>;
vqmmc-supply = <&vcc1v8>;
};

--
2.23.0

2019-08-28 20:30:33

by Anand Moon

[permalink] [raw]
Subject: [PATCHv1 2/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator

As per shematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which
is supplied by VDDIO_AO3V3.

Cc: Martin Blumenstingl <[email protected]>
Cc: Jerome Brunet <[email protected]>
Cc: Neil Armstrong <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 98e742bf44c1..a078a1ee5004 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -67,17 +67,19 @@
};

tflash_vdd: regulator-tflash_vdd {
- /*
- * signal name from schematics: TFLASH_VDD_EN
- */
compatible = "regulator-fixed";

regulator-name = "TFLASH_VDD";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;

+ /*
+ * signal name from schematics: TFLASH_VDD_EN
+ */
gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
enable-active-high;
+ /* U16 RT9179GB */
+ vin-supply = <&vddio_ao3v3>;
};

tf_io: gpio-regulator-tf_io {
@@ -95,6 +97,8 @@

states = <3300000 0
1800000 1>;
+ /* U12/U13 RT9179GB */
+ vin-supply = <&vddio_ao3v3>;
};

vcc1v8: regulator-vcc1v8 {
@@ -102,6 +106,9 @@
regulator-name = "VCC1V8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ /* U18 RT9179GB */
+ vin-supply = <&vddio_ao3v3>;
};

vddio_ao1v8: regulator-vddio-ao1v8 {
--
2.23.0

2019-08-28 20:31:03

by Anand Moon

[permalink] [raw]
Subject: [PATCHv1 3/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply

As per shematics HDMI_P5V0 is supplied by P5V0 so add missing link.

Cc: Martin Blumenstingl <[email protected]>
Cc: Jerome Brunet <[email protected]>
Cc: Neil Armstrong <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index a078a1ee5004..47789fd50415 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -213,6 +213,8 @@
status = "okay";
pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
pinctrl-names = "default";
+ /* AP2331SA-7 */
+ hdmi-supply = <&p5v0>;
};

&hdmi_tx_tmds_port {
--
2.23.0

2019-08-29 08:30:43

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCHv1 0/3] Odroid c2 missing regulator linking

On 28/08/2019 22:27, Anand Moon wrote:
> Below small changes help re-configure or fix missing inter linking
> of regulator node.
>
> Changes based top on my prevoius series.

For the serie:
Reviewed-by: Neil Armstrong <[email protected]>

>
> [0] https://patchwork.kernel.org/cover/11113091/
>
> TOOD: Add support for DVFS GXBB odroid board in next series.

I'm curious how you will do this !

>
> Best Regards
> -Anand
>
> Anand Moon (3):
> arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0
> regulator
> arm64: dts: meson: odroid-c2: Add missing regulator linked to
> VDDIO_AO3V3 regulator
> arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI
> supply
>
> .../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 44 ++++++++++++++++---
> 1 file changed, 38 insertions(+), 6 deletions(-)
>

2019-08-29 18:36:55

by Anand Moon

[permalink] [raw]
Subject: Re: [PATCHv1 0/3] Odroid c2 missing regulator linking

Hi Neil,

On Thu, 29 Aug 2019 at 13:58, Neil Armstrong <[email protected]> wrote:
>
> On 28/08/2019 22:27, Anand Moon wrote:
> > Below small changes help re-configure or fix missing inter linking
> > of regulator node.
> >
> > Changes based top on my prevoius series.
>
> For the serie:
> Reviewed-by: Neil Armstrong <[email protected]>
>

Thanks for your review.

> >
> > [0] https://patchwork.kernel.org/cover/11113091/
> >
> > TOOD: Add support for DVFS GXBB odroid board in next series.
>
> I'm curious how you will do this !

I was just studying you previous series on how you have implemented
this feature for C1, N2 and VIM3 boards.

[0] https://patchwork.kernel.org/cover/11114125/

I started gathering key inputs needed for this ie *clk / pwm*
like VDDCPU and VDDE clk changes.

But it looks like of the complex clk framework needed, so I leave this to the
expert like your team of developers to do this much quick and efficiently.

Best Regards,
-Anand

2019-08-30 07:32:39

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCHv1 0/3] Odroid c2 missing regulator linking

On 29/08/2019 20:35, Anand Moon wrote:
> Hi Neil,
>
> On Thu, 29 Aug 2019 at 13:58, Neil Armstrong <[email protected]> wrote:
>>
>> On 28/08/2019 22:27, Anand Moon wrote:
>>> Below small changes help re-configure or fix missing inter linking
>>> of regulator node.
>>>
>>> Changes based top on my prevoius series.
>>
>> For the serie:
>> Reviewed-by: Neil Armstrong <[email protected]>
>>
>
> Thanks for your review.
>
>>>
>>> [0] https://patchwork.kernel.org/cover/11113091/
>>>
>>> TOOD: Add support for DVFS GXBB odroid board in next series.
>>
>> I'm curious how you will do this !
>
> I was just studying you previous series on how you have implemented
> this feature for C1, N2 and VIM3 boards.
>
> [0] https://patchwork.kernel.org/cover/11114125/
>
> I started gathering key inputs needed for this ie *clk / pwm*
> like VDDCPU and VDDE clk changes.
>
> But it looks like of the complex clk framework needed, so I leave this to the
> expert like your team of developers to do this much quick and efficiently.

On GXBB, GXL, GXM and AXG SoCs, CPU Frequency setting and PWM Regulator setup is
done by the SCPI Co-processor via the SCPI protocol.

Thus, we should not handle it from Linux, and even if we could, we don't have the
registers documentation of the CPU clusters clock tree.

SCPI works fine on all tested devices, except Odroid-C2, because Hardkernel left
the > 1.5GHz freq in the initial SCPI tables loaded by the BL2, i.e. packed with U-Boot.
Nowadays they have removed the bad frequencies, but still some devices uses the old
bootloader.

But in the SCPI case we trust the table returned by the firmware and use it as-in,
and there is no (simple ?) way to override the table and set a max frequency.

This is why we disabled SCPI.

See https://patchwork.kernel.org/patch/9500175/

Neil

>
> Best Regards,
> -Anand
>

2019-08-30 09:36:23

by Anand Moon

[permalink] [raw]
Subject: Re: [PATCHv1 0/3] Odroid c2 missing regulator linking

Hi Neil,

On Fri, 30 Aug 2019 at 13:01, Neil Armstrong <[email protected]> wrote:
>
> On 29/08/2019 20:35, Anand Moon wrote:
> > Hi Neil,
> >
> > On Thu, 29 Aug 2019 at 13:58, Neil Armstrong <[email protected]> wrote:
> >>
> >> On 28/08/2019 22:27, Anand Moon wrote:
> >>> Below small changes help re-configure or fix missing inter linking
> >>> of regulator node.
> >>>
> >>> Changes based top on my prevoius series.
> >>
> >> For the serie:
> >> Reviewed-by: Neil Armstrong <[email protected]>
> >>
> >
> > Thanks for your review.
> >
> >>>
> >>> [0] https://patchwork.kernel.org/cover/11113091/
> >>>
> >>> TOOD: Add support for DVFS GXBB odroid board in next series.
> >>
> >> I'm curious how you will do this !
> >
> > I was just studying you previous series on how you have implemented
> > this feature for C1, N2 and VIM3 boards.
> >
> > [0] https://patchwork.kernel.org/cover/11114125/
> >
> > I started gathering key inputs needed for this ie *clk / pwm*
> > like VDDCPU and VDDE clk changes.
> >
> > But it looks like of the complex clk framework needed, so I leave this to the
> > expert like your team of developers to do this much quick and efficiently.
>
> On GXBB, GXL, GXM and AXG SoCs, CPU Frequency setting and PWM Regulator setup is
> done by the SCPI Co-processor via the SCPI protocol.
>
> Thus, we should not handle it from Linux, and even if we could, we don't have the
> registers documentation of the CPU clusters clock tree.
>

Ok thanks.

> SCPI works fine on all tested devices, except Odroid-C2, because Hardkernel left
> the > 1.5GHz freq in the initial SCPI tables loaded by the BL2, i.e. packed with U-Boot.
> Nowadays they have removed the bad frequencies, but still some devices uses the old
> bootloader.
>
> But in the SCPI case we trust the table returned by the firmware and use it as-in,
> and there is no (simple ?) way to override the table and set a max frequency.
>
> This is why we disabled SCPI.
>
> See https://patchwork.kernel.org/patch/9500175/

I have quickly enable this on my board and here the cpufreq info

[alarm@alarm ~]$ cpupower frequency-info
analyzing CPU 0:
driver: scpi-cpufreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 200 us
hardware limits: 100.0 MHz - 1.54 GHz
available frequency steps: 100.0 MHz, 250 MHz, 500 MHz, 1000 MHz,
1.30 GHz, 1.54 GHz
available cpufreq governors: conservative ondemand userspace
powersave performance schedutil
current policy: frequency should be within 100.0 MHz and 1.54 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 250 MHz (asserted by call to kernel)

I did some simple stress testing and observed the freq scaling is
working fine when cpufreq governor is set to ondemand.

Powertop output.
Package | CPU 0
100 MHz 5.2% | 100 MHz 1.6%
250 MHz 4.4% | 250 MHz 4.3%
500 MHz 2.6% | 500 MHz 2.4%
1000 MHz 0.5% | 1000 MHz 0.3%
1296 MHz 0.2% | 1296 MHz 0.1%
1.54 GHz 0.2% | 1.54 GHz 0.1%
Idle 86.9% | Idle 91.2%

Here the output on the linaro's pm-qa testing for cpufreq.

[1] https://pastebin.com/h880WATn
Almost all the test case pass with this one as off now.

Best Regards
-Anand

2019-08-30 09:52:26

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCHv1 0/3] Odroid c2 missing regulator linking

On 30/08/2019 11:34, Anand Moon wrote:
> Hi Neil,
>
> On Fri, 30 Aug 2019 at 13:01, Neil Armstrong <[email protected]> wrote:
>>
>> On 29/08/2019 20:35, Anand Moon wrote:
>>> Hi Neil,
>>>
>>> On Thu, 29 Aug 2019 at 13:58, Neil Armstrong <[email protected]> wrote:
>>>>
>>>> On 28/08/2019 22:27, Anand Moon wrote:
>>>>> Below small changes help re-configure or fix missing inter linking
>>>>> of regulator node.
>>>>>
>>>>> Changes based top on my prevoius series.
>>>>
>>>> For the serie:
>>>> Reviewed-by: Neil Armstrong <[email protected]>
>>>>
>>>
>>> Thanks for your review.
>>>
>>>>>
>>>>> [0] https://patchwork.kernel.org/cover/11113091/
>>>>>
>>>>> TOOD: Add support for DVFS GXBB odroid board in next series.
>>>>
>>>> I'm curious how you will do this !
>>>
>>> I was just studying you previous series on how you have implemented
>>> this feature for C1, N2 and VIM3 boards.
>>>
>>> [0] https://patchwork.kernel.org/cover/11114125/
>>>
>>> I started gathering key inputs needed for this ie *clk / pwm*
>>> like VDDCPU and VDDE clk changes.
>>>
>>> But it looks like of the complex clk framework needed, so I leave this to the
>>> expert like your team of developers to do this much quick and efficiently.
>>
>> On GXBB, GXL, GXM and AXG SoCs, CPU Frequency setting and PWM Regulator setup is
>> done by the SCPI Co-processor via the SCPI protocol.
>>
>> Thus, we should not handle it from Linux, and even if we could, we don't have the
>> registers documentation of the CPU clusters clock tree.
>>
>
> Ok thanks.
>
>> SCPI works fine on all tested devices, except Odroid-C2, because Hardkernel left
>> the > 1.5GHz freq in the initial SCPI tables loaded by the BL2, i.e. packed with U-Boot.
>> Nowadays they have removed the bad frequencies, but still some devices uses the old
>> bootloader.
>>
>> But in the SCPI case we trust the table returned by the firmware and use it as-in,
>> and there is no (simple ?) way to override the table and set a max frequency.
>>
>> This is why we disabled SCPI.
>>
>> See https://patchwork.kernel.org/patch/9500175/
>
> I have quickly enable this on my board and here the cpufreq info
>
> [alarm@alarm ~]$ cpupower frequency-info
> analyzing CPU 0:
> driver: scpi-cpufreq
> CPUs which run at the same hardware frequency: 0 1 2 3
> CPUs which need to have their frequency coordinated by software: 0 1 2 3
> maximum transition latency: 200 us
> hardware limits: 100.0 MHz - 1.54 GHz
> available frequency steps: 100.0 MHz, 250 MHz, 500 MHz, 1000 MHz,
> 1.30 GHz, 1.54 GHz
> available cpufreq governors: conservative ondemand userspace
> powersave performance schedutil
> current policy: frequency should be within 100.0 MHz and 1.54 GHz.
> The governor "ondemand" may decide which speed to use
> within this range.
> current CPU frequency: Unable to call hardware
> current CPU frequency: 250 MHz (asserted by call to kernel)
>
> I did some simple stress testing and observed the freq scaling is
> working fine when cpufreq governor is set to ondemand.
>
> Powertop output.
> Package | CPU 0
> 100 MHz 5.2% | 100 MHz 1.6%
> 250 MHz 4.4% | 250 MHz 4.3%
> 500 MHz 2.6% | 500 MHz 2.4%
> 1000 MHz 0.5% | 1000 MHz 0.3%
> 1296 MHz 0.2% | 1296 MHz 0.1%
> 1.54 GHz 0.2% | 1.54 GHz 0.1%
> Idle 86.9% | Idle 91.2%
>
> Here the output on the linaro's pm-qa testing for cpufreq.
>
> [1] https://pastebin.com/h880WATn
> Almost all the test case pass with this one as off now.

Thanks for passing the tests, no doubt it works with a recent
bootloader binary, but we can't leave alone the first Odroid-C2
devices loaded with an incorrect SCPI table.

I'll let Kevin decide for the following.

Neil

>
> Best Regards
> -Anand
>

2019-09-01 11:41:29

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator

On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <[email protected]> wrote:
>
> As per shematics VDDIO_AO18, VDDIO_AO3V3/VDD3V3 DDR3_1V5/DDR_VDDC:
typo: "schematics"

> fixed regulator output which is supplied by P5V0.
>
> Rename vcc3v3 regulator node to vddio_ao3v3 as per shematics.
typo: "schematics"

according to the schematics there's both:
- VDDIO_AO3V3
- VCC3V3 (which is turned on by VDDIO_AO3V3, see [0])

> Cc: Martin Blumenstingl <[email protected]>
> Cc: Jerome Brunet <[email protected]>
> Cc: Neil Armstrong <[email protected]>
> Signed-off-by: Anand Moon <[email protected]>
> ---
> .../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 +++++++++++++++++--
> 1 file changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> index 792698a60a12..98e742bf44c1 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> @@ -104,11 +104,34 @@
> regulator-max-microvolt = <1800000>;
> };
>
> - vcc3v3: regulator-vcc3v3 {
> + vddio_ao1v8: regulator-vddio-ao1v8 {
> compatible = "regulator-fixed";
> - regulator-name = "VCC3V3";
> + regulator-name = "VDDIO_AO1V8";
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-always-on;
> + /* U17 RT9179GB */
> + vin-supply = <&p5v0>;
> + };
> +
> + vddio_ao3v3: regulator-vddio-ao3v3 {
> + compatible = "regulator-fixed";
> + regulator-name = "VDDIO_AO3V3";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> + /* U11 MP2161GJ-C499 */
> + vin-supply = <&p5v0>;
> + };
> +
> + vddc_ddr: regulator-vddc-ddr {
> + compatible = "regulator-fixed";
> + regulator-name = "DDR_VDDC";
personally I would call this (along with the node name and alias) DDR3_1V5
odroid-c2_rev0.1_20150930.pdf shows that DDR3_1V5 and DDR_VDDC are
both the same. however, the DDR_VDDC signal name is not used by any
component in the datasheet

> + regulator-min-microvolt = <1500000>;
> + regulator-max-microvolt = <1500000>;
> + regulator-always-on;
> + /* U15 MP2161GJ-C499 */
> + vin-supply = <&p5v0>;
> };
>
> emmc_pwrseq: emmc-pwrseq {
> @@ -301,7 +324,7 @@
> mmc-hs200-1_8v;
>
> mmc-pwrseq = <&emmc_pwrseq>;
> - vmmc-supply = <&vcc3v3>;
> + vmmc-supply = <&vddio_ao3v3>;
odroid-c2_rev0.1_20150930.pdf uses VCC3V3 as supply


Martin

2019-09-01 11:45:45

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCHv1 2/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator

On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <[email protected]> wrote:
>
> As per shematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which
typo: "schematics"

> is supplied by VDDIO_AO3V3.
please add a short sentence to the description (since you probably
have to re-send a v2) like:
"While here, move the comment name with the signal name in the
schematics above the gpio property to make it consistent with other
regulators"

> Cc: Martin Blumenstingl <[email protected]>
> Cc: Jerome Brunet <[email protected]>
> Cc: Neil Armstrong <[email protected]>
> Signed-off-by: Anand Moon <[email protected]>
with the patch rebased (see below) and the two issues from above addressed:
Reviewed-by: Martin Blumenstingl <[email protected]>

> ---
> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> index 98e742bf44c1..a078a1ee5004 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> @@ -67,17 +67,19 @@
> };
>
> tflash_vdd: regulator-tflash_vdd {
> - /*
> - * signal name from schematics: TFLASH_VDD_EN
> - */
> compatible = "regulator-fixed";
>
> regulator-name = "TFLASH_VDD";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
>
> + /*
> + * signal name from schematics: TFLASH_VDD_EN
> + */
> gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
> enable-active-high;
> + /* U16 RT9179GB */
> + vin-supply = <&vddio_ao3v3>;
> };
>
> tf_io: gpio-regulator-tf_io {
> @@ -95,6 +97,8 @@
>
> states = <3300000 0
> 1800000 1>;
> + /* U12/U13 RT9179GB */
> + vin-supply = <&vddio_ao3v3>;
> };
thank you for the patch but I think it won't apply on top of Neil's
"arm64: dts: meson: fix boards regulators states format" (which was
applied just after you sent this series)


Martin

2019-09-01 11:48:24

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCHv1 3/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply

Hi Anand,

On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <[email protected]> wrote:
>
> As per shematics HDMI_P5V0 is supplied by P5V0 so add missing link.
typo: "schematics"

> Cc: Martin Blumenstingl <[email protected]>
> Cc: Jerome Brunet <[email protected]>
> Cc: Neil Armstrong <[email protected]>
> Signed-off-by: Anand Moon <[email protected]>
> ---
> arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> index a078a1ee5004..47789fd50415 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> @@ -213,6 +213,8 @@
> status = "okay";
> pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
> pinctrl-names = "default";
> + /* AP2331SA-7 */
> + hdmi-supply = <&p5v0>;
> };
my understanding based on odroid-c2_rev0.1_20150930.pdf is that:
- there's a (fixed) hdmi_p5v0 regulator using p5v0 as input
- the hdmi_p5v0 is the hdmi-supply

it doesn't change the functionality of this patch (since both supplies
are fixed regulators anyways)
you are already doing a nice cleanup with this series, so it would be
a shame to take a shortcut here


Martin

2019-09-01 14:15:55

by Anand Moon

[permalink] [raw]
Subject: Re: [PATCHv1 3/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply

Hi Martin,

On Sun, 1 Sep 2019 at 17:14, Martin Blumenstingl
<[email protected]> wrote:
>
> Hi Anand,
>
> On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <[email protected]> wrote:
> >
> > As per shematics HDMI_P5V0 is supplied by P5V0 so add missing link.
> typo: "schematics"
>
> > Cc: Martin Blumenstingl <[email protected]>
> > Cc: Jerome Brunet <[email protected]>
> > Cc: Neil Armstrong <[email protected]>
> > Signed-off-by: Anand Moon <[email protected]>
> > ---
> > arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > index a078a1ee5004..47789fd50415 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > @@ -213,6 +213,8 @@
> > status = "okay";
> > pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
> > pinctrl-names = "default";
> > + /* AP2331SA-7 */
> > + hdmi-supply = <&p5v0>;
> > };
> my understanding based on odroid-c2_rev0.1_20150930.pdf is that:
> - there's a (fixed) hdmi_p5v0 regulator using p5v0 as input
> - the hdmi_p5v0 is the hdmi-supply
>
> it doesn't change the functionality of this patch (since both supplies
> are fixed regulators anyways)
> you are already doing a nice cleanup with this series, so it would be
> a shame to take a shortcut here
>

I could not find gpio control pin which could be used to enable
hdmi-supply node.
So that the reason for direct linking this to p5v0 node.

But looking back at the schematics it and datasheet their are two more
regulator supplies to HDMI.

HDMITX_AVDD33-1 ---- VDDIO_AO3V3
HDMITX_AVDD18-1 ---- VCC1V8

Need to check the hdmi driver if these need to enable.

Best Regards
-Anand

>
> Martin

2019-09-01 15:31:47

by Anand Moon

[permalink] [raw]
Subject: Re: [PATCHv1 2/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator

Hi Martin,

Thanks of your review comments.

On Sun, 1 Sep 2019 at 17:11, Martin Blumenstingl
<[email protected]> wrote:
>
> On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <[email protected]> wrote:
> >
> > As per shematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which
> typo: "schematics"
>
Ok
> > is supplied by VDDIO_AO3V3.
> please add a short sentence to the description (since you probably
> have to re-send a v2) like:
> "While here, move the comment name with the signal name in the
> schematics above the gpio property to make it consistent with other
> regulators"
>

Ok I will append this in next version.

> > Cc: Martin Blumenstingl <[email protected]>
> > Cc: Jerome Brunet <[email protected]>
> > Cc: Neil Armstrong <[email protected]>
> > Signed-off-by: Anand Moon <[email protected]>
> with the patch rebased (see below) and the two issues from above addressed:
> Reviewed-by: Martin Blumenstingl <[email protected]>
>
> > ---
> > arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
> > 1 file changed, 10 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > index 98e742bf44c1..a078a1ee5004 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > @@ -67,17 +67,19 @@
> > };
> >
> > tflash_vdd: regulator-tflash_vdd {
> > - /*
> > - * signal name from schematics: TFLASH_VDD_EN
> > - */
> > compatible = "regulator-fixed";
> >
> > regulator-name = "TFLASH_VDD";
> > regulator-min-microvolt = <3300000>;
> > regulator-max-microvolt = <3300000>;
> >
> > + /*
> > + * signal name from schematics: TFLASH_VDD_EN
> > + */
> > gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
> > enable-active-high;
> > + /* U16 RT9179GB */
> > + vin-supply = <&vddio_ao3v3>;
> > };
> >
> > tf_io: gpio-regulator-tf_io {
> > @@ -95,6 +97,8 @@
> >
> > states = <3300000 0
> > 1800000 1>;
> > + /* U12/U13 RT9179GB */
> > + vin-supply = <&vddio_ao3v3>;
> > };
> thank you for the patch but I think it won't apply on top of Neil's
> "arm64: dts: meson: fix boards regulators states format" (which was
> applied just after you sent this series)
>

>
> Martin

Ok will re-base these changes on linux-next next time.

Best Regards
-Anand

2019-09-01 15:38:33

by Anand Moon

[permalink] [raw]
Subject: Re: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator

Hi Martin,

Thanks for your review comments.

Their have been some revision changes in S905 Odroid Schematics.
[0] https://dn.odroid.com/S905/Schematic/

Well I have make my changes based on old odroid-c2_rev0.2_20151218.pdf

On Sun, 1 Sep 2019 at 17:07, Martin Blumenstingl
<[email protected]> wrote:
>
> On Wed, Aug 28, 2019 at 10:27 PM Anand Moon <[email protected]> wrote:
> >
> > As per shematics VDDIO_AO18, VDDIO_AO3V3/VDD3V3 DDR3_1V5/DDR_VDDC:
> typo: "schematics"
>
OK. next time will run spell check before I send these changes.

> > fixed regulator output which is supplied by P5V0.
> >
> > Rename vcc3v3 regulator node to vddio_ao3v3 as per shematics.
> typo: "schematics"
Ok.
>
> according to the schematics there's both:
> - VDDIO_AO3V3
> - VCC3V3 (which is turned on by VDDIO_AO3V3, see [0])
>

From the schematics it seams same.

VDDIO_AO3V3---DMG340LSQN4 (Q4)---VCC3V3

But this name change was done to link TFLASH_VDD_EN to TFLASH_VDD for eMMC

VDDIO_AO3V3-----TFLASH_VDD using TFLASH_VDD_EN gpio pin.

Well I have tested this changes on eMMC module.

> > Cc: Martin Blumenstingl <[email protected]>
> > Cc: Jerome Brunet <[email protected]>
> > Cc: Neil Armstrong <[email protected]>
> > Signed-off-by: Anand Moon <[email protected]>
> > ---
> > .../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 29 +++++++++++++++++--
> > 1 file changed, 26 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > index 792698a60a12..98e742bf44c1 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
> > @@ -104,11 +104,34 @@
> > regulator-max-microvolt = <1800000>;
> > };
> >
> > - vcc3v3: regulator-vcc3v3 {
> > + vddio_ao1v8: regulator-vddio-ao1v8 {
> > compatible = "regulator-fixed";
> > - regulator-name = "VCC3V3";
> > + regulator-name = "VDDIO_AO1V8";
> > + regulator-min-microvolt = <1800000>;
> > + regulator-max-microvolt = <1800000>;
> > + regulator-always-on;
> > + /* U17 RT9179GB */
> > + vin-supply = <&p5v0>;
> > + };
> > +
> > + vddio_ao3v3: regulator-vddio-ao3v3 {
> > + compatible = "regulator-fixed";
> > + regulator-name = "VDDIO_AO3V3";
> > regulator-min-microvolt = <3300000>;
> > regulator-max-microvolt = <3300000>;
> > + regulator-always-on;
> > + /* U11 MP2161GJ-C499 */
> > + vin-supply = <&p5v0>;
> > + };
> > +
> > + vddc_ddr: regulator-vddc-ddr {
> > + compatible = "regulator-fixed";
> > + regulator-name = "DDR_VDDC";
> personally I would call this (along with the node name and alias) DDR3_1V5
> odroid-c2_rev0.1_20150930.pdf shows that DDR3_1V5 and DDR_VDDC are
> both the same. however, the DDR_VDDC signal name is not used by any
> component in the datasheet

Ok Thanks I will change this to DDR3_1V5 as per the datasheet.
>
> > + regulator-min-microvolt = <1500000>;
> > + regulator-max-microvolt = <1500000>;
> > + regulator-always-on;
> > + /* U15 MP2161GJ-C499 */
> > + vin-supply = <&p5v0>;
> > };
> >
> > emmc_pwrseq: emmc-pwrseq {
> > @@ -301,7 +324,7 @@
> > mmc-hs200-1_8v;
> >
> > mmc-pwrseq = <&emmc_pwrseq>;
> > - vmmc-supply = <&vcc3v3>;
> > + vmmc-supply = <&vddio_ao3v3>;
> odroid-c2_rev0.1_20150930.pdf uses VCC3V3 as supply
>
>
> Martin

Best Regards

-Anand

2019-09-01 21:56:10

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator

Hi Anand,

On Sun, Sep 1, 2019 at 3:58 PM Anand Moon <[email protected]> wrote:
>
> Hi Martin,
>
> Thanks for your review comments.
>
> Their have been some revision changes in S905 Odroid Schematics.
> [0] https://dn.odroid.com/S905/Schematic/
>
> Well I have make my changes based on old odroid-c2_rev0.2_20151218.pdf

[...]
> >
> > according to the schematics there's both:
> > - VDDIO_AO3V3
> > - VCC3V3 (which is turned on by VDDIO_AO3V3, see [0])
> >
>
> From the schematics it seams same.
>
> VDDIO_AO3V3---DMG340LSQN4 (Q4)---VCC3V3
yes, they are the same signal. the only difference is that VCC3V3 is
turned on later in the power-up sequence

> But this name change was done to link TFLASH_VDD_EN to TFLASH_VDD for eMMC
>
> VDDIO_AO3V3-----TFLASH_VDD using TFLASH_VDD_EN gpio pin.
>
> Well I have tested this changes on eMMC module.
I cannot see any of the TFLASH_* regulators being linked to eMMC (they
are only linked to the SD card slot, I also checked
odroid-c2_rev0.2_20151218.pdf and odroid-c2_rev0.2_20171114.pdf).
which page of the odroid-c2_rev0.2_20151218.pdf schematics shows how
TFLASH_VDD is linked to eMMC?

please note that I don't have an Odroid-C2 board myself (so I cannot
test any of this).


Martin

2019-09-02 01:19:26

by Anand Moon

[permalink] [raw]
Subject: Re: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator

Hi Martin,

On Mon, 2 Sep 2019 at 03:23, Martin Blumenstingl
<[email protected]> wrote:
>
> Hi Anand,
>
> On Sun, Sep 1, 2019 at 3:58 PM Anand Moon <[email protected]> wrote:
> >
> > Hi Martin,
> >
> > Thanks for your review comments.
> >
> > Their have been some revision changes in S905 Odroid Schematics.
> > [0] https://dn.odroid.com/S905/Schematic/
> >
> > Well I have make my changes based on old odroid-c2_rev0.2_20151218.pdf
>
> [...]
> > >
> > > according to the schematics there's both:
> > > - VDDIO_AO3V3
> > > - VCC3V3 (which is turned on by VDDIO_AO3V3, see [0])
> > >
> >
> > From the schematics it seams same.
> >
> > VDDIO_AO3V3---DMG340LSQN4 (Q4)---VCC3V3
> yes, they are the same signal. the only difference is that VCC3V3 is
> turned on later in the power-up sequence
>
> > But this name change was done to link TFLASH_VDD_EN to TFLASH_VDD for eMMC
> >
> > VDDIO_AO3V3-----TFLASH_VDD using TFLASH_VDD_EN gpio pin.
> >
> > Well I have tested this changes on eMMC module.
> I cannot see any of the TFLASH_* regulators being linked to eMMC (they
> are only linked to the SD card slot, I also checked
> odroid-c2_rev0.2_20151218.pdf and odroid-c2_rev0.2_20171114.pdf).
> which page of the odroid-c2_rev0.2_20151218.pdf schematics shows how
> TFLASH_VDD is linked to eMMC?
>
> please note that I don't have an Odroid-C2 board myself (so I cannot
> test any of this).
>
>
> Martin

Thanks I will double check again and re-post then with correction again.

Best Regards
-Anand

2019-09-03 06:10:01

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCHv1 1/3] arm64: dts: meson: odroid-c2: Add missing regulator linked to P5V0 regulator

Hi Anand,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc7 next-20190902]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Anand-Moon/arm64-dts-meson-odroid-c2-Add-missing-regulator-linked-to-P5V0-regulator/20190901-025920
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email protected]>

All errors (new ones prefixed by >>):

>> ERROR: Input tree has errors, aborting (use -f to force output)

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (1.10 kB)
.config.gz (43.88 kB)
Download all attachments

2019-09-03 19:09:11

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCHv1 0/3] Odroid c2 missing regulator linking

Hi Anand,

On Fri, Aug 30, 2019 at 11:34 AM Anand Moon <[email protected]> wrote:
[...]
> > SCPI works fine on all tested devices, except Odroid-C2, because Hardkernel left
> > the > 1.5GHz freq in the initial SCPI tables loaded by the BL2, i.e. packed with U-Boot.
> > Nowadays they have removed the bad frequencies, but still some devices uses the old
> > bootloader.
> >
> > But in the SCPI case we trust the table returned by the firmware and use it as-in,
> > and there is no (simple ?) way to override the table and set a max frequency.
> >
> > This is why we disabled SCPI.
> >
> > See https://patchwork.kernel.org/patch/9500175/
>
> I have quickly enable this on my board and here the cpufreq info
[...]
> Almost all the test case pass with this one as off now.
I suggest to send an RFC patch to (re-)enable DVFS on Odroid-C2
I find it easy to miss a DVFS discussion inside a "missing regulator" series

with a separate patch you can also get feedback from other Odroid-C2
owners who can help testing
coincidence or not: on Friday someone asked in the #linux-amlogic IRC
channel why Odroid-C2 didn't have DVFS enabled and what to do about it


Martin