Skip to contentSkip to conversation

Added Audio and HDMI power domain for Amlogic SoC

PATCH NAK Anand Moon 3 participants 18 messages May 3, 2021 – May 4, 2021

Subsystems (2)
lore
Share & tools
lore

Anand Moon

author
#0 lore raw

cover Added Audio and HDMI power domain for Amlogic SoC

Patch series add Audio and Hdmi power domain for Amlogic SoC.

Tested on GXBB - Odroid C2
SM1 - Odroid C4
G12B - Odroid N2
-Anand

Anand Moon (9):
soc: amlogic: meson-ee-pwrc: Add audio power domain Meson g12a and
g12b SoCs
arm64: dts: amlogic: Add audio power domain for g12a and g12b
soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs
arm64: dts: amlogic: Add hdmi power domain for g12a and g12b
soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson sm1 SoCs
arm64: dts: amlogic: Add audio power domain for sm1 SoC
arm64: dts: amlogic: Add hdmi power domain for sm1 sbc
soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson gxbb and gxl
SoCs
arm64: dts: amlogic: Add hdmi power domain for gxbb and gxl

 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts    |  2 ++
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts      |  1 +
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts   |  2 ++
 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts  |  1 +
 .../arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts    |  1 +
 .../arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi |  2 ++
 arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi     |  1 +
 .../boot/dts/amlogic/meson-gx-libretech-pc.dtsi      |  1 +
 arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi  |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts |  1 +
 .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts      |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi    |  1 +
 .../dts/amlogic/meson-gxl-s805x-libretech-ac.dts     |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts |  1 +
 .../boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts  |  1 +
 .../dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts  |  1 +
 .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts     |  1 +
 .../boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts |  1 +
 .../arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts  |  1 +
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi    |  2 ++
 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts     |  2 ++
 drivers/soc/amlogic/meson-ee-pwrc.c                  | 12 ++++++++++++
 include/dt-bindings/power/meson-g12a-power.h         |  2 ++
 include/dt-bindings/power/meson-gxbb-power.h         |  1 +
 include/dt-bindings/power/meson-sm1-power.h          |  1 +
 33 files changed, 50 insertions(+)
Signature · 1 line
2.31.1
author
#1 lore raw

PATCH 1/9 soc: amlogic: meson-ee-pwrc: Add audio power domain Meson g12a and g12b SoCs

As per the S922X datasheet add audio power domain controller for Meson g12a and g12b SoCs.

Cc Neil Armstrong <[email protected]>
---
 drivers/soc/amlogic/meson-ee-pwrc.c          | 5 +++++
 include/dt-bindings/power/meson-g12a-power.h | 1 +
 2 files changed, 6 insertions(+)
drivers/soc/amlogic/meson-ee-pwrc.c +5 -0
index 50bf5d2b828b..2e07ddf2d6a6 100644
@@ -154,6 +154,10 @@ static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = {
 	VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
 };
 
+static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_audio[] = {
+	{ HHI_MEM_PD_REG0, GENMASK(5, 4) },
+};
+
 static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_eth[] = {
 	{ HHI_MEM_PD_REG0, GENMASK(3, 2) },
 };
