Skip to contentSkip to conversation

arm: dts: imx8mp: Import GPCv2 subset, HSIOMIX and USB PD

PATCH In review Marek Vasut 3 participants 9 messages Apr 1, 2022 – Apr 11, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: imx8mp: Import GPCv2 subset, HSIOMIX and USB PD

Add DT bindings for a subset of GPCv2 which handles USB and PCIe PDs, HSIOMIX PD controller and missing USB PD properties. This is required to bring up the DWC3 USB controller up.

This is based on linux next and patches which are still pending review, but which are likely going to be part of Linux 5.19:
b2d67d7bdf74 ("arm64: dts: imx8mp: disable usb3_phy1")
290918c72a29 ("arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3 nodes")
https://www.spinics.net/lists/arm-kernel/msg958501.html

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/dts/imx8mp.dtsi | 72 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 70 insertions(+), 2 deletions(-)
arch/arm/dts/imx8mp.dtsi +70 -2
index f9d64253c8a..79b65750da9 100644
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/clock/imx8mp-clock.h>
+#include <dt-bindings/power/imx8mp-power.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -434,6 +435,44 @@
 				interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
 				#reset-cells = <1>;
 			};
+
+			gpc: gpc@303a0000 {
+				compatible = "fsl,imx8mp-gpc";
+				reg = <0x303a0000 0x1000>;
+				interrupt-parent = <&gic>;
+				interrupt-controller;
+				#interrupt-cells = <3>;
+
+				pgc {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					pgc_pcie_phy: power-domain@1 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_PCIE_PHY>;
+					};
+
+					pgc_usb1_phy: power-domain@2 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_USB1_PHY>;
+					};
+
+					pgc_usb2_phy: power-domain@3 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_USB2_PHY>;
+					};
+
+					pgc_hsiomix: power-domains@17 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_HSIOMIX>;
+						clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
+							 <&clk IMX8MP_CLK_HSIO_ROOT>;
+						assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
+						assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
+						assigned-clock-rates = <500000000>;
+					};
+				};
+			};
 		};
 
 		aips2: bus@30400000 {
@@ -842,6 +881,28 @@
 			};
 		};
 
+		aips4: bus@32c00000 {
+			compatible = "fsl,aips-bus", "simple-bus";
+			reg = <0x32c00000 0x400000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			hsio_blk_ctrl: blk-ctrl@32f10000 {
+				compatible = "fsl,imx8mp-hsio-blk-ctrl", "syscon";
+				reg = <0x32f10000 0x24>;
+				clocks = <&clk IMX8MP_CLK_USB_ROOT>,
+					 <&clk IMX8MP_CLK_PCIE_ROOT>;
+				clock-names = "usb", "pcie";
+				power-domains = <&pgc_hsiomix>, <&pgc_hsiomix>,
+						<&pgc_usb1_phy>, <&pgc_usb2_phy>,
+						<&pgc_hsiomix>, <&pgc_pcie_phy>;
+				power-domain-names = "bus", "usb", "usb-phy1",
+						     "usb-phy2", "pcie", "pcie-phy";
+				#power-domain-cells = <1>;
+			};
+		};
+
 		gic: interrupt-controller@38800000 {
 			compatible = "arm,gic-v3";
 			reg = <0x38800000 0x10000>,
@@ -865,17 +926,20 @@
 			clock-names = "phy";
 			assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
 			assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY1>;
 			#phy-cells = <0>;
 			status = "disabled";
 		};
 
 		usb3_0: usb@32f10100 {
 			compatible = "fsl,imx8mp-dwc3";
-			reg = <0x32f10100 0x8>;
+			reg = <0x32f10100 0x8>,
+			      <0x381f0000 0x20>;
 			clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
 				 <&clk IMX8MP_CLK_USB_ROOT>;
 			clock-names = "hsio", "suspend";
 			interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			dma-ranges = <0x40000000 0x40000000 0xc0000000>;
@@ -907,16 +971,20 @@
 			clock-names = "phy";
 			assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
 			assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY2>;
 			#phy-cells = <0>;
+			status = "disabled";
 		};
 
 		usb3_1: usb@32f10108 {
 			compatible = "fsl,imx8mp-dwc3";
-			reg = <0x32f10108 0x8>;
+			reg = <0x32f10108 0x8>,
+			      <0x382f0000 0x20>;
 			clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
 				 <&clk IMX8MP_CLK_USB_ROOT>;
 			clock-names = "hsio", "suspend";
 			interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			dma-ranges = <0x40000000 0x40000000 0xc0000000>;
Signature · 1 line
2.35.1
Tested-by on v1 1/1
#1 lore raw
Quoted 150 lines · Marek Vasut

Add DT bindings for a subset of GPCv2 which handles USB and PCIe PDs, HSIOMIX PD controller and missing USB PD properties. This is required to bring up the DWC3 USB controller up.

This is based on linux next and patches which are still pending review, but which are likely going to be part of Linux 5.19:
b2d67d7bdf74 ("arm64: dts: imx8mp: disable usb3_phy1")
290918c72a29 ("arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3 nodes")
https://www.spinics.net/lists/arm-kernel/msg958501.html

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 arch/arm/dts/imx8mp.dtsi | 72 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 70 insertions(+), 2 deletions(-)
arch/arm/dts/imx8mp.dtsi +70 -3
index f9d64253c8a..79b65750da9 100644
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/clock/imx8mp-clock.h>
+#include <dt-bindings/power/imx8mp-power.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -434,6 +435,44 @@
                                interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                                #reset-cells = <1>;
                        };
