1*724ba675SRob Herring/* 2*724ba675SRob Herring * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com> 3*724ba675SRob Herring * 4*724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms 5*724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual 6*724ba675SRob Herring * licensing only applies to this file, and not this project as a 7*724ba675SRob Herring * whole. 8*724ba675SRob Herring * 9*724ba675SRob Herring * a) This file is free software; you can redistribute it and/or 10*724ba675SRob Herring * modify it under the terms of the GNU General Public License as 11*724ba675SRob Herring * published by the Free Software Foundation; either version 2 of the 12*724ba675SRob Herring * License, or (at your option) any later version. 13*724ba675SRob Herring * 14*724ba675SRob Herring * This file is distributed in the hope that it will be useful, 15*724ba675SRob Herring * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*724ba675SRob Herring * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*724ba675SRob Herring * GNU General Public License for more details. 18*724ba675SRob Herring * 19*724ba675SRob Herring * Or, alternatively, 20*724ba675SRob Herring * 21*724ba675SRob Herring * b) Permission is hereby granted, free of charge, to any person 22*724ba675SRob Herring * obtaining a copy of this software and associated documentation 23*724ba675SRob Herring * files (the "Software"), to deal in the Software without 24*724ba675SRob Herring * restriction, including without limitation the rights to use, 25*724ba675SRob Herring * copy, modify, merge, publish, distribute, sublicense, and/or 26*724ba675SRob Herring * sell copies of the Software, and to permit persons to whom the 27*724ba675SRob Herring * Software is furnished to do so, subject to the following 28*724ba675SRob Herring * conditions: 29*724ba675SRob Herring * 30*724ba675SRob Herring * The above copyright notice and this permission notice shall be 31*724ba675SRob Herring * included in all copies or substantial portions of the Software. 32*724ba675SRob Herring * 33*724ba675SRob Herring * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34*724ba675SRob Herring * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35*724ba675SRob Herring * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36*724ba675SRob Herring * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37*724ba675SRob Herring * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38*724ba675SRob Herring * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39*724ba675SRob Herring * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40*724ba675SRob Herring * OTHER DEALINGS IN THE SOFTWARE. 41*724ba675SRob Herring */ 42*724ba675SRob Herring 43*724ba675SRob Herring#include "sunxi-h3-h5.dtsi" 44*724ba675SRob Herring#include <dt-bindings/thermal/thermal.h> 45*724ba675SRob Herring 46*724ba675SRob Herring/ { 47*724ba675SRob Herring cpu0_opp_table: opp-table-cpu { 48*724ba675SRob Herring compatible = "operating-points-v2"; 49*724ba675SRob Herring opp-shared; 50*724ba675SRob Herring 51*724ba675SRob Herring opp-648000000 { 52*724ba675SRob Herring opp-hz = /bits/ 64 <648000000>; 53*724ba675SRob Herring opp-microvolt = <1040000 1040000 1300000>; 54*724ba675SRob Herring clock-latency-ns = <244144>; /* 8 32k periods */ 55*724ba675SRob Herring }; 56*724ba675SRob Herring 57*724ba675SRob Herring opp-816000000 { 58*724ba675SRob Herring opp-hz = /bits/ 64 <816000000>; 59*724ba675SRob Herring opp-microvolt = <1100000 1100000 1300000>; 60*724ba675SRob Herring clock-latency-ns = <244144>; /* 8 32k periods */ 61*724ba675SRob Herring }; 62*724ba675SRob Herring 63*724ba675SRob Herring opp-1008000000 { 64*724ba675SRob Herring opp-hz = /bits/ 64 <1008000000>; 65*724ba675SRob Herring opp-microvolt = <1200000 1200000 1300000>; 66*724ba675SRob Herring clock-latency-ns = <244144>; /* 8 32k periods */ 67*724ba675SRob Herring }; 68*724ba675SRob Herring }; 69*724ba675SRob Herring 70*724ba675SRob Herring cpus { 71*724ba675SRob Herring #address-cells = <1>; 72*724ba675SRob Herring #size-cells = <0>; 73*724ba675SRob Herring 74*724ba675SRob Herring cpu0: cpu@0 { 75*724ba675SRob Herring compatible = "arm,cortex-a7"; 76*724ba675SRob Herring device_type = "cpu"; 77*724ba675SRob Herring reg = <0>; 78*724ba675SRob Herring clocks = <&ccu CLK_CPUX>; 79*724ba675SRob Herring clock-names = "cpu"; 80*724ba675SRob Herring operating-points-v2 = <&cpu0_opp_table>; 81*724ba675SRob Herring #cooling-cells = <2>; 82*724ba675SRob Herring }; 83*724ba675SRob Herring 84*724ba675SRob Herring cpu1: cpu@1 { 85*724ba675SRob Herring compatible = "arm,cortex-a7"; 86*724ba675SRob Herring device_type = "cpu"; 87*724ba675SRob Herring reg = <1>; 88*724ba675SRob Herring clocks = <&ccu CLK_CPUX>; 89*724ba675SRob Herring clock-names = "cpu"; 90*724ba675SRob Herring operating-points-v2 = <&cpu0_opp_table>; 91*724ba675SRob Herring #cooling-cells = <2>; 92*724ba675SRob Herring }; 93*724ba675SRob Herring 94*724ba675SRob Herring cpu2: cpu@2 { 95*724ba675SRob Herring compatible = "arm,cortex-a7"; 96*724ba675SRob Herring device_type = "cpu"; 97*724ba675SRob Herring reg = <2>; 98*724ba675SRob Herring clocks = <&ccu CLK_CPUX>; 99*724ba675SRob Herring clock-names = "cpu"; 100*724ba675SRob Herring operating-points-v2 = <&cpu0_opp_table>; 101*724ba675SRob Herring #cooling-cells = <2>; 102*724ba675SRob Herring }; 103*724ba675SRob Herring 104*724ba675SRob Herring cpu3: cpu@3 { 105*724ba675SRob Herring compatible = "arm,cortex-a7"; 106*724ba675SRob Herring device_type = "cpu"; 107*724ba675SRob Herring reg = <3>; 108*724ba675SRob Herring clocks = <&ccu CLK_CPUX>; 109*724ba675SRob Herring clock-names = "cpu"; 110*724ba675SRob Herring operating-points-v2 = <&cpu0_opp_table>; 111*724ba675SRob Herring #cooling-cells = <2>; 112*724ba675SRob Herring }; 113*724ba675SRob Herring }; 114*724ba675SRob Herring 115*724ba675SRob Herring gpu_opp_table: opp-table-gpu { 116*724ba675SRob Herring compatible = "operating-points-v2"; 117*724ba675SRob Herring 118*724ba675SRob Herring opp-120000000 { 119*724ba675SRob Herring opp-hz = /bits/ 64 <120000000>; 120*724ba675SRob Herring }; 121*724ba675SRob Herring 122*724ba675SRob Herring opp-312000000 { 123*724ba675SRob Herring opp-hz = /bits/ 64 <312000000>; 124*724ba675SRob Herring }; 125*724ba675SRob Herring 126*724ba675SRob Herring opp-432000000 { 127*724ba675SRob Herring opp-hz = /bits/ 64 <432000000>; 128*724ba675SRob Herring }; 129*724ba675SRob Herring 130*724ba675SRob Herring opp-576000000 { 131*724ba675SRob Herring opp-hz = /bits/ 64 <576000000>; 132*724ba675SRob Herring }; 133*724ba675SRob Herring }; 134*724ba675SRob Herring 135*724ba675SRob Herring pmu { 136*724ba675SRob Herring compatible = "arm,cortex-a7-pmu"; 137*724ba675SRob Herring interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>, 138*724ba675SRob Herring <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, 139*724ba675SRob Herring <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, 140*724ba675SRob Herring <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; 141*724ba675SRob Herring interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; 142*724ba675SRob Herring }; 143*724ba675SRob Herring 144*724ba675SRob Herring timer { 145*724ba675SRob Herring compatible = "arm,armv7-timer"; 146*724ba675SRob Herring interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 147*724ba675SRob Herring <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 148*724ba675SRob Herring <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 149*724ba675SRob Herring <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 150*724ba675SRob Herring }; 151*724ba675SRob Herring 152*724ba675SRob Herring soc { 153*724ba675SRob Herring deinterlace: deinterlace@1400000 { 154*724ba675SRob Herring compatible = "allwinner,sun8i-h3-deinterlace"; 155*724ba675SRob Herring reg = <0x01400000 0x20000>; 156*724ba675SRob Herring clocks = <&ccu CLK_BUS_DEINTERLACE>, 157*724ba675SRob Herring <&ccu CLK_DEINTERLACE>, 158*724ba675SRob Herring <&ccu CLK_DRAM_DEINTERLACE>; 159*724ba675SRob Herring clock-names = "bus", "mod", "ram"; 160*724ba675SRob Herring resets = <&ccu RST_BUS_DEINTERLACE>; 161*724ba675SRob Herring interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>; 162*724ba675SRob Herring interconnects = <&mbus 9>; 163*724ba675SRob Herring interconnect-names = "dma-mem"; 164*724ba675SRob Herring }; 165*724ba675SRob Herring 166*724ba675SRob Herring syscon: system-control@1c00000 { 167*724ba675SRob Herring compatible = "allwinner,sun8i-h3-system-control"; 168*724ba675SRob Herring reg = <0x01c00000 0x1000>; 169*724ba675SRob Herring #address-cells = <1>; 170*724ba675SRob Herring #size-cells = <1>; 171*724ba675SRob Herring ranges; 172*724ba675SRob Herring 173*724ba675SRob Herring sram_c: sram@1d00000 { 174*724ba675SRob Herring compatible = "mmio-sram"; 175*724ba675SRob Herring reg = <0x01d00000 0x80000>; 176*724ba675SRob Herring #address-cells = <1>; 177*724ba675SRob Herring #size-cells = <1>; 178*724ba675SRob Herring ranges = <0 0x01d00000 0x80000>; 179*724ba675SRob Herring 180*724ba675SRob Herring ve_sram: sram-section@0 { 181*724ba675SRob Herring compatible = "allwinner,sun8i-h3-sram-c1", 182*724ba675SRob Herring "allwinner,sun4i-a10-sram-c1"; 183*724ba675SRob Herring reg = <0x000000 0x80000>; 184*724ba675SRob Herring }; 185*724ba675SRob Herring }; 186*724ba675SRob Herring }; 187*724ba675SRob Herring 188*724ba675SRob Herring video-codec@1c0e000 { 189*724ba675SRob Herring compatible = "allwinner,sun8i-h3-video-engine"; 190*724ba675SRob Herring reg = <0x01c0e000 0x1000>; 191*724ba675SRob Herring clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>, 192*724ba675SRob Herring <&ccu CLK_DRAM_VE>; 193*724ba675SRob Herring clock-names = "ahb", "mod", "ram"; 194*724ba675SRob Herring resets = <&ccu RST_BUS_VE>; 195*724ba675SRob Herring interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; 196*724ba675SRob Herring allwinner,sram = <&ve_sram 1>; 197*724ba675SRob Herring }; 198*724ba675SRob Herring 199*724ba675SRob Herring crypto: crypto@1c15000 { 200*724ba675SRob Herring compatible = "allwinner,sun8i-h3-crypto"; 201*724ba675SRob Herring reg = <0x01c15000 0x1000>; 202*724ba675SRob Herring interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>; 203*724ba675SRob Herring clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>; 204*724ba675SRob Herring clock-names = "bus", "mod"; 205*724ba675SRob Herring resets = <&ccu RST_BUS_CE>; 206*724ba675SRob Herring }; 207*724ba675SRob Herring 208*724ba675SRob Herring mali: gpu@1c40000 { 209*724ba675SRob Herring compatible = "allwinner,sun8i-h3-mali", "arm,mali-400"; 210*724ba675SRob Herring reg = <0x01c40000 0x10000>; 211*724ba675SRob Herring interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, 212*724ba675SRob Herring <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, 213*724ba675SRob Herring <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, 214*724ba675SRob Herring <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, 215*724ba675SRob Herring <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, 216*724ba675SRob Herring <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, 217*724ba675SRob Herring <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; 218*724ba675SRob Herring interrupt-names = "gp", 219*724ba675SRob Herring "gpmmu", 220*724ba675SRob Herring "pp0", 221*724ba675SRob Herring "ppmmu0", 222*724ba675SRob Herring "pp1", 223*724ba675SRob Herring "ppmmu1", 224*724ba675SRob Herring "pmu"; 225*724ba675SRob Herring clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>; 226*724ba675SRob Herring clock-names = "bus", "core"; 227*724ba675SRob Herring resets = <&ccu RST_BUS_GPU>; 228*724ba675SRob Herring operating-points-v2 = <&gpu_opp_table>; 229*724ba675SRob Herring }; 230*724ba675SRob Herring 231*724ba675SRob Herring ths: thermal-sensor@1c25000 { 232*724ba675SRob Herring compatible = "allwinner,sun8i-h3-ths"; 233*724ba675SRob Herring reg = <0x01c25000 0x400>; 234*724ba675SRob Herring interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 235*724ba675SRob Herring resets = <&ccu RST_BUS_THS>; 236*724ba675SRob Herring clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>; 237*724ba675SRob Herring clock-names = "bus", "mod"; 238*724ba675SRob Herring nvmem-cells = <&ths_calibration>; 239*724ba675SRob Herring nvmem-cell-names = "calibration"; 240*724ba675SRob Herring #thermal-sensor-cells = <0>; 241*724ba675SRob Herring }; 242*724ba675SRob Herring }; 243*724ba675SRob Herring 244*724ba675SRob Herring thermal-zones { 245*724ba675SRob Herring cpu_thermal: cpu-thermal { 246*724ba675SRob Herring polling-delay-passive = <0>; 247*724ba675SRob Herring polling-delay = <0>; 248*724ba675SRob Herring thermal-sensors = <&ths>; 249*724ba675SRob Herring 250*724ba675SRob Herring trips { 251*724ba675SRob Herring cpu_hot_trip: cpu-hot { 252*724ba675SRob Herring temperature = <80000>; 253*724ba675SRob Herring hysteresis = <2000>; 254*724ba675SRob Herring type = "passive"; 255*724ba675SRob Herring }; 256*724ba675SRob Herring 257*724ba675SRob Herring cpu_very_hot_trip: cpu-very-hot { 258*724ba675SRob Herring temperature = <100000>; 259*724ba675SRob Herring hysteresis = <0>; 260*724ba675SRob Herring type = "critical"; 261*724ba675SRob Herring }; 262*724ba675SRob Herring }; 263*724ba675SRob Herring 264*724ba675SRob Herring cooling-maps { 265*724ba675SRob Herring cpu-hot-limit { 266*724ba675SRob Herring trip = <&cpu_hot_trip>; 267*724ba675SRob Herring cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 268*724ba675SRob Herring <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 269*724ba675SRob Herring <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, 270*724ba675SRob Herring <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; 271*724ba675SRob Herring }; 272*724ba675SRob Herring }; 273*724ba675SRob Herring }; 274*724ba675SRob Herring }; 275*724ba675SRob Herring}; 276*724ba675SRob Herring 277*724ba675SRob Herring&ccu { 278*724ba675SRob Herring compatible = "allwinner,sun8i-h3-ccu"; 279*724ba675SRob Herring}; 280*724ba675SRob Herring 281*724ba675SRob Herring&display_clocks { 282*724ba675SRob Herring compatible = "allwinner,sun8i-h3-de2-clk"; 283*724ba675SRob Herring}; 284*724ba675SRob Herring 285*724ba675SRob Herring&mbus { 286*724ba675SRob Herring compatible = "allwinner,sun8i-h3-mbus"; 287*724ba675SRob Herring}; 288*724ba675SRob Herring 289*724ba675SRob Herring&mmc0 { 290*724ba675SRob Herring compatible = "allwinner,sun7i-a20-mmc"; 291*724ba675SRob Herring clocks = <&ccu CLK_BUS_MMC0>, 292*724ba675SRob Herring <&ccu CLK_MMC0>, 293*724ba675SRob Herring <&ccu CLK_MMC0_OUTPUT>, 294*724ba675SRob Herring <&ccu CLK_MMC0_SAMPLE>; 295*724ba675SRob Herring clock-names = "ahb", 296*724ba675SRob Herring "mmc", 297*724ba675SRob Herring "output", 298*724ba675SRob Herring "sample"; 299*724ba675SRob Herring}; 300*724ba675SRob Herring 301*724ba675SRob Herring&mmc1 { 302*724ba675SRob Herring compatible = "allwinner,sun7i-a20-mmc"; 303*724ba675SRob Herring clocks = <&ccu CLK_BUS_MMC1>, 304*724ba675SRob Herring <&ccu CLK_MMC1>, 305*724ba675SRob Herring <&ccu CLK_MMC1_OUTPUT>, 306*724ba675SRob Herring <&ccu CLK_MMC1_SAMPLE>; 307*724ba675SRob Herring clock-names = "ahb", 308*724ba675SRob Herring "mmc", 309*724ba675SRob Herring "output", 310*724ba675SRob Herring "sample"; 311*724ba675SRob Herring}; 312*724ba675SRob Herring 313*724ba675SRob Herring&mmc2 { 314*724ba675SRob Herring compatible = "allwinner,sun7i-a20-mmc"; 315*724ba675SRob Herring clocks = <&ccu CLK_BUS_MMC2>, 316*724ba675SRob Herring <&ccu CLK_MMC2>, 317*724ba675SRob Herring <&ccu CLK_MMC2_OUTPUT>, 318*724ba675SRob Herring <&ccu CLK_MMC2_SAMPLE>; 319*724ba675SRob Herring clock-names = "ahb", 320*724ba675SRob Herring "mmc", 321*724ba675SRob Herring "output", 322*724ba675SRob Herring "sample"; 323*724ba675SRob Herring}; 324*724ba675SRob Herring 325*724ba675SRob Herring&pio { 326*724ba675SRob Herring compatible = "allwinner,sun8i-h3-pinctrl"; 327*724ba675SRob Herring}; 328*724ba675SRob Herring 329*724ba675SRob Herring&rtc { 330*724ba675SRob Herring compatible = "allwinner,sun8i-h3-rtc"; 331*724ba675SRob Herring}; 332*724ba675SRob Herring 333*724ba675SRob Herring&sid { 334*724ba675SRob Herring compatible = "allwinner,sun8i-h3-sid"; 335*724ba675SRob Herring}; 336