All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrien Grassein <adrien.grassein@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com,
	devicetree@vger.kernel.org,
	Adrien Grassein <adrien.grassein@gmail.com>
Subject: [PATCH] arm64: dts imx8mm: Add power domains
Date: Sun,  6 Dec 2020 18:43:04 +0100	[thread overview]
Message-ID: <20201206174304.28106-1-adrien.grassein@gmail.com> (raw)

Power domains were not defined for imx8mm
but, according to spec, they are the same as on
the imx8mq SoC.

Tested on a Boundary Nitrogen 8M Mini board.


Signed-off-by: Adrien Grassein <adrien.grassein@gmail.com>
---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 76 +++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index 05ee062548e4..72f69a6da5c3 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -8,6 +8,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/thermal/thermal.h>
+#include <dt-bindings/power/imx8mq-power.h>
 
 #include "imx8mm-pinfunc.h"
 
@@ -549,6 +550,81 @@
 			};
 		};
 
+		gpc: gpc@303a0000 {
+			compatible = "fsl,imx8mq-gpc";
+			reg = <0x303a0000 0x10000>;
+			interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&gic>;
+			interrupt-controller;
+			#interrupt-cells = <3>;
+
+			pgc {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				pgc_mipi: power-domain@0 {
+					#power-domain-cells = <0>;
+					reg = <IMX8M_POWER_DOMAIN_MIPI>;
+				};
+
+				/*
+				 * As per comment in ATF source code:
+				 *
+				 * PCIE1 and PCIE2 share the
+				 * same reset signal, if we
+				 * power down PCIE2, PCIE1
+				 * will be held in reset too.
+				 *
+				 * So instead of creating two
+				 * separate power domains for
+				 * PCIE1 and PCIE2 we create a
+				 * link between both and use
+				 * it as a shared PCIE power
+				 * domain.
+				 */
+				pgc_pcie: power-domain@1 {
+					#power-domain-cells = <0>;
+					reg = <IMX8M_POWER_DOMAIN_PCIE1>;
+					power-domains = <&pgc_pcie2>;
+				};
+
+				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_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>;
+				};
+			};
+		};
+
 		aips2: bus@30400000 {
 			compatible = "fsl,aips-bus", "simple-bus";
 			reg = <0x30400000 0x400000>;
-- 
2.20.1


             reply	other threads:[~2020-12-06 17:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06 17:43 Adrien Grassein [this message]
2020-12-07  9:43 ` [PATCH] arm64: dts imx8mm: Add power domains Lucas Stach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201206174304.28106-1-adrien.grassein@gmail.com \
    --to=adrien.grassein@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.