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