--- /dev/null
+// 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;
+ };
+ };
+ };
+};
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