1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-or-later 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Copyright (c) 2020 thingy.jp. 4*f126890aSEmmanuel Vadot * Author: Daniel Palmer <daniel@thingy.jp> 5*f126890aSEmmanuel Vadot */ 6*f126890aSEmmanuel Vadot 7*f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 8*f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/arm-gic.h> 9*f126890aSEmmanuel Vadot#include <dt-bindings/clock/mstar-msc313-mpll.h> 10*f126890aSEmmanuel Vadot 11*f126890aSEmmanuel Vadot/ { 12*f126890aSEmmanuel Vadot #address-cells = <1>; 13*f126890aSEmmanuel Vadot #size-cells = <1>; 14*f126890aSEmmanuel Vadot interrupt-parent = <&gic>; 15*f126890aSEmmanuel Vadot 16*f126890aSEmmanuel Vadot cpus: cpus { 17*f126890aSEmmanuel Vadot #address-cells = <1>; 18*f126890aSEmmanuel Vadot #size-cells = <0>; 19*f126890aSEmmanuel Vadot 20*f126890aSEmmanuel Vadot cpu0: cpu@0 { 21*f126890aSEmmanuel Vadot device_type = "cpu"; 22*f126890aSEmmanuel Vadot compatible = "arm,cortex-a7"; 23*f126890aSEmmanuel Vadot reg = <0x0>; 24*f126890aSEmmanuel Vadot clocks = <&cpupll>; 25*f126890aSEmmanuel Vadot clock-names = "cpuclk"; 26*f126890aSEmmanuel Vadot }; 27*f126890aSEmmanuel Vadot }; 28*f126890aSEmmanuel Vadot 29*f126890aSEmmanuel Vadot arch_timer { 30*f126890aSEmmanuel Vadot compatible = "arm,armv7-timer"; 31*f126890aSEmmanuel Vadot interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) 32*f126890aSEmmanuel Vadot | IRQ_TYPE_LEVEL_LOW)>, 33*f126890aSEmmanuel Vadot <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) 34*f126890aSEmmanuel Vadot | IRQ_TYPE_LEVEL_LOW)>, 35*f126890aSEmmanuel Vadot <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) 36*f126890aSEmmanuel Vadot | IRQ_TYPE_LEVEL_LOW)>, 37*f126890aSEmmanuel Vadot <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) 38*f126890aSEmmanuel Vadot | IRQ_TYPE_LEVEL_LOW)>; 39*f126890aSEmmanuel Vadot /* 40*f126890aSEmmanuel Vadot * we shouldn't need this but the vendor 41*f126890aSEmmanuel Vadot * u-boot is broken 42*f126890aSEmmanuel Vadot */ 43*f126890aSEmmanuel Vadot clock-frequency = <6000000>; 44*f126890aSEmmanuel Vadot arm,cpu-registers-not-fw-configured; 45*f126890aSEmmanuel Vadot }; 46*f126890aSEmmanuel Vadot 47*f126890aSEmmanuel Vadot pmu: pmu { 48*f126890aSEmmanuel Vadot compatible = "arm,cortex-a7-pmu"; 49*f126890aSEmmanuel Vadot interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; 50*f126890aSEmmanuel Vadot interrupt-affinity = <&cpu0>; 51*f126890aSEmmanuel Vadot }; 52*f126890aSEmmanuel Vadot 53*f126890aSEmmanuel Vadot clocks: clocks { 54*f126890aSEmmanuel Vadot xtal: xtal { 55*f126890aSEmmanuel Vadot #clock-cells = <0>; 56*f126890aSEmmanuel Vadot compatible = "fixed-clock"; 57*f126890aSEmmanuel Vadot clock-frequency = <24000000>; 58*f126890aSEmmanuel Vadot }; 59*f126890aSEmmanuel Vadot 60*f126890aSEmmanuel Vadot rtc_xtal: rtc_xtal { 61*f126890aSEmmanuel Vadot #clock-cells = <0>; 62*f126890aSEmmanuel Vadot compatible = "fixed-clock"; 63*f126890aSEmmanuel Vadot clock-frequency = <32768>; 64*f126890aSEmmanuel Vadot status = "disabled"; 65*f126890aSEmmanuel Vadot }; 66*f126890aSEmmanuel Vadot 67*f126890aSEmmanuel Vadot xtal_div2: xtal_div2 { 68*f126890aSEmmanuel Vadot #clock-cells = <0>; 69*f126890aSEmmanuel Vadot compatible = "fixed-factor-clock"; 70*f126890aSEmmanuel Vadot clocks = <&xtal>; 71*f126890aSEmmanuel Vadot clock-div = <2>; 72*f126890aSEmmanuel Vadot clock-mult = <1>; 73*f126890aSEmmanuel Vadot }; 74*f126890aSEmmanuel Vadot }; 75*f126890aSEmmanuel Vadot 76*f126890aSEmmanuel Vadot soc: soc { 77*f126890aSEmmanuel Vadot compatible = "simple-bus"; 78*f126890aSEmmanuel Vadot #address-cells = <1>; 79*f126890aSEmmanuel Vadot #size-cells = <1>; 80*f126890aSEmmanuel Vadot ranges = <0x16001000 0x16001000 0x00007000>, 81*f126890aSEmmanuel Vadot <0x1f000000 0x1f000000 0x00400000>, 82*f126890aSEmmanuel Vadot <0xa0000000 0xa0000000 0x20000>; 83*f126890aSEmmanuel Vadot 84*f126890aSEmmanuel Vadot gic: interrupt-controller@16001000 { 85*f126890aSEmmanuel Vadot compatible = "arm,cortex-a7-gic"; 86*f126890aSEmmanuel Vadot reg = <0x16001000 0x1000>, 87*f126890aSEmmanuel Vadot <0x16002000 0x2000>, 88*f126890aSEmmanuel Vadot <0x16004000 0x2000>, 89*f126890aSEmmanuel Vadot <0x16006000 0x2000>; 90*f126890aSEmmanuel Vadot #interrupt-cells = <3>; 91*f126890aSEmmanuel Vadot interrupt-controller; 92*f126890aSEmmanuel Vadot interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) 93*f126890aSEmmanuel Vadot | IRQ_TYPE_LEVEL_LOW)>; 94*f126890aSEmmanuel Vadot }; 95*f126890aSEmmanuel Vadot 96*f126890aSEmmanuel Vadot riu: bus@1f000000 { 97*f126890aSEmmanuel Vadot compatible = "simple-bus"; 98*f126890aSEmmanuel Vadot reg = <0x1f000000 0x00400000>; 99*f126890aSEmmanuel Vadot #address-cells = <1>; 100*f126890aSEmmanuel Vadot #size-cells = <1>; 101*f126890aSEmmanuel Vadot ranges = <0x0 0x1f000000 0x00400000>; 102*f126890aSEmmanuel Vadot 103*f126890aSEmmanuel Vadot pmsleep: syscon@1c00 { 104*f126890aSEmmanuel Vadot compatible = "mstar,msc313-pmsleep", "syscon"; 105*f126890aSEmmanuel Vadot reg = <0x1c00 0x100>; 106*f126890aSEmmanuel Vadot }; 107*f126890aSEmmanuel Vadot 108*f126890aSEmmanuel Vadot reboot { 109*f126890aSEmmanuel Vadot compatible = "syscon-reboot"; 110*f126890aSEmmanuel Vadot regmap = <&pmsleep>; 111*f126890aSEmmanuel Vadot offset = <0xb8>; 112*f126890aSEmmanuel Vadot mask = <0x79>; 113*f126890aSEmmanuel Vadot }; 114*f126890aSEmmanuel Vadot 115*f126890aSEmmanuel Vadot rtc@2400 { 116*f126890aSEmmanuel Vadot compatible = "mstar,msc313-rtc"; 117*f126890aSEmmanuel Vadot reg = <0x2400 0x40>; 118*f126890aSEmmanuel Vadot clocks = <&xtal_div2>; 119*f126890aSEmmanuel Vadot interrupts-extended = <&intc_irq GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; 120*f126890aSEmmanuel Vadot }; 121*f126890aSEmmanuel Vadot 122*f126890aSEmmanuel Vadot watchdog@6000 { 123*f126890aSEmmanuel Vadot compatible = "mstar,msc313e-wdt"; 124*f126890aSEmmanuel Vadot reg = <0x6000 0x1f>; 125*f126890aSEmmanuel Vadot clocks = <&xtal_div2>; 126*f126890aSEmmanuel Vadot }; 127*f126890aSEmmanuel Vadot 128*f126890aSEmmanuel Vadot 129*f126890aSEmmanuel Vadot intc_fiq: interrupt-controller@201310 { 130*f126890aSEmmanuel Vadot compatible = "mstar,mst-intc"; 131*f126890aSEmmanuel Vadot reg = <0x201310 0x40>; 132*f126890aSEmmanuel Vadot #interrupt-cells = <3>; 133*f126890aSEmmanuel Vadot interrupt-controller; 134*f126890aSEmmanuel Vadot interrupt-parent = <&gic>; 135*f126890aSEmmanuel Vadot mstar,irqs-map-range = <96 127>; 136*f126890aSEmmanuel Vadot }; 137*f126890aSEmmanuel Vadot 138*f126890aSEmmanuel Vadot intc_irq: interrupt-controller@201350 { 139*f126890aSEmmanuel Vadot compatible = "mstar,mst-intc"; 140*f126890aSEmmanuel Vadot reg = <0x201350 0x40>; 141*f126890aSEmmanuel Vadot #interrupt-cells = <3>; 142*f126890aSEmmanuel Vadot interrupt-controller; 143*f126890aSEmmanuel Vadot interrupt-parent = <&gic>; 144*f126890aSEmmanuel Vadot mstar,irqs-map-range = <32 95>; 145*f126890aSEmmanuel Vadot mstar,intc-no-eoi; 146*f126890aSEmmanuel Vadot }; 147*f126890aSEmmanuel Vadot 148*f126890aSEmmanuel Vadot l3bridge: l3bridge@204400 { 149*f126890aSEmmanuel Vadot compatible = "mstar,l3bridge"; 150*f126890aSEmmanuel Vadot reg = <0x204400 0x200>; 151*f126890aSEmmanuel Vadot }; 152*f126890aSEmmanuel Vadot 153*f126890aSEmmanuel Vadot mpll: mpll@206000 { 154*f126890aSEmmanuel Vadot compatible = "mstar,msc313-mpll"; 155*f126890aSEmmanuel Vadot #clock-cells = <1>; 156*f126890aSEmmanuel Vadot reg = <0x206000 0x200>; 157*f126890aSEmmanuel Vadot clocks = <&xtal>; 158*f126890aSEmmanuel Vadot }; 159*f126890aSEmmanuel Vadot 160*f126890aSEmmanuel Vadot cpupll: cpupll@206400 { 161*f126890aSEmmanuel Vadot compatible = "mstar,msc313-cpupll"; 162*f126890aSEmmanuel Vadot reg = <0x206400 0x200>; 163*f126890aSEmmanuel Vadot #clock-cells = <0>; 164*f126890aSEmmanuel Vadot clocks = <&mpll MSTAR_MSC313_MPLL_DIV2>; 165*f126890aSEmmanuel Vadot }; 166*f126890aSEmmanuel Vadot 167*f126890aSEmmanuel Vadot gpio: gpio@207800 { 168*f126890aSEmmanuel Vadot #gpio-cells = <2>; 169*f126890aSEmmanuel Vadot reg = <0x207800 0x200>; 170*f126890aSEmmanuel Vadot gpio-controller; 171*f126890aSEmmanuel Vadot #interrupt-cells = <2>; 172*f126890aSEmmanuel Vadot interrupt-controller; 173*f126890aSEmmanuel Vadot interrupt-parent = <&intc_fiq>; 174*f126890aSEmmanuel Vadot status = "disabled"; 175*f126890aSEmmanuel Vadot }; 176*f126890aSEmmanuel Vadot 177*f126890aSEmmanuel Vadot pm_uart: serial@221000 { 178*f126890aSEmmanuel Vadot compatible = "ns16550a"; 179*f126890aSEmmanuel Vadot reg = <0x221000 0x100>; 180*f126890aSEmmanuel Vadot reg-shift = <3>; 181*f126890aSEmmanuel Vadot interrupts-extended = <&intc_irq GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>; 182*f126890aSEmmanuel Vadot clock-frequency = <172000000>; 183*f126890aSEmmanuel Vadot status = "disabled"; 184*f126890aSEmmanuel Vadot }; 185*f126890aSEmmanuel Vadot }; 186*f126890aSEmmanuel Vadot 187*f126890aSEmmanuel Vadot imi: sram@a0000000 { 188*f126890aSEmmanuel Vadot compatible = "mmio-sram"; 189*f126890aSEmmanuel Vadot reg = <0xa0000000 0x10000>; 190*f126890aSEmmanuel Vadot }; 191*f126890aSEmmanuel Vadot }; 192*f126890aSEmmanuel Vadot}; 193