@@ -252,6 +256,7 @@ static struct meson_ee_pwrc_domain_desc axg_pwrc_domains[] = {
 static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = {
 	[PWRC_G12A_VPU_ID]  = VPU_PD("VPU", &gx_pwrc_vpu, g12a_pwrc_mem_vpu,
 				     pwrc_ee_get_power, 11, 2),
+	[PWRC_G12A_AUDIO_ID] = MEM_PD("AUDIO", meson_pwrc_mem_audio),
 	[PWRC_G12A_ETH_ID] = MEM_PD("ETH", meson_pwrc_mem_eth),
 };
 
include/dt-bindings/power/meson-g12a-power.h +1 -0
index bb5e67a842de..1cf20e4e412e 100644
@@ -9,5 +9,6 @@
 
 #define PWRC_G12A_VPU_ID		0
 #define PWRC_G12A_ETH_ID		1
+#define PWRC_G12A_AUDIO_ID		2
 
 #endif
Signature · 1 line
2.31.1
author
#2 lore raw

PATCH 2/9 arm64: dts: amlogic: Add audio power domain for g12a and g12b

In reply to Anand Moon

Add audio power domain id for sound on g12a and g12b sbc to enable audio power domain via "pwrc" controller.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts   | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts  | 1 +
 7 files changed, 7 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +1 -0
index 81269ccc2496..24599f448564 100644
@@ -217,6 +217,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +1 -0
index 579f3d02d613..1c821800514a 100644
@@ -167,6 +167,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts +1 -0
index 6c7bfacbad78..99ed165a41c9 100644
@@ -49,6 +49,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts +1 -0
index 707daf92787b..6bcc4685e65b 100644
@@ -58,6 +58,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts +1 -0
index 5d96c1449050..555524cd50f2 100644
@@ -45,6 +45,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +1 -0
index 344573e157a7..e99533dd64c2 100644
@@ -258,6 +258,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts +1 -0
index 0c7892600d56..4b12685af1ad 100644
@@ -40,6 +40,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
Signature · 1 line
2.31.1
author
#3 lore raw

PATCH 3/9 soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs

In reply to Anand Moon

As per the S922X datasheet add hdmi power domain
controller for Meson g12a and g12b SoCs.

Cc Neil Armstrong <[email protected]>
---
 drivers/soc/amlogic/meson-ee-pwrc.c          | 5 +++++
 include/dt-bindings/power/meson-g12a-power.h | 1 +
 2 files changed, 6 insertions(+)
drivers/soc/amlogic/meson-ee-pwrc.c +5 -0
index 2e07ddf2d6a6..ec402c4ab931 100644
@@ -154,6 +154,10 @@ static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = {
 	VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
 };
 
+static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_hdmi[] = {
+	{ HHI_MEM_PD_REG0, GENMASK(15, 8) },
+};
+
 static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_audio[] = {
 	{ HHI_MEM_PD_REG0, GENMASK(5, 4) },
 };
@@ -256,6 +260,7 @@ static struct meson_ee_pwrc_domain_desc axg_pwrc_domains[] = {
 static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = {
 	[PWRC_G12A_VPU_ID]  = VPU_PD("VPU", &gx_pwrc_vpu, g12a_pwrc_mem_vpu,
 				     pwrc_ee_get_power, 11, 2),
+	[PWRC_G12A_HDMI_ID] = MEM_PD("HDMI", meson_pwrc_mem_hdmi),
 	[PWRC_G12A_AUDIO_ID] = MEM_PD("AUDIO", meson_pwrc_mem_audio),
 	[PWRC_G12A_ETH_ID] = MEM_PD("ETH", meson_pwrc_mem_eth),
 };
include/dt-bindings/power/meson-g12a-power.h +1 -0
index 1cf20e4e412e..900924d17798 100644
@@ -10,5 +10,6 @@
 #define PWRC_G12A_VPU_ID		0
 #define PWRC_G12A_ETH_ID		1
 #define PWRC_G12A_AUDIO_ID		2
+#define PWRC_G12A_HDMI_ID		3
 
 #endif
Signature · 1 line
2.31.1
reviewer NACKed-by on v1 3/9 NAK
#4 lore raw

Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs

Hi Anand,

Quoted 16 lines · Anand Moon

As per the S922X datasheet add hdmi power domain
controller for Meson g12a and g12b SoCs.

Cc Neil Armstrong <[email protected]>
---
 drivers/soc/amlogic/meson-ee-pwrc.c          | 5 +++++
 include/dt-bindings/power/meson-g12a-power.h | 1 +
 2 files changed, 6 insertions(+)
drivers/soc/amlogic/meson-ee-pwrc.c +0 -0
index 2e07ddf2d6a6..ec402c4ab931 100644

drivers/soc/amlogic/meson-ee-pwrc.c static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = { · line 160

Quoted 7 lines
drivers/soc/amlogic/meson-ee-pwrc.c +4 -0
@@ -154,6 +154,10 @@ static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = {
        VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
 };
 
+static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_hdmi[] = {
+       { HHI_MEM_PD_REG0, GENMASK(15, 8) },
+};
+

the VPU power domain already includes:
VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
whereas VPU_HHI_MEMPD is bits[15:8]

Having two power domains which are managing the same registers sounds like it'll be causing some trouble
So for now this is (as I am not even sure what the goal here is):

Best regards,
Martin

author
#5 lore raw

Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs

Hi Martin,

Quoted 31 lines · Martin Blumenstingl

Hi Anand,

Quoted 16 lines · Anand Moon

As per the S922X datasheet add hdmi power domain
controller for Meson g12a and g12b SoCs.

Cc Neil Armstrong <[email protected]>
---
 drivers/soc/amlogic/meson-ee-pwrc.c          | 5 +++++
 include/dt-bindings/power/meson-g12a-power.h | 1 +
 2 files changed, 6 insertions(+)
drivers/soc/amlogic/meson-ee-pwrc.c +0 -0
index 2e07ddf2d6a6..ec402c4ab931 100644

drivers/soc/amlogic/meson-ee-pwrc.c static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = { · line 160

Quoted 7 lines
drivers/soc/amlogic/meson-ee-pwrc.c +4 -0
@@ -154,6 +154,10 @@ static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = {
        VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
 };
 
+static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_hdmi[] = {
+       { HHI_MEM_PD_REG0, GENMASK(15, 8) },
+};
+

the VPU power domain already includes:
VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
whereas VPU_HHI_MEMPD is bits[15:8]

Quoted 5 lines

Having two power domains which are managing the same registers sounds like it'll be causing some trouble
So for now this is (as I am not even sure what the goal here is):

Ok, thanks. On the line of Ethernet PD, I tried to add this accordingly. whenever I try something new it fails. Please ignore this series.

Quoted 2 lines

Best regards,
Martin

Thanks
-Anand

#6 lore raw

Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs

Hi Anand,

On Mon, May 3, 2021 at 5:29 PM Anand Moon <[email protected]> wrote:
[...]

Quoted 8 lines
Quoted 8 lines

drivers/soc/amlogic/meson-ee-pwrc.c static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = { · line 160

Quoted 4 lines
drivers/soc/amlogic/meson-ee-pwrc.c +4 -0
+static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_hdmi[] = {
+       { HHI_MEM_PD_REG0, GENMASK(15, 8) },
+};
+

the VPU power domain already includes:
VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
whereas VPU_HHI_MEMPD is bits[15:8]

Quoted 7 lines
Quoted 5 lines

Having two power domains which are managing the same registers sounds like it'll be causing some trouble
So for now this is (as I am not even sure what the goal here is):

Ok, thanks. On the line of Ethernet PD, I tried to add this accordingly.

From what I understand the VPU power domain is special because the display pipeline consists of multiple components (HDMI, VPU, ...) that's why the handling currently is special

Quoted 1 line

whenever I try something new it fails. Please ignore this series.

if the VPU and HDMI power domains were separate (from hardware perspective, not from driver perspective) then your change is a good step forward.
in that case VPU_HHI_MEMPD would need to be removed from wherever it's currently used -> that means we need to also decide if we want to break compatibility with older (before this series) .dtbs

Best regards,
Martin

author
#7 lore raw

Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs

hi Martin

Quoted 24 lines · Martin Blumenstingl

Hi Anand,

On Mon, May 3, 2021 at 5:29 PM Anand Moon <[email protected]> wrote:
[...]

Quoted 8 lines
Quoted 8 lines

drivers/soc/amlogic/meson-ee-pwrc.c static struct meson_ee_pwrc_mem_domain gxbb_pwrc_mem_vpu[] = { · line 160

Quoted 4 lines
drivers/soc/amlogic/meson-ee-pwrc.c +4 -0
+static struct meson_ee_pwrc_mem_domain meson_pwrc_mem_hdmi[] = {
+       { HHI_MEM_PD_REG0, GENMASK(15, 8) },
+};
+

the VPU power domain already includes:
VPU_HHI_MEMPD(HHI_MEM_PD_REG0),
whereas VPU_HHI_MEMPD is bits[15:8]

Quoted 7 lines
Quoted 5 lines

Having two power domains which are managing the same registers sounds like it'll be causing some trouble
So for now this is (as I am not even sure what the goal here is):

Ok, thanks. On the line of Ethernet PD, I tried to add this accordingly.

From what I understand the VPU power domain is special because the display pipeline consists of multiple components (HDMI, VPU, ...) that's why the handling currently is special

Quoted 9 lines
Quoted 1 line

whenever I try something new it fails. Please ignore this series.

if the VPU and HDMI power domains were separate (from hardware perspective, not from driver perspective) then your change is a good step forward.
in that case VPU_HHI_MEMPD would need to be removed from wherever it's currently used -> that means we need to also decide if we want to break compatibility with older (before this series) .dtbs

As per the datasheet S922X Datasheet, HDMI and VPU are different reg controller and they are independent of each other.

*HHI_MEM_PD_REG0 0x40*

17~16 R/W 0x3 DDR memory PD
*15~8 R/W 0xFF HDMI memory PD*
7~6 R/W 0x3 Reserved
5~4 R/W 0x3 Audio mem PD
3~2 R/W 0x3 Ethernet memory PD
1~0 R/W 0x3 resved

Note: HDMI and AUDIO and Ethernet are also independent of each other.

*HHI_VPU_MEM_PD_REG0 0x41 *

31~30 R/W 0x3 sharp
29~28 R/W 0x3 Deinterlacer – di_post: 11 = power down. 00 = normal operation 27~26 R/W 0x3 Deinterlacer – di_pre 25~24 R/W 0x3 Vi_di_scaler 23~22 R/W 0x3 afbc_dec1
21~20 R/W 0x3 Srscl super scaler
19~18 R/W 0x3 Vdin1 memory
17~16 R/W 0x3 Vdin0 memory
15~14 R/W 0x3 Osd_scaler memory
13~12 R/W 0x3 Scaler memory
11~10 R/W 0x3 Vpp output fifo
9~8 R/W 0x3 Color management module
7~6 R/W 0x3 Vd2 memory
5~4 R/W 0x3 Vd1 memory
3~2 R/W 0x3 Osd2 memory
1~0 R/W 0x3 Osd1 memory

Below is the output on Odroid N2.

[alarm@archl-on2 ~]$ sudo cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status children
performance
/device runtime status
----------------------------------------------------------------------------------------------
HDMI on

            0
    /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx  unsupported
             0
AUDIO                           on
            0
    /devices/platform/sound                             unsupported
            0
ETH                             on
            0
    /devices/platform/soc/ff3f0000.ethernet             active
            0
VPU                             on
            0
    /devices/platform/soc/ff900000.vpu                  unsupported
            0

HDMI power domain is ON.
Audio is wrongly mapped.

Quoted 2 lines

Best regards,
Martin

-Anand

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic

#8 lore raw

Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs

Hi Anand,

On Mon, May 3, 2021 at 6:37 PM Anand Moon <[email protected]> wrote:
[...]

Quoted 12 lines
Quoted 9 lines
Quoted 1 line

whenever I try something new it fails. Please ignore this series.

if the VPU and HDMI power domains were separate (from hardware perspective, not from driver perspective) then your change is a good step forward.
in that case VPU_HHI_MEMPD would need to be removed from wherever it's currently used -> that means we need to also decide if we want to break compatibility with older (before this series) .dtbs

As per the datasheet S922X Datasheet, HDMI and VPU are different reg controller and they are independent of each other.

[...]

Quoted 1 line

Note: HDMI and AUDIO and Ethernet are also independent of each other.

let me say it this way: I've seen cases where the information from the datasheet is not correct

Also to me it doesn't explicitly state that the bits are independent of each other (at the same time it also doesn't state that they belong together).

In the same datasheet you also find the HHI_HDMI_PLL_CNTL0 register hdmi_dpll_M, hdmi_dpll_N and hdmi_dpll_od are listed in there. The PLL output depends on hdmi_dpll_M and hdmi_dpll_N while hdmi_dpll_od is taking the output of the two and dividing it. This relation is nowhere described in the datasheet either so you "just have to know it".

Unfortunately I don't know of any good way to check the relationship of the power domain registers other than someone from Amlogic explaining to us how it works internally.

[...]

Quoted 8 lines

Below is the output on Odroid N2.

[alarm@archl-on2 ~]$ sudo cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status children
performance
/device runtime status
----------------------------------------------------------------------------------------------
HDMI on

Quoted 15 lines
            0
    /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx  unsupported
             0
AUDIO                           on
            0
    /devices/platform/sound                             unsupported
            0
ETH                             on
            0
    /devices/platform/soc/ff3f0000.ethernet             active
            0
VPU                             on
            0
    /devices/platform/soc/ff900000.vpu                  unsupported
            0

This describes what Linux sees (based on how you configured the device-tree). The output confirms what you are expecting to see (I think), but based on that we can't tell what's right or wrong in terms of the actual hardware.

To make another example: I could edit meson-g12b-odroid-n2.dtsi and change the vin-supply of "VDDAO_3V3" to &usb_pwr_en
Then /sys/kernel/debug/regulator/regulator_summary would show that VDDAO_3V3 is taking the voltage from USB_PWR_EN as input. But from a hardware (schematics) perspective this is not correct. Since the schematics describe the relation (input, output) between the regulators we know how they are connected to each other.
If this relation was not described in the schematics then we'd be in the same situation as with the power domains.

Best regards,
Martin

author
#9 lore raw

Re: [PATCHv1 3/9] soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs

Hi Martin

Quoted 33 lines · Martin Blumenstingl

Hi Anand,

On Mon, May 3, 2021 at 6:37 PM Anand Moon <[email protected]> wrote:
[...]

Quoted 12 lines
Quoted 9 lines
Quoted 1 line

whenever I try something new it fails. Please ignore this series.

if the VPU and HDMI power domains were separate (from hardware perspective, not from driver perspective) then your change is a good step forward.
in that case VPU_HHI_MEMPD would need to be removed from wherever it's currently used -> that means we need to also decide if we want to break compatibility with older (before this series) .dtbs

As per the datasheet S922X Datasheet, HDMI and VPU are different reg controller and they are independent of each other.

[...]

Quoted 1 line

Note: HDMI and AUDIO and Ethernet are also independent of each other.

let me say it this way: I've seen cases where the information from the datasheet is not correct

Also to me it doesn't explicitly state that the bits are independent of each other (at the same time it also doesn't state that they belong together).

In the same datasheet you also find the HHI_HDMI_PLL_CNTL0 register hdmi_dpll_M, hdmi_dpll_N and hdmi_dpll_od are listed in there. The PLL output depends on hdmi_dpll_M and hdmi_dpll_N while hdmi_dpll_od is taking the output of the two and dividing it. This relation is nowhere described in the datasheet either so you "just have to know it".

Quoted 4 lines

Unfortunately I don't know of any good way to check the relationship of the power domain registers other than someone from Amlogic explaining to us how it works internally.

I should have sought more details on this feature before posting something. Thanks for the detailed explanation of this feature,

So in order for this feature to work the final state should be *active* for each power domain.

Quoted 29 lines

[...]

Quoted 8 lines

Below is the output on Odroid N2.

[alarm@archl-on2 ~]$ sudo cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status children
performance
/device runtime status
----------------------------------------------------------------------------------------------
HDMI on

Quoted 15 lines
            0
    /devices/platform/soc/ff600000.bus/ff600000.hdmi-tx  unsupported
             0
AUDIO                           on
            0
    /devices/platform/sound                             unsupported
            0
ETH                             on
            0
    /devices/platform/soc/ff3f0000.ethernet             active
            0
VPU                             on
            0
    /devices/platform/soc/ff900000.vpu                  unsupported
            0

This describes what Linux sees (based on how you configured the device-tree). The output confirms what you are expecting to see (I think), but based on that we can't tell what's right or wrong in terms of the actual hardware.

Quoted 10 lines

To make another example: I could edit meson-g12b-odroid-n2.dtsi and change the vin-supply of "VDDAO_3V3" to &usb_pwr_en
Then /sys/kernel/debug/regulator/regulator_summary would show that VDDAO_3V3 is taking the voltage from USB_PWR_EN as input. But from a hardware (schematics) perspective this is not correct. Since the schematics describe the relation (input, output) between the regulators we know how they are connected to each other.
If this relation was not described in the schematics then we'd be in the same situation as with the power do

On Amlogic SBC, I think VDDAO_3V3 and VDDIO_AO1V8 share the power with SD card and USB.
so can we add these as optional regulators to enable/disable within the usb driver if needed?

I am facing some issues to fix the power on Odroid C1+ and C2 board as well.

Quoted 2 lines

Best regards,
Martin

Thanks
-Anand

author
#10 lore raw

PATCH 4/9 arm64: dts: amlogic: Add hdmi power domain for g12a and g12b

In reply to Anand Moon

Add hdmi power domain id for hdmi on g12a and g12b sbc to enable hdmi power domain via "pwrc" controller.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts       | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi      | 1 +
 5 files changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +1 -0
index 24599f448564..23de424b58ee 100644
@@ -373,6 +373,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_G12A_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +1 -0
index a26bfe72550f..4a8b3bc07151 100644
@@ -208,6 +208,7 @@ &hdmi_tx {
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
 	pinctrl-names = "default";
 	hdmi-supply = <&vcc_5v>;
+	power-domains = <&pwrc PWRC_G12A_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +1 -0
index 1c821800514a..09ce4a95ed7e 100644
@@ -309,6 +309,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_G12A_HDMI_ID>;
 	hdmi-supply = <&vcc_5v>;
 };
 
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi +1 -0
index e99533dd64c2..2ac7cdcd622a 100644
@@ -510,6 +510,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_G12A_HDMI_ID>;
 	hdmi-supply = <&vcc_5v>;
 };
 
arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi +1 -0
index feb088504740..f8ff459cff78 100644
@@ -286,6 +286,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_G12A_HDMI_ID>;
 	hdmi-supply = <&vcc_5v>;
 };
 
Signature · 1 line
2.31.1
author
#11 lore raw

PATCH 5/9 soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson sm1 SoCs

In reply to Anand Moon

As per the S905X3 datasheet add hdmi power domain
controller for Meson sm1 SoCs.

Cc Neil Armstrong <[email protected]>
---
 drivers/soc/amlogic/meson-ee-pwrc.c         | 1 +
 include/dt-bindings/power/meson-sm1-power.h | 1 +
 2 files changed, 2 insertions(+)
drivers/soc/amlogic/meson-ee-pwrc.c +1 -0
index ec402c4ab931..062b2488f932 100644
@@ -302,6 +302,7 @@ static struct meson_ee_pwrc_domain_desc sm1_pwrc_domains[] = {
 				    pwrc_ee_get_power),
 	[PWRC_SM1_GE2D_ID] = TOP_PD("GE2D", &sm1_pwrc_ge2d, sm1_pwrc_mem_ge2d,
 				    pwrc_ee_get_power),
+	[PWRC_SM1_HDMI_ID] = MEM_PD("HDMI", meson_pwrc_mem_hdmi),
 	[PWRC_SM1_AUDIO_ID] = MEM_PD("AUDIO", sm1_pwrc_mem_audio),
 	[PWRC_SM1_ETH_ID] = MEM_PD("ETH", meson_pwrc_mem_eth),
 };
include/dt-bindings/power/meson-sm1-power.h +1 -0
index a020ab00c134..094a6a44ab96 100644
@@ -14,5 +14,6 @@
 #define PWRC_SM1_GE2D_ID	4
 #define PWRC_SM1_AUDIO_ID	5
 #define PWRC_SM1_ETH_ID		6
+#define PWRC_SM1_HDMI_ID	7
 
 #endif
Signature · 1 line
2.31.1
author
#12 lore raw

PATCH 6/9 arm64: dts: amlogic: Add audio power domain for sm1 SoC

In reply to Anand Moon

Add audio power domain id for hdmi on sm1 sbc to enable audio power domain via "pwrc" controller.

---
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 1 +
 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts  | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi +1 -0
index d14716b3d0f1..b16a9a2b6cc4 100644
@@ -174,6 +174,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_SM1_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +1 -0
index 2194a778973f..0ca72b000105 100644
@@ -256,6 +256,7 @@ sound {
 		assigned-clock-rates = <294912000>,
 				       <270950400>,
 				       <393216000>;
+		power-domains = <&pwrc PWRC_SM1_AUDIO_ID>;
 		status = "okay";
 
 		dai-link-0 {
Signature · 1 line
2.31.1
author
#13 lore raw

PATCH 7/9 arm64: dts: amlogic: Add hdmi power domain for sm1 sbc

In reply to Anand Moon

Add hdmi power domain id for hdmi on sm1 sbc to enable hdmi power domain via "pwrc" controller.

---
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi | 1 +
 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts  | 1 +
 2 files changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi +1 -0
index b16a9a2b6cc4..fd8544d0150f 100644
@@ -347,6 +347,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_SM1_HDMI_ID>;
 	hdmi-supply = <&vcc_5v>;
 };
 
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +1 -0
index 0ca72b000105..c9fc51d81fca 100644
@@ -413,6 +413,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_SM1_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
Signature · 1 line
2.31.1
author
#14 lore raw

PATCH 8/9 soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson gxbb and gxl SoCs

In reply to Anand Moon

As per the S905X datasheet add hdmi power domain
controller for Meson gxbb and gxl SoCs.

Cc Neil Armstrong <[email protected]>
---
 drivers/soc/amlogic/meson-ee-pwrc.c          | 1 +
 include/dt-bindings/power/meson-gxbb-power.h | 1 +
 2 files changed, 2 insertions(+)
drivers/soc/amlogic/meson-ee-pwrc.c +1 -0
index 062b2488f932..23a748ee9e68 100644
@@ -268,6 +268,7 @@ static struct meson_ee_pwrc_domain_desc g12a_pwrc_domains[] = {
 static struct meson_ee_pwrc_domain_desc gxbb_pwrc_domains[] = {
 	[PWRC_GXBB_VPU_ID]  = VPU_PD("VPU", &gx_pwrc_vpu, gxbb_pwrc_mem_vpu,
 				     pwrc_ee_get_power, 12, 2),
+	[PWRC_GXBB_HDMI_ID] = MEM_PD("HDMI", meson_pwrc_mem_hdmi),
 	[PWRC_GXBB_ETHERNET_MEM_ID] = MEM_PD("ETH", meson_pwrc_mem_eth),
 };
 
include/dt-bindings/power/meson-gxbb-power.h +1 -0
index 1262dac696c0..eafa92eb836e 100644
@@ -9,5 +9,6 @@
 
 #define PWRC_GXBB_VPU_ID		0
 #define PWRC_GXBB_ETHERNET_MEM_ID	1
+#define PWRC_GXBB_HDMI_ID		2
 
 #endif
Signature · 1 line
2.31.1
author
#15 lore raw

PATCH 9/9 arm64: dts: amlogic: Add hdmi power domain for gxbb and gxl

In reply to Anand Moon

Add hdmi power domain id for hdmi on gxbb and gxl and gxm sbc to enable hdmi power domain, via "pwrc" controller.

---
 arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi          | 1 +
 arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi             | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts            | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts          | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts             | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi                | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi            | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi               | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts            | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts            | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts      | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts    | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts     | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts            | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts           | 1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts             | 1 +
 18 files changed, 18 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi +1 -0
index 2d7032f41e4b..272e54be0365 100644
@@ -311,6 +311,7 @@ &hdmi_tx {
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
 	hdmi-supply = <&vcc5v>;
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 	status = "okay";
 };
 
arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi +1 -0
index dafc841f7c16..c9f17174436f 100644
@@ -220,6 +220,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 	hdmi-supply = <&hdmi_5v>;
 };
 
arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts +1 -0
index 7273eed5292c..6b5330344b94 100644
@@ -219,6 +219,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts +1 -0
index f887bfb445fd..569b32f9e8e7 100644
@@ -222,6 +222,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -0
index 201596247fd9..344834f6c475 100644
@@ -269,6 +269,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 	hdmi-supply = <&hdmi_p5v0>;
 };
 
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +1 -0
index e803a466fe4e..b747cdc6ede8 100644
@@ -132,6 +132,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +1 -0
index 9b0b81f191f1..ae10bd4cb858 100644
@@ -140,6 +140,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi +1 -0
index a350fee1264d..609544efd742 100644
@@ -161,6 +161,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-libretech-ac.dts +1 -0
index 2d769203f671..f8cd86c13765 100644
@@ -209,6 +209,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts +1 -0
index eb7f5a3fefd4..ec38ca9a6818 100644
@@ -136,6 +136,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts +1 -0
index b2ab05c22090..b0707382da30 100644
@@ -95,6 +95,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts +1 -0
index 60feac0179c0..0266a14c428c 100644
@@ -116,6 +116,7 @@ &hdmi_tx {
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
 	hdmi-supply = <&hdmi_5v>;
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts +1 -0
index 93d8f8aff70d..bd3be5a2f4bf 100644
@@ -224,6 +224,7 @@ &hdmi_tx {
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	hdmi-supply = <&vcc5v>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +1 -0
index 82bfabfbd39c..8f6fdcf8466b 100644
@@ -229,6 +229,7 @@ &hdmi_tx {
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
 	hdmi-supply = <&hdmi_5v>;
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts +1 -0
index f1acca5c4434..5837114368b5 100644
@@ -127,6 +127,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts +1 -0
index 2602940c2077..b951cd767c30 100644
@@ -52,6 +52,7 @@ &hdmi_tx {
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
 	hdmi-supply = <&hdmi_5v>;
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts +1 -0
index 18a4b7a6c5df..64ccf599fc76 100644
@@ -246,6 +246,7 @@ &hdmi_tx {
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
 	hdmi-supply = <&hdmi_5v>;
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts +1 -0
index dfa7a37a1281..c64d1fcda299 100644
@@ -121,6 +121,7 @@ &hdmi_tx {
 	status = "okay";
 	pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
 	pinctrl-names = "default";
+	power-domains = <&pwrc PWRC_GXBB_HDMI_ID>;
 };
 
 &hdmi_tx_tmds_port {
Signature · 1 line
2.31.1
reviewer
#16 lore raw
In reply to Anand Moon
Quoted 7 lines · Anand Moon

Patch series add Audio and Hdmi power domain for Amlogic SoC.

Tested on GXBB - Odroid C2
SM1 - Odroid C4
G12B - Odroid N2
-Anand

AFAIK, the audio power domain is a no-op on the g12/sm1. At least this is what we've been told by AML. Unless this solves something, I don't think it should be done at all.

Quoted 47 lines

Anand Moon (9):
soc: amlogic: meson-ee-pwrc: Add audio power domain Meson g12a and
g12b SoCs
arm64: dts: amlogic: Add audio power domain for g12a and g12b
soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson g12a SoCs
arm64: dts: amlogic: Add hdmi power domain for g12a and g12b
soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson sm1 SoCs
arm64: dts: amlogic: Add audio power domain for sm1 SoC
arm64: dts: amlogic: Add hdmi power domain for sm1 sbc
soc: amlogic: meson-ee-pwrc: Add hdmi power domain Meson gxbb and gxl
SoCs
arm64: dts: amlogic: Add hdmi power domain for gxbb and gxl

 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts    |  2 ++
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts      |  1 +
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts   |  2 ++
 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts  |  1 +
 .../arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts    |  1 +
 .../arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi |  2 ++
 arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-g12b-w400.dtsi     |  1 +
 .../boot/dts/amlogic/meson-gx-libretech-pc.dtsi      |  1 +
 arch/arm64/boot/dts/amlogic/meson-gx-p23x-q20x.dtsi  |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts |  1 +
 .../boot/dts/amlogic/meson-gxbb-nexbox-a95x.dts      |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts  |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi     |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi    |  1 +
 .../dts/amlogic/meson-gxl-s805x-libretech-ac.dts     |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s805x-p241.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts |  1 +
 .../boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts  |  1 +
 .../dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts  |  1 +
 .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts     |  1 +
 .../boot/dts/amlogic/meson-gxl-s905x-nexbox-a95x.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dts |  1 +
 .../arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts |  1 +
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts  |  1 +
 arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi    |  2 ++
 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts     |  2 ++
 drivers/soc/amlogic/meson-ee-pwrc.c                  | 12 ++++++++++++
 include/dt-bindings/power/meson-g12a-power.h         |  2 ++
 include/dt-bindings/power/meson-gxbb-power.h         |  1 +
 include/dt-bindings/power/meson-sm1-power.h          |  1 +
 33 files changed, 50 insertions(+)
author
#17 lore raw

Hi Jerome,

Quoted 12 lines · Jerome Brunet
Quoted 7 lines · Anand Moon

Patch series add Audio and Hdmi power domain for Amlogic SoC.

Tested on GXBB - Odroid C2
SM1 - Odroid C4
G12B - Odroid N2
-Anand

Quoted 4 lines

AFAIK, the audio power domain is a no-op on the g12/sm1. At least this is what we've been told by AML. Unless this solves something, I don't think it should be done at all.

Opps, I unitedly make some assumption,.I will drop these changes.

Thanks
-Anand