ARM64: dts: rk3399: add pinctrl for i2s spdif
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399.dtsi
index 9fa6183db7664fe069a10ed3b9e3b5823fb4a118..fa6be22ca942eca9ae06f3dbe54ea90a43d216f1 100644 (file)
@@ -40,8 +40,9 @@
  *     OTHER DEALINGS IN THE SOFTWARE.
  */
 #include <dt-bindings/clock/rk3399-cru.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 
 / {
                serial3 = &uart3;
        };
 
-       psci {
-               compatible = "arm,psci";
-               method = "smc";
-       };
-
        cpus {
                #address-cells = <2>;
                #size-cells = <0>;
                        };
                };
 
-               idle-states {
-                       entry-method = "psci";
-
-                       cpu_sleep: cpu-sleep-0 {
-                               compatible = "arm,idle-state";
-                       };
-               };
-
                cpu_l0: cpu@0 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x0>;
-                       cpu-idle-states = <&cpu_sleep>;
-                       enable-method = "psci";
                };
 
                cpu_l1: cpu@1 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x1>;
-                       cpu-idle-states = <&cpu_sleep>;
-                       enable-method = "psci";
                };
 
                cpu_l2: cpu@2 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x2>;
-                       cpu-idle-states = <&cpu_sleep>;
-                       enable-method = "psci";
                };
 
                cpu_l3: cpu@3 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a53", "arm,armv8";
                        reg = <0x0 0x3>;
-                       cpu-idle-states = <&cpu_sleep>;
-                       enable-method = "psci";
                };
 
                cpu_b0: cpu@100 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a72", "arm,armv8";
                        reg = <0x0 0x100>;
-                       cpu-idle-states = <&cpu_sleep>;
-                       enable-method = "psci";
                };
 
                cpu_b1: cpu@101 {
                        device_type = "cpu";
                        compatible = "arm,cortex-a72", "arm,armv8";
                        reg = <0x0 0x101>;
-                       cpu-idle-states = <&cpu_sleep>;
-                       enable-method = "psci";
                };
        };
 
-       pmu {
-               compatible = "arm,armv8-pmuv3";
-               interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
-               interrupt-affinity = <&cpu_l0>, <&cpu_l1>, <&cpu_l2>,
-                                    <&cpu_l3>, <&cpu_b0>, <&cpu_b1>;
-       };
-
        timer {
                compatible = "arm,armv8-timer";
-               interrupts =
-                       <GIC_PPI 13
-                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-                       <GIC_PPI 14
-                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-                       <GIC_PPI 11
-                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
-                       <GIC_PPI 10
-                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
-               clock-frequency = <24000000>;
+               interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>;
        };
 
        xin24m: xin24m {
                      <0x0 0xfff00000 0 0x10000>, /* GICC */
                      <0x0 0xfff10000 0 0x10000>, /* GICH */
                      <0x0 0xfff20000 0 0x10000>; /* GICV */
-               interrupts =
-                       <GIC_PPI 9
-                       (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
+               interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
                its: interrupt-controller@fee20000 {
                        compatible = "arm,gic-v3-its";
                        msi-controller;
                dmac_bus: dma-controller@ff6d0000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x0 0xff6d0000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
                        #dma-cells = <1>;
-                       clocks = <&cru ACLK_DMAC_BUS>;
+                       clocks = <&cru ACLK_DMAC0_PERILP>;
                        clock-names = "apb_pclk";
                };
 
                dmac_peri: dma-controller@ff6e0000 {
                        compatible = "arm,pl330", "arm,primecell";
                        reg = <0x0 0xff6e0000 0x0 0x4000>;
-                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
+                                    <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
                        #dma-cells = <1>;
-                       clocks = <&cru ACLK_DMAC_PERI>;
+                       clocks = <&cru ACLK_DMAC1_PERILP>;
                        clock-names = "apb_pclk";
                };
        };
                status = "disabled";
        };
 
