]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: dts: imx8mp: Import GPCv2 subset, HSIOMIX and USB PD
authorMarek Vasut <marex@denx.de>
Tue, 12 Apr 2022 22:42:57 +0000 (00:42 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 21 Apr 2022 10:44:23 +0000 (12:44 +0200)
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

Tested-By: Tim Harvey <tharvey@gateworks.com> #imx8mp-venice-gw74xx
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
arch/arm/dts/imx8mp.dtsi

index f9d64253c8acd8adc5f54a4e727046ad1cd9afc4..79b65750da9940fc514563a8ae9c6692267ab038 100644 (file)
@@ -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>
                                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 {
                        };
                };
 
+               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>,
                        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>;
                        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>;