linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains
@ 2019-01-15 11:01 Lucas Stach
  2019-01-15 11:01 ` [PATCH v2 2/2] arm64: imx8mq: select PM support Lucas Stach
  2019-01-16  3:16 ` [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains Shawn Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Lucas Stach @ 2019-01-15 11:01 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Fabio Estevam, patchwork-lst, NXP Linux Team, linux-arm-kernel, kernel

This adds support for the power domain controller found on the
i.MX8MQ SoC.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
v2:
- fix node numbering to be in hex
- make node names more generic by dropping pgc- prefix
- add required reset clocks for the GPU domain
---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 70 +++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index a55b9329376b..5bd1f106ed84 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -5,6 +5,7 @@
  */
 
 #include <dt-bindings/clock/imx8mq-clock.h>
+#include <dt-bindings/power/imx8mq-power.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include "imx8mq-pinfunc.h"
@@ -252,6 +253,75 @@
 				              "clk_ext1", "clk_ext2",
 				              "clk_ext3", "clk_ext4";
 			};
+
+			gpc: gpc@303a0000 {
+				compatible = "fsl,imx8mq-gpc";
+				reg = <0x303a0000 0x10000>;
+
+				pgc {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					pgc_mipi: power-domain@0 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_MIPI>;
+					};
+
+					pgc_pcie1: power-domain@1 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_PCIE1>;
+					};
+
+					pgc_otg1: power-domain@2 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_USB_OTG1>;
+					};
+
+					pgc_otg2: power-domain@3 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_USB_OTG2>;
+					};
+
+					pgc_ddr1: power-domain@4 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_DDR1>;
+					};
+
+					pgc_gpu: power-domain@5 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_GPU>;
+						clocks = <&clk IMX8MQ_CLK_GPU_ROOT>,
+						         <&clk IMX8MQ_CLK_GPU_SHADER_DIV>,
+							 <&clk IMX8MQ_CLK_GPU_AXI>,
+						         <&clk IMX8MQ_CLK_GPU_AHB>;
+					};
+
+					pgc_vpu: power-domain@6 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_VPU>;
+					};
+
+					pgc_disp: power-domain@7 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_DISP>;
+					};
+
+					pgc_mipi_csi1: power-domain@8 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_MIPI_CSI1>;
+					};
+
+					pgc_mipi_csi2: power-domain@9 {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_MIPI_CSI2>;
+					};
+
+					pgc_pcie2: power-domain@a {
+						#power-domain-cells = <0>;
+						reg = <IMX8M_POWER_DOMAIN_PCIE2>;
+					};
+				};
+			};
 		};
 
 		bus@30400000 { /* AIPS2 */
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] arm64: imx8mq: select PM support
  2019-01-15 11:01 [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains Lucas Stach
@ 2019-01-15 11:01 ` Lucas Stach
  2019-01-16  3:17   ` Shawn Guo
  2019-01-16  3:16 ` [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains Shawn Guo
  1 sibling, 1 reply; 5+ messages in thread
From: Lucas Stach @ 2019-01-15 11:01 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Fabio Estevam, patchwork-lst, NXP Linux Team, linux-arm-kernel, kernel

The ATF on the i.MX8MQ device disables all non-essential power
domains. For correct on-SoC peripheral operation we need both
the power domain driver and generic domains, so device driver
probe gets ordered behind the power domain controller driver.

Select those options, as those being absent can lead to very
hard to debug failures.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm64/Kconfig.platforms | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 251ecf34cb02..bb0d78d1ca4d 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -146,6 +146,9 @@ config ARCH_MXC
 	bool "ARMv8 based NXP i.MX SoC family"
 	select ARM64_ERRATUM_843419
 	select ARM64_ERRATUM_845719
+	select CONFIG_PM
+	select PM_GENERIC_DOMAINS
+	select IMX_GPCV2_PM_DOMAINS
 	help
 	  This enables support for the ARMv8 based SoCs in the
 	  NXP i.MX family.
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains
  2019-01-15 11:01 [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains Lucas Stach
  2019-01-15 11:01 ` [PATCH v2 2/2] arm64: imx8mq: select PM support Lucas Stach
@ 2019-01-16  3:16 ` Shawn Guo
  1 sibling, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2019-01-16  3:16 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Fabio Estevam, patchwork-lst, NXP Linux Team, linux-arm-kernel, kernel

On Tue, Jan 15, 2019 at 12:01:44PM +0100, Lucas Stach wrote:
> This adds support for the power domain controller found on the
> i.MX8MQ SoC.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] arm64: imx8mq: select PM support
  2019-01-15 11:01 ` [PATCH v2 2/2] arm64: imx8mq: select PM support Lucas Stach
@ 2019-01-16  3:17   ` Shawn Guo
  2019-01-16  7:00     ` Aisheng Dong
  0 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2019-01-16  3:17 UTC (permalink / raw)
  To: Lucas Stach
  Cc: Fabio Estevam, patchwork-lst, NXP Linux Team, linux-arm-kernel, kernel

On Tue, Jan 15, 2019 at 12:01:45PM +0100, Lucas Stach wrote:
> The ATF on the i.MX8MQ device disables all non-essential power
> domains. For correct on-SoC peripheral operation we need both
> the power domain driver and generic domains, so device driver
> probe gets ordered behind the power domain controller driver.
> 
> Select those options, as those being absent can lead to very
> hard to debug failures.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  arch/arm64/Kconfig.platforms | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index 251ecf34cb02..bb0d78d1ca4d 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -146,6 +146,9 @@ config ARCH_MXC
>  	bool "ARMv8 based NXP i.MX SoC family"
>  	select ARM64_ERRATUM_843419
>  	select ARM64_ERRATUM_845719
> +	select CONFIG_PM

select PM

> +	select PM_GENERIC_DOMAINS
> +	select IMX_GPCV2_PM_DOMAINS

We would like to keep the list alphabetically sorted.

Shawn

>  	help
>  	  This enables support for the ARMv8 based SoCs in the
>  	  NXP i.MX family.
> -- 
> 2.20.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v2 2/2] arm64: imx8mq: select PM support
  2019-01-16  3:17   ` Shawn Guo
@ 2019-01-16  7:00     ` Aisheng Dong
  0 siblings, 0 replies; 5+ messages in thread
