ARM: dts: enable SD and GMAC at rk3288-evb
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288.dtsi
index 04ea209f1737f9fb052f4efc8589e98aa027836e..422760e63814122de5b830db0c836d527611da75 100644 (file)
@@ -45,6 +45,7 @@
 #include <dt-bindings/clock/rk3288-cru.h>
 #include <dt-bindings/thermal/thermal.h>
 #include <dt-bindings/power/rk3288-power.h>
+#include <dt-bindings/soc/rockchip_boot-mode.h>
 #include "skeleton.dtsi"
 
 / {
                        interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
                        #dma-cells = <1>;
+                       arm,pl330-broken-no-flushp;
+                       peripherals-req-type-burst;
                        clocks = <&cru ACLK_DMAC2>;
                        clock-names = "apb_pclk";
                };
                        interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
                        #dma-cells = <1>;
+                       arm,pl330-broken-no-flushp;
+                       peripherals-req-type-burst;
                        clocks = <&cru ACLK_DMAC1>;
                        clock-names = "apb_pclk";
                        status = "disabled";
                        interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
                        #dma-cells = <1>;
+                       arm,pl330-broken-no-flushp;
+                       peripherals-req-type-burst;
                        clocks = <&cru ACLK_DMAC1>;
                        clock-names = "apb_pclk";
                };
                #clock-cells = <0>;
        };
 
+       edp_phy: edp-phy {
+               compatible = "rockchip,rk3288-dp-phy";
+               clocks = <&cru SCLK_EDP_24M>;
+               clock-names = "24m";
+               rockchip,grf = <&grf>;
+               #phy-cells = <0>;
+               status = "disabled";
+       };
+
        timer {
                compatible = "arm,armv7-timer";
                arm,cpu-registers-not-fw-configured;
                interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
                reg = <0xff0f0000 0x4000>;
                status = "disabled";
+               supports-emmc;
        };
 
        saradc: saradc@ff100000 {
                        "aclk_mac", "pclk_mac";
                resets = <&cru SRST_MAC>;
                reset-names = "stmmaceth";
+               max-speed = <100>;
                status = "disabled";
        };
 
                                clocks = <&cru ACLK_GPU>;
                        };
                };
+
+               reboot-mode {
+                       compatible = "syscon-reboot-mode";
+                       offset = <0x94>;
+                       mode-normal = <BOOT_NORMAL>;
+                       mode-recovery = <BOOT_RECOVERY>;
+                       mode-bootloader = <BOOT_FASTBOOT>;
+                       mode-loader = <BOOT_LOADER>;
+                       mode-ums = <BOOT_UMS>;
+               };
        };
 
        sgrf: syscon@ff740000 {
                rockchip,grf = <&grf>;
                #clock-cells = <1>;
                #reset-cells = <1>;
-               assigned-clocks = <&cru PLL_GPLL>, <&cru PLL_CPLL>,
-                                 <&cru PLL_NPLL>, <&cru ACLK_CPU>,
-                                 <&cru HCLK_CPU>, <&cru PCLK_CPU>,
-                                 <&cru ACLK_PERI>, <&cru HCLK_PERI>,
-                                 <&cru PCLK_PERI>;
-               assigned-clock-rates = <594000000>, <400000000>,
+               assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>,
+                                 <&cru PLL_GPLL>, <&cru PLL_CPLL>,
+                                  <&cru PLL_NPLL>, <&cru ACLK_CPU>,
+                                  <&cru HCLK_CPU>, <&cru PCLK_CPU>,
+                                  <&cru ACLK_PERI>, <&cru HCLK_PERI>,
+                                  <&cru PCLK_PERI>;
+               assigned-clock-rates = <0>, <0>,
+                                      <594000000>, <400000000>,
                                       <500000000>, <300000000>,
                                       <150000000>, <75000000>,
                                       <300000000>, <150000000>,
                                       <75000000>;
+               assigned-clock-parents = <&cru PLL_NPLL>, <&cru PLL_GPLL>;
        };
 
        grf: syscon@ff770000 {
                clocks = <&cru HCLK_SPDIF8CH>, <&cru SCLK_SPDIF8CH>;
                dmas = <&dmac_bus_s 3>;
                dma-names = "tx";
-               interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
                pinctrl-names = "default";
                pinctrl-0 = <&spdif_tx>;
                rockchip,grf = <&grf>;
        i2s: i2s@ff890000 {
                compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s";
                reg = <0xff890000 0x10000>;
-               interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                #size-cells = <0>;
                dmas = <&dmac_bus_s 0>, <&dmac_bus_s 1>;
                                reg = <0>;
                                remote-endpoint = <&hdmi_in_vopb>;
                        };
+
+                       vopb_out_edp: endpoint@1 {
+                               reg = <1>;
+                               remote-endpoint = <&edp_in_vopb>;
+                       };
+
+                       vopb_out_mipi: endpoint@2 {
+                               reg = <2>;
+                               remote-endpoint = <&mipi_in_vopb>;
+                       };
+
+                       vopb_out_lvds: endpoint@3 {
+                               reg = <3>;
+                               remote-endpoint = <&lvds_in_vopb>;
+                       };
                };
        };
 
                                reg = <0>;
                                remote-endpoint = <&hdmi_in_vopl>;
                        };
+
+                       vopl_out_edp: endpoint@1 {
+                               reg = <1>;
+                               remote-endpoint = <&edp_in_vopl>;
+                       };
+
+                       vopl_out_mipi: endpoint@2 {
+                               reg = <2>;
+                               remote-endpoint = <&mipi_in_vopl>;
+                       };
+
+                       vopl_out_lvds: endpoint@3 {
+                               reg = <3>;
+                               remote-endpoint = <&lvds_in_vopl>;
+                       };
+
                };
        };
 
                status = "disabled";
        };
 
