From 300bf3e7ed61324eaa2c7e264d345436bf79b305 Mon Sep 17 00:00:00 2001 From: Ahmed Naseef Date: Tue, 18 Aug 2020 17:52:20 +0530 Subject: [PATCH] bcm63xx: Add support for D-Link DSL-2750u rev C1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds support for the D-Link DSL-2750u rev C1. (https://deviwiki.com/wiki/D-Link_DSL-2750U_rev_C1) It uses the same hardware as ADB P.DG A4001N. CPU: Broadcom BCM63281 (320 MHz) RAM: 32M (Winbond W9725G6JB) Flash: 8M (MXIC MX25L6445E) Ethernet: 4x 100 Mbps Wireless: 802.11b/g/n: BCM43225 USB: 1x 2.0 Flash instructions: 1. Assign static IP 192.168.1.100 to PC 2. Unplug the power source 3. Press the RESET button at the router, don't release it yet! 4. Plug the power source.Wait some seconds 5. Release the RESET button 6. Browse to http://192.168.1.1 7. Send the openwrt-bcm63xx-generic-DSL2750U-C1-squashfs-cfe.bin and wait some minutes until the firmware upgrade finish. Signed-off-by: Ahmed Naseef [DTS improvements, proper board patch, refresh patches] Signed-off-by: Álvaro Fernández Rojas Signed-off-by: maurerr --- .../bcm63xx/base-files/etc/board.d/01_leds | 1 + .../bcm63xx/base-files/etc/board.d/02_network | 1 + .../dts/bcm6328-d-link-dsl-2750u-c1.dts | 146 ++++++++++++++++++ target/linux/bcm63xx/image/bcm63xx.mk | 13 ++ .../patches-5.4/512-board_bcm6328.patch | 3 +- .../patches-5.4/513-board-bcm6338.patch | 2 +- .../patches-5.4/514-board_bcm6345.patch | 2 +- .../patches-5.4/515-board-bcm6348.patch | 2 +- .../patches-5.4/516-board-bcm6358.patch | 2 +- .../patches-5.4/517-board_bcm6362.patch | 2 +- .../patches-5.4/518-board_bcm6368.patch | 2 +- .../patches-5.4/519-board_bcm63268.patch | 2 +- ...31-board_bcm6348-bt-voyager-2500v-bb.patch | 2 +- 13 files changed, 171 insertions(+), 9 deletions(-) create mode 100644 target/linux/bcm63xx/dts/bcm6328-d-link-dsl-2750u-c1.dts diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds b/target/linux/bcm63xx/base-files/etc/board.d/01_leds index cfd4cf3c317..bdd69340239 100755 --- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds +++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds @@ -16,6 +16,7 @@ actiontec,r1000h) adb,a4001n|\ comtrend,ar-5315u|\ comtrend,vr-3032u|\ +d-link,dsl-2750u-c1|\ huawei,hg253s-v2|\ nucom,r5010un-v2|\ sagem,fast-2704-v2) diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network b/target/linux/bcm63xx/base-files/etc/board.d/02_network index f02eabe68fd..711b8f8c002 100755 --- a/target/linux/bcm63xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network @@ -31,6 +31,7 @@ comtrend,vr-3025u|\ comtrend,vr-3025un|\ comtrend,vr-3026e|\ d-link,dsl-274xb-f1|\ +d-link,dsl-2750u-c1|\ d-link,dsl-275xb-d1|\ huawei,echolife-hg622|\ huawei,echolife-hg655b|\ diff --git a/target/linux/bcm63xx/dts/bcm6328-d-link-dsl-2750u-c1.dts b/target/linux/bcm63xx/dts/bcm6328-d-link-dsl-2750u-c1.dts new file mode 100644 index 00000000000..09152150392 --- /dev/null +++ b/target/linux/bcm63xx/dts/bcm6328-d-link-dsl-2750u-c1.dts @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "bcm6328.dtsi" + +#include + +/ { + model = "D-Link DSL-2750U rev C1"; + compatible = "d-link,dsl-2750u-c1", "brcm,bcm6328"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + chosen { + bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wifi { + label = "wifi"; + gpios = <&pinctrl 12 1>; + linux,code = ; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + gpios = <&pinctrl 23 1>; + linux,code = ; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + gpios = <&pinctrl 24 1>; + linux,code = ; + debounce-interval = <60>; + }; + }; +}; + +&hsspi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <16666667>; + spi-tx-bus-width = <2>; + spi-rx-bus-width = <2>; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + cfe@0 { + reg = <0x000000 0x010000>; + label = "cfe"; + read-only; + }; + + linux@10000 { + reg = <0x010000 0x7e0000>; + label = "linux"; + compatible = "brcm,bcm963xx-imagetag"; + }; + + nvram@7f0000 { + reg = <0x7f0000 0x010000>; + label = "nvram"; + }; + }; + }; +}; + +&leds { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_leds>; + + led@1 { + reg = <1>; + active-low; + label = "green:inet"; + }; + + led_power_green: led@4 { + reg = <4>; + active-low; + label = "green:power"; + default-state = "on"; + }; + + led@7 { + reg = <7>; + active-low; + label = "red:inet"; + }; + + led@8 { + reg = <8>; + active-low; + label = "red:power"; + }; + + led@9 { + reg = <9>; + active-low; + label = "green:wps"; + }; + + led@10 { + reg = <10>; + active-low; + label = "green:usb"; + }; + + led@11 { + reg = <11>; + active-low; + label = "green:dsl"; + }; +}; + +&pinctrl { + pinctrl_leds: leds { + function = "led"; + pins = "gpio1", "gpio4", "gpio7", + "gpio8", "gpio9", "gpio10", + "gpio11"; + }; +}; + +&uart0 { + status = "okay"; +}; diff --git a/target/linux/bcm63xx/image/bcm63xx.mk b/target/linux/bcm63xx/image/bcm63xx.mk index 15cc549ec4a..d3356040d01 100644 --- a/target/linux/bcm63xx/image/bcm63xx.mk +++ b/target/linux/bcm63xx/image/bcm63xx.mk @@ -571,6 +571,19 @@ define Device/d-link_dsl-274xb-f1 endef TARGET_DEVICES += d-link_dsl-274xb-f1 +define Device/d-link_dsl-2750u-c1 + $(Device/bcm63xx) + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DSL-2750U + DEVICE_VARIANT := C1 + IMAGES += sysupgrade.bin + CFE_BOARD_ID := 963281TAVNG + CHIP_ID := 6328 + FLASH_MB := 8 + DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES) +endef +TARGET_DEVICES += d-link_dsl-2750u-c1 + define Device/d-link_dsl-275xb-d1 $(Device/bcm63xx) DEVICE_VENDOR := D-Link diff --git a/target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch b/target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch index abab912092d..5a2dbdcf85b 100644 --- a/target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch +++ b/target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch @@ -500,7 +500,7 @@ #endif /* CONFIG_BCM63XX_CPU_6328 */ #ifdef CONFIG_BCM63XX_CPU_6338 &board_96338gw, -@@ -742,7 +1228,18 @@ static struct of_device_id const bcm963x +@@ -742,7 +1228,19 @@ static struct of_device_id const bcm963x { .compatible = "sagem,fast-2704n", .data = &board_FAST2704N, }, #endif /* CONFIG_BCM63XX_CPU_6318 */ #ifdef CONFIG_BCM63XX_CPU_6328 @@ -512,6 +512,7 @@ + { .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, }, + { .compatible = "comtrend,ar-5387un", .data = &board_AR5387un, }, + { .compatible = "d-link,dsl-274xb-f1", .data = &board_dsl_274xb_f1, }, ++ { .compatible = "d-link,dsl-2750u-c1", .data = &board_A4001N, }, + { .compatible = "nucom,r5010un-v2", .data = &board_R5010UNV2, }, + { .compatible = "sagem,fast-2704-v2", .data = &board_FAST2704V2, }, + { .compatible = "sercomm,ad1018", .data = &board_AD1018, }, diff --git a/target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch b/target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch index 85c8e6c3909..8ff2a69707b 100644 --- a/target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch +++ b/target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch @@ -42,7 +42,7 @@ #endif /* CONFIG_BCM63XX_CPU_6338 */ #ifdef CONFIG_BCM63XX_CPU_6345 &board_96345gw2, -@@ -1244,6 +1272,8 @@ static struct of_device_id const bcm963x +@@ -1245,6 +1273,8 @@ static struct of_device_id const bcm963x #ifdef CONFIG_BCM63XX_CPU_6338 { .compatible = "brcm,bcm96338gw", .data = &board_96338gw, }, { .compatible = "brcm,bcm96338w", .data = &board_96338w, }, diff --git a/target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch b/target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch index d881555853b..ca200024c2d 100644 --- a/target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch +++ b/target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch @@ -28,7 +28,7 @@ #endif /* CONFIG_BCM63XX_CPU_6345 */ #ifdef CONFIG_BCM63XX_CPU_6348 &board_96348r, -@@ -1277,6 +1291,8 @@ static struct of_device_id const bcm963x +@@ -1278,6 +1292,8 @@ static struct of_device_id const bcm963x #endif /* CONFIG_BCM63XX_CPU_6338 */ #ifdef CONFIG_BCM63XX_CPU_6345 { .compatible = "brcm,bcm96345gw2", .data = &board_96345gw2, }, diff --git a/target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch b/target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch index 1e93c5e4435..eab83113f76 100644 --- a/target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch +++ b/target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch @@ -296,7 +296,7 @@ #endif /* CONFIG_BCM63XX_CPU_6348 */ #ifdef CONFIG_BCM63XX_CPU_6358 &board_96358vw, -@@ -1295,15 +1577,29 @@ static struct of_device_id const bcm963x +@@ -1296,15 +1578,29 @@ static struct of_device_id const bcm963x { .compatible = "dynalink,rta770w", .data = &board_rta770w, }, #endif /* CONFIG_BCM63XX_CPU_6345 */ #ifdef CONFIG_BCM63XX_CPU_6348 diff --git a/target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch b/target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch index 18f813b9b85..4279b0bb133 100644 --- a/target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch +++ b/target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch @@ -357,7 +357,7 @@ #endif /* CONFIG_BCM63XX_CPU_6358 */ }; -@@ -1607,11 +1935,24 @@ static struct of_device_id const bcm963x +@@ -1608,11 +1936,24 @@ static struct of_device_id const bcm963x { .compatible = "alcatel,rg100a", .data = &board_96358vw2, }, { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, }, { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, }, diff --git a/target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch b/target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch index 8e87c0cc55a..ac9d76a52f5 100644 --- a/target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch +++ b/target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch @@ -131,7 +131,7 @@ }; static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -1955,6 +2072,10 @@ static struct of_device_id const bcm963x +@@ -1956,6 +2073,10 @@ static struct of_device_id const bcm963x { .compatible = "telsey,cpva642", .data = &board_CPVA642, }, #endif /* CONFIG_BCM63XX_CPU_6358 */ #ifdef CONFIG_BCM63XX_CPU_6362 diff --git a/target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch b/target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch index e745bf08488..1ba6d5ecd8b 100644 --- a/target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch +++ b/target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch @@ -681,7 +681,7 @@ }; static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -2078,6 +2738,20 @@ static struct of_device_id const bcm963x +@@ -2079,6 +2739,20 @@ static struct of_device_id const bcm963x { .compatible = "sfr,neufbox-6-sercomm-r0", .data = &board_nb6, }, #endif /* CONFIG_BCM63XX_CPU_6362 */ #ifdef CONFIG_BCM63XX_CPU_6368 diff --git a/target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch b/target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch index 2718bbdd365..139f6ad0853 100644 --- a/target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch +++ b/target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch @@ -290,7 +290,7 @@ }; static struct of_device_id const bcm963xx_boards_dt[] = { -@@ -2754,6 +3030,14 @@ static struct of_device_id const bcm963x +@@ -2755,6 +3031,14 @@ static struct of_device_id const bcm963x { .compatible = "zyxel,p870hw-51a-v2", .data = &board_P870HW51A_V2, }, #endif /* CONFIG_BCM63XX_CPU_6368 */ #ifdef CONFIG_BCM63XX_CPU_63268 diff --git a/target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch b/target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch index 750deb6da01..9264becf3e7 100644 --- a/target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch +++ b/target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -3066,6 +3066,22 @@ void __init board_bcm963xx_init(void) +@@ -3067,6 +3067,22 @@ void __init board_bcm963xx_init(void) val &= MPI_CSBASE_BASE_MASK; } boot_addr = (u8 *)KSEG1ADDR(val);