1/* 2 * Copyright (C) 2016 ARM Ltd. 3 * based on the Allwinner H3 dtsi: 4 * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com> 5 * 6 * This file is dual-licensed: you can use it either under the terms 7 * of the GPL or the X11 license, at your option. Note that this dual 8 * licensing only applies to this file, and not this project as a 9 * whole. 10 * 11 * a) This file is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU General Public License as 13 * published by the Free Software Foundation; either version 2 of the 14 * License, or (at your option) any later version. 15 * 16 * This file is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * Or, alternatively, 22 * 23 * b) Permission is hereby granted, free of charge, to any person 24 * obtaining a copy of this software and associated documentation 25 * files (the "Software"), to deal in the Software without 26 * restriction, including without limitation the rights to use, 27 * copy, modify, merge, publish, distribute, sublicense, and/or 28 * sell copies of the Software, and to permit persons to whom the 29 * Software is furnished to do so, subject to the following 30 * conditions: 31 * 32 * The above copyright notice and this permission notice shall be 33 * included in all copies or substantial portions of the Software. 34 * 35 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42 * OTHER DEALINGS IN THE SOFTWARE. 43 */ 44 45#include <dt-bindings/clock/sun50i-a64-ccu.h> 46#include <dt-bindings/interrupt-controller/arm-gic.h> 47#include <dt-bindings/pinctrl/sun4i-a10.h> 48#include <dt-bindings/reset/sun50i-a64-ccu.h> 49 50/ { 51 interrupt-parent = <&gic>; 52 #address-cells = <1>; 53 #size-cells = <1>; 54 55 cpus { 56 #address-cells = <1>; 57 #size-cells = <0>; 58 59 cpu0: cpu@0 { 60 compatible = "arm,cortex-a53", "arm,armv8"; 61 device_type = "cpu"; 62 reg = <0>; 63 enable-method = "psci"; 64 }; 65 66 cpu1: cpu@1 { 67 compatible = "arm,cortex-a53", "arm,armv8"; 68 device_type = "cpu"; 69 reg = <1>; 70 enable-method = "psci"; 71 }; 72 73 cpu2: cpu@2 { 74 compatible = "arm,cortex-a53", "arm,armv8"; 75 device_type = "cpu"; 76 reg = <2>; 77 enable-method = "psci"; 78 }; 79 80 cpu3: cpu@3 { 81 compatible = "arm,cortex-a53", "arm,armv8"; 82 device_type = "cpu"; 83 reg = <3>; 84 enable-method = "psci"; 85 }; 86 }; 87 88 osc24M: osc24M_clk { 89 #clock-cells = <0>; 90 compatible = "fixed-clock"; 91 clock-frequency = <24000000>; 92 clock-output-names = "osc24M"; 93 }; 94 95 osc32k: osc32k_clk { 96 #clock-cells = <0>; 97 compatible = "fixed-clock"; 98 clock-frequency = <32768>; 99 clock-output-names = "osc32k"; 100 }; 101 102 psci { 103 compatible = "arm,psci-0.2"; 104 method = "smc"; 105 }; 106 107 timer { 108 compatible = "arm,armv8-timer"; 109 interrupts = <GIC_PPI 13 110 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, 111 <GIC_PPI 14 112 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, 113 <GIC_PPI 11 114 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>, 115 <GIC_PPI 10 116 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 117 }; 118 119 soc { 120 compatible = "simple-bus"; 121 #address-cells = <1>; 122 #size-cells = <1>; 123 ranges; 124 125 usbphy: phy@01c19400 { 126 compatible = "allwinner,sun50i-a64-usb-phy"; 127 reg = <0x01c19400 0x14>, 128 <0x01c1b800 0x4>; 129 reg-names = "phy_ctrl", 130 "pmu1"; 131 clocks = <&ccu CLK_USB_PHY0>, 132 <&ccu CLK_USB_PHY1>; 133 clock-names = "usb0_phy", 134 "usb1_phy"; 135 resets = <&ccu RST_USB_PHY0>, 136 <&ccu RST_USB_PHY1>; 137 reset-names = "usb0_reset", 138 "usb1_reset"; 139 status = "disabled"; 140 #phy-cells = <1>; 141 }; 142 143 ehci1: usb@01c1b000 { 144 compatible = "allwinner,sun50i-a64-ehci", "generic-ehci"; 145 reg = <0x01c1b000 0x100>; 146 interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 147 clocks = <&ccu CLK_BUS_OHCI1>, 148 <&ccu CLK_BUS_EHCI1>, 149 <&ccu CLK_USB_OHCI1>; 150 resets = <&ccu RST_BUS_OHCI1>, 151 <&ccu RST_BUS_EHCI1>; 152 phys = <&usbphy 1>; 153 phy-names = "usb"; 154 status = "disabled"; 155 }; 156 157 ohci1: usb@01c1b400 { 158 compatible = "allwinner,sun50i-a64-ohci", "generic-ohci"; 159 reg = <0x01c1b400 0x100>; 160 interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>; 161 clocks = <&ccu CLK_BUS_OHCI1>, 162 <&ccu CLK_USB_OHCI1>; 163 resets = <&ccu RST_BUS_OHCI1>; 164 phys = <&usbphy 1>; 165 phy-names = "usb"; 166 status = "disabled"; 167 }; 168 169 ccu: clock@01c20000 { 170 compatible = "allwinner,sun50i-a64-ccu"; 171 reg = <0x01c20000 0x400>; 172 clocks = <&osc24M>, <&osc32k>; 173 clock-names = "hosc", "losc"; 174 #clock-cells = <1>; 175 #reset-cells = <1>; 176 }; 177 178 pio: pinctrl@1c20800 { 179 compatible = "allwinner,sun50i-a64-pinctrl"; 180 reg = <0x01c20800 0x400>; 181 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>, 182 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, 183 <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; 184 clocks = <&ccu 58>; 185 gpio-controller; 186 #gpio-cells = <3>; 187 interrupt-controller; 188 #interrupt-cells = <3>; 189 190 i2c1_pins: i2c1_pins { 191 pins = "PH2", "PH3"; 192 function = "i2c1"; 193 }; 194 195 uart0_pins_a: uart0@0 { 196 pins = "PB8", "PB9"; 197 function = "uart0"; 198 }; 199 }; 200 201 uart0: serial@1c28000 { 202 compatible = "snps,dw-apb-uart"; 203 reg = <0x01c28000 0x400>; 204 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 205 reg-shift = <2>; 206 reg-io-width = <4>; 207 clocks = <&ccu 67>; 208 resets = <&ccu 46>; 209 status = "disabled"; 210 }; 211 212 uart1: serial@1c28400 { 213 compatible = "snps,dw-apb-uart"; 214 reg = <0x01c28400 0x400>; 215 interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 216 reg-shift = <2>; 217 reg-io-width = <4>; 218 clocks = <&ccu 68>; 219 resets = <&ccu 47>; 220 status = "disabled"; 221 }; 222 223 uart2: serial@1c28800 { 224 compatible = "snps,dw-apb-uart"; 225 reg = <0x01c28800 0x400>; 226 interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 227 reg-shift = <2>; 228 reg-io-width = <4>; 229 clocks = <&ccu 69>; 230 resets = <&ccu 48>; 231 status = "disabled"; 232 }; 233 234 uart3: serial@1c28c00 { 235 compatible = "snps,dw-apb-uart"; 236 reg = <0x01c28c00 0x400>; 237 interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>; 238 reg-shift = <2>; 239 reg-io-width = <4>; 240 clocks = <&ccu 70>; 241 resets = <&ccu 49>; 242 status = "disabled"; 243 }; 244 245 uart4: serial@1c29000 { 246 compatible = "snps,dw-apb-uart"; 247 reg = <0x01c29000 0x400>; 248 interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>; 249 reg-shift = <2>; 250 reg-io-width = <4>; 251 clocks = <&ccu 71>; 252 resets = <&ccu 50>; 253 status = "disabled"; 254 }; 255 256 i2c0: i2c@1c2ac00 { 257 compatible = "allwinner,sun6i-a31-i2c"; 258 reg = <0x01c2ac00 0x400>; 259 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; 260 clocks = <&ccu 63>; 261 resets = <&ccu 42>; 262 status = "disabled"; 263 #address-cells = <1>; 264 #size-cells = <0>; 265 }; 266 267 i2c1: i2c@1c2b000 { 268 compatible = "allwinner,sun6i-a31-i2c"; 269 reg = <0x01c2b000 0x400>; 270 interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 271 clocks = <&ccu 64>; 272 resets = <&ccu 43>; 273 status = "disabled"; 274 #address-cells = <1>; 275 #size-cells = <0>; 276 }; 277 278 i2c2: i2c@1c2b400 { 279 compatible = "allwinner,sun6i-a31-i2c"; 280 reg = <0x01c2b400 0x400>; 281 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; 282 clocks = <&ccu 65>; 283 resets = <&ccu 44>; 284 status = "disabled"; 285 #address-cells = <1>; 286 #size-cells = <0>; 287 }; 288 289 gic: interrupt-controller@1c81000 { 290 compatible = "arm,gic-400"; 291 reg = <0x01c81000 0x1000>, 292 <0x01c82000 0x2000>, 293 <0x01c84000 0x2000>, 294 <0x01c86000 0x2000>; 295 interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 296 interrupt-controller; 297 #interrupt-cells = <3>; 298 }; 299 300 rtc: rtc@1f00000 { 301 compatible = "allwinner,sun6i-a31-rtc"; 302 reg = <0x01f00000 0x54>; 303 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 304 <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; 305 }; 306 }; 307}; 308