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 "qca956x.dtsi" |
||
8 | |||
9 | / { |
||
10 | compatible = "avm,fritz4020", "qca,qca9560"; |
||
11 | model = "AVM FRITZ!Box 4020"; |
||
12 | |||
13 | aliases { |
||
14 | led-boot = &power; |
||
15 | led-failsafe = &info_red; |
||
16 | led-running = &power; |
||
17 | led-upgrade = &info_red; |
||
18 | }; |
||
19 | |||
20 | chosen { |
||
21 | bootargs = "console=ttyS0,115200n8"; |
||
22 | }; |
||
23 | |||
24 | led_spi { |
||
25 | compatible = "spi-gpio"; |
||
26 | #address-cells = <1>; |
||
27 | #size-cells = <0>; |
||
28 | |||
29 | gpio-sck = <&gpio 20 GPIO_ACTIVE_HIGH>; |
||
30 | gpio-mosi = <&gpio 19 GPIO_ACTIVE_HIGH>; |
||
31 | num-chipselects = <0>; |
||
32 | |||
33 | led_gpio: led_gpio@0 { |
||
34 | compatible = "fairchild,74hc595"; |
||
35 | reg = <0>; |
||
36 | gpio-controller; |
||
37 | #gpio-cells = <2>; |
||
38 | registers-number = <1>; |
||
39 | lines-initial-states = /bits/ 8 <0xff>; |
||
40 | spi-max-frequency = <10000000>; |
||
41 | |||
42 | gpio_latch_bit { |
||
43 | gpio-hog; |
||
44 | gpios = <7 GPIO_ACTIVE_HIGH>; |
||
45 | output-high; |
||
46 | line-name = "gpio-latch-bit"; |
||
47 | }; |
||
48 | }; |
||
49 | }; |
||
50 | |||
51 | leds { |
||
52 | compatible = "gpio-leds"; |
||
53 | |||
54 | power: power { |
||
55 | label = "fritz4020:green:power"; |
||
56 | gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>; |
||
57 | default-state = "on"; |
||
58 | }; |
||
59 | |||
60 | wlan { |
||
61 | label = "fritz4020:green:wlan"; |
||
62 | gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>; |
||
63 | linux,default-trigger = "phy0tpt"; |
||
64 | }; |
||
65 | |||
66 | lan { |
||
67 | label = "fritz4020:green:lan"; |
||
68 | gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; |
||
69 | }; |
||
70 | |||
71 | wan { |
||
72 | label = "fritz4020:green:wan"; |
||
73 | gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; |
||
74 | }; |
||
75 | |||
76 | info { |
||
77 | label = "fritz4020:green:info"; |
||
78 | gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; |
||
79 | }; |
||
80 | |||
81 | info_red: info_red { |
||
82 | label = "fritz4020:red:info"; |
||
83 | gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>; |
||
84 | }; |
||
85 | }; |
||
86 | |||
87 | keys { |
||
88 | compatible = "gpio-keys-polled"; |
||
89 | poll-interval = <100>; |
||
90 | |||
91 | wps_button { |
||
92 | label = "WPS button"; |
||
93 | linux,code = <KEY_WPS_BUTTON>; |
||
94 | gpios = <&gpio 2 GPIO_ACTIVE_LOW>; |
||
95 | }; |
||
96 | |||
97 | wlan_button { |
||
98 | label = "WLAN button"; |
||
99 | linux,code = <KEY_RFKILL>; |
||
100 | gpios = <&gpio 21 GPIO_ACTIVE_LOW>; |
||
101 | }; |
||
102 | }; |
||
103 | }; |
||
104 | |||
105 | &uart { |
||
106 | status = "okay"; |
||
107 | }; |
||
108 | |||
109 | &gpio { |
||
110 | status = "okay"; |
||
111 | }; |
||
112 | |||
113 | &spi { |
||
114 | status = "okay"; |
||
115 | num-cs = <1>; |
||
116 | |||
117 | flash@0 { |
||
118 | compatible = "jedec,spi-nor"; |
||
119 | reg = <0>; |
||
120 | spi-max-frequency = <25000000>; |
||
121 | |||
122 | partitions { |
||
123 | compatible = "fixed-partitions"; |
||
124 | #address-cells = <1>; |
||
125 | #size-cells = <1>; |
||
126 | |||
127 | partition@0 { |
||
128 | label = "urlader"; |
||
129 | reg = <0x000000 0x020000>; |
||
130 | read-only; |
||
131 | }; |
||
132 | |||
133 | partition@1 { |
||
134 | compatible = "avm,eva-firmware"; |
||
135 | label = "firmware"; |
||
136 | reg = <0x020000 0xee0000>; |
||
137 | }; |
||
138 | |||
139 | partition@2 { |
||
140 | label = "tffs (1)"; |
||
141 | reg = <0xf00000 0x080000>; |
||
142 | read-only; |
||
143 | }; |
||
144 | |||
145 | partition@3 { |
||
146 | label = "tffs (2)"; |
||
147 | reg = <0xf80000 0x080000>; |
||
148 | read-only; |
||
149 | }; |
||
150 | }; |
||
151 | }; |
||
152 | }; |
||
153 | |||
154 | ð0 { |
||
155 | status = "okay"; |
||
156 | |||
157 | phy-mode = "mii"; |
||
158 | phy-handle = <&swphy0>; |
||
159 | |||
160 | gmac-config { |
||
161 | device = <&gmac>; |
||
162 | |||
163 | switch-phy-addr-swap = <1>; |
||
164 | switch-phy-swap = <1>; |
||
165 | }; |
||
166 | }; |
||
167 | |||
168 | ð1 { |
||
169 | status = "okay"; |
||
170 | }; |
||
171 | |||
172 | &wmac { |
||
173 | status = "okay"; |
||
174 | qca,no-eeprom; |
||
175 | }; |