Skip to contentSkip to conversation

Odroid c2 missing regulator linking

PATCH In review Anand Moon 4 participants 19 messages Aug 28, 2019 – Sep 3, 2019

Subsystems (2)
lore
Share & tools
lore

Anand Moon

author
#0 lore raw

cover 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(-)
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH 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]>
---
 .../boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 29 +++++++++++++++++--
 1 file changed, 26 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +26 -3
index 792698a60a12..98e742bf44c1 100644
@@ -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>;
 };
 
Signature · 1 line
2.23.0
#2 lore raw

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

Quoted 2 lines · Anand Moon

As per shematics VDDIO_AO18, VDDIO_AO3V3/VDD3V3 DDR3_1V5/DDR_VDDC:

typo: "schematics"

Quoted 3 lines

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])

Quoted 31 lines
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>
---
 .../boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 29 +++++++++++++++++--
 1 file changed, 26 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +12 -2
index 792698a60a12..98e742bf44c1 100644
@@ -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";

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 129

Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +8 -0
                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

Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +5 -0
+               regulator-min-microvolt = <1500000>;
+               regulator-max-microvolt = <1500000>;
+               regulator-always-on;
+               /* U15 MP2161GJ-C499 */
+               vin-supply = <&p5v0>;
        };
 
        emmc_pwrseq: emmc-pwrseq {

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 327

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -1
@@ -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

author
#3 lore raw

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

Quoted 6 lines · Martin Blumenstingl
Quoted 2 lines · Anand Moon

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.

Quoted 4 lines
Quoted 3 lines

fixed regulator output which is supplied by P5V0.

Rename vcc3v3 regulator node to vddio_ao3v3 as per shematics.

typo: "schematics"

Ok.

Quoted 7 lines

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.

Quoted 37 lines
Quoted 37 lines
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>
---
 .../boot/dts/amlogic/meson-gxbb-odroidc2.dts  | 29 +++++++++++++++++--
 1 file changed, 26 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +16 -2
index 792698a60a12..98e742bf44c1 100644
@@ -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>;
+       };
Quoted 8 lines

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 129

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +4 -0
+
+       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.

Quoted 12 lines
Quoted 12 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +5 -0
+               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;
 
Quoted 7 lines

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 327

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -1
        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

#4 lore raw

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

Hi Anand,

Quoted 9 lines · Anand Moon

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

[...]

Quoted 9 lines
Quoted 5 lines

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

Quoted 5 lines

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

author
#5 lore raw

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

Hi Martin,

Quoted 38 lines · Martin Blumenstingl

Hi Anand,

Quoted 9 lines · Anand Moon

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

[...]

Quoted 9 lines
Quoted 5 lines

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

Quoted 5 lines

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?

Quoted 5 lines

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

#6 lore raw

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

In reply to Anand Moon
Thank you for the patch! Yet something to improve:

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

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

author
#7 lore raw

PATCH 2/3 arm64: dts: meson: odroid-c2: Add missing regulator linked to VDDIO_AO3V3 regulator

In reply to Anand Moon

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]>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +10 -3
index 98e742bf44c1..a078a1ee5004 100644
@@ -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 {
Signature · 1 line
2.23.0
reviewer Reviewed-by on v1 2/3
#8 lore raw

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

Quoted 2 lines · Anand Moon

As per shematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which

typo: "schematics"

Quoted 1 line

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"

Quoted 4 lines
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>

with the patch rebased (see below) and the two issues from above addressed:

Quoted 32 lines
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +5 -3
index 98e742bf44c1..a078a1ee5004 100644
@@ -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 {

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 102

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +2 -0
@@ -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

author
#9 lore raw

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

Hi Martin,

Thanks of your review comments.

Quoted 6 lines · Martin Blumenstingl
Quoted 2 lines · Anand Moon

As per shematics TFLASH_VDD, TF_IO, VCC3V3 fixed regulator output which

typo: "schematics"

Ok

Quoted 7 lines
Quoted 1 line

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.

Quoted 51 lines
Quoted 4 lines
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>

with the patch rebased (see below) and the two issues from above addressed:

Quoted 32 lines
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +5 -3
index 98e742bf44c1..a078a1ee5004 100644
@@ -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 {

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 102

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +2 -0
@@ -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)

Quoted 1 line

Martin

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

Best Regards
-Anand

author
#10 lore raw

PATCH 3/3 arm64: dts: meson: odroid-c2: Add missing regulator linked to HDMI supply

In reply to Anand Moon

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]>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +2 -0
index a078a1ee5004..47789fd50415 100644
@@ -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 {
Signature · 1 line
2.23.0
#11 lore raw

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

Hi Anand,

Quoted 2 lines · Anand Moon

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

typo: "schematics"

Quoted 13 lines
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +0 -0
index a078a1ee5004..47789fd50415 100644

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 218

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +2 -0
@@ -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

author
#12 lore raw

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

Hi Martin,

Quoted 31 lines · Martin Blumenstingl

Hi Anand,

Quoted 2 lines · Anand Moon

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

typo: "schematics"

Quoted 13 lines
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +0 -0
index a078a1ee5004..47789fd50415 100644

arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts line 218

Quoted 6 lines
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +2 -0
@@ -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

Quoted 5 lines

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

Quoted 2 lines

Martin

Reviewed-by on the v1 series
#13 lore raw
In reply to Anand Moon
Quoted 4 lines · Anand Moon

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

Changes based top on my prevoius series.

For the serie:

Quoted 4 lines

[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 !

Quoted 15 lines

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(-)
author
#14 lore raw

Hi Neil,

Quoted 10 lines · Neil Armstrong
Quoted 4 lines · Anand Moon

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

Changes based top on my prevoius series.

For the serie:

Thanks for your review.

Quoted 6 lines
Quoted 4 lines

[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

#15 lore raw
Quoted 26 lines · Anand Moon

Hi Neil,

Quoted 10 lines · Neil Armstrong
Quoted 4 lines · Anand Moon

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

Changes based top on my prevoius series.

For the serie:

Thanks for your review.

Quoted 6 lines
Quoted 4 lines

[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.

Quoted 7 lines

[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

Quoted 4 lines

Best Regards,
-Anand

author
#16 lore raw

Hi Neil,

Quoted 33 lines · Neil Armstrong
Quoted 31 lines · Anand Moon

Hi Neil,

Quoted 10 lines · Neil Armstrong
Quoted 4 lines · Anand Moon

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

Changes based top on my prevoius series.

For the serie:

Thanks for your review.

Quoted 6 lines
Quoted 4 lines

[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.

Quoted 9 lines
Quoted 2 lines

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.

Quoted 11 lines

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

#17 lore raw
Quoted 92 lines · Anand Moon

Hi Neil,

Quoted 33 lines · Neil Armstrong
Quoted 31 lines · Anand Moon

Hi Neil,

Quoted 10 lines · Neil Armstrong
Quoted 4 lines · Anand Moon

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

Changes based top on my prevoius series.

For the serie:

Thanks for your review.

Quoted 6 lines
Quoted 4 lines

[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.

Quoted 9 lines
Quoted 2 lines

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.

Quoted 11 lines

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%
Quoted 4 lines

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

Quoted 4 lines

Best Regards
-Anand

#18 lore raw
In reply to Anand Moon

Hi Anand,

On Fri, Aug 30, 2019 at 11:34 AM Anand Moon <[email protected]> wrote:
[...]

Quoted 13 lines
Quoted 11 lines

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

[...]

Quoted 1 line

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