1/dts-v1/;
2#include "loongson3.dtsi"
3/ {
4	model = "loongson,generic";
5	compatible = "loongson,loongson3";
6	#address-cells = <2>;
7	#size-cells = <2>;
8
9	memory {
10		name = "memory";
11		device_type = "memory";
12	};
13
14	cpuic: interrupt-controller {
15		compatible = "loongson,cpu-interrupt-controller";
16		interrupt-controller;
17		#interrupt-cells = <1>;
18	};
19
20	platic: interrupt-controller@1bd00040 {
21		compatible = "loongson,ls7a-interrupt-controller";
22		interrupt-controller;
23		#interrupt-cells = <1>;
24		interrupts = <3>;
25		interrupt-parent = <&cpuic>;
26	};
27
28	aliases {
29		i2c0 = &i2c0;
30		i2c1 = &i2c1;
31		i2c2 = &i2c2;
32		i2c3 = &i2c3;
33		i2c4 = &i2c4;
34		i2c5 = &i2c5;
35	};
36
37	platform {
38		compatible = "loongson,nbus", "simple-bus";
39		#address-cells = <2>;
40		#size-cells = <1>;
41		enable-lpc-irq;
42		ranges = <0x000 0x00000000 0x000 0x00000000 0x20000000
43			  0x000 0x40000000 0x000 0x40000000 0x40000000
44			  0xe00 0x00000000 0xe00 0x00000000 0x80000000>;
45
46		uart0: serial@10080000 {
47			device_type = "serial";
48			compatible = "ns16550,loongson";
49			reg = <0 0x10080000 0x100>;
50			clock-frequency = <50000000>;
51			interrupts = <72>;
52			interrupt-parent = <&platic>;
53			no-loopback-test;
54		};
55
56		gpio: gpio@100e0000 {
57			compatible = "loongson,ls7a-gpio";
58			reg = <0 0x100e0000 0xc00>;
59			gpio-controller;
60			#gpio-cells = <2>;
61			ngpios = <57>;
62			conf_offset = <0x800>;
63			out_offset = <0x900>;
64			in_offset = <0xa00>;
65			gpio_base = <16>;
66			interrupts = <124>;
67			interrupt-parent = <&platic>;
68		};
69
70		i2c0: i2c@10090000 {
71			compatible = "loongson,ls7a-i2c";
72			reg = <0 0x10090000 0x8>;
73			interrupts = <73>;
74			interrupt-parent = <&platic>;
75			#address-cells = <1>;
76			#size-cells = <0>;
77		};
78
79		i2c1: i2c@10090100 {
80			compatible = "loongson,ls7a-i2c";
81			reg = <0 0x10090100 0x8>;
82			interrupts = <73>;
83			interrupt-parent = <&platic>;
84			#address-cells = <1>;
85			#size-cells = <0>;
86		};
87
88		i2c2: i2c@10090200 {
89			compatible = "loongson,ls7a-i2c";
90			reg = <0 0x10090200 0x8>;
91			interrupts = <73>;
92			interrupt-parent = <&platic>;
93			#address-cells = <1>;
94			#size-cells = <0>;
95		};
96
97		i2c3: i2c@10090300 {
98			compatible = "loongson,ls7a-i2c";
99			reg = <0 0x10090300 0x8>;
100			interrupts = <73>;
101			interrupt-parent = <&platic>;
102			#address-cells = <1>;
103			#size-cells = <0>;
104		};
105
106		i2c4: i2c@10090400 {
107			compatible = "loongson,ls7a-i2c";
108			reg = <0 0x10090400 0x8>;
109			interrupts = <73>;
110			interrupt-parent = <&platic>;
111			#address-cells = <1>;
112			#size-cells = <0>;
113		};
114
115		i2c5: i2c@10090500 {
116			compatible = "loongson,ls7a-i2c";
117			reg = <0 0x10090500 0x8>;
118			interrupts = <73>;
119			interrupt-parent = <&platic>;
120			#address-cells = <1>;
121			#size-cells = <0>;
122		};
123
124		rtc0: rtc@100d0100 {
125			compatible = "loongson,ls7a-rtc";
126			reg = <0 0x100d0100 0x100>;
127			interrupts = <116>;
128			interrupt-parent = <&platic>;
129		};
130
131                pwm0: pwm@100a0000 {
132                        compatible = "loongson,ls7a-pwm";
133                        reg = <0 0x100a0000 0x10>;
134                        interrupts = <88>;
135                        interrupt-parent = <&platic>;
136                };
137
138                pwm1: pwm@100a0100 {
139                        compatible = "loongson,ls7a-pwm";
140                        reg = <0 0x100a0100 0x10>;
141                        interrupts = <89>;
142                        interrupt-parent = <&platic>;
143                };
144
145                pwm2: pwm@100a0200 {
146                        compatible = "loongson,ls7a-pwm";
147                        reg = <0 0x100a0200 0x10>;
148                        interrupts = <90>;
149                        interrupt-parent = <&platic>;
150                };
151
152                pwm3: pwm@100a0300 {
153                        compatible = "loongson,ls7a-pwm";
154                        reg = <0 0x100a0300 0x10>;
155                        interrupts = <91>;
156                        interrupt-parent = <&platic>;
157                };
158	};
159};
160