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(+)
--
2.31.1
Add audio power domain id for sound on g12a and g12b sbc
to enable audio power domain via "pwrc" controller.
Signed-off-by: Anand Moon <[email protected]>
---
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(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 81269ccc2496..24599f448564 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -217,6 +217,7 @@ sound {
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
+ power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
status = "okay";
dai-link-0 {
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 579f3d02d613..1c821800514a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -167,6 +167,7 @@ sound {
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
+ power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
status = "okay";
dai-link-0 {
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
index 6c7bfacbad78..99ed165a41c9 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
@@ -49,6 +49,7 @@ sound {
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
+ power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
status = "okay";
dai-link-0 {
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
index 707daf92787b..6bcc4685e65b 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking-pro.dts
@@ -58,6 +58,7 @@ sound {
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
+ power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
status = "okay";
dai-link-0 {
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
index 5d96c1449050..555524cd50f2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gtking.dts
@@ -45,6 +45,7 @@ sound {
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
+ power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
status = "okay";
dai-link-0 {
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 344573e157a7..e99533dd64c2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -258,6 +258,7 @@ sound {
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
+ power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
status = "okay";
dai-link-0 {
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
index 0c7892600d56..4b12685af1ad 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-ugoos-am6.dts
@@ -40,6 +40,7 @@ sound {
assigned-clock-rates = <294912000>,
<270950400>,
<393216000>;
+ power-domains = <&pwrc PWRC_G12A_AUDIO_ID>;
status = "okay";
dai-link-0 {
--
2.31.1
As per the S905X datasheet add hdmi power domain
controller for Meson gxbb and gxl SoCs.
Cc: Neil Armstrong <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
drivers/soc/amlogic/meson-ee-pwrc.c | 1 +
include/dt-bindings/power/meson-gxbb-power.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c
index 062b2488f932..23a748ee9e68 100644
--- a/drivers/soc/amlogic/meson-ee-pwrc.c
+++ b/drivers/soc/amlogic/meson-ee-pwrc.c
@@ -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),
};
diff --git a/include/dt-bindings/power/meson-gxbb-power.h b/include/dt-bindings/power/meson-gxbb-power.h
index 1262dac696c0..eafa92eb836e 100644
--- a/include/dt-bindings/power/meson-gxbb-power.h
+++ b/include/dt-bindings/power/meson-gxbb-power.h
@@ -9,5 +9,6 @@
#define PWRC_GXBB_VPU_ID 0
#define PWRC_GXBB_ETHERNET_MEM_ID 1
+#define PWRC_GXBB_HDMI_ID 2
#endif
--
2.31.1
Add hdmi power domain id for hdmi on sm1 sbc
to enable hdmi power domain via "pwrc" controller.
Signed-off-by: Anand Moon <[email protected]>
---
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(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
index b16a9a2b6cc4..fd8544d0150f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid.dtsi
@@ -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>;
};
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
index 0ca72b000105..c9fc51d81fca 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts
@@ -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 {
--
2.31.1
As per the S922X datasheet add hdmi power domain
controller for Meson g12a and g12b SoCs.
Cc: Neil Armstrong <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
drivers/soc/amlogic/meson-ee-pwrc.c | 5 +++++
include/dt-bindings/power/meson-g12a-power.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c
index 2e07ddf2d6a6..ec402c4ab931 100644
--- a/drivers/soc/amlogic/meson-ee-pwrc.c
+++ b/drivers/soc/amlogic/meson-ee-pwrc.c
@@ -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),
};
diff --git a/include/dt-bindings/power/meson-g12a-power.h b/include/dt-bindings/power/meson-g12a-power.h
index 1cf20e4e412e..900924d17798 100644
--- a/include/dt-bindings/power/meson-g12a-power.h
+++ b/include/dt-bindings/power/meson-g12a-power.h
@@ -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
--
2.31.1
As per the S922X datasheet add audio power domain controller for
Meson g12a and g12b SoCs.
Cc: Neil Armstrong <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
drivers/soc/amlogic/meson-ee-pwrc.c | 5 +++++
include/dt-bindings/power/meson-g12a-power.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/soc/amlogic/meson-ee-pwrc.c b/drivers/soc/amlogic/meson-ee-pwrc.c
index 50bf5d2b828b..2e07ddf2d6a6 100644
--- a/drivers/soc/amlogic/meson-ee-pwrc.c
+++ b/drivers/soc/amlogic/meson-ee-pwrc.c
@@ -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),
};
diff --git a/include/dt-bindings/power/meson-g12a-power.h b/include/dt-bindings/power/meson-g12a-power.h
index bb5e67a842de..1cf20e4e412e 100644
--- a/include/dt-bindings/power/meson-g12a-power.h
+++ b/include/dt-bindings/power/meson-g12a-power.h
@@ -9,5 +9,6 @@
#define PWRC_G12A_VPU_ID 0
#define PWRC_G12A_ETH_ID 1
+#define PWRC_G12A_AUDIO_ID 2
#endif
--
2.31.1