+
+                       gpc: gpc@303a0000 {
+                               compatible = "fsl,imx8mp-gpc";
+                               reg = <0x303a0000 0x1000>;
+                               interrupt-parent = <&gic>;
+                               interrupt-controller;
+                               #interrupt-cells = <3>;
+
+                               pgc {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       pgc_pcie_phy: power-domain@1 {
+                                               #power-domain-cells = <0>;
+                                               reg = <IMX8MP_POWER_DOMAIN_PCIE_PHY>;
+                                       };
+
+                                       pgc_usb1_phy: power-domain@2 {
+                                               #power-domain-cells = <0>;
+                                               reg = <IMX8MP_POWER_DOMAIN_USB1_PHY>;
+                                       };
+
+                                       pgc_usb2_phy: power-domain@3 {
+                                               #power-domain-cells = <0>;
+                                               reg = <IMX8MP_POWER_DOMAIN_USB2_PHY>;
+                                       };
+
+                                       pgc_hsiomix: power-domains@17 {
+                                               #power-domain-cells = <0>;
+                                               reg = <IMX8MP_POWER_DOMAIN_HSIOMIX>;
+                                               clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
+                                                        <&clk IMX8MP_CLK_HSIO_ROOT>;
+                                               assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
+                                               assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
+                                               assigned-clock-rates = <500000000>;
+                                       };
+                               };
+                       };
                };
 
                aips2: bus@30400000 {
@@ -842,6 +881,28 @@
                        };
                };
 
