Merge https://gitlab.denx.de/u-boot/custodians/u-boot-clk
[oweals/u-boot.git] / arch / arm / dts / rk3288.dtsi
index ac367f85b98807a7d5432ddadd81f1d9618ad73d..866fc08215245eab36ad8bcdc30c459362361fd8 100644 (file)
@@ -1,6 +1,4 @@
-/*
- * SPDX-License-Identifier:    GPL-2.0+
- */
+// SPDX-License-Identifier: GPL-2.0+
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/interrupt-controller/irq.h>
@@ -9,6 +7,7 @@
 #include <dt-bindings/clock/rk3288-cru.h>
 #include <dt-bindings/power-domain/rk3288.h>
 #include <dt-bindings/thermal/thermal.h>
+#include <dt-bindings/video/rk3288.h>
 #include "skeleton.dtsi"
 
 / {
 
        sdmmc: dwmmc@ff0c0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>,
                         <&cru SCLK_SDMMC_DRV>, <&cru SCLK_SDMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
 
        sdio0: dwmmc@ff0d0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_SDIO0>, <&cru SCLK_SDIO0>,
                         <&cru SCLK_SDIO0_DRV>, <&cru SCLK_SDIO0_SAMPLE>;
                clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
 
        sdio1: dwmmc@ff0e0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_SDIO1>, <&cru SCLK_SDIO1>,
                         <&cru SCLK_SDIO1_DRV>, <&cru SCLK_SDIO1_SAMPLE>;
                clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
 
        emmc: dwmmc@ff0f0000 {
                compatible = "rockchip,rk3288-dw-mshc";
-               clock-freq-min-max = <400000 150000000>;
+               max-frequency = <150000000>;
                clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
                         <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
                clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
                interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&cru HCLK_OTG0>;
                clock-names = "otg";
+               dr_mode = "otg";
                phys = <&usbphy0>;
                phy-names = "usb2-phy";
                status = "disabled";
        };
 
        dmc: dmc@ff610000 {
-               u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3288-dmc", "syscon";
                rockchip,cru = <&cru>;
                rockchip,grf = <&grf>;
        };
 
        pmu: power-management@ff730000 {
-               u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3288-pmu", "syscon";
                reg = <0xff730000 0x100>;
        };
 
        sgrf: syscon@ff740000 {
-               u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3288-sgrf", "syscon";
                reg = <0xff740000 0x1000>;
        };
                compatible = "rockchip,rk3288-cru";
                reg = <0xff760000 0x1000>;
                rockchip,grf = <&grf>;
-               u-boot,dm-pre-reloc;
                #clock-cells = <1>;
                #reset-cells = <1>;
-               assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>,
-                                 <&cru PLL_GPLL>, <&cru PLL_CPLL>,
+               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 = <0>, <0>,
-                                      <594000000>, <400000000>,
+               assigned-clock-rates = <594000000>, <400000000>,
                                       <500000000>, <300000000>,
                                       <150000000>, <75000000>,
                                       <300000000>, <150000000>,
                                       <75000000>;
-               assigned-clock-parents = <&cru PLL_NPLL>, <&cru PLL_GPLL>;
        };
 
        grf: syscon@ff770000 {
-               u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3288-grf", "syscon";
                reg = <0xff770000 0x1000>;
        };
                status = "disabled";
        };
 
+       spdif: sound@ff88b0000 {
+               compatible = "rockchip,rk3288-spdif", "rockchip,rk3066-spdif";
+               reg = <0xff8b0000 0x10000>;
+               #sound-dai-cells = <0>;
+               clock-names = "hclk", "mclk";
+               clocks = <&cru HCLK_SPDIF8CH>, <&cru SCLK_SPDIF8CH>;
+               dmas = <&dmac_bus_s 3>;
+               dma-names = "tx";
+               interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spdif_tx>;
+               rockchip,grf = <&grf>;
+               status = "disabled";
+       };
+
        i2s: i2s@ff890000 {
                compatible = "rockchip,rk3288-i2s", "rockchip,rk3066-i2s";
                reg = <0xff890000 0x10000>;
                interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
                #address-cells = <1>;
                #size-cells = <0>;
+               #sound-dai-cells = <1>;
                dmas = <&dmac_bus_s 0>, <&dmac_bus_s 1>;
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
                                reg = <1>;
                                remote-endpoint = <&hdmi_in_vopb>;
                        };
+                       vopb_out_lvds: endpoint@2 {
+                               reg = <2>;
+                               remote-endpoint = <&lvds_in_vopb>;
+                       };
+                       vopb_out_mipi: endpoint@3 {
+                               reg = <3>;
+                               remote-endpoint = <&mipi_in_vopb>;
+                       };
+
                };
        };
 
                                reg = <1>;
                                remote-endpoint = <&hdmi_in_vopl>;
                        };
+                       vopl_out_lvds: endpoint@2 {
+                               reg = <2>;
+                               remote-endpoint = <&lvds_in_vopl>;
+                       };
+                       vopl_out_mipi: endpoint@3 {
+                               reg = <3>;
+                               remote-endpoint = <&mipi_in_vopl>;
+                       };
 
                };
        };
                };
        };
 
+       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>;
+               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>;
+                               };
+                       };
+               };
+       };
+
+       mipi_dsi0: mipi@ff960000 {
+               compatible = "rockchip,rk3288_mipi_dsi";
+               reg = <0xff960000 0x4000>;
+               clocks = <&cru PCLK_MIPI_DSI0>;
+               clock-names = "pclk_mipi";
+               /*pinctrl-names = "default";
+               pinctrl-0 = <&lcdc0_ctl>;*/
+               rockchip,grf = <&grf>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+               ports {
+                       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>;
+                               };
+                       };
+               };
+       };
+
        hdmi_audio: hdmi_audio {
                compatible = "rockchip,rk3288-hdmi-audio";
                i2s-controller = <&i2s>;
        };
 
        noc: syscon@ffac0000 {
-               u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3288-noc", "syscon";
                reg = <0xffac0000 0x2000>;
        };
                        };
                };
 
+               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>;
                                                <4 3 3 &pcfg_pull_none>;
                        };
                };
+
+               spdif {
+                       spdif_tx: spdif-tx {
+                               rockchip,pins = <RK_GPIO6 11 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
        };
 
        power: power-controller {