|
21 | 21 | gpio-leds {
|
22 | 22 | compatible = "gpio-leds";
|
23 | 23 |
|
24 |
| - wan { |
25 |
| - label = "mir3g:red:wan"; |
| 24 | + status_red { |
| 25 | + label = "mir3g:red:status"; |
26 | 26 | gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
|
27 | 27 | };
|
28 | 28 |
|
29 |
| - usb { |
30 |
| - label = "mir3g:blue:usb"; |
| 29 | + status_blue { |
| 30 | + label = "mir3g:blue:status"; |
31 | 31 | gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
|
32 | 32 | };
|
33 | 33 |
|
34 |
| - status { |
| 34 | + status_yellow { |
35 | 35 | label = "mir3g:yellow:status";
|
36 | 36 | gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
|
37 | 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 | + }; |
| 53 | + |
38 | 54 | };
|
39 | 55 |
|
40 | 56 | gpio-keys-polled {
|
|
45 | 61 |
|
46 | 62 | reset {
|
47 | 63 | label = "reset";
|
48 |
| - gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; |
| 64 | + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; |
49 | 65 | linux,code = <KEY_RESTART>;
|
50 | 66 | };
|
51 | 67 | };
|
| 68 | + |
| 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 | + }; |
| 78 | + }; |
52 | 79 | };
|
53 | 80 |
|
54 | 81 | &nand {
|
|
63 | 90 | partition@80000 {
|
64 | 91 | label = "Config";
|
65 | 92 | reg = <0x80000 0x40000>;
|
66 |
| - read-only; |
67 | 93 | };
|
68 | 94 |
|
69 | 95 | partition@c0000 {
|
|
81 | 107 | partition@140000 {
|
82 | 108 | label = "crash";
|
83 | 109 | reg = <0x140000 0x40000>;
|
84 |
| - read-only; |
85 | 110 | };
|
86 | 111 |
|
87 | 112 | partition@180000 {
|
88 | 113 | label = "crash_syslog";
|
89 | 114 | reg = <0x180000 0x40000>;
|
90 |
| - read-only; |
91 | 115 | };
|
92 | 116 |
|
93 | 117 | partition@1c0000 {
|
|
96 | 120 | read-only;
|
97 | 121 | };
|
98 | 122 |
|
99 |
| - /* |
100 |
| - * kernel0 partition should be erased, so |
101 |
| - * u-boot in failsafe routine switches |
102 |
| - * to next one looking for kernel image. |
103 |
| - * To remind about this fact rename kernel0 |
104 |
| - * into kernel_erase. |
| 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. |
105 | 135 | */
|
| 136 | + |
106 | 137 | partition@200000 {
|
107 |
| - label = "kernel_erase"; |
| 138 | + label = "kernel_stock"; |
108 | 139 | reg = <0x200000 0x400000>;
|
109 | 140 | };
|
110 | 141 |
|
|
114 | 145 | };
|
115 | 146 |
|
116 | 147 | /* ubi partition is the result of squashing
|
117 |
| - * next consequent stock partitions: |
118 |
| - * - rootfs0 (rootfs partition for stock kernel0), |
119 |
| - * - rootfs1 (rootfs partition for stock failsafe kernel1), |
| 148 | + * next consecutive stock partitions: |
| 149 | + * - rootfs0 (rootfs partition for stock kernel0), |
| 150 | + * - rootfs1 (rootfs partition for stock failsafe kernel1), |
120 | 151 | * - overlay (used as ubi overlay in stock fw)
|
121 | 152 | * resulting 117,5MiB space for packages.
|
122 | 153 | */
|
| 154 | + |
123 | 155 | partition@a00000 {
|
124 | 156 | label = "ubi";
|
125 | 157 | reg = <0xa00000 0x7580000>;
|
|
136 | 168 | mediatek,mtd-eeprom = <&factory 0x0000>;
|
137 | 169 | ieee80211-freq-limit = <2400000 2500000>;
|
138 | 170 | };
|
139 |
| - }; |
| 171 | + }; |
140 | 172 |
|
141 | 173 | pcie1 {
|
142 | 174 | wifi@14c3,7662 {
|
|
156 | 188 | &pinctrl {
|
157 | 189 | state_default: pinctrl0 {
|
158 | 190 | gpio {
|
159 |
| - ralink,group = "jtag", "uart3", "wdt"; |
| 191 | + ralink,group = "jtag", "uart2", "uart3", "wdt"; |
160 | 192 | ralink,function = "gpio";
|
161 | 193 | };
|
162 | 194 | };
|
|
0 commit comments