arm64: dts: imx8mq: Combine PCIE power domains
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Fri, 5 Apr 2019 17:30:02 +0000 (10:30 -0700)
committerShawn Guo <shawnguo@kernel.org>
Thu, 11 Apr 2019 06:59:10 +0000 (14:59 +0800)
According to NXP's FAE feedback and a comment in ATF firmware, PCIE1
and PCIE2 power domains can't really be used independently. Due to
shared reset line both power domains have to be turned on at the same
time. Account for that quirk by combining PCIE power domains into a
single 'pgc_pcie' power domain.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Leonard Crestez <leonard.crestez@nxp.com>
Cc: "A.s. Dong" <aisheng.dong@nxp.com>
Cc: Richard Zhu <hongxing.zhu@nxp.com>
Cc: linux-imx@nxp.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/imx8mq.dtsi

index 0235967..253d6d6 100644 (file)
                                                reg = <IMX8M_POWER_DOMAIN_MIPI>;
                                        };
 
-                                       pgc_pcie1: power-domain@1 {
+                                       /*
+                                        * 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 {