9df80e1d5ee87a1dc492abff61ce9045521a1534
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9330.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ath79.dtsi"
4
5 / {
6 compatible = "qca,ar9330";
7
8 #address-cells = <1>;
9 #size-cells = <1>;
10
11 aliases {
12 serial0 = &uart;
13 };
14
15 cpus {
16 #address-cells = <1>;
17 #size-cells = <0>;
18
19 cpu@0 {
20 device_type = "cpu";
21 compatible = "mips,mips24Kc";
22 clocks = <&pll ATH79_CLK_CPU>;
23 reg = <0>;
24 };
25 };
26
27 chosen {
28 bootargs = "console=ttyATH0,115200";
29 };
30
31 ref: ref {
32 compatible = "fixed-clock";
33 #clock-cells = <0>;
34 clock-output-names = "ref";
35 };
36
37 ahb {
38 apb {
39 ddr_ctrl: memory-controller@18000000 {
40 compatible = "qca,ar7240-ddr-controller";
41 reg = <0x18000000 0x100>;
42
43 #qca,ddr-wb-channel-cells = <1>;
44 };
45
46 uart: uart@18020000 {
47 compatible = "qca,ar9330-uart";
48 reg = <0x18020000 0x14>;
49
50 interrupts = <3>;
51
52 clocks = <&pll ATH79_CLK_REF>;
53 clock-names = "uart";
54 };
55
56 gpio: gpio@18040000 {
57 compatible = "qca,ar7100-gpio";
58 reg = <0x18040000 0x28>;
59 interrupts = <2>;
60
61 ngpios = <30>;
62
63 gpio-controller;
64 #gpio-cells = <2>;
65
66 interrupt-controller;
67 #interrupt-cells = <2>;
68 };
69
70 pinmux: pinmux@18040028 {
71 compatible = "pinctrl-single";
72 reg = <0x18040028 0x8>;
73
74 pinctrl-single,bit-per-mux;
75 pinctrl-single,register-width = <32>;
76 pinctrl-single,function-mask = <0x1>;
77 #pinctrl-cells = <2>;
78
79 jtag_disable_pins: pinmux_jtag_disable_pins {
80 pinctrl-single,bits = <0x0 0x1 0x1>;
81 };
82
83 switch_led_disable_pins: pinmux_switch_led_disable_pins {
84 pinctrl-single,bits = <0x0 0x0 0xf8>;
85 };
86 };
87
88 pll: pll-controller@18050000 {
89 compatible = "qca,ar9330-pll";
90 reg = <0x18050000 0x100>;
91
92 clocks = <&ref>;
93 clock-names = "ref";
94
95 #clock-cells = <1>;
96 clock-output-names = "cpu", "ddr", "ahb";
97 };
98
99 wdt: wdt@18060008 {
100 compatible = "qca,ar7130-wdt";
101 reg = <0x18060008 0x8>;
102
103 interrupts = <4>;
104
105 clocks = <&pll ATH79_CLK_AHB>;
106 clock-names = "wdt";
107 };
108
109 rst: reset-controller@1806001c {
110 compatible = "qca,ar7100-reset";
111 reg = <0x1806001c 0x4>;
112
113 #reset-cells = <1>;
114 };
115 };
116
117 usb: usb@1b000000 {
118 compatible = "chipidea,usb2";
119 reg = <0x1b000000 0x200>;
120
121 interrupts = <3>;
122 resets = <&rst 5>;
123 reset-names = "usb-host";
124
125 phy-names = "usb-phy";
126 phys = <&usb_phy>;
127
128 status = "disabled";
129
130 #address-cells = <1>;
131 #size-cells = <0>;
132 };
133
134 spi: spi@1f000000 {
135 compatible = "qca,ar934x-spi";
136 reg = <0x1f000000 0x1c>;
137
138 clocks = <&pll ATH79_CLK_AHB>;
139
140 #address-cells = <1>;
141 #size-cells = <0>;
142
143 status = "disabled";
144 };
145
146 gmac: gmac@18070000 {
147 compatible = "qca,ar9330-gmac";
148 reg = <0x18070000 0x4>;
149 };
150
151 wmac: wmac@18100000 {
152 compatible = "qca,ar9330-wmac";
153 reg = <0x18100000 0x20000>;
154
155 interrupts = <2>;
156
157 status = "disabled";
158 };
159 };
160
161 usb_phy: usb-phy {
162 compatible = "qca,ar7200-usb-phy";
163
164 reset-names = "usb-phy", "usb-suspend-override";
165 resets = <&rst 4>, <&rst 3>;
166
167 #phy-cells = <0>;
168
169 status = "disabled";
170 };
171 };
172
173 &cpuintc {
174 qca,ddr-wb-channel-interrupts = <2>, <3>;
175 qca,ddr-wb-channels = <&ddr_ctrl 3>, <&ddr_ctrl 2>;
176 };
177
178 &eth0 {
179 compatible = "qca,ar9330-eth", "syscon";
180
181 pll-data = <0x00110000 0x00001099 0x00991099>;
182
183 resets = <&rst 9>;
184 reset-names = "mac";
185 phy-handle = <&swphy4>;
186 };
187
188 &mdio1 {
189 status = "okay";
190 compatible = "qca,ar9330-mdio";
191
192 resets = <&rst 23>;
193 reset-names = "mdio";
194 builtin-switch;
195
196 builtin_switch: switch0@1f {
197 compatible = "qca,ar7240sw";
198 reg = <0x1f>;
199 resets = <&rst 8>;
200 reset-names = "switch";
201 qca,mib-poll-interval = <500>;
202
203 mdio-bus {
204 #address-cells = <1>;
205 #size-cells = <0>;
206
207 swphy4: ethernet-phy@4 {
208 reg = <4>;
209 phy-mode = "mii";
210 };
211 };
212 };
213 };
214
215 &eth1 {
216 compatible = "qca,ar9330-eth", "syscon";
217
218 pll-data = <0x00110000 0x00001099 0x00991099>;
219 phy-mode = "gmii";
220
221 resets = <&rst 13>;
222 reset-names = "mac";
223
224 fixed-link {
225 speed = <1000>;
226 full-duplex;
227 };
228 };