+       spi0: spi@ff1c0000 {
+               compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff110000 0x0 0x1000>;
+               clocks = <&cru SCLK_SPI0>, <&cru PCLK_SPI0>;
+               clock-names = "spiclk", "apb_pclk";
+               interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi1: spi@ff1d0000 {
+               compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff120000 0x0 0x1000>;
+               clocks = <&cru SCLK_SPI1>, <&cru PCLK_SPI1>;
+               clock-names = "spiclk", "apb_pclk";
+               interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi2: spi@ff1e0000 {
+               compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff130000 0x0 0x1000>;
+               clocks = <&cru SCLK_SPI2>, <&cru PCLK_SPI2>;
+               clock-names = "spiclk", "apb_pclk";
+               interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi4: spi@ff1f0000 {
+               compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff120000 0x0 0x1000>;
+               clocks = <&cru SCLK_SPI4>, <&cru PCLK_SPI4>;
+               clock-names = "spiclk", "apb_pclk";
+               interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi4_clk &spi4_tx &spi4_rx &spi4_cs0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
+       spi5: spi@ff200000 {
+               compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff130000 0x0 0x1000>;
+               clocks = <&cru SCLK_SPI5>, <&cru PCLK_SPI5>;
+               clock-names = "spiclk", "apb_pclk";
+               interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi5_clk &spi5_tx &spi5_rx &spi5_cs0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
        pmugrf: syscon@ff320000 {
                compatible = "rockchip,rk3399-pmugrf", "syscon";
                reg = <0x0 0xff320000 0x0 0x1000>;
        };
 
+       spi3: spi@ff350000 {
+               compatible = "rockchip,rk3399-spi", "rockchip,rk3066-spi";
+               reg = <0x0 0xff110000 0x0 0x1000>;
+               clocks = <&cru SCLK_SPI3_PMU>, <&cru PCLK_SPI3_PMU>;
+               clock-names = "spiclk", "apb_pclk";
+               interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spi3_clk &spi3_tx &spi3_rx &spi3_cs0>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
        uart4: serial@ff370000 {
                compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
                reg = <0x0 0xff370000 0x0 0x100>;
-               clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
+               clocks = <&cru SCLK_UART4_PMU>, <&cru PCLK_UART4_PMU>;
                clock-names = "baudclk", "apb_pclk";
                interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
                reg-shift = <2>;
                status = "disabled";
        };
 
-       cru_pmu: pmu-clock-controller@ff750000 {
-               compatible = "rockchip,rk3399-pmu-cru";
+       pmucru: pmu-clock-controller@ff750000 {
+               compatible = "rockchip,rk3399-pmucru";
                reg = <0x0 0xff750000 0x0 0x1000>;
+               rockchip,grf = <&pmugrf>;
                #clock-cells = <1>;
                #reset-cells = <1>;
        };
                reg = <0x0 0xff770000 0x0 0x10000>;
        };
 
+       spdif: spdif@ff870000 {
+               compatible = "rockchip,rk3399-spdif";
+               reg = <0x0 0xff870000 0x0 0x1000>;
+               interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+               dmas = <&dmac_bus 7>;
+               dma-names = "tx";
+               clock-names = "hclk", "mclk";
+               clocks = <&cru HCLK_SPDIF>, <&cru SCLK_SPDIF_8CH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&spdif_bus>;
+               status = "disabled";
+       };
+
        i2s0: i2s@ff880000 {
                compatible = "rockchip,rk3399-i2s", "rockchip,rk3066-i2s";
                reg = <0x0 0xff880000 0x0 0x1000>;
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
                clocks = <&cru HCLK_I2S0_8CH>, <&cru SCLK_I2S0_8CH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s0_8ch_bus>;
                status = "disabled";
        };
 
                dma-names = "tx", "rx";
                clock-names = "i2s_hclk", "i2s_clk";
                clocks = <&cru HCLK_I2S1_8CH>, <&cru SCLK_I2S1_8CH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2s1_2ch_bus>;
                status = "disabled";
        };
 
                        };
                };
 
+               spdif {
+                       spdif_bus: spdif-bus {
+                               rockchip,pins =
+                                       <4 21 RK_FUNC_1 &pcfg_pull_none>;
+                       };
+               };
+
                spi0 {
                        spi0_clk: spi0-clk {
                                rockchip,pins =