1*4882a593Smuzhiyun/* 2*4882a593Smuzhiyun * Copyright 2016 Chen-Yu Tsai 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Chen-Yu Tsai <wens@csie.org> 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * This file is dual-licensed: you can use it either under the terms 7*4882a593Smuzhiyun * of the GPL or the X11 license, at your option. Note that this dual 8*4882a593Smuzhiyun * licensing only applies to this file, and not this project as a 9*4882a593Smuzhiyun * whole. 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * a) This file is free software; you can redistribute it and/or 12*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License as 13*4882a593Smuzhiyun * published by the Free Software Foundation; either version 2 of the 14*4882a593Smuzhiyun * License, or (at your option) any later version. 15*4882a593Smuzhiyun * 16*4882a593Smuzhiyun * This file is distributed in the hope that it will be useful, 17*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 18*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19*4882a593Smuzhiyun * GNU General Public License for more details. 20*4882a593Smuzhiyun * 21*4882a593Smuzhiyun * Or, alternatively, 22*4882a593Smuzhiyun * 23*4882a593Smuzhiyun * b) Permission is hereby granted, free of charge, to any person 24*4882a593Smuzhiyun * obtaining a copy of this software and associated documentation 25*4882a593Smuzhiyun * files (the "Software"), to deal in the Software without 26*4882a593Smuzhiyun * restriction, including without limitation the rights to use, 27*4882a593Smuzhiyun * copy, modify, merge, publish, distribute, sublicense, and/or 28*4882a593Smuzhiyun * sell copies of the Software, and to permit persons to whom the 29*4882a593Smuzhiyun * Software is furnished to do so, subject to the following 30*4882a593Smuzhiyun * conditions: 31*4882a593Smuzhiyun * 32*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be 33*4882a593Smuzhiyun * included in all copies or substantial portions of the Software. 34*4882a593Smuzhiyun * 35*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 36*4882a593Smuzhiyun * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 37*4882a593Smuzhiyun * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 38*4882a593Smuzhiyun * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 39*4882a593Smuzhiyun * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 40*4882a593Smuzhiyun * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 41*4882a593Smuzhiyun * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 42*4882a593Smuzhiyun * OTHER DEALINGS IN THE SOFTWARE. 43*4882a593Smuzhiyun */ 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun#include <dt-bindings/interrupt-controller/arm-gic.h> 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun/ { 48*4882a593Smuzhiyun #address-cells = <1>; 49*4882a593Smuzhiyun #size-cells = <1>; 50*4882a593Smuzhiyun interrupt-parent = <&gic>; 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun aliases { 53*4882a593Smuzhiyun }; 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun chosen { 56*4882a593Smuzhiyun }; 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun clocks { 59*4882a593Smuzhiyun #address-cells = <1>; 60*4882a593Smuzhiyun #size-cells = <1>; 61*4882a593Smuzhiyun ranges; 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun osc24M: osc24M_clk { 64*4882a593Smuzhiyun #clock-cells = <0>; 65*4882a593Smuzhiyun compatible = "fixed-clock"; 66*4882a593Smuzhiyun clock-frequency = <24000000>; 67*4882a593Smuzhiyun }; 68*4882a593Smuzhiyun 69*4882a593Smuzhiyun osc32k: osc32k_clk { 70*4882a593Smuzhiyun #clock-cells = <0>; 71*4882a593Smuzhiyun compatible = "fixed-clock"; 72*4882a593Smuzhiyun clock-frequency = <32768>; 73*4882a593Smuzhiyun clock-output-names = "osc32k"; 74*4882a593Smuzhiyun }; 75*4882a593Smuzhiyun }; 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun cpus { 78*4882a593Smuzhiyun #address-cells = <1>; 79*4882a593Smuzhiyun #size-cells = <0>; 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun cpu0: cpu@0 { 82*4882a593Smuzhiyun compatible = "arm,cortex-a7"; 83*4882a593Smuzhiyun device_type = "cpu"; 84*4882a593Smuzhiyun reg = <0>; 85*4882a593Smuzhiyun }; 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun cpu@1 { 88*4882a593Smuzhiyun compatible = "arm,cortex-a7"; 89*4882a593Smuzhiyun device_type = "cpu"; 90*4882a593Smuzhiyun reg = <1>; 91*4882a593Smuzhiyun }; 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun cpu@2 { 94*4882a593Smuzhiyun compatible = "arm,cortex-a7"; 95*4882a593Smuzhiyun device_type = "cpu"; 96*4882a593Smuzhiyun reg = <2>; 97*4882a593Smuzhiyun }; 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun cpu@3 { 100*4882a593Smuzhiyun compatible = "arm,cortex-a7"; 101*4882a593Smuzhiyun device_type = "cpu"; 102*4882a593Smuzhiyun reg = <3>; 103*4882a593Smuzhiyun }; 104*4882a593Smuzhiyun }; 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun memory@40000000 { 107*4882a593Smuzhiyun device_type = "memory"; 108*4882a593Smuzhiyun reg = <0x40000000 0x80000000>; 109*4882a593Smuzhiyun }; 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun soc { 112*4882a593Smuzhiyun compatible = "simple-bus"; 113*4882a593Smuzhiyun #address-cells = <1>; 114*4882a593Smuzhiyun #size-cells = <1>; 115*4882a593Smuzhiyun ranges; 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun pio: pinctrl@1c20800 { 118*4882a593Smuzhiyun compatible = "allwinner,sun8i-r40-pinctrl"; 119*4882a593Smuzhiyun reg = <0x01c20800 0x400>; 120*4882a593Smuzhiyun interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; 121*4882a593Smuzhiyun /* apb should be replaced once CCU is implemented */ 122*4882a593Smuzhiyun clocks = <&osc24M>, <&osc24M>, <&osc32k>; 123*4882a593Smuzhiyun clock-names = "apb", "hosc", "losc"; 124*4882a593Smuzhiyun gpio-controller; 125*4882a593Smuzhiyun interrupt-controller; 126*4882a593Smuzhiyun #interrupt-cells = <3>; 127*4882a593Smuzhiyun #gpio-cells = <3>; 128*4882a593Smuzhiyun 129*4882a593Smuzhiyun i2c0_pins: i2c0_pins { 130*4882a593Smuzhiyun pins = "PB0", "PB1"; 131*4882a593Smuzhiyun function = "i2c0"; 132*4882a593Smuzhiyun bias-pull-up; 133*4882a593Smuzhiyun }; 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun uart0_pb_pins: uart0_pb_pins { 136*4882a593Smuzhiyun pins = "PB22", "PB23"; 137*4882a593Smuzhiyun function = "uart0"; 138*4882a593Smuzhiyun bias-pull-up; 139*4882a593Smuzhiyun }; 140*4882a593Smuzhiyun }; 141*4882a593Smuzhiyun 142*4882a593Smuzhiyun uart0: serial@1c28000 { 143*4882a593Smuzhiyun compatible = "snps,dw-apb-uart"; 144*4882a593Smuzhiyun reg = <0x01c28000 0x400>; 145*4882a593Smuzhiyun interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>; 146*4882a593Smuzhiyun reg-shift = <2>; 147*4882a593Smuzhiyun reg-io-width = <4>; 148*4882a593Smuzhiyun clocks = <&osc24M>; 149*4882a593Smuzhiyun status = "disabled"; 150*4882a593Smuzhiyun }; 151*4882a593Smuzhiyun 152*4882a593Smuzhiyun i2c0: i2c@1c2ac00 { 153*4882a593Smuzhiyun compatible = "allwinner,sun6i-a31-i2c"; 154*4882a593Smuzhiyun reg = <0x01c2ac00 0x400>; 155*4882a593Smuzhiyun interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 156*4882a593Smuzhiyun clocks = <&osc24M>; 157*4882a593Smuzhiyun status = "disabled"; 158*4882a593Smuzhiyun #address-cells = <1>; 159*4882a593Smuzhiyun #size-cells = <0>; 160*4882a593Smuzhiyun }; 161*4882a593Smuzhiyun 162*4882a593Smuzhiyun gic: interrupt-controller@1c81000 { 163*4882a593Smuzhiyun compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic"; 164*4882a593Smuzhiyun reg = <0x01c81000 0x1000>, 165*4882a593Smuzhiyun <0x01c82000 0x1000>, 166*4882a593Smuzhiyun <0x01c84000 0x2000>, 167*4882a593Smuzhiyun <0x01c86000 0x2000>; 168*4882a593Smuzhiyun interrupt-controller; 169*4882a593Smuzhiyun #interrupt-cells = <3>; 170*4882a593Smuzhiyun interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; 171*4882a593Smuzhiyun }; 172*4882a593Smuzhiyun }; 173*4882a593Smuzhiyun 174*4882a593Smuzhiyun timer { 175*4882a593Smuzhiyun compatible = "arm,armv7-timer"; 176*4882a593Smuzhiyun interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 177*4882a593Smuzhiyun <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 178*4882a593Smuzhiyun <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>, 179*4882a593Smuzhiyun <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>; 180*4882a593Smuzhiyun clock-frequency = <24000000>; 181*4882a593Smuzhiyun arm,cpu-registers-not-fw-configured; 182*4882a593Smuzhiyun }; 183*4882a593Smuzhiyun}; 184