arm64: dts: rockchip: add usb2 nodes to rk3568 device tree
authorPeter Geis <pgwipeout@gmail.com>
Wed, 15 Dec 2021 21:02:51 +0000 (16:02 -0500)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 23 Jan 2022 12:36:39 +0000 (13:36 +0100)
Add the requisite nodes to the rk3568 device tree to enable the usb2
device controllers.
Includes the usb2phy nodes, usb2phy grf nodes, and usb2 controller
nodes.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Michael Riesch <michael.riesch@wolfvision.net>
Link: https://lore.kernel.org/r/20211215210252.120923-8-pgwipeout@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk356x.dtsi

index a68033a239750454b554ef2f9be3c8ad23204c68..8ee2fab676f4b4374148acf308d3d2fdf1d6bde6 100644 (file)
                msi-controller;
        };
 
+       usb_host0_ehci: usb@fd800000 {
+               compatible = "generic-ehci";
+               reg = <0x0 0xfd800000 0x0 0x40000>;
+               interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_USB2HOST0>, <&cru HCLK_USB2HOST0_ARB>,
+                        <&cru PCLK_USB>;
+               phys = <&u2phy1_otg>;
+               phy-names = "usb";
+               status = "disabled";
+       };
+
+       usb_host0_ohci: usb@fd840000 {
+               compatible = "generic-ohci";
+               reg = <0x0 0xfd840000 0x0 0x40000>;
+               interrupts = <GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_USB2HOST0>, <&cru HCLK_USB2HOST0_ARB>,
+                        <&cru PCLK_USB>;
+               phys = <&u2phy1_otg>;
+               phy-names = "usb";
+               status = "disabled";
+       };
+
+       usb_host1_ehci: usb@fd880000 {
+               compatible = "generic-ehci";
+               reg = <0x0 0xfd880000 0x0 0x40000>;
+               interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_USB2HOST1>, <&cru HCLK_USB2HOST1_ARB>,
+                        <&cru PCLK_USB>;
+               phys = <&u2phy1_host>;
+               phy-names = "usb";
+               status = "disabled";
+       };
+
+       usb_host1_ohci: usb@fd8c0000 {
+               compatible = "generic-ohci";
+               reg = <0x0 0xfd8c0000 0x0 0x40000>;
+               interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_USB2HOST1>, <&cru HCLK_USB2HOST1_ARB>,
+                        <&cru PCLK_USB>;
+               phys = <&u2phy1_host>;
+               phy-names = "usb";
+               status = "disabled";
+       };
+
        pmugrf: syscon@fdc20000 {
                compatible = "rockchip,rk3568-pmugrf", "syscon", "simple-mfd";
                reg = <0x0 0xfdc20000 0x0 0x10000>;
                reg = <0x0 0xfdc60000 0x0 0x10000>;
        };
 
+       usb2phy0_grf: syscon@fdca0000 {
+               compatible = "rockchip,rk3568-usb2phy-grf", "syscon";
+               reg = <0x0 0xfdca0000 0x0 0x8000>;
+       };
+
+       usb2phy1_grf: syscon@fdca8000 {
+               compatible = "rockchip,rk3568-usb2phy-grf", "syscon";
+               reg = <0x0 0xfdca8000 0x0 0x8000>;
+       };
+
        pmucru: clock-controller@fdd00000 {
                compatible = "rockchip,rk3568-pmucru";
                reg = <0x0 0xfdd00000 0x0 0x1000>;
                status = "disabled";
        };
 
+       u2phy0: usb2phy@fe8a0000 {
+               compatible = "rockchip,rk3568-usb2phy";
+               reg = <0x0 0xfe8a0000 0x0 0x10000>;
+               clocks = <&pmucru CLK_USBPHY0_REF>;
+               clock-names = "phyclk";
+               clock-output-names = "clk_usbphy0_480m";
+               interrupts = <GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
+               rockchip,usbgrf = <&usb2phy0_grf>;
+               #clock-cells = <0>;
+               status = "disabled";
+
+               u2phy0_host: host-port {
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               u2phy0_otg: otg-port {
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+       };
+
+       u2phy1: usb2phy@fe8b0000 {
+               compatible = "rockchip,rk3568-usb2phy";
+               reg = <0x0 0xfe8b0000 0x0 0x10000>;
+               clocks = <&pmucru CLK_USBPHY1_REF>;
+               clock-names = "phyclk";
+               clock-output-names = "clk_usbphy1_480m";
+               interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
+               rockchip,usbgrf = <&usb2phy1_grf>;
+               #clock-cells = <0>;
+               status = "disabled";
+
+               u2phy1_host: host-port {
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               u2phy1_otg: otg-port {
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+       };
+
        pinctrl: pinctrl {
                compatible = "rockchip,rk3568-pinctrl";
                rockchip,grf = <&grf>;