arm64: dts: rockchip: add otg-port node of usb2-phy for rk3328 dwc2
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3328.dtsi
index c198895a53c123c74dafc1de5ed7f13a1587d591..6171fade725ee07f96b92cb950c7aeda31fba6e0 100644 (file)
@@ -45,7 +45,8 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/rockchip.h>
-#include <dt-bindings/soc/rockchip_boot-mode.h>
+#include <dt-bindings/soc/rockchip,boot-mode.h>
+#include <dt-bindings/power/rk3328-power.h>
 
 / {
        compatible = "rockchip,rk3328";
                        status = "disabled";
                };
 
+               power: power-controller {
+                       compatible = "rockchip,rk3328-power-controller";
+                       #power-domain-cells = <1>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       status = "disabled";
+
+                       pd_hevc@RK3328_PD_HEVC {
+                               reg = <RK3328_PD_HEVC>;
+                       };
+                       pd_video@RK3328_PD_VIDEO {
+                               reg = <RK3328_PD_VIDEO>;
+                       };
+                       pd_vpu@RK3328_PD_VPU {
+                               reg = <RK3328_PD_VPU>;
+                       };
+               };
+
                reboot-mode {
                        compatible = "syscon-reboot-mode";
                        offset = <0x5c8>;
-                       mode-bootloader = <BOOT_LOADER>;
+                       mode-bootloader = <BOOT_BL_DOWNLOAD>;
                        mode-charge = <BOOT_CHARGING>;
                        mode-fastboot = <BOOT_FASTBOOT>;
-                       mode-loader = <BOOT_LOADER>;
+                       mode-loader = <BOOT_BL_DOWNLOAD>;
                        mode-normal = <BOOT_NORMAL>;
                        mode-recovery = <BOOT_RECOVERY>;
                        mode-ums = <BOOT_UMS>;
        };
 
        i2c0: i2c@ff150000 {
-               compatible = "rockchip,rk3328-i2c";
+               compatible = "rockchip,rk3328-i2c", "rockchip,rk3399-i2c";
                reg = <0x0 0xff150000 0x0 0x1000>;
                interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c1: i2c@ff160000 {
-               compatible = "rockchip,rk3328-i2c";
+               compatible = "rockchip,rk3328-i2c", "rockchip,rk3399-i2c";
                reg = <0x0 0xff160000 0x0 0x1000>;
                interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c2: i2c@ff170000 {
-               compatible = "rockchip,rk3328-i2c";
+               compatible = "rockchip,rk3328-i2c", "rockchip,rk3399-i2c";
                reg = <0x0 0xff170000 0x0 0x1000>;
                interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
        };
 
        i2c3: i2c@ff180000 {
-               compatible = "rockchip,rk3328-i2c";
+               compatible = "rockchip,rk3328-i2c", "rockchip,rk3399-i2c";
                reg = <0x0 0xff180000 0x0 0x1000>;
                interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                status = "disabled";
        };
 
+       pwm0: pwm@ff1b0000 {
+               compatible = "rockchip,rk3328-pwm";
+               reg = <0x0 0xff1b0000 0x0 0x10>;
+               #pwm-cells = <3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm0_pin>;
+               clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
+               clock-names = "pwm", "pclk";
+               status = "disabled";
+       };
+
+       pwm1: pwm@ff1b0010 {
+               compatible = "rockchip,rk3328-pwm";
+               reg = <0x0 0xff1b0010 0x0 0x10>;
+               #pwm-cells = <3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm1_pin>;
+               clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
+               clock-names = "pwm", "pclk";
+               status = "disabled";
+       };
+
+       pwm2: pwm@ff1b0020 {
+               compatible = "rockchip,rk3328-pwm";
+               reg = <0x0 0xff1b0020 0x0 0x10>;
+               #pwm-cells = <3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm2_pin>;
+               clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
+               clock-names = "pwm", "pclk";
+               status = "disabled";
+       };
+
+       pwm3: pwm@ff1b0030 {
+               compatible = "rockchip,rk3328-pwm";
+               reg = <0x0 0xff1b0030 0x0 0x10>;
+               interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+               #pwm-cells = <3>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwmir_pin>;
+               clocks = <&cru SCLK_PWM>, <&cru PCLK_PWM>;
+               clock-names = "pwm", "pclk";
+               status = "disabled";
+       };
+
        amba {
                compatible = "simple-bus";
                #address-cells = <2>;
                        <32768>, <32768>;
        };
 
+       usb2phy_grf: syscon@ff450000 {
+               compatible = "rockchip,rk3328-usb2phy-grf", "syscon",
+                            "simple-mfd";
+               reg = <0x0 0xff450000 0x0 0x10000>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               u2phy: usb2-phy@100 {
+                       compatible = "rockchip,rk3328-usb2phy";
+                       reg = <0x100 0x10>;
+                       clocks = <&xin24m>;
+                       clock-names = "phyclk";
+                       #clock-cells = <0>;
+                       assigned-clocks = <&cru USB480M>;
+                       assigned-clock-parents = <&u2phy>;
+                       clock-output-names = "usb480m_phy";
+                       status = "disabled";
+
+                       u2phy_host: host-port {
+                               #phy-cells = <0>;
+                               interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "linestate";
+                               status = "disabled";
+                       };
+
+                       u2phy_otg: otg-port {
+                               #phy-cells = <0>;
+                               interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
+                                            <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+                               interrupt-names = "otg-bvalid", "otg-id",
+                                                 "linestate";
+                               status = "disabled";
+                       };
+               };
+       };
+
+       usb3phy_grf: syscon@ff460000 {
+               compatible = "rockchip,usb3phy-grf", "syscon";
+               reg = <0x0 0xff460000 0x0 0x1000>;
+       };
+
+       u3phy: usb3-phy@ff470000 {
+               compatible = "rockchip,rk3328-u3phy";
+               reg = <0x0 0xff470000 0x0 0x0>;
+               rockchip,u3phygrf = <&usb3phy_grf>;
+               interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "linestate";
+               clocks = <&cru PCLK_USB3PHY_OTG>, <&cru PCLK_USB3PHY_PIPE>;
+               clock-names = "u3phy-otg", "u3phy-pipe";
+               resets = <&cru SRST_USB3PHY_U2>,
+                        <&cru SRST_USB3PHY_U3>,
+                        <&cru SRST_USB3PHY_PIPE>,
+                        <&cru SRST_USB3OTG_UTMI>,
+                        <&cru SRST_USB3PHY_OTG_P>,
+                        <&cru SRST_USB3PHY_PIPE_P>;
+               reset-names = "u3phy-u2-por", "u3phy-u3-por",
+                             "u3phy-pipe-mac", "u3phy-utmi-mac",
+                             "u3phy-utmi-apb", "u3phy-pipe-apb";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+               status = "disabled";
+
+               u3phy_utmi: utmi@ff470000 {
+                       reg = <0x0 0xff470000 0x0 0x8000>;
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+
+               u3phy_pipe: pipe@ff478000 {
+                       reg = <0x0 0xff478000 0x0 0x8000>;
+                       #phy-cells = <0>;
+                       status = "disabled";
+               };
+       };
+
+       sdmmc: rksdmmc@ff500000 {
+               compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xff500000 0x0 0x4000>;
+               clock-freq-min-max = <400000 150000000>;
+               clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
+               clock-names = "biu", "ciu";
+               fifo-depth = <0x100>;
+               interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       sdio: dwmmc@ff510000 {
+               compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xff510000 0x0 0x4000>;
+               clock-freq-min-max = <400000 150000000>;
+               clocks = <&cru HCLK_SDIO>, <&cru SCLK_SDIO>,
+                        <&cru SCLK_SDIO_DRV>, <&cru SCLK_SDIO_SAMPLE>;
+               clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
+               fifo-depth = <0x100>;
+               interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       emmc: rksdmmc@ff520000 {
+               compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xff520000 0x0 0x4000>;
+               clock-freq-min-max = <400000 150000000>;
+               clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>;
+               clock-names = "biu", "ciu";
+               fifo-depth = <0x100>;
+               interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       gmac2io: eth@ff540000 {
+               compatible = "rockchip,rk3328-gmac";
+               reg = <0x0 0xff540000 0x0 0x10000>;
+               rockchip,grf = <&grf>;
+               interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "macirq";
+               clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_RX>,
+                        <&cru SCLK_MAC2IO_TX>, <&cru SCLK_MAC2IO_REF>,
+                        <&cru SCLK_MAC2IO_REFOUT>, <&cru ACLK_MAC2IO>,
+                        <&cru PCLK_MAC2IO>;
+               clock-names = "stmmaceth", "mac_clk_rx",
+                             "mac_clk_tx", "clk_mac_ref",
+                             "clk_mac_refout", "aclk_mac",
+                             "pclk_mac";
+               resets = <&cru SRST_GMAC2IO_A>;
+               reset-names = "stmmaceth";
+               status = "disabled";
+       };
+
+       usb20_otg: usb@ff580000 {
+               compatible = "rockchip,rk3328-usb", "rockchip,rk3066-usb",
+                            "snps,dwc2";
+               reg = <0x0 0xff580000 0x0 0x40000>;
+               interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_OTG>, <&cru HCLK_OTG_PMU>;
+               clock-names = "otg", "otg_pmu";
+               dr_mode = "otg";
+               g-np-tx-fifo-size = <16>;
+               g-rx-fifo-size = <275>;
+               g-tx-fifo-size = <256 128 128 64 64 32>;
+               g-use-dma;
+               phys = <&u2phy_otg>;
+               phy-names = "usb2-phy";
+               status = "disabled";
+       };
+
+       usb_host0_ehci: usb@ff5c0000 {
+               compatible = "generic-ehci";
+               reg = <0x0 0xff5c0000 0x0 0x10000>;
+               interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
+                        <&u2phy>;
+               clock-names = "usbhost", "arbiter", "utmi";
+               phys = <&u2phy_host>;
+               phy-names = "usb";
+               status = "disabled";
+       };
+
+       usb_host0_ohci: usb@ff5d0000 {
+               compatible = "generic-ohci";
+               reg = <0x0 0xff5d0000 0x0 0x10000>;
+               interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>,
+                        <&u2phy>;
+               clock-names = "usbhost", "arbiter", "utmi";
+               phys = <&u2phy_host>;
+               phy-names = "usb";
+               status = "disabled";
+       };
+
+       sdmmc_ext: rksdmmc@ff5f0000 {
+               compatible = "rockchip,rk3328-dw-mshc", "rockchip,rk3288-dw-mshc";
+               reg = <0x0 0xff5f0000 0x0 0x4000>;
+               clock-freq-min-max = <400000 150000000>;
+               clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>;
+               clock-names = "biu", "ciu";
+               fifo-depth = <0x100>;
+               interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+               status = "disabled";
+       };
+
+       usbdrd3: usb@ff600000 {
+               compatible = "rockchip,rk3328-dwc3";
+               clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>,
+                        <&cru ACLK_USB3OTG>;
+               clock-names = "ref_clk", "suspend_clk",
+                             "bus_clk";
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+               status = "disabled";
+
+               usbdrd_dwc3: dwc3@ff600000 {
+                       compatible = "snps,dwc3";
+                       reg = <0x0 0xff600000 0x0 0x100000>;
+                       interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
+                       dr_mode = "host";
+                       phys = <&u3phy_utmi>, <&u3phy_pipe>;
+                       phy-names = "usb2-phy", "usb3-phy";
+                       phy_type = "utmi_wide";
+                       snps,dis_enblslpm_quirk;
+                       snps,dis-u2-freeclk-exists-quirk;
+                       snps,dis_u2_susphy_quirk;
+                       snps,dis_u3_susphy_quirk;
+                       snps,dis-del-phy-power-chg-quirk;
+                       status = "disabled";
+               };
+       };
+
        gic: interrupt-controller@ff811000 {
                compatible = "arm,gic-400";
                #interrupt-cells = <3>;