From: Aisheng Dong @ 2019-01-16  7:00 UTC (permalink / raw)
  To: Shawn Guo, Lucas Stach
  Cc: Fabio Estevam, patchwork-lst, dl-linux-imx, linux-arm-kernel, kernel

> -----Original Message-----
> From: Shawn Guo [mailto:shawnguo@kernel.org]
> Sent: Wednesday, January 16, 2019 11:17 AM
...
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > ---
> >  arch/arm64/Kconfig.platforms | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/arm64/Kconfig.platforms
> > b/arch/arm64/Kconfig.platforms index 251ecf34cb02..bb0d78d1ca4d
> 100644
> > --- a/arch/arm64/Kconfig.platforms
> > +++ b/arch/arm64/Kconfig.platforms
> > @@ -146,6 +146,9 @@ config ARCH_MXC
> >  	bool "ARMv8 based NXP i.MX SoC family"
> >  	select ARM64_ERRATUM_843419
> >  	select ARM64_ERRATUM_845719
> > +	select CONFIG_PM
> 
> select PM
> 
> > +	select PM_GENERIC_DOMAINS
> > +	select IMX_GPCV2_PM_DOMAINS
> 
> We would like to keep the list alphabetically sorted.

Should these two options to through defconfig according to the former suggestion
From arm soc maintainer?

Put them here also means there's no chance to disable it for other imx v8 socs.

Regards
Dong Aisheng
> 
> Shawn
> 
> >  	help
> >  	  This enables support for the ARMv8 based SoCs in the
> >  	  NXP i.MX family.
> > --
> > 2.20.1
> >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-16  7:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 11:01 [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains Lucas Stach
2019-01-15 11:01 ` [PATCH v2 2/2] arm64: imx8mq: select PM support Lucas Stach
2019-01-16  3:17   ` Shawn Guo
2019-01-16  7:00     ` Aisheng Dong
2019-01-16  3:16 ` [PATCH v2 1/2] arm64: dts: imx8mq: add GPC power domains Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).