OpenWrt – Blame information for rev 2
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | // SPDX-License-Identifier: GPL-2.0-or-later OR MIT |
2 | /dts-v1/; |
||
3 | |||
4 | #include <dt-bindings/gpio/gpio.h> |
||
5 | #include <dt-bindings/input/input.h> |
||
6 | |||
7 | #include "ar9341.dtsi" |
||
8 | |||
9 | / { |
||
10 | model = "TP-Link TL-WR842N/ND v2"; |
||
11 | compatible = "tplink,tl-wr842n-v2", "qca,ar9341"; |
||
12 | |||
13 | aliases { |
||
14 | serial0 = &uart; |
||
15 | led-boot = &system; |
||
16 | led-failsafe = &system; |
||
17 | led-running = &system; |
||
18 | led-upgrade = &system; |
||
19 | }; |
||
20 | |||
21 | keys { |
||
22 | compatible = "gpio-keys-polled"; |
||
23 | poll-interval = <20>; |
||
24 | |||
25 | pinctrl-names = "default"; |
||
26 | pinctrl-0 = <&jtag_disable_pins>; |
||
27 | |||
28 | reset { |
||
29 | label = "Reset"; |
||
30 | linux,code = <KEY_RESTART>; |
||
31 | gpios = <&gpio 17 GPIO_ACTIVE_LOW>; |
||
32 | debounce-interval = <60>; |
||
33 | }; |
||
34 | |||
35 | rfkill { |
||
36 | label = "WiFi"; |
||
37 | linux,code = <KEY_RFKILL>; |
||
38 | gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; |
||
39 | debounce-interval = <60>; |
||
40 | }; |
||
41 | }; |
||
42 | |||
43 | leds { |
||
44 | compatible = "gpio-leds"; |
||
45 | |||
46 | system: power { |
||
47 | label = "tp-link:green:power"; |
||
48 | gpios = <&gpio 14 GPIO_ACTIVE_LOW>; |
||
49 | default-state = "on"; |
||
50 | }; |
||
51 | |||
52 | wlan { |
||
53 | label = "tp-link:green:wlan"; |
||
54 | gpios = <&gpio 13 GPIO_ACTIVE_LOW>; |
||
55 | linux,default-trigger = "phy0tpt"; |
||
56 | }; |
||
57 | |||
58 | qss { |
||
59 | label = "tp-link:green:qss"; |
||
60 | gpios = <&gpio 15 GPIO_ACTIVE_LOW>; |
||
61 | }; |
||
62 | |||
63 | wan { |
||
64 | label = "tp-link:green:wan"; |
||
65 | gpios = <&gpio 18 GPIO_ACTIVE_LOW>; |
||
66 | }; |
||
67 | |||
68 | lan1 { |
||
69 | label = "tp-link:green:lan1"; |
||
70 | gpios = <&gpio 19 GPIO_ACTIVE_LOW>; |
||
71 | }; |
||
72 | |||
73 | lan2 { |
||
74 | label = "tp-link:green:lan2"; |
||
75 | gpios = <&gpio 20 GPIO_ACTIVE_LOW>; |
||
76 | }; |
||
77 | |||
78 | lan3 { |
||
79 | label = "tp-link:green:lan3"; |
||
80 | gpios = <&gpio 21 GPIO_ACTIVE_LOW>; |
||
81 | }; |
||
82 | |||
83 | lan4 { |
||
84 | label = "tp-link:green:lan4"; |
||
85 | gpios = <&gpio 12 GPIO_ACTIVE_LOW>; |
||
86 | }; |
||
87 | |||
88 | usb { |
||
89 | label = "tp-link:green:usb"; |
||
90 | gpios = <&gpio 11 GPIO_ACTIVE_LOW>; |
||
91 | trigger-sources = <&hub_port>; |
||
92 | linux,default-trigger = "usbport"; |
||
93 | }; |
||
94 | }; |
||
95 | |||
96 | gpio-export { |
||
97 | compatible = "gpio-export"; |
||
98 | |||
99 | gpio_usb_power { |
||
100 | gpio-export,name = "tp-link:power:usb"; |
||
101 | gpio-export,output = <1>; |
||
102 | gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; |
||
103 | }; |
||
104 | }; |
||
105 | }; |
||
106 | |||
107 | &ref { |
||
108 | clock-frequency = <25000000>; |
||
109 | }; |
||
110 | |||
111 | &uart { |
||
112 | status = "okay"; |
||
113 | }; |
||
114 | |||
115 | &gpio { |
||
116 | status = "okay"; |
||
117 | }; |
||
118 | |||
119 | &spi { |
||
120 | num-cs = <1>; |
||
121 | |||
122 | status = "okay"; |
||
123 | |||
124 | flash@0 { |
||
125 | compatible = "jedec,spi-nor"; |
||
126 | reg = <0>; |
||
127 | spi-max-frequency = <25000000>; |
||
128 | |||
129 | partitions { |
||
130 | compatible = "fixed-partitions"; |
||
131 | #address-cells = <1>; |
||
132 | #size-cells = <1>; |
||
133 | |||
134 | uboot: partition@0 { |
||
135 | label = "u-boot"; |
||
136 | reg = <0x000000 0x020000>; |
||
137 | read-only; |
||
138 | }; |
||
139 | |||
140 | partition@20000 { |
||
141 | compatible = "tplink,firmware"; |
||
142 | label = "firmware"; |
||
143 | reg = <0x020000 0x7d0000>; |
||
144 | }; |
||
145 | |||
146 | art: partition@7f0000 { |
||
147 | label = "art"; |
||
148 | reg = <0x7f0000 0x010000>; |
||
149 | read-only; |
||
150 | }; |
||
151 | }; |
||
152 | }; |
||
153 | }; |
||
154 | |||
155 | &usb { |
||
156 | #address-cells = <1>; |
||
157 | #size-cells = <0>; |
||
158 | status = "okay"; |
||
159 | |||
160 | hub_port: port@1 { |
||
161 | reg = <1>; |
||
162 | #trigger-source-cells = <0>; |
||
163 | }; |
||
164 | }; |
||
165 | |||
166 | &usb_phy { |
||
167 | status = "okay"; |
||
168 | }; |
||
169 | |||
170 | ð0 { |
||
171 | status = "okay"; |
||
172 | |||
173 | phy-handle = <&swphy0>; |
||
174 | mtd-mac-address = <&uboot 0x1fc00>; |
||
175 | mtd-mac-address-increment = <(-1)>; |
||
176 | }; |
||
177 | |||
178 | ð1 { |
||
179 | status = "okay"; |
||
180 | |||
181 | phy-handle = <&swphy4>; |
||
182 | mtd-mac-address = <&uboot 0x1fc00>; |
||
183 | phy-mode = "gmii"; |
||
184 | pll-data = <0x06000000 0x00000101 0x00001616>; |
||
185 | |||
186 | gmac-config { |
||
187 | device = <&gmac>; |
||
188 | switch-phy-swap = <1>; |
||
189 | }; |
||
190 | }; |
||
191 | |||
192 | &wmac { |
||
193 | status = "okay"; |
||
194 | |||
195 | mtd-cal-data = <&art 0x1000>; |
||
196 | mtd-mac-address = <&uboot 0x1fc00>; |
||
197 | }; |