+               aips4: bus@32c00000 {
+                       compatible = "fsl,aips-bus", "simple-bus";
+                       reg = <0x32c00000 0x400000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       hsio_blk_ctrl: blk-ctrl@32f10000 {
+                               compatible = "fsl,imx8mp-hsio-blk-ctrl", "syscon";
+                               reg = <0x32f10000 0x24>;
+                               clocks = <&clk IMX8MP_CLK_USB_ROOT>,
+                                        <&clk IMX8MP_CLK_PCIE_ROOT>;
+                               clock-names = "usb", "pcie";
+                               power-domains = <&pgc_hsiomix>, <&pgc_hsiomix>,
+                                               <&pgc_usb1_phy>, <&pgc_usb2_phy>,
+                                               <&pgc_hsiomix>, <&pgc_pcie_phy>;
+                               power-domain-names = "bus", "usb", "usb-phy1",
+                                                    "usb-phy2", "pcie", "pcie-phy";
+                               #power-domain-cells = <1>;
+                       };
+               };
+
                gic: interrupt-controller@38800000 {
                        compatible = "arm,gic-v3";
                        reg = <0x38800000 0x10000>,
@@ -865,17 +926,20 @@
                        clock-names = "phy";
                        assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
                        assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+                       power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY1>;
                        #phy-cells = <0>;
                        status = "disabled";
                };
 
                usb3_0: usb@32f10100 {
                        compatible = "fsl,imx8mp-dwc3";
-                       reg = <0x32f10100 0x8>;
+                       reg = <0x32f10100 0x8>,
+                             <0x381f0000 0x20>;
                        clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
                                 <&clk IMX8MP_CLK_USB_ROOT>;
                        clock-names = "hsio", "suspend";
                        interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+                       power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        dma-ranges = <0x40000000 0x40000000 0xc0000000>;
@@ -907,16 +971,20 @@
                        clock-names = "phy";
                        assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
                        assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+                       power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY2>;
                        #phy-cells = <0>;
+                       status = "disabled";
                };
 
                usb3_1: usb@32f10108 {
                        compatible = "fsl,imx8mp-dwc3";
-                       reg = <0x32f10108 0x8>;
+                       reg = <0x32f10108 0x8>,
+                             <0x382f0000 0x20>;
                        clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
                                 <&clk IMX8MP_CLK_USB_ROOT>;
                        clock-names = "hsio", "suspend";
                        interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+                       power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
                        #address-cells = <1>;
                        #size-cells = <1>;
                        dma-ranges = <0x40000000 0x40000000 0xc0000000>;
--
Quoted 2 lines

2.35.1

Thanks for working on this!

This helps get DWC3 USB working on IMX8MP.

Best Regards,

Tim

#2 lore raw
In reply to Marek Vasut

Hi Marek,

after bisecting, rather this breaks some boards like imx8mm_beacon (it is not the only one):

+In file included from arch/arm/dts/.imx8mp-evk.dtb.pre.tmp:8:

+arch/arm/dts/imx8mp.dtsi:7:10: fatal error: dt-bindings/power/imx8mp-power.h: No such file or directory

+ 7 | #include <dt-bindings/power/imx8mp-power.h>

+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+compilation terminated.

Can you check and then repost ? Thanks !

Best regards,
Stefano

Quoted 148 lines · Marek Vasut

Add DT bindings for a subset of GPCv2 which handles USB and PCIe PDs, HSIOMIX PD controller and missing USB PD properties. This is required to bring up the DWC3 USB controller up.

This is based on linux next and patches which are still pending review, but which are likely going to be part of Linux 5.19:
b2d67d7bdf74 ("arm64: dts: imx8mp: disable usb3_phy1")
290918c72a29 ("arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3 nodes")
https://www.spinics.net/lists/arm-kernel/msg958501.html

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
  arch/arm/dts/imx8mp.dtsi | 72 ++++++++++++++++++++++++++++++++++++++--
  1 file changed, 70 insertions(+), 2 deletions(-)
arch/arm/dts/imx8mp.dtsi +70 -2
index f9d64253c8a..79b65750da9 100644
@@ -4,6 +4,7 @@
   */
 
  #include <dt-bindings/clock/imx8mp-clock.h>
+#include <dt-bindings/power/imx8mp-power.h>
  #include <dt-bindings/gpio/gpio.h>
  #include <dt-bindings/input/input.h>
  #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -434,6 +435,44 @@
  				interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
  				#reset-cells = <1>;
  			};
+
+			gpc: gpc@303a0000 {
+				compatible = "fsl,imx8mp-gpc";
+				reg = <0x303a0000 0x1000>;
+				interrupt-parent = <&gic>;
+				interrupt-controller;
+				#interrupt-cells = <3>;
+
+				pgc {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					pgc_pcie_phy: power-domain@1 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_PCIE_PHY>;
+					};
+
+					pgc_usb1_phy: power-domain@2 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_USB1_PHY>;
+					};
+
+					pgc_usb2_phy: power-domain@3 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_USB2_PHY>;
+					};
+
+					pgc_hsiomix: power-domains@17 {
+						#power-domain-cells = <0>;
+						reg = <IMX8MP_POWER_DOMAIN_HSIOMIX>;
+						clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
+							 <&clk IMX8MP_CLK_HSIO_ROOT>;
+						assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
+						assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
+						assigned-clock-rates = <500000000>;
+					};
+				};
+			};
  		};
 
  		aips2: bus@30400000 {
@@ -842,6 +881,28 @@
  			};
  		};
 
