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