treewide: fix some cosmetic glitches in dts files
[openwrt/openwrt.git] / target / linux / ramips / dts / MIR3G.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "xiaomi,mir3g", "mediatek,mt7621-soc";
10 model = "Xiaomi Mi Router 3G";
11
12 aliases {
13 led-status = &led_status_blue;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x10000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200n8";
23 };
24
25 gpio-leds {
26 compatible = "gpio-leds";
27
28 status_red {
29 label = "mir3g:red:status";
30 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
31 };
32
33 led_status_blue: status_blue {
34 label = "mir3g:blue:status";
35 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
36 };
37
38 status_yellow {
39 label = "mir3g:yellow:status";
40 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
41 };
42
43 wan_amber {
44 label = "mir3g:amber:wan";
45 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
46 };
47
48 lan1_amber {
49 label = "mir3g:amber:lan1";
50 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
51 };
52
53 lan2_amber {
54 label = "mir3g:amber:lan2";
55 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
56 };
57 };
58
59 gpio-keys-polled {
60 compatible = "gpio-keys-polled";
61 poll-interval = <20>;
62
63 reset {
64 label = "reset";
65 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
66 linux,code = <KEY_RESTART>;
67 };
68 };
69
70 reg_usb_vbus: reg_usb_vbus {
71 compatible = "regulator-fixed";
72 regulator-name = "usb_vbus";
73 regulator-min-microvolt = <5000000>;
74 regulator-max-microvolt = <5000000>;
75 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
76 enable-active-high;
77 };
78 };
79
80 &xhci {
81 vbus-supply = <&reg_usb_vbus>;
82 };
83
84 &nand {
85 status = "okay";
86
87 partitions {
88 compatible = "fixed-partitions";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 partition@0 {
93 label = "Bootloader";
94 reg = <0x0 0x80000>;
95 read-only;
96 };
97
98 partition@80000 {
99 label = "Config";
100 reg = <0x80000 0x40000>;
101 };
102
103 partition@c0000 {
104 label = "Bdata";
105 reg = <0xc0000 0x40000>;
106 read-only;
107 };
108
109 factory: partition@100000 {
110 label = "Factory";
111 reg = <0x100000 0x40000>;
112 read-only;
113 };
114
115 partition@140000 {
116 label = "crash";
117 reg = <0x140000 0x40000>;
118 };
119
120 partition@180000 {
121 label = "crash_syslog";
122 reg = <0x180000 0x40000>;
123 };
124
125 partition@1c0000 {
126 label = "reserved0";
127 reg = <0x1c0000 0x40000>;
128 read-only;
129 };
130
131 /* uboot expects to find kernels at 0x200000 & 0x600000
132 * referred to as system 1 & system 2 respectively.
133 * a kernel is considered suitable for handing control over
134 * if its linux magic number exists & uImage CRC are correct.
135 * If either of those conditions fail, a matching sys'n'_fail flag
136 * is set in uboot env & a restart performed in the hope that the
137 * alternate kernel is okay.
138 * if neither kernel checksums ok and both are marked failed, system 2
139 * is booted anyway.
140 *
141 * Note uboot's tftp flash install writes the transferred
142 * image to both kernel partitions.
143 */
144
145 partition@200000 {
146 label = "kernel_stock";
147 reg = <0x200000 0x400000>;
148 };
149
150 partition@600000 {
151 label = "kernel";
152 reg = <0x600000 0x400000>;
153 };
154
155 /* ubi partition is the result of squashing
156 * next consecutive stock partitions:
157 * - rootfs0 (rootfs partition for stock kernel0),
158 * - rootfs1 (rootfs partition for stock failsafe kernel1),
159 * - overlay (used as ubi overlay in stock fw)
160 * resulting 117,5MiB space for packages.
161 */
162
163 partition@a00000 {
164 label = "ubi";
165 reg = <0xa00000 0x7580000>;
166 };
167 };
168 };
169
170 &pcie {
171 status = "okay";
172 };
173
174 &pcie0 {
175 wifi@0,0 {
176 compatible = "pci14c3,7603";
177 reg = <0x0000 0 0 0 0>;
178 mediatek,mtd-eeprom = <&factory 0x0000>;
179 ieee80211-freq-limit = <2400000 2500000>;
180 };
181 };
182
183 &pcie1 {
184 wifi@0,0 {
185 compatible = "pci14c3,7662";
186 reg = <0x0000 0 0 0 0>;
187 mediatek,mtd-eeprom = <&factory 0x8000>;
188 ieee80211-freq-limit = <5000000 6000000>;
189 };
190 };
191
192 &ethernet {
193 mtd-mac-address = <&factory 0xe000>;
194 mediatek,portmap = "lwlll";
195 };
196
197 &pinctrl {
198 state_default: pinctrl0 {
199 gpio {
200 ralink,group = "jtag", "uart2", "uart3", "wdt";
201 ralink,function = "gpio";
202 };
203 };
204 };