+		aips4: bus@32c00000 {
+			compatible = "fsl,aips-bus", "simple-bus";
+			reg = <0x32c00000 0x400000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			hsio_blk_ctrl: blk-ctrl@32f10000 {
+				compatible = "fsl,imx8mp-hsio-blk-ctrl", "syscon";
+				reg = <0x32f10000 0x24>;
+				clocks = <&clk IMX8MP_CLK_USB_ROOT>,
+					 <&clk IMX8MP_CLK_PCIE_ROOT>;
+				clock-names = "usb", "pcie";
+				power-domains = <&pgc_hsiomix>, <&pgc_hsiomix>,
+						<&pgc_usb1_phy>, <&pgc_usb2_phy>,
+						<&pgc_hsiomix>, <&pgc_pcie_phy>;
+				power-domain-names = "bus", "usb", "usb-phy1",
+						     "usb-phy2", "pcie", "pcie-phy";
+				#power-domain-cells = <1>;
+			};
+		};
+
  		gic: interrupt-controller@38800000 {
  			compatible = "arm,gic-v3";
  			reg = <0x38800000 0x10000>,
@@ -865,17 +926,20 @@
  			clock-names = "phy";
  			assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
  			assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY1>;
  			#phy-cells = <0>;
  			status = "disabled";
  		};
 
  		usb3_0: usb@32f10100 {
  			compatible = "fsl,imx8mp-dwc3";
-			reg = <0x32f10100 0x8>;
+			reg = <0x32f10100 0x8>,
+			      <0x381f0000 0x20>;
  			clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
  				 <&clk IMX8MP_CLK_USB_ROOT>;
  			clock-names = "hsio", "suspend";
  			interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
  			#address-cells = <1>;
  			#size-cells = <1>;
  			dma-ranges = <0x40000000 0x40000000 0xc0000000>;
@@ -907,16 +971,20 @@
  			clock-names = "phy";
  			assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
  			assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY2>;
  			#phy-cells = <0>;
+			status = "disabled";
  		};
 
  		usb3_1: usb@32f10108 {
  			compatible = "fsl,imx8mp-dwc3";
-			reg = <0x32f10108 0x8>;
+			reg = <0x32f10108 0x8>,
+			      <0x382f0000 0x20>;
  			clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
  				 <&clk IMX8MP_CLK_USB_ROOT>;
  			clock-names = "hsio", "suspend";
  			interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+			power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
  			#address-cells = <1>;
  			#size-cells = <1>;
  			dma-ranges = <0x40000000 0x40000000 0xc0000000>;
Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#3 lore raw
Quoted 18 lines · Stefano Babic

Hi Marek,

after bisecting, rather this breaks some boards like imx8mm_beacon (it is not the only one):

(quoted diff) +2 -0
+In file included from arch/arm/dts/.imx8mp-evk.dtb.pre.tmp:8:
 
+arch/arm/dts/imx8mp.dtsi:7:10: fatal error:

dt-bindings/power/imx8mp-power.h: No such file or directory

(quoted diff) +3 -0
+    7 | #include <dt-bindings/power/imx8mp-power.h>
 
+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+compilation terminated.
Quoted 5 lines

Can you check and then repost ? Thanks !

Best regards,
Stefano

Stefano,

I think your missing "imx: power-domain: Add i.MX8MP support" [1]

There is quite a queue of imx patches that have been waiting for review and merging and some have been broken due to Kconfig changes as you're seeing now. Others depend on one another in this situation here.

Is there any way you could review, merge to an imx-next, and issue a pull-request to Tom periodically between releases instead of waiting for the 1 merge window in between?

Best Regards,

Tim

Tim
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Quoted 156 lines · Marek Vasut
Quoted 138 lines

Add DT bindings for a subset of GPCv2 which handles USB and PCIe PDs, HSIOMIX PD controller and missing USB PD properties. This is required to bring up the DWC3 USB controller up.

This is based on linux next and patches which are still pending review, but which are likely going to be part of Linux 5.19:
b2d67d7bdf74 ("arm64: dts: imx8mp: disable usb3_phy1")
290918c72a29 ("arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3 nodes")
https://www.spinics.net/lists/arm-kernel/msg958501.html

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
  arch/arm/dts/imx8mp.dtsi | 72 ++++++++++++++++++++++++++++++++++++++--
  1 file changed, 70 insertions(+), 2 deletions(-)
arch/arm/dts/imx8mp.dtsi +67 -2
index f9d64253c8a..79b65750da9 100644
@@ -4,6 +4,7 @@
   */
 
  #include <dt-bindings/clock/imx8mp-clock.h>
+#include <dt-bindings/power/imx8mp-power.h>
  #include <dt-bindings/gpio/gpio.h>
  #include <dt-bindings/input/input.h>
  #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -434,6 +435,44 @@
                              interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                              #reset-cells = <1>;
                      };
