OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 7... Line 7...
7   7  
8 / { 8 / {
9 compatible = "xiaomi,mir3g", "mediatek,mt7621-soc"; 9 compatible = "xiaomi,mir3g", "mediatek,mt7621-soc";
Line 10... Line -...
10 model = "Xiaomi Mi Router 3G"; -  
11   -  
12 aliases { -  
13 led-boot = &led_status_blue; -  
14 led-failsafe = &led_status_blue; -  
15 led-running = &led_status_blue; -  
16 led-upgrade = &led_status_blue; -  
17 }; 10 model = "Xiaomi Mi Router 3G";
18   11  
19 memory@0 { 12 memory@0 {
20 device_type = "memory"; 13 device_type = "memory";
Line 21... Line 14...
21 reg = <0x0 0x10000000>; 14 reg = <0x0 0x10000000>;
22 }; 15 };
23   16  
Line 24... Line 17...
24 chosen { 17 chosen {
25 bootargs = "console=ttyS0,115200n8"; 18 bootargs = "console=ttyS0,115200n8";
Line 26... Line 19...
26 }; 19 };
27   20  
28 leds { 21 gpio-leds {
29 compatible = "gpio-leds"; 22 compatible = "gpio-leds";
Line 30... Line 23...
30   23  
31 status_red { 24 status_red {
32 label = "mir3g:red:status"; 25 label = "mir3g:red:status";
33 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; 26 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
Line 34... Line 27...
34 }; 27 };
Line 55... Line 48...
55   48  
56 lan2_amber { 49 lan2_amber {
57 label = "mir3g:amber:lan2"; 50 label = "mir3g:amber:lan2";
58 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; 51 gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
-   52 };
59 }; 53  
Line 60... Line 54...
60 }; 54 };
61   55  
-   56 gpio-keys-polled {
-   57 compatible = "gpio-keys-polled";
62 keys { 58 #address-cells = <1>;
Line 63... Line 59...
63 compatible = "gpio-keys-polled"; 59 #size-cells = <0>;
64 poll-interval = <20>; 60 poll-interval = <20>;
65   61  
66 reset { 62 reset {
67 label = "reset"; 63 label = "reset";
68 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; 64 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
Line 69... Line 65...
69 linux,code = <KEY_RESTART>; 65 linux,code = <KEY_RESTART>;
70 }; 66 };
71 }; 67 };
-   68  
-   69 gpio_export {
72   70 compatible = "gpio-export";
73 reg_usb_vbus: reg_usb_vbus { 71 #size-cells = <0>;
74 compatible = "regulator-fixed"; 72  
75 regulator-name = "usb_vbus"; 73 usbpower {
76 regulator-min-microvolt = <5000000>; 74 gpio-export,name = "usbpower";
77 regulator-max-microvolt = <5000000>; 75 gpio-export,output = <1>;
Line 78... Line -...
78 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; -  
79 enable-active-high; -  
80 }; -  
81 }; -  
82   76 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
83 &xhci { 77 };
Line 84... Line -...
84 vbus-supply = <&reg_usb_vbus>; -  
85 }; -  
86   -  
87 &nand { -  
88 status = "okay"; -  
89   78 };
90 partitions { 79 };
91 compatible = "fixed-partitions"; 80  
92 #address-cells = <1>; 81 &nand {
93 #size-cells = <1>; 82 status = "okay";
Line 94... Line 83...
94   83  
95 partition@0 { 84 partition@0 {
96 label = "Bootloader"; 85 label = "Bootloader";
97 reg = <0x0 0x80000>; 86 reg = <0x0 0x80000>;
Line 98... Line 87...
98 read-only; 87 read-only;
99 }; 88 };
100   89  
101 partition@80000 { 90 partition@80000 {
102 label = "Config"; 91 label = "Config";
Line 103... Line 92...
103 reg = <0x80000 0x40000>; 92 reg = <0x80000 0x40000>;
104 }; 93 };
105   94  
106 partition@c0000 { 95 partition@c0000 {
107 label = "Bdata"; 96 label = "Bdata";
Line 108... Line 97...
108 reg = <0xc0000 0x40000>; 97 reg = <0xc0000 0x40000>;
109 read-only; 98 read-only;
110 }; 99 };
111   100  
Line 112... Line 101...
112 factory: partition@100000 { 101 factory: partition@100000 {
113 label = "Factory"; 102 label = "Factory";
114 reg = <0x100000 0x40000>; 103 reg = <0x100000 0x40000>;
115 read-only; 104 read-only;
Line 116... Line 105...
116 }; 105 };
117   106  
118 partition@140000 { 107 partition@140000 {
119 label = "crash"; 108 label = "crash";
120 reg = <0x140000 0x40000>; 109 reg = <0x140000 0x40000>;
Line 121... Line 110...
121 }; 110 };
122   111  
123 partition@180000 { 112 partition@180000 {
124 label = "crash_syslog"; 113 label = "crash_syslog";
125 reg = <0x180000 0x40000>; 114 reg = <0x180000 0x40000>;
126 }; 115 };
127   116  
128 partition@1c0000 { 117 partition@1c0000 {
129 label = "reserved0"; 118 label = "reserved0";
130 reg = <0x1c0000 0x40000>; 119 reg = <0x1c0000 0x40000>;
131 read-only; 120 read-only;
132 }; 121 };
133   122  
Line 134... Line 123...
134 /* uboot expects to find kernels at 0x200000 & 0x600000 123 /* uboot expects to find kernels at 0x200000 & 0x600000
135 * referred to as system 1 & system 2 respectively. 124 * referred to as system 1 & system 2 respectively.
136 * a kernel is considered suitable for handing control over 125 * a kernel is considered suitable for handing control over
137 * if its linux magic number exists & uImage CRC are correct. 126 * if its linux magic number exists & uImage CRC are correct.
Line 138... Line 127...
138 * If either of those conditions fail, a matching sys'n'_fail flag 127 * If either of those conditions fail, a matching sys'n'_fail flag
139 * is set in uboot env & a restart performed in the hope that the 128 * is set in uboot env & a restart performed in the hope that the
140 * alternate kernel is okay. 129 * alternate kernel is okay.
141 * if neither kernel checksums ok and both are marked failed, system 2 130 * if neither kernel checksums ok and both are marked failed, system 2
Line 142... Line 131...
142 * is booted anyway. 131 * is booted anyway.
143 * 132 *
144 * Note uboot's tftp flash install writes the transferred 133 * Note uboot's tftp flash install writes the transferred
145 * image to both kernel partitions. 134 * image to both kernel partitions.
146 */ 135 */
147   136  
148 partition@200000 { 137 partition@200000 {
Line 149... Line 138...
149 label = "kernel_stock"; 138 label = "kernel_stock";
150 reg = <0x200000 0x400000>; 139 reg = <0x200000 0x400000>;
151 }; 140 };
152   -  
153 partition@600000 { 141  
154 label = "kernel"; 142 partition@600000 {
Line 155... Line 143...
155 reg = <0x600000 0x400000>; 143 label = "kernel";
156 }; 144 reg = <0x600000 0x400000>;
157   -  
Line 158... Line 145...
158 /* ubi partition is the result of squashing 145 };
159 * next consecutive stock partitions: 146  
160 * - rootfs0 (rootfs partition for stock kernel0), 147 /* ubi partition is the result of squashing
161 * - rootfs1 (rootfs partition for stock failsafe kernel1), 148 * next consecutive stock partitions:
162 * - overlay (used as ubi overlay in stock fw) 149 * - rootfs0 (rootfs partition for stock kernel0),
163 * resulting 117,5MiB space for packages. 150 * - rootfs1 (rootfs partition for stock failsafe kernel1),
-   151 * - overlay (used as ubi overlay in stock fw)
164 */ 152 * resulting 117,5MiB space for packages.
165   -  
Line 166... Line 153...
166 partition@a00000 { 153 */
167 label = "ubi"; 154  
168 reg = <0xa00000 0x7580000>; 155 partition@a00000 {
169 }; 156 label = "ubi";
170 }; 157 reg = <0xa00000 0x7580000>;
171 }; 158 };
-   159 };
172   160  
173 &pcie { 161 &pcie {
Line 174... Line 162...
174 status = "okay"; 162 status = "okay";
175 }; 163