+       mipi_dsi: mipi@ff960000 {
+               compatible = "rockchip,rk3288-mipi-dsi", "snps,dw-mipi-dsi";
+               reg = <0xff960000 0x4000>;
+               interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_MIPIDSI_24M>, <&cru PCLK_MIPI_DSI0>;
+               clock-names = "ref", "pclk";
+               rockchip,grf = <&grf>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <1>;
+
+                       mipi_in: port {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               mipi_in_vopb: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vopb_out_mipi>;
+                               };
+                               mipi_in_vopl: endpoint@1 {
+                                       reg = <1>;
+                                       remote-endpoint = <&vopl_out_mipi>;
+                               };
+                       };
+               };
+       };
+
+       edp: dp@ff970000 {
+               compatible = "rockchip,rk3288-dp";
+               reg = <0xff970000 0x4000>;
+               interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+               clocks = <&cru SCLK_EDP>, <&cru PCLK_EDP_CTRL>;
+               clock-names = "dp", "pclk";
+               phys = <&edp_phy>;
+               phy-names = "dp";
+               resets = <&cru SRST_EDP>;
+               reset-names = "dp";
+               rockchip,grf = <&grf>;
+               status = "disabled";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       edp_in: port@0 {
+                               reg = <0>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               edp_in_vopb: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vopb_out_edp>;
+                               };
+                               edp_in_vopl: endpoint@1 {
+                                       reg = <1>;
+                                       remote-endpoint = <&vopl_out_edp>;
+                               };
+                       };
+               };
+       };
+
+       lvds: lvds@ff96c000 {
+               compatible = "rockchip,rk3288-lvds";
+               reg = <0xff96c000 0x4000>;
+               clocks = <&cru PCLK_LVDS_PHY>;
+               clock-names = "pclk_lvds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&lcdc0_ctl>;
+               power-domains = <&power RK3288_PD_VIO>;
+               rockchip,grf = <&grf>;
+               status = "disabled";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       lvds_in: port@0 {
+                               reg = <0>;
+
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               lvds_in_vopb: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vopb_out_lvds>;
+                               };
+                               lvds_in_vopl: endpoint@1 {
+                                       reg = <1>;
+                                       remote-endpoint = <&vopl_out_lvds>;
+                               };
+                       };
+               };
+       };
+
        hdmi: hdmi@ff980000 {
                compatible = "rockchip,rk3288-dw-hdmi";
                reg = <0xff980000 0x20000>;
                };
        };
 
+       gpu: gpu@ffa30000 {
+               compatible = "arm,malit764",
+                            "arm,malit76x",
+                            "arm,malit7xx",
+                            "arm,mali-midgard";
+               reg = <0xffa30000 0x10000>;
+               interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "JOB", "MMU", "GPU";
+               clocks = <&cru ACLK_GPU>;
+               clock-names = "clk_mali";
+               operating-points = <
+                       /* KHz uV */
+                       600000 1250000
+                       /* 500000 1200000 - See crosbug.com/p/33857 */
+                       400000 1100000
+                       300000 1000000
+                       200000 950000
+                       100000 950000
+               >;
+               #cooling-cells = <2>; /* min followed by max */
+               power-domains = <&power RK3288_PD_GPU>;
+               status = "disabled";
+       };
+
+       vpu: video-codec@ff9a0000 {
+               compatible = "rockchip,rk3288-vpu";
+               reg = <0xff9a0000 0x800>;
+               interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
+                               <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "vepu", "vdpu";
+               clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>;
+               clock-names = "aclk", "hclk";
+               power-domains = <&power RK3288_PD_VIDEO>;
+               iommus = <&vpu_mmu>;
+               assigned-clocks = <&cru ACLK_VCODEC>;
+               assigned-clock-rates = <400000000>;
+               status = "disabled";
+       };
+
+       vpu_mmu: iommu@ff9a0800 {
+               compatible = "rockchip,iommu";
+               reg = <0xff9a0800 0x100>;
+               interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "vpu_mmu";
+               power-domains = <&power RK3288_PD_VIDEO>;
+               #iommu-cells = <0>;
+       };
+
        gic: interrupt-controller@ffc01000 {
                compatible = "arm,gic-400";
                interrupt-controller;
                interrupts = <GIC_PPI 9 0xf04>;
        };
 
+       efuse: efuse@ffb40000 {
+               compatible = "rockchip,rockchip-efuse";
+               reg = <0xffb40000 0x20>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               clocks = <&cru PCLK_EFUSE256>;
+               clock-names = "pclk_efuse";
+
+               cpu_leakage: cpu_leakage@17 {
+                       reg = <0x17 0x1>;
+               };
+       };
+
        usbphy: phy {
                compatible = "rockchip,rk3288-usb-phy";
                rockchip,grf = <&grf>;
                        };
                };
 
+               edp {
+                       edp_hpd: edp-hpd {
+                               rockchip,pins = <7 11 RK_FUNC_2 &pcfg_pull_down>;
+                       };
+               };
+
                i2c0 {
                        i2c0_xfer: i2c0-xfer {
                                rockchip,pins = <0 15 RK_FUNC_1 &pcfg_pull_none>,
                        };
                };
 
+               lcdc0 {
+                       lcdc0_ctl: lcdc0-ctl {
+                               rockchip,pins = <1 24 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 25 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 26 RK_FUNC_1 &pcfg_pull_none>,
+                                               <1 27 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
                sdmmc {
                        sdmmc_clk: sdmmc-clk {
                                rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none>;