]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: add support for Buffalo WSR-2533DHP3 23497/head
authorTaiga Ogawa <zectaiga@gmail.com>
Sat, 23 May 2026 17:41:12 +0000 (17:41 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 25 May 2026 21:08:06 +0000 (23:08 +0200)
Buffalo WSR-2533DHP3 is a 2.4/5 GHz band 11ac router, based on
MT7622B.

Specification:

- SoC         : MediaTek MT7622B
- RAM         : DDR3 256 MiB
- Flash       : SPI-NAND 128 MiB (Winbond W25N01GVZEIG)
- WLAN        : 2.4/5 GHz 4T4R
  - 2.4 GHz   : MediaTek MT7622B (SoC)
  - 5 GHz     : MediaTek MT7615
- Ethernet    : 5x 10/100/1000 Mbps
  - Switch    : MediaTek MT7531
- LEDs/Keys   : 6x/5x (2x: buttons, 3x: slide-switches)
- UART        : through-hole on PCB (J4)
  - assignment: 3.3V, GND, TX, RX from tri-angle marking
  - settings  : 115200n8
- Power       : 12 VDC, 1.5 A

Flash instruction using factory.bin image:

1. Boot WSR-2533DHP3 with "Router" mode
2. Access to "http://192.168.11.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory.bin image and click update ("更新実行")
   button
4. Wait ~120 seconds to complete flashing

Note:

- This device has 2x OS images on flash. The first one will always be
  used for booting and the secondary is for backup.

Tested:

- initramfs boot
- factory.bin installation from OEM WebUI
- LAN port assignment
- WAN DHCP
- NAT routing
- 2.4 GHz Wi-Fi
- 5 GHz Wi-Fi
- LEDs
- Buttons

MAC Addresses:

LAN    : 58:27:8C:xx:xx:90 (board_data, mac (text))
WAN    : 58:27:8C:xx:xx:90 (board_data, mac (text))
2.4 GHz: 58:27:8C:xx:xx:91
5 GHz  : 58:27:8C:xx:xx:94

Signed-off-by: Taiga Ogawa <zectaiga@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23497
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-tools/uboot-envtools/files/mediatek_mt7622
target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp3.dts [new file with mode: 0644]
target/linux/mediatek/image/mt7622.mk
target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
target/linux/mediatek/mt7622/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
target/linux/mediatek/mt7622/base-files/etc/uci-defaults/09_fix_crc
target/linux/mediatek/mt7622/base-files/lib/upgrade/buffalo.sh
target/linux/mediatek/mt7622/base-files/lib/upgrade/platform.sh

index 51d620fdb04c05a06ebf22c574edebcd02322eb0..805261bcdad7a6faf204b844327297dbeaeacf82 100644 (file)
@@ -34,7 +34,8 @@ linksys,e8450-ubi)
                ;;
        esac
        ;;
-buffalo,wsr-2533dhp2)
+buffalo,wsr-2533dhp2|\
+buffalo,wsr-2533dhp3)
        ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x20000"
        ;;
 dlink,eagle-pro-ai-m32-a1|\
diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp3.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp3.dts
new file mode 100644 (file)
index 0000000..09cba0f
--- /dev/null
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include <dt-bindings/pinctrl/mt65xx.h>
+
+#include "mt7622-buffalo-wsr.dtsi"
+
+/ {
+       model = "Buffalo WSR-2533DHP3";
+       compatible = "buffalo,wsr-2533dhp3", "mediatek,mt7622";
+
+       memory@40000000 {
+               reg = <0 0x40000000 0 0x0f000000>;
+               device_type = "memory";
+       };
+};
+
+&pio {
+       /* Serial NAND is shared pin with SPI-NOR */
+       serial_nand_pins: serial-nand-pins {
+               mux {
+                       function = "flash";
+                       groups = "snfi";
+               };
+
+               conf-cmd-dat {
+                       pins = "SPI_WP", "SPI_HOLD", "SPI_MOSI",
+                              "SPI_MISO", "SPI_CS";
+                       input-enable;
+                       drive-strength = <MTK_DRIVE_16mA>;
+                       bias-pull-up;
+               };
+
+               conf-clk {
+                       pins = "SPI_CLK";
+                       drive-strength = <MTK_DRIVE_16mA>;
+                       bias-pull-down;
+               };
+       };
+};
+
+&mdio {
+       switch@1f {
+               compatible = "mediatek,mt7531";
+               reg = <31>;
+               reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               label = "lan4";
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               label = "lan3";
+                       };
+
+                       port@2 {
+                               reg = <2>;
+                               label = "lan2";
+                       };
+
+                       port@3 {
+                               reg = <3>;
+                               label = "lan1";
+                       };
+
+                       port@4 {
+                               reg = <4>;
+                               label = "wan";
+                       };
+
+                       port@6 {
+                               reg = <6>;
+                               label = "cpu";
+                               ethernet = <&gmac0>;
+                               phy-connection-type = "2500base-x";
+
+                               fixed-link {
+                                       speed = <2500>;
+                                       full-duplex;
+                                       pause;
+                               };
+                       };
+               };
+       };
+};
+
+&snfi {
+       pinctrl-names = "default";
+       pinctrl-0 = <&serial_nand_pins>;
+       status = "okay";
+
+       flash@0 {
+               compatible = "spi-nand";
+               reg = <0>;
+               spi-max-frequency = <104000000>;
+               nand-ecc-engine = <&snfi>;
+               mediatek,bmt-v2;
+               mediatek,bmt-table-size = <0x1000>;
+               /*
+                * - Preloader - (kernel (6MiB, in firmware))
+                * - Kernel2 - board_data
+                */
+               mediatek,bmt-remap-range = <0x0 0x800000>,
+                                          <0x3400000 0x3600000>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "Preloader";
+                               reg = <0x0 0x80000>;
+                               read-only;
+                       };
+
+                       partition@80000 {
+                               label = "ATF";
+                               reg = <0x80000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@c0000 {
+                               label = "u-boot";
+                               reg = <0xc0000 0x80000>;
+                               read-only;
+                       };
+
+                       partition@140000 {
+                               label = "u-boot-env";
+                               reg = <0x140000 0x80000>;
+                               read-only;
+                       };
+
+                       factory: partition@1c0000 {
+                               label = "factory";
+                               reg = <0x1c0000 0x40000>;
+                               read-only;
+                       };
+
+                       partition@200000 {
+                               compatible = "brcm,trx";
+                               brcm,trx-magic = <0x33504844>;
+                               label = "firmware";
+                               reg = <0x200000 0x3200000>;
+                       };
+
+                       partition@3400000 {
+                               label = "Kernel2";
+                               reg = <0x3400000 0x3200000>;
+                       };
+
+                       partition@6600000 {
+                               label = "glbcfg";
+                               reg = <0x6600000 0x200000>;
+                               read-only;
+                       };
+
+                       partition@6800000 {
+                               label = "board_data";
+                               reg = <0x6800000 0x200000>;
+                               read-only;
+                       };
+               };
+       };
+};
index 14d1330b3629ed8af5a345bf98e6177cf2590e6f..a16c4e856be7631336664aab320f4b45b4b08148 100644 (file)
@@ -163,6 +163,16 @@ define Device/buffalo_wsr-2533dhp2
 endef
 TARGET_DEVICES += buffalo_wsr-2533dhp2
 
