1/dts-v1/;
2#include <dt-bindings/gpio/gpio.h>
3
4/ {
5	#size-cells = <0x02>;
6	#address-cells = <0x02>;
7	model-name = "microwatt";
8	compatible = "microwatt-soc";
9
10	aliases {
11		serial0 = &UART0;
12		ethernet = &enet0;
13	};
14
15	reserved-memory {
16		#size-cells = <0x02>;
17		#address-cells = <0x02>;
18		ranges;
19	};
20
21	memory@0 {
22		device_type = "memory";
23		reg = <0x00000000 0x00000000 0x00000000 0x10000000>;
24	};
25
26	clocks {
27		sys_clk: litex_sys_clk {
28			#clock-cells = <0>;
29			compatible = "fixed-clock";
30			clock-frequency = <100000000>;
31		};
32	};
33
34	cpus {
35		#size-cells = <0x00>;
36		#address-cells = <0x01>;
37
38		ibm,powerpc-cpu-features {
39			display-name = "Microwatt";
40			isa = <3010>;
41			device_type = "cpu-features";
42			compatible = "ibm,powerpc-cpu-features";
43
44			mmu-radix {
45				isa = <3000>;
46				usable-privilege = <6>;
47				os-support = <0>;
48			};
49
50			little-endian {
51				isa = <0>;
52				usable-privilege = <7>;
53				os-support = <0>;
54				hwcap-bit-nr = <1>;
55			};
56
57			cache-inhibited-large-page {
58				isa = <0>;
59				usable-privilege = <6>;
60				os-support = <0>;
61			};
62
63			fixed-point-v3 {
64				isa = <3000>;
65				usable-privilege = <7>;
66			};
67
68			no-execute {
69				isa = <0x00>;
70				usable-privilege = <2>;
71				os-support = <0>;
72			};
73
74			floating-point {
75				hfscr-bit-nr = <0>;
76				hwcap-bit-nr = <27>;
77				isa = <0>;
78				usable-privilege = <7>;
79				hv-support = <1>;
80				os-support = <0>;
81			};
82
83			prefixed-instructions {
84				hfscr-bit-nr = <13>;
85				fscr-bit-nr = <13>;
86				isa = <3010>;
87				usable-privilege = <7>;
88				os-support = <1>;
89				hv-support = <1>;
90			};
91
92			tar {
93				hfscr-bit-nr = <8>;
94				fscr-bit-nr = <8>;
95				isa = <2070>;
96				usable-privilege = <7>;
97				os-support = <1>;
98				hv-support = <1>;
99				hwcap-bit-nr = <58>;
100			};
101
102			control-register {
103				isa = <0>;
104				usable-privilege = <7>;
105			};
106
107			system-call-vectored {
108				isa = <3000>;
109				usable-privilege = <7>;
110				os-support = <1>;
111				fscr-bit-nr = <12>;
112				hwcap-bit-nr = <52>;
113			};
114		};
115
116		PowerPC,Microwatt@0 {
117			i-cache-sets = <2>;
118			ibm,dec-bits = <64>;
119			reservation-granule-size = <64>;
120			clock-frequency = <100000000>;
121			timebase-frequency = <100000000>;
122			i-tlb-sets = <1>;
123			ibm,ppc-interrupt-server#s = <0>;
124			i-cache-block-size = <64>;
125			d-cache-block-size = <64>;
126			d-cache-sets = <2>;
127			i-tlb-size = <64>;
128			cpu-version = <0x990000>;
129			status = "okay";
130			i-cache-size = <0x1000>;
131			ibm,processor-radix-AP-encodings = <0x0c 0xa0000010 0x20000015 0x4000001e>;
132			tlb-size = <0>;
133			tlb-sets = <0>;
134			device_type = "cpu";
135			d-tlb-size = <128>;
136			d-tlb-sets = <2>;
137			reg = <0>;
138			general-purpose;
139			64-bit;
140			d-cache-size = <0x1000>;
141			ibm,chip-id = <0>;
142			ibm,mmu-lpid-bits = <12>;
143			ibm,mmu-pid-bits = <20>;
144		};
145
146		PowerPC,Microwatt@1 {
147			i-cache-sets = <2>;
148			ibm,dec-bits = <64>;
149			reservation-granule-size = <64>;
150			clock-frequency = <100000000>;
151			timebase-frequency = <100000000>;
152			i-tlb-sets = <1>;
153			ibm,ppc-interrupt-server#s = <1>;
154			i-cache-block-size = <64>;
155			d-cache-block-size = <64>;
156			d-cache-sets = <2>;
157			i-tlb-size = <64>;
158			cpu-version = <0x990000>;
159			status = "okay";
160			i-cache-size = <0x1000>;
161			ibm,processor-radix-AP-encodings = <0x0c 0xa0000010 0x20000015 0x4000001e>;
162			tlb-size = <0>;
163			tlb-sets = <0>;
164			device_type = "cpu";
165			d-tlb-size = <128>;
166			d-tlb-sets = <2>;
167			reg = <1>;
168			general-purpose;
169			64-bit;
170			d-cache-size = <0x1000>;
171			ibm,chip-id = <0>;
172			ibm,mmu-lpid-bits = <12>;
173			ibm,mmu-pid-bits = <20>;
174		};
175	};
176
177	soc@c0000000 {
178		compatible = "simple-bus";
179		#address-cells = <1>;
180		#size-cells = <1>;
181		interrupt-parent = <&ICS>;
182
183		ranges = <0 0 0xc0000000 0x40000000>;
184
185		interrupt-controller@4000 {
186			compatible = "openpower,xics-presentation", "ibm,ppc-xicp";
187			ibm,interrupt-server-ranges = <0x0 0x2>;
188			reg = <0x4000 0x10 0x4010 0x10>;
189		};
190
191		ICS: interrupt-controller@5000 {
192			compatible = "openpower,xics-sources";
193			interrupt-controller;
194			interrupt-ranges = <0x10 0x10>;
195			reg = <0x5000 0x100>;
196			#address-cells = <0>;
197			#size-cells = <0>;
198			#interrupt-cells = <2>;
199		};
200
201		UART0: serial@2000 {
202			device_type = "serial";
203			compatible = "ns16550";
204			reg = <0x2000 0x8>;
205			clock-frequency = <100000000>;
206			current-speed = <115200>;
207			reg-shift = <2>;
208			fifo-size = <16>;
209			interrupts = <0x10 0x1>;
210		};
211
212		gpio: gpio@7000 {
213			device_type = "gpio";
214			compatible = "faraday,ftgpio010";
215			gpio-controller;
216			#gpio-cells = <2>;
217			reg = <0x7000 0x80>;
218			interrupts = <0x14 1>;
219			interrupt-controller;
220			#interrupt-cells = <2>;
221		};
222
223		enet0: ethernet@8020000 {
224			compatible = "litex,liteeth";
225			reg = <0x8021000 0x100
226				0x8020800 0x100
227				0x8030000 0x2000>;
228			reg-names = "mac", "mido", "buffer";
229			litex,rx-slots = <2>;
230			litex,tx-slots = <2>;
231			litex,slot-size = <0x800>;
232			interrupts = <0x11 0x1>;
233		};
234
235		mmc@8040000 {
236			compatible = "litex,mmc";
237			reg = <0x8042800 0x800
238				0x8041000 0x800
239				0x8040800 0x800
240				0x8042000 0x800
241				0x8041800 0x800>;
242			reg-names = "phy", "core", "reader", "writer", "irq";
243			bus-width = <4>;
244			interrupts = <0x13 1>;
245			clocks = <&sys_clk>;
246		};
247	};
248
249	chosen {
250		bootargs = "";
251		ibm,architecture-vec-5 = [19 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00
252					  00 00 00 00 00 00 00 00 40 00 40];
253		stdout-path = &UART0;
254	};
255};
256