ipq40xx: add GL-AP1300 label-mac-device
[openwrt/staging/dedeckeh.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-gl-ap1300.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq4019.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/soc/qcom,tcsr.h>
7
8 / {
9 model = "GL.iNet GL-AP1300";
10 compatible = "glinet,gl-ap1300";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &gmac0;
18 };
19
20 memory {
21 device_type = "memory";
22 reg = <0x80000000 0x10000000>;
23 };
24
25 chosen {
26 bootargs-append = " ubi.mtd=ubi root=/dev/ubiblock0_1";
27 };
28
29 soc {
30 rng@22000 {
31 status = "okay";
32 };
33
34 mdio@90000 {
35 status = "okay";
36 };
37
38 ess-psgmii@98000 {
39 status = "okay";
40 };
41
42 tcsr@1949000 {
43 compatible = "qcom,tcsr";
44 reg = <0x1949000 0x100>;
45 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
46 };
47
48 tcsr@194b000 {
49 /* select hostmode */
50 compatible = "qcom,tcsr";
51 reg = <0x194b000 0x100>;
52 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
53 status = "okay";
54 };
55
56 ess_tcsr@1953000 {
57 compatible = "qcom,tcsr";
58 reg = <0x1953000 0x1000>;
59 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
60 };
61
62 tcsr@1957000 {
63 compatible = "qcom,tcsr";
64 reg = <0x1957000 0x100>;
65 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
66 };
67
68 usb2@60f8800 {
69 status = "okay";
70 };
71
72 usb3@8af8800 {
73 status = "okay";
74 };
75
76 crypto@8e3a000 {
77 status = "okay";
78 };
79
80 watchdog@b017000 {
81 status = "okay";
82 };
83
84 ess-switch@c000000 {
85 status = "okay";
86 switch_lan_bmp = <0x18>;
87 switch_wan_bmp = <0x20>;
88 };
89
90 edma@c080000 {
91 status = "okay";
92 };
93 };
94
95 keys {
96 compatible = "gpio-keys";
97
98 reset {
99 label = "reset";
100 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_RESTART>;
102 };
103 };
104
105 leds {
106 compatible = "gpio-leds";
107
108 led_power: power {
109 label = "green:power";
110 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
111 default-state = "on";
112 };
113
114 wan {
115 label = "green:wan";
116 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
117 };
118 };
119 };
120
121 &blsp_dma {
122 status = "okay";
123 };
124
125 &cryptobam {
126 status = "okay";
127 };
128
129 &blsp1_spi1 {
130 status = "okay";
131
132 pinctrl-0 = <&spi0_pins>;
133 pinctrl-names = "default";
134 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 5 GPIO_ACTIVE_HIGH>;
135
136 flash@0 {
137 status = "okay";
138
139 compatible = "jedec,spi-nor";
140 reg = <0>;
141 spi-max-frequency = <24000000>;
142
143 partitions {
144 compatible = "fixed-partitions";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 partition@0 {
149 label = "SBL1";
150 reg = <0x00000000 0x00040000>;
151 read-only;
152 };
153
154 partition@40000 {
155 label = "MIBIB";
156 reg = <0x00040000 0x00020000>;
157 read-only;
158 };
159
160 partition@60000 {
161 label = "QSEE";
162 reg = <0x00060000 0x00060000>;
163 read-only;
164 };
165
166 partition@c0000 {
167 label = "CDT";
168 reg = <0x000c0000 0x00010000>;
169 read-only;
170 };
171
172 partition@d0000 {
173 label = "DDRPARAMS";
174 reg = <0x000d0000 0x00010000>;
175 read-only;
176 };
177
178 partition@e0000 {
179 label = "APPSBLENV"; /* uboot env*/
180 reg = <0x000e0000 0x00010000>;
181 };
182
183 partition@f0000 {
184 label = "APPSBL"; /* uboot */
185 reg = <0x000f0000 0x00080000>;
186 read-only;
187 };
188
189 partition@170000 {
190 label = "ART";
191 reg = <0x00170000 0x00010000>;
192 read-only;
193 compatible = "nvmem-cells";
194 #address-cells = <1>;
195 #size-cells = <1>;
196
197 precal_art_1000: precal@1000 {
198 reg = <0x1000 0x2f20>;
199 };
200
201 precal_art_5000: precal@5000 {
202 reg = <0x5000 0x2f20>;
203 };
204 };
205 };
206 };
207
208 spi-nand@1 {
209 status = "okay";
210
211 compatible = "spi-nand";
212 reg = <1>;
213 spi-max-frequency = <24000000>;
214
215 partitions {
216 compatible = "fixed-partitions";
217 #address-cells = <1>;
218 #size-cells = <1>;
219
220 partition@0 {
221 label = "ubi";
222 reg = <0x00000000 0x08000000>;
223 };
224 };
225 };
226 };
227
228 &blsp1_uart1 {
229 pinctrl-0 = <&serial_pins>;
230 pinctrl-names = "default";
231 status = "okay";
232 };
233
234 &tlmm {
235 serial_pins: serial_pinmux {
236 mux {
237 pins = "gpio60", "gpio61";
238 function = "blsp_uart0";
239 bias-disable;
240 };
241 };
242
243 spi0_pins: spi0_pinmux {
244 mux_spi {
245 function = "blsp_spi0";
246 pins = "gpio55", "gpio56", "gpio57";
247 drive-strength = <12>;
248 bias-disable;
249 };
250
251 mux_cs {
252 function = "gpio";
253 pins = "gpio54", "gpio5";
254 drive-strength = <2>;
255 bias-disable;
256 output-high;
257 };
258 };
259 };
260
261 &usb2_hs_phy {
262 status = "okay";
263 };
264
265 &usb3_hs_phy {
266 status = "okay";
267 };
268
269 &usb3_ss_phy {
270 status = "okay";
271 };
272
273 &wifi0 {
274 status = "okay";
275 nvmem-cell-names = "pre-calibration";
276 nvmem-cells = <&precal_art_1000>;
277 qcom,ath10k-calibration-variant = "GL-AP1300";
278 };
279
280 &wifi1 {
281 status = "okay";
282 nvmem-cell-names = "pre-calibration";
283 nvmem-cells = <&precal_art_5000>;
284 qcom,ath10k-calibration-variant = "GL-AP1300";
285 };