+define Device/buffalo_wsr-2533dhp3
+  $(Device/buffalo_wsr)
+  DEVICE_MODEL := WSR-2533DHP3
+  DEVICE_DTS := mt7622-buffalo-wsr-2533dhp3
+  IMAGE_SIZE := 51200k
+  BUFFALO_TRX_MAGIC := 0x33504844
+  DEVICE_PACKAGES := kmod-mt7615-firmware
+endef
+TARGET_DEVICES += buffalo_wsr-2533dhp3
+
 define Device/buffalo_wsr-3200ax4s
   $(Device/buffalo_wsr)
   DEVICE_MODEL := WSR-3200AX4S
index ff4ff0c480c1f519d3057281dc0b43f2e612b30e..b83d03e6b985c818b52e09b0e32a3706806d90f8 100644 (file)
@@ -54,6 +54,7 @@ mediatek_setup_macs()
        local label_mac=""
 
        case $board in
+       buffalo,wsr-2533dhp3|\
        buffalo,wsr-3200ax4s)
                lan_mac=$(mtd_get_mac_ascii board_data "mac")
                wan_mac=$lan_mac
index 7ee9f24071c5982ab0079dbfa4526c277a1202f7..cf7ad823912318e4a420ad1c8e66e501cd96a5af 100644 (file)
@@ -13,6 +13,11 @@ case "$board" in
        bananapi,bpi-r64)
                [ "$PHYNBR" = "0" ] && macaddr_add $(cat /sys/class/net/eth0/address) 2 > /sys${DEVPATH}/macaddress
                ;;
+       buffalo,wsr-2533dhp3)
+               basemac=$(mtd_get_mac_ascii board_data "mac")
+               [ "$PHYNBR" = "0" ] && macaddr_add $basemac 4 > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" = "1" ] && macaddr_add $basemac 1 > /sys${DEVPATH}/macaddress
+               ;;
        buffalo,wsr-3200ax4s)
                basemac=$(mtd_get_mac_ascii board_data "mac")
                [ "$PHYNBR" = "0" ] && macaddr_add $basemac 1 > /sys${DEVPATH}/macaddress
index 25c8a0359ba0934ea8e22c94fab80096e3f7bc62..f8c7b7a01f615768407c03511284b7a21f945e96 100644 (file)
@@ -16,6 +16,7 @@ case "$(board_name)" in
 buffalo,wsr-2533dhp2)
        fixup_trx_crc 0x44485032
        ;;
+buffalo,wsr-2533dhp3|\
 buffalo,wsr-3200ax4s)
        fixup_trx_crc 0x44485033
        ;;
index fcfea36966d255e5ba3d48ae5e1391e4869beeee..267b10cb97ad78ff4bb2013e4754faddb8e398b2 100644 (file)
@@ -53,6 +53,7 @@ case "$(board_name)" in
 buffalo,wsr-2533dhp2)
        BUFFALO_TRX_MAGIC="44485032" # "DHP2"
        ;;
+buffalo,wsr-2533dhp3|\
 buffalo,wsr-3200ax4s)
        BUFFALO_TRX_MAGIC="44485033" # "DHP3"
        ;;
index 471a8a127d8c139d22bd6f7467005d6bdc1debcb..8674339f06857d0e20d2e90265ff23c00e71b84e 100755 (executable)
@@ -15,6 +15,7 @@ platform_do_upgrade() {
                fit_do_upgrade "$1"
                ;;
        buffalo,wsr-2533dhp2|\
+       buffalo,wsr-2533dhp3|\
        buffalo,wsr-3200ax4s)
                buffalo_do_upgrade "$1"
                ;;
@@ -56,6 +57,7 @@ platform_check_image() {
 
        case "$board" in
        buffalo,wsr-2533dhp2|\
+       buffalo,wsr-2533dhp3|\
        buffalo,wsr-3200ax4s)
                buffalo_check_image "$board" "$magic" "$1" || return 1
                ;;