brcm63xx: move DSL-275XB to DT
authorJonas Gorski <jogo@openwrt.org>
Mon, 30 Mar 2015 20:21:15 +0000 (20:21 +0000)
committerJonas Gorski <jogo@openwrt.org>
Mon, 30 Mar 2015 20:21:15 +0000 (20:21 +0000)
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 45168

target/linux/brcm63xx/base-files/lib/brcm63xx.sh
target/linux/brcm63xx/dts/dsl-275xb-d.dts [new file with mode: 0644]
target/linux/brcm63xx/image/Makefile
target/linux/brcm63xx/patches-3.18/567-board_dsl-2751b_e1.patch
target/linux/brcm63xx/patches-3.18/568-board_DGND3700v1_3800B.patch
target/linux/brcm63xx/patches-3.18/569-board_homehub2a.patch
target/linux/brcm63xx/profiles/d-link.mk

index 159537d1349e10bd3db95861588eed81f4b66737..13406552c312e703ee02f404caeeaefc98841905 100755 (executable)
@@ -120,6 +120,9 @@ brcm63xx_dt_detect() {
        "D-Link DSL-2740B/DSL-2741B rev F1")
                board_name="dsl-274xb-f"
                ;;
+       "D-Link DSL-2750B/DSL-2751 rev D1")
+               board_name="dsl-275xb-d"
+               ;;
        "D-Link DVA-G3810BN/TL")
                board_name="dva-g3810bn"
                ;;
diff --git a/target/linux/brcm63xx/dts/dsl-275xb-d.dts b/target/linux/brcm63xx/dts/dsl-275xb-d.dts
new file mode 100644 (file)
index 0000000..44c4c5e
--- /dev/null
@@ -0,0 +1,75 @@
+/dts-v1/;
+
+/include/ "bcm6318.dtsi"
+
+/ {
+       model = "D-Link DSL-2750B/DSL-2751 rev D1";
+       compatible = "d-link,dsl-275xb-d", "brcm,bcm6318";
+
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               poll-interval = <20>;
+               debounce-interval = <60>;
+
+               wifi {
+                       label = "wifi";
+                       gpios = <&gpio0 2 1>;
+                       linux,code = <0xee>;
+               };
+
+               wps {
+                       label = "wps";
+                       gpios = <&gpio1 1 1>;
+                       linux,code = <0x211>;
+               };
+
+               reset {
+                       label = "reset";
+                       gpios = <&gpio1 2 1>;
+                       linux,code = <0x198>;
+               };
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               power_green {
+                       label = "dsl-275xb:green:power";
+                       gpios = <&gpio0 3 1>;
+                       default-state = "on";
+               };
+
+               inet_green {
+                       label = "dsl-275xb:green:inet";
+                       gpios = <&gpio0 8 1>;
+               };
+
+               inet_red {
+                       label = "dsl-275xb:red:inet-fail";
+                       gpios = <&gpio0 9 1>;
+               };
+
+               power_red {
+                       label = "dsl-275xb:red:post-failed";
+                       gpios = <&gpio0 11 1>;
+               };
+
+               wps_blue {
+                       label = "dsl-275xb:blue:wps";
+                       gpios = <&gpio0 16 1>;
+               };
+
+               dsl_green {
+                       label = "dsl-275xb:green:dsl";
+                       gpios = <&gpio0 17 1>;
+               };
+
+               usb_green {
+                       /* not user controllable? */
+                       label = "dsl-275xb:green:usb";
+                       gpios = <&gpio1 17 1>;
+               };
+       };
+};
index 0727343ab76df41530ff0104cb6120e2bd1bde0e..ae84b1da09aacbda9289b825636257846180b4b4 100755 (executable)
@@ -339,6 +339,8 @@ $(eval $(call ImageDTB,CFEDTB,DSL274XB_C,DSL274XB-C3,dsl-274xb-c,AW4139,6358))
 # D-Link DSL-2740B/DSL-2741B, rev F1
 $(eval $(call ImageDTB,CFEDTB,DSL274XB_F,DSL274XB-F1-EU,dsl-274xb-f,AW4339U,6328,--signature2 "4.06.01.EUF1" --pad 4))
 $(eval $(call ImageDTB,CFEDTB,DSL274XB_F,DSL274XB-F1-AU,dsl-274xb-f,AW4339U,6328,--signature2 "4.06.01.AUF1" --pad 4))
+# D-Link DSL-2750B/DSL-2751, rev D1
+$(eval $(call ImageDTB,Dummy,DSL275XB_D,DSL275XB-D1,dsl-275xb-d,AW5200U,6318, --pad 4))
 # D-Link DVA-G3810BN/TL
 $(eval $(call ImageDTB,CFEDTB,DVAG3810BN,DVAG3810BN,dva-g3810bn_tl,96358VW,6358))
 # Davolink DV-201AMR
index fe7b544cffa4f4a1ae8d5477066f6d382ff4c335..dc2fcc3481e8383e4c688f27e806481b1811e62d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -156,6 +156,141 @@ static struct board_info __initdata boar
+@@ -156,6 +156,75 @@ static struct board_info __initdata boar
                },
        },
  };
 +              },
 +      },
 +
