bcm63xx: Add support for D-Link DSL-2750u rev C1
authorAhmed Naseef <naseefkm@gmail.com>
Tue, 18 Aug 2020 12:22:20 +0000 (17:52 +0530)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 5 Dec 2020 09:51:22 +0000 (10:51 +0100)
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 <naseefkm@gmail.com>
[DTS improvements, proper board patch, refresh patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
13 files changed:
target/linux/bcm63xx/base-files/etc/board.d/01_leds
target/linux/bcm63xx/base-files/etc/board.d/02_network
target/linux/bcm63xx/dts/bcm6328-d-link-dsl-2750u-c1.dts [new file with mode: 0644]
target/linux/bcm63xx/image/bcm63xx.mk
target/linux/bcm63xx/patches-5.4/512-board_bcm6328.patch
target/linux/bcm63xx/patches-5.4/513-board-bcm6338.patch
target/linux/bcm63xx/patches-5.4/514-board_bcm6345.patch
target/linux/bcm63xx/patches-5.4/515-board-bcm6348.patch
target/linux/bcm63xx/patches-5.4/516-board-bcm6358.patch
target/linux/bcm63xx/patches-5.4/517-board_bcm6362.patch
target/linux/bcm63xx/patches-5.4/518-board_bcm6368.patch
target/linux/bcm63xx/patches-5.4/519-board_bcm63268.patch
target/linux/bcm63xx/patches-5.4/531-board_bcm6348-bt-voyager-2500v-bb.patch

index cfd4cf3c317faf32f4fd9c5c08b57dcdf1648f3f..bdd6934023981c8da49f15bbd3dfb09dce439dbe 100755 (executable)
@@ -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)
index f02eabe68fdacc4a803967ac5624917c15f66c26..711b8f8c00247d896ad91a9b8b1f4af73d620a65 100755 (executable)
@@ -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 (file)
index 0000000..0915215
--- /dev/null
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "bcm6328.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+       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 = <KEY_WLAN>;
+                       debounce-interval = <60>;
+               };
+
+               reset {
+                       label = "reset";
+                       gpios = <&pinctrl 23 1>;
+                       linux,code = <KEY_RESTART>;
+                       debounce-interval = <60>;
+               };
+
+               wps {
+                       label = "wps";
+                       gpios = <&pinctrl 24 1>;
+                       linux,code = <KEY_WPS_BUTTON>;
+                       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";
+};
index 15cc549ec4a0a7d1e50f4bdc64c02d8a8cd3174c..d3356040d015c69eebc5233e122c49944651006e 100644 (file)
@@ -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
index abab912092df6f13435d98b068f5c8ad6c1e2c35..5a2dbdcf85b4b10fc9b648e09073cee8036202ea 100644 (file)
  #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
 +      { .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, },
index 85c8e6c3909d1cd9a9c7a219dd4c7a82d0c39891..8ff2a69707b17dd482c8274008e6f2dd7137a845 100644 (file)
@@ -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, },
index d881555853b479ead59d4861c34fa06024d04304..ca200024c2d03d35aa2ce790fc87b68a53b17a71 100644 (file)
@@ -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, },
index 1e93c5e443545e3492c59f4cca56170e52882d6d..eab83113f76da1dfe515988b2d5e7328f352164e 100644 (file)
  #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
index 18f813b9b85aa64d16f218bd1ab777a1f7d2c217..4279b0bb133eb7a4bb3cafe105082af5cb89f984 100644 (file)
  #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, },
index 8e87c0cc55adb89772c9aef93d0f94b89eec242e..ac9d76a52f5184a6271bf64bb8eeee688a47be58 100644 (file)
  };
  
  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
index e745bf084880e7b3c988afdcdff8c636864cd7bf..1ba6d5ecd8b42e8b1222c60933ab9405eac5730b 100644 (file)
  };
  
  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
index 2718bbdd3657691a42c2b03645040e48af771c04..139f6ad08536310150ccff3bc9e7c6bfa0b060c1 100644 (file)
  };
  
  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
index 750deb6da016b9165e2bad4285d380dbb2388300..9264becf3e7ec6be05a391b5d84fa407373456a5 100644 (file)
@@ -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);