+
+                     gpc: gpc@303a0000 {
+                             compatible = "fsl,imx8mp-gpc";
+                             reg = <0x303a0000 0x1000>;
+                             interrupt-parent = <&gic>;
+                             interrupt-controller;
+                             #interrupt-cells = <3>;
+
+                             pgc {
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
+
+                                     pgc_pcie_phy: power-domain@1 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_PCIE_PHY>;
+                                     };
+
+                                     pgc_usb1_phy: power-domain@2 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_USB1_PHY>;
+                                     };
+
+                                     pgc_usb2_phy: power-domain@3 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_USB2_PHY>;
+                                     };
+
+                                     pgc_hsiomix: power-domains@17 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_HSIOMIX>;
+                                             clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
+                                                      <&clk IMX8MP_CLK_HSIO_ROOT>;
+                                             assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
+                                             assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
+                                             assigned-clock-rates = <500000000>;
+                                     };
+                             };
+                     };
              };
 
              aips2: bus@30400000 {
@@ -842,6 +881,28 @@
                      };
              };
 
+             aips4: bus@32c00000 {
+                     compatible = "fsl,aips-bus", "simple-bus";
+                     reg = <0x32c00000 0x400000>;
+                     #address-cells = <1>;
+                     #size-cells = <1>;
+                     ranges;
+
+                     hsio_blk_ctrl: blk-ctrl@32f10000 {
+                             compatible = "fsl,imx8mp-hsio-blk-ctrl", "syscon";
+                             reg = <0x32f10000 0x24>;
+                             clocks = <&clk IMX8MP_CLK_USB_ROOT>,
+                                      <&clk IMX8MP_CLK_PCIE_ROOT>;
+                             clock-names = "usb", "pcie";
+                             power-domains = <&pgc_hsiomix>, <&pgc_hsiomix>,
+                                             <&pgc_usb1_phy>, <&pgc_usb2_phy>,
+                                             <&pgc_hsiomix>, <&pgc_pcie_phy>;
+                             power-domain-names = "bus", "usb", "usb-phy1",
+                                                  "usb-phy2", "pcie", "pcie-phy";
+                             #power-domain-cells = <1>;
+                     };
+             };
+
              gic: interrupt-controller@38800000 {
                      compatible = "arm,gic-v3";
                      reg = <0x38800000 0x10000>,
@@ -865,17 +926,20 @@
                      clock-names = "phy";
                      assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
                      assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY1>;
                      #phy-cells = <0>;
                      status = "disabled";
              };
 
              usb3_0: usb@32f10100 {
                      compatible = "fsl,imx8mp-dwc3";
-                     reg = <0x32f10100 0x8>;
+                     reg = <0x32f10100 0x8>,
+                           <0x381f0000 0x20>;
                      clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
                               <&clk IMX8MP_CLK_USB_ROOT>;
                      clock-names = "hsio", "suspend";
                      interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
                      #address-cells = <1>;
                      #size-cells = <1>;
                      dma-ranges = <0x40000000 0x40000000 0xc0000000>;
@@ -907,16 +971,20 @@
                      clock-names = "phy";
                      assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
                      assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY2>;
                      #phy-cells = <0>;
+                     status = "disabled";
              };
 
              usb3_1: usb@32f10108 {
                      compatible = "fsl,imx8mp-dwc3";
-                     reg = <0x32f10108 0x8>;

arch/arm/dts/imx8mp.dtsi line 990

Quoted 10 lines
arch/arm/dts/imx8mp.dtsi +3 -0
+                     reg = <0x32f10108 0x8>,
+                           <0x382f0000 0x20>;
                      clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
                               <&clk IMX8MP_CLK_USB_ROOT>;
                      clock-names = "hsio", "suspend";
                      interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
                      #address-cells = <1>;
                      #size-cells = <1>;
                      dma-ranges = <0x40000000 0x40000000 0xc0000000>;

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================

#4 lore raw

Hi Tim,

Quoted 19 lines · Tim Harvey
Quoted 18 lines · Stefano Babic

Hi Marek,

after bisecting, rather this breaks some boards like imx8mm_beacon (it is not the only one):

(quoted diff) +2 -0
+In file included from arch/arm/dts/.imx8mp-evk.dtb.pre.tmp:8:
 
+arch/arm/dts/imx8mp.dtsi:7:10: fatal error:

dt-bindings/power/imx8mp-power.h: No such file or directory

(quoted diff) +3 -0
+    7 | #include <dt-bindings/power/imx8mp-power.h>
 
+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+compilation terminated.
Quoted 9 lines
Quoted 4 lines

Can you check and then repost ? Thanks !

Best regards,
Stefano

Stefano,

I think your missing "imx: power-domain: Add i.MX8MP support" [1]

Right - I confirm this, and I cannot apply it. This should be rebased and reposted.

Quoted 3 lines

There is quite a queue of imx patches that have been waiting for review and merging and some have been broken due to Kconfig changes as you're seeing now.

Yes, I see they are currently broken, so I am trying first to apply all patches that are orthogonal and do not break build.

Quoted 6 lines

Others depend on one another in this situation
here.

Is there any way you could review, merge to an imx-next, and issue a pull-request to Tom periodically between releases instead of waiting for the 1 merge window in between?

This depends more on the status of my projects than on a designed work-flow when to do it, and I can work on U-Boot's ML during spare times.

Best regards,
Stefano

Quoted 164 lines

Best Regards,

Tim

Tim
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Quoted 156 lines · Marek Vasut
Quoted 138 lines

Add DT bindings for a subset of GPCv2 which handles USB and PCIe PDs, HSIOMIX PD controller and missing USB PD properties. This is required to bring up the DWC3 USB controller up.

This is based on linux next and patches which are still pending review, but which are likely going to be part of Linux 5.19:
b2d67d7bdf74 ("arm64: dts: imx8mp: disable usb3_phy1")
290918c72a29 ("arm64: dts: imx8mp: Add memory for USB3 glue layer to usb3 nodes")
https://www.spinics.net/lists/arm-kernel/msg958501.html

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
   arch/arm/dts/imx8mp.dtsi | 72 ++++++++++++++++++++++++++++++++++++++--
   1 file changed, 70 insertions(+), 2 deletions(-)
arch/arm/dts/imx8mp.dtsi +67 -2
index f9d64253c8a..79b65750da9 100644
@@ -4,6 +4,7 @@
    */
 
   #include <dt-bindings/clock/imx8mp-clock.h>
+#include <dt-bindings/power/imx8mp-power.h>
   #include <dt-bindings/gpio/gpio.h>
   #include <dt-bindings/input/input.h>
   #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -434,6 +435,44 @@
                               interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
                               #reset-cells = <1>;
                       };
