ipq40xx: mikrotik: make RouterBoot partition writeable
[openwrt/staging/jow.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-lhgg-60ad.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 * Copyright (c) 2019, Robert Marko <robimarko@gmail.com>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 *
16 */
17
18 #include "qcom-ipq4019.dtsi"
19 #include <dt-bindings/gpio/gpio.h>
20 #include <dt-bindings/input/input.h>
21 #include <dt-bindings/soc/qcom,tcsr.h>
22
23 / {
24 model = "Mikrotik Wireless Wire Dish LHGG-60ad";
25 compatible = "mikrotik,lhgg-60ad";
26
27 memory {
28 device_type = "memory";
29 reg = <0x80000000 0x10000000>;
30 };
31
32 chosen {
33 stdout-path = "serial0:115200n8";
34 };
35
36 aliases {
37 led-boot = &user;
38 led-failsafe = &user;
39 led-running = &user;
40 led-upgrade = &user;
41 };
42
43 soc {
44 rng@22000 {
45 status = "okay";
46 };
47
48 mdio@90000 {
49 status = "okay";
50
51 /delete-node/ ethernet-phy@1;
52 /delete-node/ ethernet-phy@2;
53 /delete-node/ ethernet-phy@3;
54 /delete-node/ ethernet-phy@4;
55 /delete-node/ psgmii-phy@5;
56 };
57
58 counter@4a1000 {
59 compatible = "qcom,qca-gcnt";
60 reg = <0x4a1000 0x4>;
61 };
62
63 tcsr@1949000 {
64 compatible = "qcom,tcsr";
65 reg = <0x1949000 0x100>;
66 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
67 };
68
69 ess_tcsr@1953000 {
70 compatible = "qcom,tcsr";
71 reg = <0x1953000 0x1000>;
72 qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
73 };
74
75 tcsr@1957000 {
76 compatible = "qcom,tcsr";
77 reg = <0x1957000 0x100>;
78 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
79 };
80
81 crypto@8e3a000 {
82 status = "okay";
83 };
84
85 watchdog@b017000 {
86 status = "okay";
87 };
88
89 ess-switch@c000000 {
90 switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */
91 switch_lan_bmp = <0x0>; /* lan port bitmap */
92 switch_wan_bmp = <0x10>; /* wan port bitmap */
93 };
94
95 edma@c080000 {
96 status = "okay";
97 phy-mode = "rgmii-id";
98 qcom,num_gmac = <1>;
99 qcom,single-phy;
100 };
101 };
102
103 keys {
104 compatible = "gpio-keys";
105
106 reset {
107 label = "reset";
108 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
109 linux,code = <KEY_RESTART>;
110 };
111 };
112
113 leds {
114 compatible = "gpio-leds";
115
116 power: power {
117 label = "blue:power";
118 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
119 default-state = "keep";
120 panic-indicator;
121 };
122
123 user: user {
124 label = "yellow:user";
125 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
126 };
127
128 wlan {
129 label = "green:wlan";
130 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
131 };
132
133 align-left {
134 label = "green:align-left";
135 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
136 };
137
138 align-right {
139 label = "green:align-right";
140 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
141 };
142
143 wlan-rx {
144 label = "green:align-down";
145 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
146 };
147
148 wlan-tx {
149 label = "green:align-up";
150 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
151 };
152 };
153 };
154
155 &tlmm {
156 serial_pins: serial_pinmux {
157 mux {
158 pins = "gpio60", "gpio61";
159 function = "blsp_uart0";
160 bias-disable;
161 };
162 };
163
164 spi_0_pins: spi-0-pinmux {
165 pinmux {
166 function = "blsp_spi0";
167 pins = "gpio13", "gpio14", "gpio15";
168 bias-disable;
169 };
170
171 pinmux_cs {
172 function = "gpio";
173 pins = "gpio12";
174 bias-disable;
175 output-high;
176 };
177 };
178 };
179
180 &blsp_dma {
181 status = "okay";
182 };
183
184 &blsp1_spi1 {
185 pinctrl-0 = <&spi_0_pins>;
186 pinctrl-names = "default";
187 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
188 status = "okay";
189
190 m25p80@0 {
191 reg = <0>;
192 compatible = "jedec,spi-nor";
193 spi-max-frequency = <24000000>;
194
195 partitions {
196 compatible = "fixed-partitions";
197 #address-cells = <1>;
198 #size-cells = <1>;
199
200 partition@0 {
201 label = "Qualcomm";
202 reg = <0x0 0x80000>;
203 read-only;
204 };
205
206 partition@80000 {
207 compatible = "mikrotik,routerboot-partitions";
208 #address-cells = <1>;
209 #size-cells = <1>;
210 label = "RouterBoot";
211 reg = <0x80000 0x80000>;
212
213 hard_config {
214 read-only;
215 size = <0x2000>;
216 };
217
218 dtb_config {
219 read-only;
220 };
221
222 soft_config {
223 };
224 };
225
226 partition@100000 {
227 compatible = "mikrotik,minor";
228 label = "firmware";
229 reg = <0x100000 0xf00000>;
230 };
231 };
232 };
233 };
234
235 &blsp1_uart1 {
236 pinctrl-0 = <&serial_pins>;
237 pinctrl-names = "default";
238 status = "okay";
239 };
240
241 &cryptobam {
242 status = "okay";
243 };
244
245 &pcie0 {
246 status = "okay";
247 perst-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>;
248
249 bridge@0,0 {
250 reg = <0x00000000 0 0 0 0>;
251 #address-cells = <3>;
252 #size-cells = <2>;
253 ranges;
254
255 /* wil6210 802.11ad card */
256 wifi: wifi@1,0 {
257 status = "okay";
258 /* wil6210 driver has no compatible */
259 reg = <0x00010000 0 0 0 0>;
260 };
261 };
262 };
263
264 &gmac0 {
265 qcom,phy_mdio_addr = <0>;
266 qcom,poll_required = <1>;
267 vlan_tag = <0 0x20>;
268 };