From 8d24da14702b8da820bf2e3952d5691f77136018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 5 Mar 2021 14:38:41 +0100 Subject: [PATCH] bcm4908: prepare to support TP-Link Archer C2300 V1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's a BCM4906 based device (2 CPU cores). It has 512 MiB of RAM, 4 LAN ports, 1 WAN port, 2 USB ports, NAND flash. WiFi unknown at this point. Flashing is possible using CFE only, proper image will be worked on later. Signed-off-by: Rafał Miłecki --- target/linux/bcm4908/image/Makefile | 10 + .../tplink_archer-c2300-v1/etc/image_version | 1 + .../image/tplink_archer-c2300-v1/nvram.nvm | Bin 0 -> 8691 bytes ...bcm-document-TP-Link-Archer-C2300-bi.patch | 21 ++ ...om-bcm4908-add-TP-Link-Archer-C2300-.patch | 207 ++++++++++++++++++ 5 files changed, 239 insertions(+) create mode 100644 target/linux/bcm4908/image/tplink_archer-c2300-v1/etc/image_version create mode 100755 target/linux/bcm4908/image/tplink_archer-c2300-v1/nvram.nvm create mode 100644 target/linux/bcm4908/patches-5.4/131-0001-dt-bindings-arm-bcm-document-TP-Link-Archer-C2300-bi.patch create mode 100644 target/linux/bcm4908/patches-5.4/131-0002-arm64-dts-broadcom-bcm4908-add-TP-Link-Archer-C2300-.patch diff --git a/target/linux/bcm4908/image/Makefile b/target/linux/bcm4908/image/Makefile index 0775f42254..30c60db488 100644 --- a/target/linux/bcm4908/image/Makefile +++ b/target/linux/bcm4908/image/Makefile @@ -71,4 +71,14 @@ define Device/netgear_r8000p endef TARGET_DEVICES += netgear_r8000p +define Device/tplink_archer-c2300-v1 + DEVICE_VENDOR := TP-Link + DEVICE_MODEL := Archer C2300 + DEVICE_VARIANT := v1 + DEVICE_DTS := broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1 + IMAGES := bin + IMAGE/bin := append-ubi | bcm4908img +endef +TARGET_DEVICES += tplink_archer-c2300-v1 + $(eval $(call BuildImage)) diff --git a/target/linux/bcm4908/image/tplink_archer-c2300-v1/etc/image_version b/target/linux/bcm4908/image/tplink_archer-c2300-v1/etc/image_version new file mode 100644 index 0000000000..4fc5b5c933 --- /dev/null +++ b/target/linux/bcm4908/image/tplink_archer-c2300-v1/etc/image_version @@ -0,0 +1 @@ +5022HNDrc7HND2221446 diff --git a/target/linux/bcm4908/image/tplink_archer-c2300-v1/nvram.nvm b/target/linux/bcm4908/image/tplink_archer-c2300-v1/nvram.nvm new file mode 100755 index 0000000000000000000000000000000000000000..422f391733ce289332309f4c13e19cdaf5399b2c GIT binary patch literal 8691 zcmd5?%d+D(4!xf;ACT%Msi$4#MRzh;WiwN=n4OCfN!t}a6iN49_umf=NJ*3|Rc6^Y ziEW-k0w4%N6p^dGA205%Z?-$w{w)7N9||7{K2m&S_{iU?R{Xy`AG$U7_uE0Kw+g@A zRiCs}W7-^E_$Z&!Uc_T%rY{2Y4;j5uBz z7AJS=i_FU}@{45nZu^_={yeBG`!f6|-bj9<$q9$1zSytgtNi*V_g(wAwf5s66Kc$+ zBWXJLZ-z$`N@qlZna+@u5GhK+KJ5Ks&`K=^ksaJjle(tn!YB1!?e;nQMDFYQVeH}C zAAeB4)}CM}lxUru4l={9lNN_U`d@PVrN&=L_;v5Q&r4sQdAzf?x^J%sMdSLeyEKok zyFMBVsRY@E#9r>yg0jYh2KWAawEBLs7&Y*^F|}?&3wXfU(PwEhU)y0j?iy`y?Ql_j@$`<#7j2 z!=Jsry4L=6ND-t2H0K|+z8*2&*lVwe7_=N4+g={#K#?5u9?w6z-qIv4-2o<#*2%%V z5kY_y76Zvc?)rGNaLiNu0{a|3lMJ5{fzcT6iIg^mIHXCM!N)NwS5ftXma7tg%7c;; zVK;~cs1CawLEU>*(T>VaAM9vMt^r)%?|iTwKgTbZZ4lFX!= zOu5NG8U?|Iv~>p3))`1UZ%SKdAZ?Ag(rWQM{lw8^rBjnfQM0R*xZG25ZlQVvN16S60}D$10?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`k!ctj6XB-#;mqyaPST$!Rgx*duMtkrqJB34q5edBeOaZ7p|Mw| zTWpDvL~;V?e>A9K=lPftxM=^R; +Date: Fri, 5 Mar 2021 13:34:03 +0100 +Subject: [PATCH] dt-bindings: arm: bcm: document TP-Link Archer C2300 binding + +One more BCM4906 based device. + +Signed-off-by: Rafał Miłecki +--- + Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml | 1 + + 1 file changed, 1 insertion(+) + +--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml ++++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml +@@ -21,6 +21,7 @@ properties: + items: + - enum: + - netgear,r8000p ++ - tplink,archer-c2300-v1 + - const: brcm,bcm4906 + - const: brcm,bcm4908 + diff --git a/target/linux/bcm4908/patches-5.4/131-0002-arm64-dts-broadcom-bcm4908-add-TP-Link-Archer-C2300-.patch b/target/linux/bcm4908/patches-5.4/131-0002-arm64-dts-broadcom-bcm4908-add-TP-Link-Archer-C2300-.patch new file mode 100644 index 0000000000..cc1835e799 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/131-0002-arm64-dts-broadcom-bcm4908-add-TP-Link-Archer-C2300-.patch @@ -0,0 +1,207 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 5 Mar 2021 13:36:25 +0100 +Subject: [PATCH] arm64: dts: broadcom: bcm4908: add TP-Link Archer C2300 V1 + +Archer C2300 V1 is a home router based on the BCM4906 (2 CPU cores). It +has 512 MiB of RAM, NAND flash, USB 2.0 and USB 3.0 ports, 4 LAN ports, +1 WAN port. + +Signed-off-by: Rafał Miłecki +--- + arch/arm64/boot/dts/broadcom/bcm4908/Makefile | 1 + + .../bcm4906-tplink-archer-c2300-v1.dts | 182 ++++++++++++++++++ + 2 files changed, 183 insertions(+) + create mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts + +--- a/arch/arm64/boot/dts/broadcom/bcm4908/Makefile ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/Makefile +@@ -1,3 +1,4 @@ + # SPDX-License-Identifier: GPL-2.0 + dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-netgear-r8000p.dtb ++dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-tplink-archer-c2300-v1.dtb + dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-asus-gt-ac5300.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts +@@ -0,0 +1,182 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++ ++#include ++#include ++#include ++ ++#include "bcm4906.dtsi" ++ ++/ { ++ compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908"; ++ model = "TP-Link Archer C2300 V1"; ++ ++ memory@0 { ++ device_type = "memory"; ++ reg = <0x00 0x00 0x00 0x20000000>; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ power-white { ++ function = LED_FUNCTION_POWER; ++ color = ; ++ gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; ++ }; ++ ++ 2ghz { ++ function = "2ghz"; ++ color = ; ++ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; ++ }; ++ ++ 5ghz { ++ function = "5ghz"; ++ color = ; ++ gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wan-amber { ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ wan-blue { ++ function = LED_FUNCTION_WAN; ++ color = ; ++ gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ lan { ++ function = LED_FUNCTION_LAN; ++ color = ; ++ gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ function = LED_FUNCTION_WPS; ++ color = ; ++ gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; ++ }; ++ ++ usb-high-white { ++ function = "usbup"; ++ color = ; ++ gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; ++ }; ++ ++ usb-low-white { ++ function = "usbdown"; ++ color = ; ++ gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; ++ }; ++ ++ brightness { ++ function = LED_FUNCTION_BACKLIGHT; ++ color = ; ++ gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ gpio-keys-polled { ++ compatible = "gpio-keys-polled"; ++ poll-interval = <100>; ++ ++ brightness { ++ label = "LEDs"; ++ linux,code = ; ++ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ label = "WPS"; ++ linux,code = ; ++ gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wifi { ++ label = "WiFi"; ++ linux,code = ; ++ gpios = <&gpio0 22 GPIO_ACTIVE_LOW>; ++ }; ++ ++ restart { ++ label = "Reset"; ++ linux,code = ; ++ gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&usb_phy { ++ brcm,ioc = <1>; ++ status = "okay"; ++}; ++ ++&ehci { ++ status = "okay"; ++}; ++ ++&ohci { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&ports { ++ port@0 { ++ label = "lan4"; ++ }; ++ ++ port@1 { ++ label = "lan3"; ++ }; ++ ++ port@2 { ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ label = "lan1"; ++ }; ++ ++ port@7 { ++ reg = <7>; ++ phy-mode = "internal"; ++ phy-handle = <&phy12>; ++ label = "wan"; ++ }; ++}; ++ ++&nandcs { ++ nand-ecc-strength = <4>; ++ nand-ecc-step-size = <512>; ++ nand-on-flash-bbt; ++ ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ partitions { ++ compatible = "brcm,bcm4908-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "cferom"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ partition@100000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x100000 0x3900000>; ++ }; ++ ++ partition@5800000 { ++ compatible = "brcm,bcm4908-firmware"; ++ reg = <0x3a00000 0x3900000>; ++ }; ++ }; ++};