treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / mips / boot / dts / ingenic / x1000.dtsi
blob4994c695a1a73ba0bf0b4ca3dd5d3a4591ea75c7
1 // SPDX-License-Identifier: GPL-2.0
2 #include <dt-bindings/clock/x1000-cgu.h>
3 #include <dt-bindings/dma/x1000-dma.h>
5 / {
6         #address-cells = <1>;
7         #size-cells = <1>;
8         compatible = "ingenic,x1000", "ingenic,x1000e";
10         cpuintc: interrupt-controller {
11                 #address-cells = <0>;
12                 #interrupt-cells = <1>;
13                 interrupt-controller;
14                 compatible = "mti,cpu-interrupt-controller";
15         };
17         intc: interrupt-controller@10001000 {
18                 compatible = "ingenic,x1000-intc", "ingenic,jz4780-intc";
19                 reg = <0x10001000 0x50>;
21                 interrupt-controller;
22                 #interrupt-cells = <1>;
24                 interrupt-parent = <&cpuintc>;
25                 interrupts = <2>;
26         };
28         exclk: ext {
29                 compatible = "fixed-clock";
30                 #clock-cells = <0>;
31         };
33         rtclk: rtc {
34                 compatible = "fixed-clock";
35                 #clock-cells = <0>;
36                 clock-frequency = <32768>;
37         };
39         cgu: x1000-cgu@10000000 {
40                 compatible = "ingenic,x1000-cgu";
41                 reg = <0x10000000 0x100>;
43                 #clock-cells = <1>;
45                 clocks = <&exclk>, <&rtclk>;
46                 clock-names = "ext", "rtc";
47         };
49         tcu: timer@10002000 {
50                 compatible = "ingenic,x1000-tcu",
51                                  "ingenic,jz4770-tcu",
52                                  "simple-mfd";
53                 reg = <0x10002000 0x1000>;
54                 #address-cells = <1>;
55                 #size-cells = <1>;
56                 ranges = <0x0 0x10002000 0x1000>;
58                 #clock-cells = <1>;
60                 clocks = <&cgu X1000_CLK_RTCLK
61                           &cgu X1000_CLK_EXCLK
62                           &cgu X1000_CLK_PCLK>;
63                 clock-names = "rtc", "ext", "pclk";
65                 interrupt-controller;
66                 #interrupt-cells = <1>;
68                 interrupt-parent = <&intc>;
69                 interrupts = <27 26 25>;
71                 wdt: watchdog@0 {
72                         compatible = "ingenic,x1000-watchdog", "ingenic,jz4780-watchdog";
73                         reg = <0x0 0x10>;
75                         clocks = <&cgu X1000_CLK_RTCLK>;
76                         clock-names = "wdt";
77                 };
78         };
80         rtc: rtc@10003000 {
81                 compatible = "ingenic,x1000-rtc", "ingenic,jz4780-rtc";
82                 reg = <0x10003000 0x4c>;
84                 interrupt-parent = <&intc>;
85                 interrupts = <32>;
87                 clocks = <&cgu X1000_CLK_RTCLK>;
88                 clock-names = "rtc";
89         };
91         pinctrl: pin-controller@10010000 {
92                 compatible = "ingenic,x1000-pinctrl";
93                 reg = <0x10010000 0x800>;
94                 #address-cells = <1>;
95                 #size-cells = <0>;
97                 gpa: gpio@0 {
98                         compatible = "ingenic,x1000-gpio";
99                         reg = <0>;
101                         gpio-controller;
102                         gpio-ranges = <&pinctrl 0 0 32>;
103                         #gpio-cells = <2>;
105                         interrupt-controller;
106                         #interrupt-cells = <2>;
108                         interrupt-parent = <&intc>;
109                         interrupts = <17>;
110                 };
112                 gpb: gpio@1 {
113                         compatible = "ingenic,x1000-gpio";
114                         reg = <1>;
116                         gpio-controller;
117                         gpio-ranges = <&pinctrl 0 32 32>;
118                         #gpio-cells = <2>;
120                         interrupt-controller;
121                         #interrupt-cells = <2>;
123                         interrupt-parent = <&intc>;
124                         interrupts = <16>;
125                 };
127                 gpc: gpio@2 {
128                         compatible = "ingenic,x1000-gpio";
129                         reg = <2>;
131                         gpio-controller;
132                         gpio-ranges = <&pinctrl 0 64 32>;
133                         #gpio-cells = <2>;
135                         interrupt-controller;
136                         #interrupt-cells = <2>;
138                         interrupt-parent = <&intc>;
139                         interrupts = <15>;
140                 };
142                 gpd: gpio@3 {
143                         compatible = "ingenic,x1000-gpio";
144                         reg = <3>;
146                         gpio-controller;
147                         gpio-ranges = <&pinctrl 0 96 32>;
148                         #gpio-cells = <2>;
150                         interrupt-controller;
151                         #interrupt-cells = <2>;
153                         interrupt-parent = <&intc>;
154                         interrupts = <14>;
155                 };
156         };
158         i2c0: i2c-controller@10050000 {
159                 compatible = "ingenic,x1000-i2c";
160                 reg = <0x10050000 0x1000>;
162                 #address-cells = <1>;
163                 #size-cells = <0>;
165                 interrupt-parent = <&intc>;
166                 interrupts = <60>;
168                 clocks = <&cgu X1000_CLK_I2C0>;
170                 status = "disabled";
171         };
173         i2c1: i2c-controller@10051000 {
174                 compatible = "ingenic,x1000-i2c";
175                 reg = <0x10051000 0x1000>;
177                 #address-cells = <1>;
178                 #size-cells = <0>;
180                 interrupt-parent = <&intc>;
181                 interrupts = <59>;
183                 clocks = <&cgu X1000_CLK_I2C1>;
185                 status = "disabled";
186         };
188         i2c2: i2c-controller@10052000 {
189                 compatible = "ingenic,x1000-i2c";
190                 reg = <0x10052000 0x1000>;
192                 #address-cells = <1>;
193                 #size-cells = <0>;
195                 interrupt-parent = <&intc>;
196                 interrupts = <58>;
198                 clocks = <&cgu X1000_CLK_I2C2>;
200                 status = "disabled";
201         };
203         uart0: serial@10030000 {
204                 compatible = "ingenic,x1000-uart";
205                 reg = <0x10030000 0x100>;
207                 interrupt-parent = <&intc>;
208                 interrupts = <51>;
210                 clocks = <&exclk>, <&cgu X1000_CLK_UART0>;
211                 clock-names = "baud", "module";
213                 status = "disabled";
214         };
216         uart1: serial@10031000 {
217                 compatible = "ingenic,x1000-uart";
218                 reg = <0x10031000 0x100>;
220                 interrupt-parent = <&intc>;
221                 interrupts = <50>;
223                 clocks = <&exclk>, <&cgu X1000_CLK_UART1>;
224                 clock-names = "baud", "module";
226                 status = "disabled";
227         };
229         uart2: serial@10032000 {
230                 compatible = "ingenic,x1000-uart";
231                 reg = <0x10032000 0x100>;
233                 interrupt-parent = <&intc>;
234                 interrupts = <49>;
236                 clocks = <&exclk>, <&cgu X1000_CLK_UART2>;
237                 clock-names = "baud", "module";
239                 status = "disabled";
240         };
242         pdma: dma-controller@13420000 {
243                 compatible = "ingenic,x1000-dma";
244                 reg = <0x13420000 0x400
245                            0x13421000 0x40>;
246                 #dma-cells = <2>;
248                 interrupt-parent = <&intc>;
249                 interrupts = <10>;
251                 clocks = <&cgu X1000_CLK_PDMA>;
252         };
254         mac: ethernet@134b0000 {
255                 compatible = "ingenic,x1000-mac", "snps,dwmac";
256                 reg = <0x134b0000 0x2000>;
258                 interrupt-parent = <&intc>;
259                 interrupts = <55>;
260                 interrupt-names = "macirq";
262                 clocks = <&cgu X1000_CLK_MAC>;
263                 clock-names = "stmmaceth";
265                 status = "disabled";
267                 mdio: mdio {
268                         compatible = "snps,dwmac-mdio";
269                         #address-cells = <1>;
270                         #size-cells = <0>;
272                         status = "disabled";
273                 };
274         };
276         msc0: mmc@13450000 {
277                 compatible = "ingenic,x1000-mmc";
278                 reg = <0x13450000 0x1000>;
280                 interrupt-parent = <&intc>;
281                 interrupts = <37>;
283                 clocks = <&cgu X1000_CLK_MSC0>;
284                 clock-names = "mmc";
286                 cap-sd-highspeed;
287                 cap-mmc-highspeed;
288                 cap-sdio-irq;
290                 dmas = <&pdma X1000_DMA_MSC0_RX 0xffffffff>,
291                            <&pdma X1000_DMA_MSC0_TX 0xffffffff>;
292                 dma-names = "rx", "tx";
294                 status = "disabled";
295         };
297         msc1: mmc@13460000 {
298                 compatible = "ingenic,x1000-mmc";
299                 reg = <0x13460000 0x1000>;
301                 interrupt-parent = <&intc>;
302                 interrupts = <36>;
304                 clocks = <&cgu X1000_CLK_MSC1>;
305                 clock-names = "mmc";
307                 cap-sd-highspeed;
308                 cap-mmc-highspeed;
309                 cap-sdio-irq;
311                 dmas = <&pdma X1000_DMA_MSC1_RX 0xffffffff>,
312                            <&pdma X1000_DMA_MSC1_TX 0xffffffff>;
313                 dma-names = "rx", "tx";
315                 status = "disabled";
316         };