OpenWrt – Diff between revs 2 and 3
?pathlinks?
Rev 2 | Rev 3 | |||
---|---|---|---|---|
1 | /dts-v1/; |
1 | /dts-v1/; |
|
2 | |
2 | |
|
3 | #include "mt7620a.dtsi" |
3 | #include "mt7620a.dtsi" |
|
4 | |
4 | |
|
5 | #include <dt-bindings/input/input.h> |
5 | #include <dt-bindings/input/input.h> |
|
6 | #include <dt-bindings/gpio/gpio.h> |
6 | #include <dt-bindings/gpio/gpio.h> |
|
7 | |
7 | |
|
8 | / { |
8 | / { |
|
9 | compatible = "tplink,c50", "ralink,mt7620a-soc"; |
9 | compatible = "tplink,c50", "ralink,mt7620a-soc"; |
|
10 | model = "TP-Link Archer C50"; |
10 | model = "TP-Link Archer C50"; |
|
11 | |
- | ||
12 | aliases { |
- | ||
13 | led-boot = &led_power; |
- | ||
14 | led-failsafe = &led_power; |
- | ||
15 | led-running = &led_power; |
- | ||
16 | led-upgrade = &led_power; |
- | ||
17 | }; |
- | ||
18 | |
11 | |
|
19 | chosen { |
12 | chosen { |
|
20 | bootargs = "console=ttyS0,115200"; |
13 | bootargs = "console=ttyS0,115200"; |
|
21 | }; |
14 | }; |
|
22 | |
15 | |
|
23 | leds { |
16 | gpio-leds { |
|
24 | compatible = "gpio-leds"; |
17 | compatible = "gpio-leds"; |
|
25 | |
18 | |
|
26 | lan { |
19 | lan { |
|
27 | label = "c50:green:lan"; |
20 | label = "c50:green:lan"; |
|
28 | gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; |
21 | gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; |
|
29 | }; |
22 | }; |
|
30 | |
23 | |
|
31 | led_power: power { |
24 | power { |
|
32 | label = "c50:green:power"; |
25 | label = "c50:green:power"; |
|
33 | gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; |
26 | gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; |
|
34 | default-state = "on"; |
27 | default-state = "on"; |
|
35 | }; |
28 | }; |
|
36 | |
29 | |
|
37 | usb { |
30 | usb { |
|
38 | label = "c50:green:usb"; |
31 | label = "c50:green:usb"; |
|
39 | gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; |
32 | gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; |
|
40 | trigger-sources = <&ohci_port1>, <&ehci_port1>; |
- | ||
41 | linux,default-trigger = "usbport"; |
- | ||
42 | }; |
33 | }; |
|
43 | |
34 | |
|
44 | wan { |
35 | wan { |
|
45 | label = "c50:green:wan"; |
36 | label = "c50:green:wan"; |
|
46 | gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; |
37 | gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; |
|
47 | }; |
38 | }; |
|
48 | |
39 | |
|
49 | wan_orange { |
40 | wan_orange { |
|
50 | label = "c50:orange:wan"; |
41 | label = "c50:orange:wan"; |
|
51 | gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; |
42 | gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; |
|
52 | }; |
43 | }; |
|
53 | |
44 | |
|
54 | wlan5g { |
45 | wlan5g { |
|
55 | label = "c50:green:wlan5g"; |
46 | label = "c50:green:wlan5g"; |
|
56 | gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; |
47 | gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; |
|
57 | }; |
48 | }; |
|
58 | |
49 | |
|
59 | wlan2g { |
50 | wlan2g { |
|
60 | label = "c50:green:wlan2g"; |
51 | label = "c50:green:wlan2g"; |
|
61 | gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; |
52 | gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; |
|
62 | }; |
53 | }; |
|
63 | |
54 | |
|
64 | wps { |
55 | wps { |
|
65 | label = "c50:green:wps"; |
56 | label = "c50:green:wps"; |
|
66 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
57 | gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; |
|
67 | }; |
58 | }; |
|
68 | }; |
59 | }; |
|
69 | |
60 | |
|
70 | keys { |
61 | gpio-keys-polled { |
|
- | 62 | compatible = "gpio-keys-polled"; |
||
- | 63 | #address-cells = <1>; |
||
71 | compatible = "gpio-keys-polled"; |
64 | #size-cells = <0>; |
|
72 | poll-interval = <20>; |
65 | poll-interval = <20>; |
|
73 | |
66 | |
|
74 | reset { |
67 | reset { |
|
75 | label = "reset"; |
68 | label = "reset"; |
|
76 | gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; |
69 | gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; |
|
77 | linux,code = <KEY_RESTART>; |
70 | linux,code = <KEY_RESTART>; |
|
78 | }; |
71 | }; |
|
79 | |
72 | |
|
80 | rfkill { |
73 | rfkill { |
|
81 | label = "rfkill"; |
74 | label = "rfkill"; |
|
82 | gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; |
75 | gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; |
|
83 | linux,code = <KEY_RFKILL>; |
76 | linux,code = <KEY_RFKILL>; |
|
84 | }; }; |
77 | }; }; |
|
85 | }; |
78 | }; |
|
86 | |
79 | |
|
87 | &gpio1 { |
80 | &gpio1 { |
|
88 | status = "okay"; |
81 | status = "okay"; |
|
89 | }; |
82 | }; |
|
90 | |
83 | |
|
91 | &gpio2 { |
84 | &gpio2 { |
|
92 | status = "okay"; |
85 | status = "okay"; |
|
93 | }; |
86 | }; |
|
94 | |
87 | |
|
95 | &gpio3 { |
88 | &gpio3 { |
|
96 | status = "okay"; |
89 | status = "okay"; |
|
97 | }; |
90 | }; |
|
98 | |
91 | |
|
99 | &spi0 { |
92 | &spi0 { |
|
100 | status = "okay"; |
93 | status = "okay"; |
|
101 | |
94 | |
|
102 | m25p80@0 { |
95 | m25p80@0 { |
|
- | 96 | #address-cells = <1>; |
||
- | 97 | #size-cells = <1>; |
||
103 | compatible = "jedec,spi-nor"; |
98 | compatible = "jedec,spi-nor"; |
|
104 | reg = <0>; |
99 | reg = <0>; |
|
105 | spi-max-frequency = <10000000>; |
100 | spi-max-frequency = <10000000>; |
|
106 | |
- | ||
107 | partitions { |
- | ||
108 | compatible = "fixed-partitions"; |
- | ||
109 | #address-cells = <1>; |
- | ||
110 | #size-cells = <1>; |
- | ||
111 | |
101 | |
|
112 | partition@0 { |
102 | partition@0 { |
|
113 | label = "u-boot"; |
103 | label = "u-boot"; |
|
114 | reg = <0x0 0x20000>; |
104 | reg = <0x0 0x20000>; |
|
115 | read-only; |
105 | read-only; |
|
116 | }; |
106 | }; |
|
117 | |
107 | |
|
118 | partition@20000 { |
- | ||
119 | compatible = "tplink,firmware"; |
108 | partition@20000 { |
|
120 | label = "firmware"; |
109 | label = "firmware"; |
|
121 | reg = <0x20000 0x7a0000>; |
110 | reg = <0x20000 0x7a0000>; |
|
122 | }; |
111 | }; |
|
123 | |
112 | |
|
124 | partition@7c0000 { |
113 | partition@7c0000 { |
|
125 | label = "config"; |
114 | label = "config"; |
|
126 | reg = <0x7c0000 0x10000>; |
115 | reg = <0x7c0000 0x10000>; |
|
127 | read-only; |
116 | read-only; |
|
128 | }; |
117 | }; |
|
129 | |
118 | |
|
130 | rom: partition@7d0000 { |
119 | rom: partition@7d0000 { |
|
131 | label = "rom"; |
120 | label = "rom"; |
|
132 | reg = <0x7d0000 0x10000>; |
121 | reg = <0x7d0000 0x10000>; |
|
133 | read-only; |
122 | read-only; |
|
134 | }; |
123 | }; |
|
135 | |
124 | |
|
136 | partition@7e0000 { |
125 | partition@7e0000 { |
|
137 | label = "romfile"; |
126 | label = "romfile"; |
|
138 | reg = <0x7e0000 0x10000>; |
127 | reg = <0x7e0000 0x10000>; |
|
139 | read-only; |
128 | read-only; |
|
140 | }; |
129 | }; |
|
141 | |
130 | |
|
142 | radio: partition@7f0000 { |
131 | radio: partition@7f0000 { |
|
143 | label = "radio"; |
132 | label = "radio"; |
|
144 | reg = <0x7f0000 0x10000>; |
133 | reg = <0x7f0000 0x10000>; |
|
145 | read-only; |
- | ||
146 | }; |
134 | read-only; |
|
147 | }; |
135 | }; |
|
148 | }; |
136 | }; |
|
149 | }; |
137 | }; |
|
150 | |
138 | |
|
151 | &pinctrl { |
139 | &pinctrl { |
|
152 | state_default: pinctrl0 { |
140 | state_default: pinctrl0 { |
|
153 | gpio { |
141 | gpio { |
|
154 | ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "ephy", "spi refclk", "mdio", "wdt", "nd_sd"; |
142 | ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "ephy", "spi refclk", "mdio", "wdt", "nd_sd"; |
|
155 | ralink,function = "gpio"; |
143 | ralink,function = "gpio"; |
|
156 | }; |
144 | }; |
|
157 | }; |
145 | }; |
|
158 | }; |
146 | }; |
|
159 | |
147 | |
|
160 | ðernet { |
148 | ðernet { |
|
161 | pinctrl-names = "default"; |
149 | pinctrl-names = "default"; |
|
162 | mtd-mac-address = <&rom 0xf100>; |
150 | mtd-mac-address = <&rom 0xf100>; |
|
163 | mediatek,portmap = "wllll"; |
151 | mediatek,portmap = "wllll"; |
|
164 | }; |
152 | }; |
|
165 | |
153 | |
|
166 | &ehci { |
154 | &ehci { |
|
167 | status = "okay"; |
155 | status = "okay"; |
|
168 | }; |
156 | }; |
|
169 | |
157 | |
|
170 | &ohci { |
158 | &ohci { |
|
171 | status = "okay"; |
159 | status = "okay"; |
|
172 | }; |
160 | }; |
|
173 | |
161 | |
|
174 | &gsw { |
162 | &gsw { |
|
175 | mediatek,port4 = "ephy"; |
163 | mediatek,port4 = "ephy"; |
|
176 | }; |
164 | }; |
|
177 | |
165 | |
|
178 | &wmac { |
166 | &wmac { |
|
179 | ralink,mtd-eeprom = <&radio 0>; |
167 | ralink,mtd-eeprom = <&radio 0>; |
|
180 | mtd-mac-address = <&rom 0xf100>; |
168 | mtd-mac-address = <&rom 0xf100>; |
|
181 | mtd-mac-address-increment = <(-2)>; |
169 | mtd-mac-address-increment = <(-2)>; |
|
182 | pinctrl-names = "default"; |
170 | pinctrl-names = "default"; |
|
183 | pinctrl-0 = <&pa_pins>; |
171 | pinctrl-0 = <&pa_pins>; |
|
184 | }; |
172 | }; |
|
185 | |
173 | |
|
186 | &pcie { |
174 | &pcie { |
|
187 | status = "okay"; |
175 | status = "okay"; |
|
188 | }; |
- | ||
189 | |
176 | |
|
190 | &pcie0 { |
177 | pcie-bridge { |
|
191 | mt76@0,0 { |
178 | mt76@0,0 { |
|
- | 179 | reg = <0x0000 0 0 0 0>; |
||
192 | reg = <0x0000 0 0 0 0>; |
180 | device_type = "pci"; |
|
193 | mediatek,mtd-eeprom = <&radio 32768>; |
181 | mediatek,mtd-eeprom = <&radio 32768>; |
|
194 | ieee80211-freq-limit = <5000000 6000000>; |
182 | ieee80211-freq-limit = <5000000 6000000>; |
|
195 | mtd-mac-address = <&rom 0xf100>; |
183 | mtd-mac-address = <&rom 0xf100>; |
|
- | 184 | mtd-mac-address-increment = <(-1)>; |
||
196 | mtd-mac-address-increment = <(-1)>; |
185 | }; |
|
197 | }; |
186 | }; |
|
198 | }; |
187 | }; |
|
199 | |
188 | |