diff mbox series

arm64: dts: meson-gx: Switch to the meson-ee-pwrc bindings

Message ID 20200620161211.23685-1-martin.blumenstingl@googlemail.com (mailing list archive)
State Mainlined
Commit 5273d6cacc067e7a8552e29cabddb4934f4e05b7
Headers show
Series arm64: dts: meson-gx: Switch to the meson-ee-pwrc bindings | expand

Commit Message

Martin Blumenstingl June 20, 2020, 4:12 p.m. UTC
The "amlogic,meson-gx-pwrc-vpu" binding only supports the VPU power
domain, while actually there are more power domains behind that set of
registers. Switch to the new bindings so we can add more power domains
as needed.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-gx.dtsi   | 18 ++++++++++--------
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi |  7 +++++--
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi  |  7 +++++--
 3 files changed, 20 insertions(+), 12 deletions(-)

Comments

Neil Armstrong June 22, 2020, 7:55 a.m. UTC | #1
On 20/06/2020 18:12, Martin Blumenstingl wrote:
> The "amlogic,meson-gx-pwrc-vpu" binding only supports the VPU power
> domain, while actually there are more power domains behind that set of
> registers. Switch to the new bindings so we can add more power domains
> as needed.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-gx.dtsi   | 18 ++++++++++--------
>  arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi |  7 +++++--
>  arch/arm64/boot/dts/amlogic/meson-gxl.dtsi  |  7 +++++--
>  3 files changed, 20 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index ba63c36b22e0..0edd137151f8 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -12,6 +12,7 @@
>  #include <dt-bindings/gpio/gpio.h>
>  #include <dt-bindings/interrupt-controller/irq.h>
>  #include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/power/meson-gxbb-power.h>
>  #include <dt-bindings/thermal/thermal.h>
>  
>  / {
> @@ -60,7 +61,7 @@ simplefb_cvbs: framebuffer-cvbs {
>  			compatible = "amlogic,simple-framebuffer",
>  				     "simple-framebuffer";
>  			amlogic,pipeline = "vpu-cvbs";
> -			power-domains = <&pwrc_vpu>;
> +			power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
>  			status = "disabled";
>  		};
>  
> @@ -68,7 +69,7 @@ simplefb_hdmi: framebuffer-hdmi {
>  			compatible = "amlogic,simple-framebuffer",
>  				     "simple-framebuffer";
>  			amlogic,pipeline = "vpu-hdmi";
> -			power-domains = <&pwrc_vpu>;
> +			power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
>  			status = "disabled";
>  		};
>  	};
> @@ -438,12 +439,6 @@ sysctrl_AO: sys-ctrl@0 {
>  				compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
>  				reg =  <0x0 0x0 0x0 0x100>;
>  
> -				pwrc_vpu: power-controller-vpu {
> -					compatible = "amlogic,meson-gx-pwrc-vpu";
> -					#power-domain-cells = <0>;
> -					amlogic,hhi-sysctrl = <&sysctrl>;
> -				};
> -
>  				clkc_AO: clock-controller {
>  					compatible = "amlogic,meson-gx-aoclkc";
>  					#clock-cells = <1>;
> @@ -552,6 +547,12 @@ hiubus: bus@c883c000 {
>  			sysctrl: system-controller@0 {
>  				compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
>  				reg = <0 0 0 0x400>;
> +
> +				pwrc: power-controller {
> +					compatible = "amlogic,meson-gxbb-pwrc";
> +					#power-domain-cells = <1>;
> +					amlogic,ao-sysctrl = <&sysctrl_AO>;
> +				};
>  			};
>  
>  			mailbox: mailbox@404 {
> @@ -574,6 +575,7 @@ ethmac: ethernet@c9410000 {
>  			interrupt-names = "macirq";
>  			rx-fifo-depth = <4096>;
>  			tx-fifo-depth = <2048>;
> +			power-domains = <&pwrc PWRC_GXBB_ETHERNET_MEM_ID>;
>  			status = "disabled";
>  		};
>  
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> index 03c25b9facff..ea50dd434887 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> @@ -748,7 +748,7 @@ mux {
>  	};
>  };
>  
> -&pwrc_vpu {
> +&pwrc {
>  	resets = <&reset RESET_VIU>,
>  		 <&reset RESET_VENC>,
>  		 <&reset RESET_VCBUS>,
> @@ -761,6 +761,9 @@ &pwrc_vpu {
>  		 <&reset RESET_VDI6>,
>  		 <&reset RESET_VENCL>,
>  		 <&reset RESET_VID_LOCK>;
> +	reset-names = "viu", "venc", "vcbus", "bt656",
> +		      "dvin", "rdma", "venci", "vencp",
> +		      "vdac", "vdi6", "vencl", "vid_lock";
>  	clocks = <&clkc CLKID_VPU>,
>  	         <&clkc CLKID_VAPB>;
>  	clock-names = "vpu", "vapb";
> @@ -867,7 +870,7 @@ &uart_C {
>  
>  &vpu {
>  	compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu";
> -	power-domains = <&pwrc_vpu>;
> +	power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
>  };
>  
>  &vdec {
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> index 60484bbc7272..beb5fc79d186 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> @@ -783,7 +783,7 @@ external_mdio: mdio@2009087f {
>  	};
>  };
>  
> -&pwrc_vpu {
> +&pwrc {
>  	resets = <&reset RESET_VIU>,
>  		 <&reset RESET_VENC>,
>  		 <&reset RESET_VCBUS>,
> @@ -796,6 +796,9 @@ &pwrc_vpu {
>  		 <&reset RESET_VDI6>,
>  		 <&reset RESET_VENCL>,
>  		 <&reset RESET_VID_LOCK>;
> +	reset-names = "viu", "venc", "vcbus", "bt656",
> +		      "dvin", "rdma", "venci", "vencp",
> +		      "vdac", "vdi6", "vencl", "vid_lock";
>  	clocks = <&clkc CLKID_VPU>,
>  	         <&clkc CLKID_VAPB>;
>  	clock-names = "vpu", "vapb";
> @@ -902,7 +905,7 @@ &uart_C {
>  
>  &vpu {
>  	compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu";
> -	power-domains = <&pwrc_vpu>;
> +	power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
>  };
>  
>  &vdec {
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Kevin Hilman July 13, 2020, 7:03 p.m. UTC | #2
On Sat, 20 Jun 2020 18:12:11 +0200, Martin Blumenstingl wrote:
> The "amlogic,meson-gx-pwrc-vpu" binding only supports the VPU power
> domain, while actually there are more power domains behind that set of
> registers. Switch to the new bindings so we can add more power domains
> as needed.

Applied, thanks!

[1/1] arm64: dts: meson-gx: Switch to the meson-ee-pwrc bindings
      (no commit info)

Best regards,
patchwork-bot+linux-amlogic@kernel.org July 13, 2020, 7:21 p.m. UTC | #3
Hello:

This patch was applied to khilman/linux-amlogic.git (refs/heads/for-next).

On Sat, 20 Jun 2020 18:12:11 +0200 you wrote:
> The "amlogic,meson-gx-pwrc-vpu" binding only supports the VPU power
> domain, while actually there are more power domains behind that set of
> registers. Switch to the new bindings so we can add more power domains
> as needed.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> 
> [...]


Here is a summary with links:
  - arm64: dts: meson-gx: Switch to the meson-ee-pwrc bindings
    https://git.kernel.org/khilman/linux-amlogic/c/5273d6cacc067e7a8552e29cabddb4934f4e05b7

You are awesome, thank you!
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index ba63c36b22e0..0edd137151f8 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -12,6 +12,7 @@ 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/meson-gxbb-power.h>
 #include <dt-bindings/thermal/thermal.h>
 
 / {
@@ -60,7 +61,7 @@  simplefb_cvbs: framebuffer-cvbs {
 			compatible = "amlogic,simple-framebuffer",
 				     "simple-framebuffer";
 			amlogic,pipeline = "vpu-cvbs";
-			power-domains = <&pwrc_vpu>;
+			power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
 			status = "disabled";
 		};
 
@@ -68,7 +69,7 @@  simplefb_hdmi: framebuffer-hdmi {
 			compatible = "amlogic,simple-framebuffer",
 				     "simple-framebuffer";
 			amlogic,pipeline = "vpu-hdmi";
-			power-domains = <&pwrc_vpu>;
+			power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
 			status = "disabled";
 		};
 	};
@@ -438,12 +439,6 @@  sysctrl_AO: sys-ctrl@0 {
 				compatible = "amlogic,meson-gx-ao-sysctrl", "simple-mfd", "syscon";
 				reg =  <0x0 0x0 0x0 0x100>;
 
-				pwrc_vpu: power-controller-vpu {
-					compatible = "amlogic,meson-gx-pwrc-vpu";
-					#power-domain-cells = <0>;
-					amlogic,hhi-sysctrl = <&sysctrl>;
-				};
-
 				clkc_AO: clock-controller {
 					compatible = "amlogic,meson-gx-aoclkc";
 					#clock-cells = <1>;
@@ -552,6 +547,12 @@  hiubus: bus@c883c000 {
 			sysctrl: system-controller@0 {
 				compatible = "amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon";
 				reg = <0 0 0 0x400>;
+
+				pwrc: power-controller {
+					compatible = "amlogic,meson-gxbb-pwrc";
+					#power-domain-cells = <1>;
+					amlogic,ao-sysctrl = <&sysctrl_AO>;
+				};
 			};
 
 			mailbox: mailbox@404 {
@@ -574,6 +575,7 @@  ethmac: ethernet@c9410000 {
 			interrupt-names = "macirq";
 			rx-fifo-depth = <4096>;
 			tx-fifo-depth = <2048>;
+			power-domains = <&pwrc PWRC_GXBB_ETHERNET_MEM_ID>;
 			status = "disabled";
 		};
 
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 03c25b9facff..ea50dd434887 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -748,7 +748,7 @@  mux {
 	};
 };
 
-&pwrc_vpu {
+&pwrc {
 	resets = <&reset RESET_VIU>,
 		 <&reset RESET_VENC>,
 		 <&reset RESET_VCBUS>,
@@ -761,6 +761,9 @@  &pwrc_vpu {
 		 <&reset RESET_VDI6>,
 		 <&reset RESET_VENCL>,
 		 <&reset RESET_VID_LOCK>;
+	reset-names = "viu", "venc", "vcbus", "bt656",
+		      "dvin", "rdma", "venci", "vencp",
+		      "vdac", "vdi6", "vencl", "vid_lock";
 	clocks = <&clkc CLKID_VPU>,
 	         <&clkc CLKID_VAPB>;
 	clock-names = "vpu", "vapb";
@@ -867,7 +870,7 @@  &uart_C {
 
 &vpu {
 	compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu";
-	power-domains = <&pwrc_vpu>;
+	power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
 };
 
 &vdec {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 60484bbc7272..beb5fc79d186 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -783,7 +783,7 @@  external_mdio: mdio@2009087f {
 	};
 };
 
-&pwrc_vpu {
+&pwrc {
 	resets = <&reset RESET_VIU>,
 		 <&reset RESET_VENC>,
 		 <&reset RESET_VCBUS>,
@@ -796,6 +796,9 @@  &pwrc_vpu {
 		 <&reset RESET_VDI6>,
 		 <&reset RESET_VENCL>,
 		 <&reset RESET_VID_LOCK>;
+	reset-names = "viu", "venc", "vcbus", "bt656",
+		      "dvin", "rdma", "venci", "vencp",
+		      "vdac", "vdi6", "vencl", "vid_lock";
 	clocks = <&clkc CLKID_VPU>,
 	         <&clkc CLKID_VAPB>;
 	clock-names = "vpu", "vapb";
@@ -902,7 +905,7 @@  &uart_C {
 
 &vpu {
 	compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu";
-	power-domains = <&pwrc_vpu>;
+	power-domains = <&pwrc PWRC_GXBB_VPU_ID>;
 };
 
 &vdec {