1333d859dSvishnupatekar/* 2333d859dSvishnupatekar * Copyright 2015 Vishnu Patekar 3333d859dSvishnupatekar * 4333d859dSvishnupatekar * Vishnu Patekar <vishnupatekar0510@gmail.com> 5333d859dSvishnupatekar * 6333d859dSvishnupatekar * This file is dual-licensed: you can use it either under the terms 7333d859dSvishnupatekar * of the GPL or the X11 license, at your option. Note that this dual 8333d859dSvishnupatekar * licensing only applies to this file, and not this project as a 9333d859dSvishnupatekar * whole. 10333d859dSvishnupatekar * 11333d859dSvishnupatekar * a) This file is free software; you can redistribute it and/or 12333d859dSvishnupatekar * modify it under the terms of the GNU General Public License as 13333d859dSvishnupatekar * published by the Free Software Foundation; either version 2 of the 14333d859dSvishnupatekar * License, or (at your option) any later version. 15333d859dSvishnupatekar * 16333d859dSvishnupatekar * This file is distributed in the hope that it will be useful, 17333d859dSvishnupatekar * but WITHOUT ANY WARRANTY; without even the implied warranty of 18333d859dSvishnupatekar * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19333d859dSvishnupatekar * GNU General Public License for more details. 20333d859dSvishnupatekar * 21333d859dSvishnupatekar * Or, alternatively, 22333d859dSvishnupatekar * 23333d859dSvishnupatekar * b) Permission is hereby granted, free of charge, to any person 24333d859dSvishnupatekar * obtaining a copy of this software and associated documentation 25333d859dSvishnupatekar * files (the "Software"), to deal in the Software without 26333d859dSvishnupatekar * restriction, including without limitation the rights to use, 27333d859dSvishnupatekar * copy, modify, merge, publish, distribute, sublicense, and/or 28333d859dSvishnupatekar * sell copies of the Software, and to permit persons to whom the 29333d859dSvishnupatekar * Software is furnished to do so, subject to the following 30333d859dSvishnupatekar * conditions: 31333d859dSvishnupatekar * 32333d859dSvishnupatekar * The above copyright notice and this permission notice shall be 33333d859dSvishnupatekar * included in all copies or substantial portions of the Software. 34333d859dSvishnupatekar * 35333d859dSvishnupatekar * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36333d859dSvishnupatekar * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37333d859dSvishnupatekar * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38333d859dSvishnupatekar * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39333d859dSvishnupatekar * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40333d859dSvishnupatekar * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41333d859dSvishnupatekar * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42333d859dSvishnupatekar * OTHER DEALINGS IN THE SOFTWARE. 43333d859dSvishnupatekar 44333d859dSvishnupatekar */ 45333d859dSvishnupatekar 46333d859dSvishnupatekar#include "skeleton.dtsi" 47333d859dSvishnupatekar 48333d859dSvishnupatekar#include <dt-bindings/interrupt-controller/arm-gic.h> 49333d859dSvishnupatekar 50333d859dSvishnupatekar#include <dt-bindings/pinctrl/sun4i-a10.h> 51333d859dSvishnupatekar 52333d859dSvishnupatekar/ { 53333d859dSvishnupatekar interrupt-parent = <&gic>; 54333d859dSvishnupatekar 55333d859dSvishnupatekar cpus { 56333d859dSvishnupatekar #address-cells = <1>; 57333d859dSvishnupatekar #size-cells = <0>; 58333d859dSvishnupatekar 59333d859dSvishnupatekar cpu@0 { 60333d859dSvishnupatekar compatible = "arm,cortex-a7"; 61333d859dSvishnupatekar device_type = "cpu"; 62333d859dSvishnupatekar reg = <0>; 63333d859dSvishnupatekar }; 64333d859dSvishnupatekar 65333d859dSvishnupatekar cpu@1 { 66333d859dSvishnupatekar compatible = "arm,cortex-a7"; 67333d859dSvishnupatekar device_type = "cpu"; 68333d859dSvishnupatekar reg = <1>; 69333d859dSvishnupatekar }; 70333d859dSvishnupatekar 71333d859dSvishnupatekar cpu@2 { 72333d859dSvishnupatekar compatible = "arm,cortex-a7"; 73333d859dSvishnupatekar device_type = "cpu"; 74333d859dSvishnupatekar reg = <2>; 75333d859dSvishnupatekar }; 76333d859dSvishnupatekar 77333d859dSvishnupatekar cpu@3 { 78333d859dSvishnupatekar compatible = "arm,cortex-a7"; 79333d859dSvishnupatekar device_type = "cpu"; 80333d859dSvishnupatekar reg = <3>; 81333d859dSvishnupatekar }; 8280e5f83cSHans de Goede 83333d859dSvishnupatekar cpu@100 { 84333d859dSvishnupatekar compatible = "arm,cortex-a7"; 85333d859dSvishnupatekar device_type = "cpu"; 86333d859dSvishnupatekar reg = <0x100>; 87333d859dSvishnupatekar }; 88333d859dSvishnupatekar 89333d859dSvishnupatekar cpu@101 { 90333d859dSvishnupatekar compatible = "arm,cortex-a7"; 91333d859dSvishnupatekar device_type = "cpu"; 92333d859dSvishnupatekar reg = <0x101>; 93333d859dSvishnupatekar }; 9480e5f83cSHans de Goede 95333d859dSvishnupatekar cpu@102 { 96333d859dSvishnupatekar compatible = "arm,cortex-a7"; 97333d859dSvishnupatekar device_type = "cpu"; 98333d859dSvishnupatekar reg = <0x102>; 99333d859dSvishnupatekar }; 100333d859dSvishnupatekar 101333d859dSvishnupatekar cpu@103 { 102333d859dSvishnupatekar compatible = "arm,cortex-a7"; 103333d859dSvishnupatekar device_type = "cpu"; 104333d859dSvishnupatekar reg = <0x103>; 105333d859dSvishnupatekar }; 106333d859dSvishnupatekar }; 107333d859dSvishnupatekar 108333d859dSvishnupatekar timer { 109333d859dSvishnupatekar compatible = "arm,armv7-timer"; 11080e5f83cSHans de Goede interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, 11180e5f83cSHans de Goede <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, 11280e5f83cSHans de Goede <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>, 11380e5f83cSHans de Goede <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>; 114333d859dSvishnupatekar }; 115333d859dSvishnupatekar 116333d859dSvishnupatekar clocks { 117333d859dSvishnupatekar #address-cells = <1>; 118333d859dSvishnupatekar #size-cells = <1>; 119333d859dSvishnupatekar ranges; 120333d859dSvishnupatekar 12180e5f83cSHans de Goede /* TODO: PRCM block has a mux for this. */ 122333d859dSvishnupatekar osc24M: osc24M_clk { 123333d859dSvishnupatekar #clock-cells = <0>; 124333d859dSvishnupatekar compatible = "fixed-clock"; 125333d859dSvishnupatekar clock-frequency = <24000000>; 126333d859dSvishnupatekar clock-output-names = "osc24M"; 127333d859dSvishnupatekar }; 128333d859dSvishnupatekar 12980e5f83cSHans de Goede /* 13080e5f83cSHans de Goede * This is called "internal OSC" in some places. 13180e5f83cSHans de Goede * It is an internal RC-based oscillator. 13280e5f83cSHans de Goede * TODO: Its controls are in the PRCM block. 13380e5f83cSHans de Goede */ 13480e5f83cSHans de Goede osc16M: osc16M_clk { 135333d859dSvishnupatekar #clock-cells = <0>; 136333d859dSvishnupatekar compatible = "fixed-clock"; 13780e5f83cSHans de Goede clock-frequency = <16000000>; 13880e5f83cSHans de Goede clock-output-names = "osc16M"; 13980e5f83cSHans de Goede }; 14080e5f83cSHans de Goede 14180e5f83cSHans de Goede osc16Md512: osc16Md512_clk { 14280e5f83cSHans de Goede #clock-cells = <0>; 14380e5f83cSHans de Goede compatible = "fixed-factor-clock"; 14480e5f83cSHans de Goede clock-div = <512>; 14580e5f83cSHans de Goede clock-mult = <1>; 14680e5f83cSHans de Goede clocks = <&osc16M>; 14780e5f83cSHans de Goede clock-output-names = "osc16M-d512"; 148333d859dSvishnupatekar }; 149333d859dSvishnupatekar }; 150333d859dSvishnupatekar 15180e5f83cSHans de Goede soc { 152333d859dSvishnupatekar compatible = "simple-bus"; 153333d859dSvishnupatekar #address-cells = <1>; 154333d859dSvishnupatekar #size-cells = <1>; 155333d859dSvishnupatekar ranges; 156333d859dSvishnupatekar 157333d859dSvishnupatekar pio: pinctrl@01c20800 { 158333d859dSvishnupatekar compatible = "allwinner,sun8i-a83t-pinctrl"; 159333d859dSvishnupatekar interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>, 160333d859dSvishnupatekar <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, 16180e5f83cSHans de Goede <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; 162333d859dSvishnupatekar reg = <0x01c20800 0x400>; 163333d859dSvishnupatekar clocks = <&osc24M>; 164333d859dSvishnupatekar gpio-controller; 165333d859dSvishnupatekar interrupt-controller; 166333d859dSvishnupatekar #interrupt-cells = <3>; 167333d859dSvishnupatekar #gpio-cells = <3>; 168333d859dSvishnupatekar 169333d859dSvishnupatekar mmc0_pins_a: mmc0@0 { 170333d859dSvishnupatekar allwinner,pins = "PF0", "PF1", "PF2", 171333d859dSvishnupatekar "PF3", "PF4", "PF5"; 172333d859dSvishnupatekar allwinner,function = "mmc0"; 173333d859dSvishnupatekar allwinner,drive = <SUN4I_PINCTRL_30_MA>; 174333d859dSvishnupatekar allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 175333d859dSvishnupatekar }; 176333d859dSvishnupatekar 177333d859dSvishnupatekar uart0_pins_a: uart0@0 { 178333d859dSvishnupatekar allwinner,pins = "PF2", "PF4"; 179333d859dSvishnupatekar allwinner,function = "uart0"; 180333d859dSvishnupatekar allwinner,drive = <SUN4I_PINCTRL_10_MA>; 181333d859dSvishnupatekar allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 182333d859dSvishnupatekar }; 183333d859dSvishnupatekar 184333d859dSvishnupatekar uart0_pins_b: uart0@1 { 185333d859dSvishnupatekar allwinner,pins = "PB9", "PB10"; 186333d859dSvishnupatekar allwinner,function = "uart0"; 187333d859dSvishnupatekar allwinner,drive = <SUN4I_PINCTRL_10_MA>; 188333d859dSvishnupatekar allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; 189333d859dSvishnupatekar }; 190333d859dSvishnupatekar }; 191333d859dSvishnupatekar 19280e5f83cSHans de Goede timer@01c20c00 { 19380e5f83cSHans de Goede compatible = "allwinner,sun4i-a10-timer"; 19480e5f83cSHans de Goede reg = <0x01c20c00 0xa0>; 19580e5f83cSHans de Goede interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>, 19680e5f83cSHans de Goede <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>; 19780e5f83cSHans de Goede clocks = <&osc24M>; 19880e5f83cSHans de Goede }; 19980e5f83cSHans de Goede 20080e5f83cSHans de Goede watchdog@01c20ca0 { 20180e5f83cSHans de Goede compatible = "allwinner,sun6i-a31-wdt"; 20280e5f83cSHans de Goede reg = <0x01c20ca0 0x20>; 20380e5f83cSHans de Goede interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>; 20480e5f83cSHans de Goede clocks = <&osc24M>; 20580e5f83cSHans de Goede }; 20680e5f83cSHans de Goede 207333d859dSvishnupatekar uart0: serial@01c28000 { 208333d859dSvishnupatekar compatible = "snps,dw-apb-uart"; 209333d859dSvishnupatekar reg = <0x01c28000 0x400>; 210333d859dSvishnupatekar interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 211333d859dSvishnupatekar reg-shift = <2>; 212333d859dSvishnupatekar reg-io-width = <4>; 213333d859dSvishnupatekar clocks = <&osc24M>; 214333d859dSvishnupatekar status = "disabled"; 215333d859dSvishnupatekar }; 21680e5f83cSHans de Goede 21780e5f83cSHans de Goede gic: interrupt-controller@01c81000 { 21880e5f83cSHans de Goede compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; 21980e5f83cSHans de Goede reg = <0x01c81000 0x1000>, 22080e5f83cSHans de Goede <0x01c82000 0x1000>, 22180e5f83cSHans de Goede <0x01c84000 0x2000>, 22280e5f83cSHans de Goede <0x01c86000 0x2000>; 22380e5f83cSHans de Goede interrupt-controller; 22480e5f83cSHans de Goede #interrupt-cells = <3>; 22580e5f83cSHans de Goede interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; 22680e5f83cSHans de Goede }; 227*b0bea667SChen-Yu Tsai 228*b0bea667SChen-Yu Tsai usb_otg: usb@01c19000 { 229*b0bea667SChen-Yu Tsai compatible = "allwinner,sun8i-a33-musb"; 230*b0bea667SChen-Yu Tsai interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 231*b0bea667SChen-Yu Tsai interrupt-names = "mc"; 232*b0bea667SChen-Yu Tsai status = "disabled"; 233*b0bea667SChen-Yu Tsai }; 234*b0bea667SChen-Yu Tsai 235*b0bea667SChen-Yu Tsai ehci0: usb@01c1a000 { 236*b0bea667SChen-Yu Tsai compatible = "allwinner,sun8i-a83t-ehci", "generic-ehci"; 237*b0bea667SChen-Yu Tsai reg = <0x01c1a000 0x100>; 238*b0bea667SChen-Yu Tsai interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; 239*b0bea667SChen-Yu Tsai status = "disabled"; 240*b0bea667SChen-Yu Tsai }; 241*b0bea667SChen-Yu Tsai 242*b0bea667SChen-Yu Tsai ohci0: usb@01c1a400 { 243*b0bea667SChen-Yu Tsai compatible = "allwinner,sun8i-a83t-ohci", "generic-ohci"; 244*b0bea667SChen-Yu Tsai reg = <0x01c1a400 0x100>; 245*b0bea667SChen-Yu Tsai interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>; 246*b0bea667SChen-Yu Tsai status = "disabled"; 247*b0bea667SChen-Yu Tsai }; 248*b0bea667SChen-Yu Tsai 249*b0bea667SChen-Yu Tsai ehci1: usb@01c1b000 { 250*b0bea667SChen-Yu Tsai compatible = "allwinner,sun8i-a83t-ehci", "generic-ehci"; 251*b0bea667SChen-Yu Tsai reg = <0x01c1b000 0x100>; 252*b0bea667SChen-Yu Tsai interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>; 253*b0bea667SChen-Yu Tsai status = "disabled"; 254*b0bea667SChen-Yu Tsai }; 255*b0bea667SChen-Yu Tsai 256*b0bea667SChen-Yu Tsai r_pio: pinctrl@01f02c00 { 257*b0bea667SChen-Yu Tsai compatible = "allwinner,sun8i-a83t-r-pinctrl"; 258*b0bea667SChen-Yu Tsai reg = <0x01f02c00 0x400>; 259*b0bea667SChen-Yu Tsai interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>; 260*b0bea667SChen-Yu Tsai }; 261333d859dSvishnupatekar }; 262333d859dSvishnupatekar}; 263