cc1835e799afb776812073a1b2b07ffad5d68563
[openwrt/staging/hauke.git] /
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Fri, 5 Mar 2021 13:36:25 +0100
3 Subject: [PATCH] arm64: dts: broadcom: bcm4908: add TP-Link Archer C2300 V1
4
5 Archer C2300 V1 is a home router based on the BCM4906 (2 CPU cores). It
6 has 512 MiB of RAM, NAND flash, USB 2.0 and USB 3.0 ports, 4 LAN ports,
7 1 WAN port.
8
9 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
10 ---
11 arch/arm64/boot/dts/broadcom/bcm4908/Makefile | 1 +
12 .../bcm4906-tplink-archer-c2300-v1.dts | 182 ++++++++++++++++++
13 2 files changed, 183 insertions(+)
14 create mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts
15
16 --- a/arch/arm64/boot/dts/broadcom/bcm4908/Makefile
17 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/Makefile
18 @@ -1,3 +1,4 @@
19 # SPDX-License-Identifier: GPL-2.0
20 dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-netgear-r8000p.dtb
21 +dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-tplink-archer-c2300-v1.dtb
22 dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-asus-gt-ac5300.dtb
23 --- /dev/null
24 +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts
25 @@ -0,0 +1,182 @@
26 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
27 +
28 +#include <dt-bindings/gpio/gpio.h>
29 +#include <dt-bindings/input/input.h>
30 +#include <dt-bindings/leds/common.h>
31 +
32 +#include "bcm4906.dtsi"
33 +
34 +/ {
35 + compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908";
36 + model = "TP-Link Archer C2300 V1";
37 +
38 + memory@0 {
39 + device_type = "memory";
40 + reg = <0x00 0x00 0x00 0x20000000>;
41 + };
42 +
43 + leds {
44 + compatible = "gpio-leds";
45 +
46 + power-white {
47 + function = LED_FUNCTION_POWER;
48 + color = <LED_COLOR_ID_BLUE>;
49 + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
50 + };
51 +
52 + 2ghz {
53 + function = "2ghz";
54 + color = <LED_COLOR_ID_BLUE>;
55 + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
56 + };
57 +
58 + 5ghz {
59 + function = "5ghz";
60 + color = <LED_COLOR_ID_BLUE>;
61 + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
62 + };
63 +
64 + wan-amber {
65 + function = LED_FUNCTION_WAN;
66 + color = <LED_COLOR_ID_AMBER>;
67 + gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
68 + };
69 +
70 + wan-blue {
71 + function = LED_FUNCTION_WAN;
72 + color = <LED_COLOR_ID_BLUE>;
73 + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
74 + };
75 +
76 + lan {
77 + function = LED_FUNCTION_LAN;
78 + color = <LED_COLOR_ID_BLUE>;
79 + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
80 + };
81 +
82 + wps {
83 + function = LED_FUNCTION_WPS;
84 + color = <LED_COLOR_ID_BLUE>;
85 + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
86 + };
87 +
88 + usb-high-white {
89 + function = "usbup";
90 + color = <LED_COLOR_ID_BLUE>;
91 + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
92 + };
93 +
94 + usb-low-white {
95 + function = "usbdown";
96 + color = <LED_COLOR_ID_BLUE>;
97 + gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
98 + };
99 +
100 + brightness {
101 + function = LED_FUNCTION_BACKLIGHT;
102 + color = <LED_COLOR_ID_WHITE>;
103 + gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
104 + };
105 + };
106 +
107 + gpio-keys-polled {
108 + compatible = "gpio-keys-polled";
109 + poll-interval = <100>;
110 +
111 + brightness {
112 + label = "LEDs";
113 + linux,code = <KEY_BRIGHTNESS_ZERO>;
114 + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
115 + };
116 +
117 + wps {
118 + label = "WPS";
119 + linux,code = <KEY_WPS_BUTTON>;
120 + gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
121 + };
122 +
123 + wifi {
124 + label = "WiFi";
125 + linux,code = <KEY_RFKILL>;
126 + gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
127 + };
128 +
129 + restart {
130 + label = "Reset";
131 + linux,code = <KEY_RESTART>;
132 + gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
133 + };
134 + };
135 +};
136 +
137 +&usb_phy {
138 + brcm,ioc = <1>;
139 + status = "okay";
140 +};
141 +
142 +&ehci {
143 + status = "okay";
144 +};
145 +
146 +&ohci {
147 + status = "okay";
148 +};
149 +
150 +&xhci {
151 + status = "okay";
152 +};
153 +
154 +&ports {
155 + port@0 {
156 + label = "lan4";
157 + };
158 +
159 + port@1 {
160 + label = "lan3";
161 + };
162 +
163 + port@2 {
164 + label = "lan2";
165 + };
166 +
167 + port@3 {
168 + label = "lan1";
169 + };
170 +
171 + port@7 {
172 + reg = <7>;
173 + phy-mode = "internal";
174 + phy-handle = <&phy12>;
175 + label = "wan";
176 + };
177 +};
178 +
179 +&nandcs {
180 + nand-ecc-strength = <4>;
181 + nand-ecc-step-size = <512>;
182 + nand-on-flash-bbt;
183 +
184 + #address-cells = <1>;
185 + #size-cells = <0>;
186 +
187 + partitions {
188 + compatible = "brcm,bcm4908-partitions";
189 + #address-cells = <1>;
190 + #size-cells = <1>;
191 +
192 + partition@0 {
193 + label = "cferom";
194 + reg = <0x0 0x100000>;
195 + };
196 +
197 + partition@100000 {
198 + compatible = "brcm,bcm4908-firmware";
199 + reg = <0x100000 0x3900000>;
200 + };
201 +
202 + partition@5800000 {
203 + compatible = "brcm,bcm4908-firmware";
204 + reg = <0x3a00000 0x3900000>;
205 + };
206 + };
207 +};