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