+
+                     gpc: gpc@303a0000 {
+                             compatible = "fsl,imx8mp-gpc";
+                             reg = <0x303a0000 0x1000>;
+                             interrupt-parent = <&gic>;
+                             interrupt-controller;
+                             #interrupt-cells = <3>;
+
+                             pgc {
+                                     #address-cells = <1>;
+                                     #size-cells = <0>;
+
+                                     pgc_pcie_phy: power-domain@1 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_PCIE_PHY>;
+                                     };
+
+                                     pgc_usb1_phy: power-domain@2 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_USB1_PHY>;
+                                     };
+
+                                     pgc_usb2_phy: power-domain@3 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_USB2_PHY>;
+                                     };
+
+                                     pgc_hsiomix: power-domains@17 {
+                                             #power-domain-cells = <0>;
+                                             reg = <IMX8MP_POWER_DOMAIN_HSIOMIX>;
+                                             clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
+                                                      <&clk IMX8MP_CLK_HSIO_ROOT>;
+                                             assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
+                                             assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
+                                             assigned-clock-rates = <500000000>;
+                                     };
+                             };
+                     };
               };
 
               aips2: bus@30400000 {
@@ -842,6 +881,28 @@
                       };
               };
 
+             aips4: bus@32c00000 {
+                     compatible = "fsl,aips-bus", "simple-bus";
+                     reg = <0x32c00000 0x400000>;
+                     #address-cells = <1>;
+                     #size-cells = <1>;
+                     ranges;
+
+                     hsio_blk_ctrl: blk-ctrl@32f10000 {
+                             compatible = "fsl,imx8mp-hsio-blk-ctrl", "syscon";
+                             reg = <0x32f10000 0x24>;
+                             clocks = <&clk IMX8MP_CLK_USB_ROOT>,
+                                      <&clk IMX8MP_CLK_PCIE_ROOT>;
+                             clock-names = "usb", "pcie";
+                             power-domains = <&pgc_hsiomix>, <&pgc_hsiomix>,
+                                             <&pgc_usb1_phy>, <&pgc_usb2_phy>,
+                                             <&pgc_hsiomix>, <&pgc_pcie_phy>;
+                             power-domain-names = "bus", "usb", "usb-phy1",
+                                                  "usb-phy2", "pcie", "pcie-phy";
+                             #power-domain-cells = <1>;
+                     };
+             };
+
               gic: interrupt-controller@38800000 {
                       compatible = "arm,gic-v3";
                       reg = <0x38800000 0x10000>,
@@ -865,17 +926,20 @@
                       clock-names = "phy";
                       assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
                       assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY1>;
                       #phy-cells = <0>;
                       status = "disabled";
               };
 
               usb3_0: usb@32f10100 {
                       compatible = "fsl,imx8mp-dwc3";
-                     reg = <0x32f10100 0x8>;
+                     reg = <0x32f10100 0x8>,
+                           <0x381f0000 0x20>;
                       clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
                                <&clk IMX8MP_CLK_USB_ROOT>;
                       clock-names = "hsio", "suspend";
                       interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
                       #address-cells = <1>;
                       #size-cells = <1>;
                       dma-ranges = <0x40000000 0x40000000 0xc0000000>;
@@ -907,16 +971,20 @@
                       clock-names = "phy";
                       assigned-clocks = <&clk IMX8MP_CLK_USB_PHY_REF>;
                       assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB_PHY2>;
                       #phy-cells = <0>;
+                     status = "disabled";
               };
 
               usb3_1: usb@32f10108 {
                       compatible = "fsl,imx8mp-dwc3";
-                     reg = <0x32f10108 0x8>;

arch/arm/dts/imx8mp.dtsi line 990

Quoted 10 lines
arch/arm/dts/imx8mp.dtsi +3 -0
+                     reg = <0x32f10108 0x8>,
+                           <0x382f0000 0x20>;
                       clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
                                <&clk IMX8MP_CLK_USB_ROOT>;
                       clock-names = "hsio", "suspend";
                       interrupts = <GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>;
+                     power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
                       #address-cells = <1>;
                       #size-cells = <1>;
                       dma-ranges = <0x40000000 0x40000000 0xc0000000>;

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#5 lore raw
Quoted 1 line · Stefano Babic

Hi Tim,

Hi,

Quoted 27 lines · Tim Harvey
Quoted 26 lines · Stefano Babic
Quoted 15 lines

Hi Marek,

after bisecting, rather this breaks some boards like imx8mm_beacon (it is not the only one):

(quoted diff) +2 -0
+In file included from arch/arm/dts/.imx8mp-evk.dtb.pre.tmp:8:
 
+arch/arm/dts/imx8mp.dtsi:7:10: fatal error:

dt-bindings/power/imx8mp-power.h: No such file or directory

+    7 | #include <dt-bindings/power/imx8mp-power.h>

+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 7 lines

+compilation terminated.

Can you check and then repost ? Thanks !

Best regards,
Stefano

Stefano,

Quoted 4 lines
Quoted 2 lines

I think your missing "imx: power-domain: Add i.MX8MP support" [1]

Right - I confirm this, and I cannot apply it. This should be rebased and reposted.

Yes, all those patches are now broken and must be rebased and retested.

Should I send out whatever is currently missing on top of u-boot-imx/master-next or what ?

#6 lore raw

Hi Marek,

Quoted 32 lines · Marek Vasut
Quoted 1 line · Stefano Babic

Hi Tim,

Hi,

Quoted 27 lines · Tim Harvey
Quoted 26 lines · Stefano Babic
Quoted 15 lines

Hi Marek,

after bisecting, rather this breaks some boards like imx8mm_beacon (it is not the only one):

(quoted diff) +2 -0
+In file included from arch/arm/dts/.imx8mp-evk.dtb.pre.tmp:8:
 
+arch/arm/dts/imx8mp.dtsi:7:10: fatal error:

dt-bindings/power/imx8mp-power.h: No such file or directory

+    7 | #include <dt-bindings/power/imx8mp-power.h>

+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 7 lines

+compilation terminated.

Can you check and then repost ? Thanks !

Best regards,
Stefano

Stefano,

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I think your missing "imx: power-domain: Add i.MX8MP support" [1]

Right - I confirm this, and I cannot apply it. This should be rebased and reposted.

Yes, all those patches are now broken and must be rebased and retested.

Should I send out whatever is currently missing on top of u-boot-imx/master-next or what ?

I am splitting patches dropping patches that are clearly broken and then pushing this to u-boot-imx (and then to Tom). So just wait until I update u-boot-imx with the first big buch of patches.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================
#7 lore raw
Quoted 1 line · Stefano Babic

Hi Marek,

Hi,

Quoted 36 lines · Marek Vasut
Quoted 35 lines · Stefano Babic
Quoted 1 line

Hi Tim,

Hi,

Quoted 30 lines · Tim Harvey
Quoted 28 lines · Stefano Babic
Quoted 15 lines

Hi Marek,

after bisecting, rather this breaks some boards like imx8mm_beacon (it is not the only one):

(quoted diff) +2 -0
+In file included from arch/arm/dts/.imx8mp-evk.dtb.pre.tmp:8:
 
+arch/arm/dts/imx8mp.dtsi:7:10: fatal error:

dt-bindings/power/imx8mp-power.h: No such file or directory

+    7 | #include <dt-bindings/power/imx8mp-power.h>

+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quoted 7 lines

+compilation terminated.

Can you check and then repost ? Thanks !

Best regards,
Stefano

Stefano,

I think your missing "imx: power-domain: Add i.MX8MP support" [1]

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Right - I confirm this, and I cannot apply it. This should be rebased and reposted.

Yes, all those patches are now broken and must be rebased and retested.

Should I send out whatever is currently missing on top of u-boot-imx/master-next or what ?

I am splitting patches dropping patches that are clearly broken and then pushing this to u-boot-imx (and then to Tom). So just wait until I update u-boot-imx with the first big buch of patches.

Here is the entire batch of patches, in the right order, with RB/TB collected.

#8 lore raw
Quoted 43 lines · Marek Vasut
Quoted 1 line · Stefano Babic

Hi Marek,

Hi,

Quoted 38 lines · Marek Vasut
Quoted 37 lines · Stefano Babic
Quoted 1 line

Hi Tim,

Hi,

Quoted 31 lines · Tim Harvey
Quoted 19 lines · Stefano Babic
Quoted 18 lines

Hi Marek,

after bisecting, rather this breaks some boards like imx8mm_beacon (it is not the only one):

(quoted diff) +2 -0
+In file included from arch/arm/dts/.imx8mp-evk.dtb.pre.tmp:8:
 
+arch/arm/dts/imx8mp.dtsi:7:10: fatal error:

dt-bindings/power/imx8mp-power.h: No such file or directory

+    7 | #include <dt-bindings/power/imx8mp-power.h>

+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+compilation terminated.

Quoted 9 lines
Quoted 4 lines

Can you check and then repost ? Thanks !

Best regards,
Stefano

Stefano,

I think your missing "imx: power-domain: Add i.MX8MP support" [1]

Right - I confirm this, and I cannot apply it. This should be rebased and reposted.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Yes, all those patches are now broken and must be rebased and retested.

Should I send out whatever is currently missing on top of u-boot-imx/master-next or what ?

I am splitting patches dropping patches that are clearly broken and then pushing this to u-boot-imx (and then to Tom). So just wait until I update u-boot-imx with the first big buch of patches.

Here is the entire batch of patches, in the right order, with RB/TB collected.

https://patchwork.ozlabs.org/project/uboot/list/?series=294611