-+      .leds = {
-+              {
-+                      .name           = "dsl-275xb:green:power",
-+                      .gpio           = 3,
-+                      .active_low     = 1,
-+                      .default_trigger = "default-on",
-+              },
-+              {
-+                      .name           = "dsl-275xb:green:inet",
-+                      .gpio           = 8,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-275xb:red:inet-fail",
-+                      .gpio           = 9,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-275xb:red:post-failed",
-+                      .gpio           = 11,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-275xb:wps:blue",
-+                      .gpio           = 16,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-275xb:green:dsl",
-+                      .gpio           = 17,
-+                      .active_low     = 1,
-+              },
-+              {
-+                      .name           = "dsl-275xb:green:usb",
-+                      .gpio           = 49, /* FIXME: does not work! */
-+                      .active_low     = 1,
-+              },
-+      },
-+
-+      .buttons = {
-+              {
-+                      .desc                   = "wlan",
-+                      .gpio                   = 2,
-+                      .active_low             = 1,
-+                      .type                   = EV_KEY,
-+                      .code                   = KEY_WLAN,
-+                      .debounce_interval      = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+              },
-+              {
-+                      .desc                   = "wps",
-+                      .gpio                   = 33,
-+                      .active_low             = 1,
-+                      .type                   = EV_KEY,
-+                      .code                   = KEY_WPS_BUTTON,
-+                      .debounce_interval      = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+              },
-+              {
-+                      .desc                   = "reset",
-+                      .gpio                   = 34,
-+                      .active_low             = 1,
-+                      .type                   = EV_KEY,
-+                      .code                   = KEY_RESTART,
-+                      .debounce_interval      = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
-+              },
-+      },
-+
 +      .fallback_sprom = {
 +              .type                           = SPROM_BCM43217,
 +              .pci_bus                        = 1,
  #endif /* CONFIG_BCM63XX_CPU_6318 */
  
  /*
-@@ -2190,6 +2325,7 @@ static const struct board_info __initcon
+@@ -2190,6 +2259,7 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6318
        &board_96318ref,
        &board_96318ref_p300,
  #endif
  #ifdef CONFIG_BCM63XX_CPU_6328
        &board_96328avng,
+@@ -2283,6 +2353,7 @@ static struct of_device_id const bcm963x
+ #ifdef CONFIG_BCM63XX_CPU_6318
+       { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, },
+       { .compatible = "brcm,bcm96318ref_p300", .data = &board_96318ref_p300, },
++      { .compatible = "d-link,dsl-275xb-d", .data = &board_dsl_2751b_d1, },
+ #endif
+ #ifdef CONFIG_BCM63XX_CPU_6328
+       { .compatible = "adb,a4001n", .data = &board_A4001N, },
index 2eb6136f231df7cf87a23f1f40bf2067abe9f802..250359b0174289132263ba6c7efffd336cc88044 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1928,6 +1928,48 @@ static struct board_info __initdata boar
+@@ -1862,6 +1862,48 @@ static struct board_info __initdata boar
        .has_ehci0 = 1,
  };
  
@@ -49,7 +49,7 @@
  static struct sprom_fixup __initdata vr3025u_fixups[] = {
        { .offset = 97, .value = 0xfeb3 },
        { .offset = 98, .value = 0x1618 },
-@@ -2399,6 +2441,7 @@ static const struct board_info __initcon
+@@ -2333,6 +2375,7 @@ static const struct board_info __initcon
  #ifdef CONFIG_BCM63XX_CPU_6368
        &board_96368mvwg,
        &board_96368mvngr,
@@ -57,7 +57,7 @@
        &board_P870HW51A_V2,
        &board_VR3025u,
        &board_VR3025un,
-@@ -2500,6 +2543,7 @@ static struct of_device_id const bcm963x
+@@ -2435,6 +2478,7 @@ static struct of_device_id const bcm963x
        { .compatible = "comtrend,vr-3025u", .data = &board_VR3025u, },
        { .compatible = "comtrend,vr-3025un", .data = &board_VR3025un, },
        { .compatible = "comtrend,wap-5813n", .data = &board_WAP5813n, },
index 0f05d4cce094cfe23767cedf77c84442e02cd336..83f3b53fba57e9e26c0c5119933b9f47ed11aa2d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -1544,6 +1544,32 @@ static struct board_info __initdata boar
+@@ -1478,6 +1478,32 @@ static struct board_info __initdata boar
        },
  };
  
@@ -33,7 +33,7 @@
  static struct board_info __initdata board_HW520 = {
        .name                           = "HW6358GW_B",
        .expected_cpu_id                = 0x6358,
-@@ -2424,6 +2450,7 @@ static const struct board_info __initcon
+@@ -2358,6 +2384,7 @@ static const struct board_info __initcon
        &board_nb4_ser_r0,
        &board_nb4_fxc_r1,
        &board_ct6373_1,
@@ -41,7 +41,7 @@
        &board_HW520,
        &board_HW553,
        &board_HW556_A,
-@@ -2532,6 +2559,7 @@ static struct of_device_id const bcm963x
+@@ -2467,6 +2494,7 @@ static struct of_device_id const bcm963x
        { .compatible = "sfr,nb4-fxc-r1", .data = &board_nb4_fxc_r1, },
        { .compatible = "t-com,spw303v", .data = &board_spw303v, },
        { .compatible = "telsey,cpva642", .data = &board_CPVA642, },
index ede72b23251f4863dc9cd262bd9c4e639e6e868a..1bd5fc80701a14f08a9147ec4d436cdaabd9ddc5 100644 (file)
@@ -51,6 +51,15 @@ define Profile/DSL274XB_F/Description
 endef
 $(eval $(call Profile,DSL274XB_F))
 
+define Profile/DSL275XB_D
+  NAME:=D-Link DSL-2750B/DSL-2751 rev D1
+  PACKAGES:=kmod-b43 wpad-mini kmod-usb-ohci kmod-usb2
+endef
+define Profile/DSL275XB_D/Description
+  Package set optimized for DSL-2750B/DSL-2751 rev D1.
+endef
+$(eval $(call Profile,DSL275XB_D))
+
 define Profile/DVAG3810BN
   NAME:=D-Link DVA-G3810BN/TL
   PACKAGES:=kmod-b43 wpad-mini \