1*4882a593Smuzhiyun/* 2*4882a593Smuzhiyun * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz> 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms 5*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual 6*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a 7*4882a593Smuzhiyun * whole. 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * a) This file is free software; you can redistribute it and/or 10*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License as 11*4882a593Smuzhiyun * published by the Free Software Foundation; either version 2 of the 12*4882a593Smuzhiyun * License, or (at your option) any later version. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun * This file is distributed in the hope that it will be useful, 15*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*4882a593Smuzhiyun * GNU General Public License for more details. 18*4882a593Smuzhiyun * 19*4882a593Smuzhiyun * Or, alternatively, 20*4882a593Smuzhiyun * 21*4882a593Smuzhiyun * b) Permission is hereby granted, free of charge, to any person 22*4882a593Smuzhiyun * obtaining a copy of this software and associated documentation 23*4882a593Smuzhiyun * files (the "Software"), to deal in the Software without 24*4882a593Smuzhiyun * restriction, including without limitation the rights to use, 25*4882a593Smuzhiyun * copy, modify, merge, publish, distribute, sublicense, and/or 26*4882a593Smuzhiyun * sell copies of the Software, and to permit persons to whom the 27*4882a593Smuzhiyun * Software is furnished to do so, subject to the following 28*4882a593Smuzhiyun * conditions: 29*4882a593Smuzhiyun * 30*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be 31*4882a593Smuzhiyun * included in all copies or substantial portions of the Software. 32*4882a593Smuzhiyun * 33*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 34*4882a593Smuzhiyun * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 35*4882a593Smuzhiyun * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 36*4882a593Smuzhiyun * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 37*4882a593Smuzhiyun * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 38*4882a593Smuzhiyun * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 39*4882a593Smuzhiyun * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 40*4882a593Smuzhiyun * OTHER DEALINGS IN THE SOFTWARE. 41*4882a593Smuzhiyun */ 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun#include <dt-bindings/clock/sun8i-v3s-ccu.h> 44*4882a593Smuzhiyun#include <dt-bindings/reset/sun8i-v3s-ccu.h> 45*4882a593Smuzhiyun#include <dt-bindings/interrupt-controller/arm-gic.h> 46*4882a593Smuzhiyun#include <dt-bindings/pinctrl/sun4i-a10.h> 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun/ { 49*4882a593Smuzhiyun #address-cells = <1>; 50*4882a593Smuzhiyun #size-cells = <1>; 51*4882a593Smuzhiyun interrupt-parent = <&gic>; 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun cpus { 54*4882a593Smuzhiyun #address-cells = <1>; 55*4882a593Smuzhiyun #size-cells = <0>; 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun cpu@0 { 58*4882a593Smuzhiyun compatible = "arm,cortex-a7"; 59*4882a593Smuzhiyun device_type = "cpu"; 60*4882a593Smuzhiyun reg = <0>; 61*4882a593Smuzhiyun clocks = <&ccu CLK_CPU>; 62*4882a593Smuzhiyun }; 63*4882a593Smuzhiyun }; 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun timer { 66*4882a593Smuzhiyun compatible = "arm,armv7-timer"; 67*4882a593Smuzhiyun interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 68*4882a593Smuzhiyun <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 69*4882a593Smuzhiyun <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 70*4882a593Smuzhiyun <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 71*4882a593Smuzhiyun }; 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun clocks { 74*4882a593Smuzhiyun #address-cells = <1>; 75*4882a593Smuzhiyun #size-cells = <1>; 76*4882a593Smuzhiyun ranges; 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun osc24M: osc24M_clk { 79*4882a593Smuzhiyun #clock-cells = <0>; 80*4882a593Smuzhiyun compatible = "fixed-clock"; 81*4882a593Smuzhiyun clock-frequency = <24000000>; 82*4882a593Smuzhiyun clock-output-names = "osc24M"; 83*4882a593Smuzhiyun }; 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun osc32k: osc32k_clk { 86*4882a593Smuzhiyun #clock-cells = <0>; 87*4882a593Smuzhiyun compatible = "fixed-clock"; 88*4882a593Smuzhiyun clock-frequency = <32768>; 89*4882a593Smuzhiyun clock-output-names = "osc32k"; 90*4882a593Smuzhiyun }; 91*4882a593Smuzhiyun }; 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun soc { 94*4882a593Smuzhiyun compatible = "simple-bus"; 95*4882a593Smuzhiyun #address-cells = <1>; 96*4882a593Smuzhiyun #size-cells = <1>; 97*4882a593Smuzhiyun ranges; 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun mmc0: mmc@01c0f000 { 100*4882a593Smuzhiyun compatible = "allwinner,sun7i-a20-mmc"; 101*4882a593Smuzhiyun reg = <0x01c0f000 0x1000>; 102*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_MMC0>, 103*4882a593Smuzhiyun <&ccu CLK_MMC0>, 104*4882a593Smuzhiyun <&ccu CLK_MMC0_OUTPUT>, 105*4882a593Smuzhiyun <&ccu CLK_MMC0_SAMPLE>; 106*4882a593Smuzhiyun clock-names = "ahb", 107*4882a593Smuzhiyun "mmc", 108*4882a593Smuzhiyun "output", 109*4882a593Smuzhiyun "sample"; 110*4882a593Smuzhiyun resets = <&ccu RST_BUS_MMC0>; 111*4882a593Smuzhiyun reset-names = "ahb"; 112*4882a593Smuzhiyun interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>; 113*4882a593Smuzhiyun status = "disabled"; 114*4882a593Smuzhiyun #address-cells = <1>; 115*4882a593Smuzhiyun #size-cells = <0>; 116*4882a593Smuzhiyun }; 117*4882a593Smuzhiyun 118*4882a593Smuzhiyun mmc1: mmc@01c10000 { 119*4882a593Smuzhiyun compatible = "allwinner,sun7i-a20-mmc"; 120*4882a593Smuzhiyun reg = <0x01c10000 0x1000>; 121*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_MMC1>, 122*4882a593Smuzhiyun <&ccu CLK_MMC1>, 123*4882a593Smuzhiyun <&ccu CLK_MMC1_OUTPUT>, 124*4882a593Smuzhiyun <&ccu CLK_MMC1_SAMPLE>; 125*4882a593Smuzhiyun clock-names = "ahb", 126*4882a593Smuzhiyun "mmc", 127*4882a593Smuzhiyun "output", 128*4882a593Smuzhiyun "sample"; 129*4882a593Smuzhiyun resets = <&ccu RST_BUS_MMC1>; 130*4882a593Smuzhiyun reset-names = "ahb"; 131*4882a593Smuzhiyun interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>; 132*4882a593Smuzhiyun status = "disabled"; 133*4882a593Smuzhiyun #address-cells = <1>; 134*4882a593Smuzhiyun #size-cells = <0>; 135*4882a593Smuzhiyun }; 136*4882a593Smuzhiyun 137*4882a593Smuzhiyun mmc2: mmc@01c11000 { 138*4882a593Smuzhiyun compatible = "allwinner,sun7i-a20-mmc"; 139*4882a593Smuzhiyun reg = <0x01c11000 0x1000>; 140*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_MMC2>, 141*4882a593Smuzhiyun <&ccu CLK_MMC2>, 142*4882a593Smuzhiyun <&ccu CLK_MMC2_OUTPUT>, 143*4882a593Smuzhiyun <&ccu CLK_MMC2_SAMPLE>; 144*4882a593Smuzhiyun clock-names = "ahb", 145*4882a593Smuzhiyun "mmc", 146*4882a593Smuzhiyun "output", 147*4882a593Smuzhiyun "sample"; 148*4882a593Smuzhiyun resets = <&ccu RST_BUS_MMC2>; 149*4882a593Smuzhiyun reset-names = "ahb"; 150*4882a593Smuzhiyun interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; 151*4882a593Smuzhiyun status = "disabled"; 152*4882a593Smuzhiyun #address-cells = <1>; 153*4882a593Smuzhiyun #size-cells = <0>; 154*4882a593Smuzhiyun }; 155*4882a593Smuzhiyun 156*4882a593Smuzhiyun usb_otg: usb@01c19000 { 157*4882a593Smuzhiyun compatible = "allwinner,sun8i-h3-musb"; 158*4882a593Smuzhiyun reg = <0x01c19000 0x0400>; 159*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_OTG>; 160*4882a593Smuzhiyun resets = <&ccu RST_BUS_OTG>; 161*4882a593Smuzhiyun interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 162*4882a593Smuzhiyun interrupt-names = "mc"; 163*4882a593Smuzhiyun phys = <&usbphy 0>; 164*4882a593Smuzhiyun phy-names = "usb"; 165*4882a593Smuzhiyun extcon = <&usbphy 0>; 166*4882a593Smuzhiyun status = "disabled"; 167*4882a593Smuzhiyun }; 168*4882a593Smuzhiyun 169*4882a593Smuzhiyun usbphy: phy@01c19400 { 170*4882a593Smuzhiyun compatible = "allwinner,sun8i-v3s-usb-phy"; 171*4882a593Smuzhiyun reg = <0x01c19400 0x2c>, 172*4882a593Smuzhiyun <0x01c1a800 0x4>; 173*4882a593Smuzhiyun reg-names = "phy_ctrl", 174*4882a593Smuzhiyun "pmu0"; 175*4882a593Smuzhiyun clocks = <&ccu CLK_USB_PHY0>; 176*4882a593Smuzhiyun clock-names = "usb0_phy"; 177*4882a593Smuzhiyun resets = <&ccu RST_USB_PHY0>; 178*4882a593Smuzhiyun reset-names = "usb0_reset"; 179*4882a593Smuzhiyun status = "disabled"; 180*4882a593Smuzhiyun #phy-cells = <1>; 181*4882a593Smuzhiyun }; 182*4882a593Smuzhiyun 183*4882a593Smuzhiyun ccu: clock@01c20000 { 184*4882a593Smuzhiyun compatible = "allwinner,sun8i-v3s-ccu"; 185*4882a593Smuzhiyun reg = <0x01c20000 0x400>; 186*4882a593Smuzhiyun clocks = <&osc24M>, <&osc32k>; 187*4882a593Smuzhiyun clock-names = "hosc", "losc"; 188*4882a593Smuzhiyun #clock-cells = <1>; 189*4882a593Smuzhiyun #reset-cells = <1>; 190*4882a593Smuzhiyun }; 191*4882a593Smuzhiyun 192*4882a593Smuzhiyun rtc: rtc@01c20400 { 193*4882a593Smuzhiyun compatible = "allwinner,sun6i-a31-rtc"; 194*4882a593Smuzhiyun reg = <0x01c20400 0x54>; 195*4882a593Smuzhiyun interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, 196*4882a593Smuzhiyun <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>; 197*4882a593Smuzhiyun }; 198*4882a593Smuzhiyun 199*4882a593Smuzhiyun pio: pinctrl@01c20800 { 200*4882a593Smuzhiyun compatible = "allwinner,sun8i-v3s-pinctrl"; 201*4882a593Smuzhiyun reg = <0x01c20800 0x400>; 202*4882a593Smuzhiyun interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 203*4882a593Smuzhiyun <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; 204*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>; 205*4882a593Smuzhiyun clock-names = "apb", "hosc", "losc"; 206*4882a593Smuzhiyun gpio-controller; 207*4882a593Smuzhiyun #gpio-cells = <3>; 208*4882a593Smuzhiyun interrupt-controller; 209*4882a593Smuzhiyun #interrupt-cells = <3>; 210*4882a593Smuzhiyun 211*4882a593Smuzhiyun uart0_pins_a: uart0@0 { 212*4882a593Smuzhiyun pins = "PB8", "PB9"; 213*4882a593Smuzhiyun function = "uart0"; 214*4882a593Smuzhiyun bias-pull-up; 215*4882a593Smuzhiyun }; 216*4882a593Smuzhiyun 217*4882a593Smuzhiyun mmc0_pins_a: mmc0@0 { 218*4882a593Smuzhiyun pins = "PF0", "PF1", "PF2", "PF3", 219*4882a593Smuzhiyun "PF4", "PF5"; 220*4882a593Smuzhiyun function = "mmc0"; 221*4882a593Smuzhiyun drive-strength = <30>; 222*4882a593Smuzhiyun bias-pull-up; 223*4882a593Smuzhiyun }; 224*4882a593Smuzhiyun }; 225*4882a593Smuzhiyun 226*4882a593Smuzhiyun timer@01c20c00 { 227*4882a593Smuzhiyun compatible = "allwinner,sun4i-a10-timer"; 228*4882a593Smuzhiyun reg = <0x01c20c00 0xa0>; 229*4882a593Smuzhiyun interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, 230*4882a593Smuzhiyun <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 231*4882a593Smuzhiyun clocks = <&osc24M>; 232*4882a593Smuzhiyun }; 233*4882a593Smuzhiyun 234*4882a593Smuzhiyun wdt0: watchdog@01c20ca0 { 235*4882a593Smuzhiyun compatible = "allwinner,sun6i-a31-wdt"; 236*4882a593Smuzhiyun reg = <0x01c20ca0 0x20>; 237*4882a593Smuzhiyun interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 238*4882a593Smuzhiyun }; 239*4882a593Smuzhiyun 240*4882a593Smuzhiyun uart0: serial@01c28000 { 241*4882a593Smuzhiyun compatible = "snps,dw-apb-uart"; 242*4882a593Smuzhiyun reg = <0x01c28000 0x400>; 243*4882a593Smuzhiyun interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 244*4882a593Smuzhiyun reg-shift = <2>; 245*4882a593Smuzhiyun reg-io-width = <4>; 246*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_UART0>; 247*4882a593Smuzhiyun resets = <&ccu RST_BUS_UART0>; 248*4882a593Smuzhiyun status = "disabled"; 249*4882a593Smuzhiyun }; 250*4882a593Smuzhiyun 251*4882a593Smuzhiyun uart1: serial@01c28400 { 252*4882a593Smuzhiyun compatible = "snps,dw-apb-uart"; 253*4882a593Smuzhiyun reg = <0x01c28400 0x400>; 254*4882a593Smuzhiyun interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 255*4882a593Smuzhiyun reg-shift = <2>; 256*4882a593Smuzhiyun reg-io-width = <4>; 257*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_UART1>; 258*4882a593Smuzhiyun resets = <&ccu RST_BUS_UART1>; 259*4882a593Smuzhiyun status = "disabled"; 260*4882a593Smuzhiyun }; 261*4882a593Smuzhiyun 262*4882a593Smuzhiyun uart2: serial@01c28800 { 263*4882a593Smuzhiyun compatible = "snps,dw-apb-uart"; 264*4882a593Smuzhiyun reg = <0x01c28800 0x400>; 265*4882a593Smuzhiyun interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>; 266*4882a593Smuzhiyun reg-shift = <2>; 267*4882a593Smuzhiyun reg-io-width = <4>; 268*4882a593Smuzhiyun clocks = <&ccu CLK_BUS_UART2>; 269*4882a593Smuzhiyun resets = <&ccu RST_BUS_UART2>; 270*4882a593Smuzhiyun status = "disabled"; 271*4882a593Smuzhiyun }; 272*4882a593Smuzhiyun 273*4882a593Smuzhiyun gic: interrupt-controller@01c81000 { 274*4882a593Smuzhiyun compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; 275*4882a593Smuzhiyun reg = <0x01c81000 0x1000>, 276*4882a593Smuzhiyun <0x01c82000 0x1000>, 277*4882a593Smuzhiyun <0x01c84000 0x2000>, 278*4882a593Smuzhiyun <0x01c86000 0x2000>; 279*4882a593Smuzhiyun interrupt-controller; 280*4882a593Smuzhiyun #interrupt-cells = <3>; 281*4882a593Smuzhiyun interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 282*4882a593Smuzhiyun }; 283*4882a593Smuzhiyun }; 284*4882a593Smuzhiyun}; 285