Adding support for Buffalo WSR-2533DHPLS

Hi,

I bought two of these thinking they were the same as the supported Buffalo WSR-2533DHPL.
They were not.

Specs:

  • MT7621AT soc
  • 128MiB NAND (Winbond W29N01HV)
  • 256MB DDR3
    2x MT7615N for wifi

I got it running with wifi and LAN support from a tftp-booted image, but I'm having issues getting it to boot from flash.
Work-in-progress in my github fork: https://github.com/audunmg/openwrt/tree/buffalo_wsr-2533dhpls

Uboot needs trx-magic to be 0x534c4844 (Original image starts with DHLS...)
So I set trx-magic to that (with trx -M 0x534c4844) and uboot accepts and boots my image, but the trx-partitions are no longer detected.
I've set the devicetree partition to this:

               partition@180000 {
                       compatible = "brcm,trx";
                       brcm,trx-magic = <0x534c4844>;
                       label = "firmware";
                       reg = <0x180000 0x1800000>;
               };

I've tried reversing the bytes, but the trx-partitions are not getting detected.

Any help is greatly appreciated, especially if you see something else I'm doing wrong.

Finally figured it out.

brcm,trx-magic in device-tree is parsed by ./drivers/mtd/mtdsplit/mtdsplit_trx.c in the kernel, and not by ./drivers/mtd/mtdsplit/mtdsplit_trx.c (enabled with CONFIG_MTD_SPLIT_TRX_FW).

Setting CONFIG_MTD_PARSER_TRX=y in the kernel config and setting brcm,trx-magic to the same as the parameter to trx -M works and I can finally flash an image to the router now.

1 Like