--- /dev/null
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ compatible = "creality,wb-01", "mediatek,mt7628an-soc";
+ model = "Creality WB-01";
+
+ aliases {
+ led-boot = &led_status;
+ led-failsafe = &led_status;
+ led-upgrade = &led_status;
+ led-running = &led_status;
+ label-mac-device = &wmac;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ reset {
+ label = "reset";
+ gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_RESTART>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led_wlan2 {
+ function = LED_FUNCTION_WLAN_2GHZ;
+ color = <LED_COLOR_ID_YELLOW>;
+ gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "phy0tpt";
+ };
+
+ led_lan {
+ function = LED_FUNCTION_LAN;
+ color = <LED_COLOR_ID_BLUE>;
+ gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+ };
+
+ led_status: status {
+ function = LED_FUNCTION_STATUS;
+ color = <LED_COLOR_ID_GREEN>;
+ gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+ };
+
+ led_sd {
+ function = LED_FUNCTION_SD;
+ color = <LED_COLOR_ID_RED>;
+ gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&spi0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <10000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "u-boot";
+ reg = <0x0 0x30000>;
+ read-only;
+ };
+
+ partition@30000 {
+ label = "u-boot-env";
+ reg = <0x30000 0x10000>;
+ read-only;
+ };
+
+ factory: partition@40000 {
+ compatible = "nvmem-cells";
+ label = "factory";
+ reg = <0x40000 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_factory_4: macaddr@4 {
+ reg = <0x04 0x6>;
+ };
+
+ macaddr_factory_28: macaddr@28 {
+ reg = <0x28 0x6>;
+ };
+ };
+ };
+
+ partition@50000 {
+ compatible = "denx,uimage";
+ label = "firmware";
+ reg = <0x50000 0xfb0000>;
+ };
+ };
+ };
+};
+
+&esw {
+ mediatek,portmap = <0x3f>;
+ mediatek,portdisable = <0x3e>;
+};
+
+&state_default {
+ gpio {
+ groups = "wdt", "p3led_an", "p1led_an", "p0led_an", "wled_an";
+ function = "gpio";
+ };
+};
+
+&wmac {
+ status = "okay";
+
+ nvmem-cells = <&macaddr_factory_4>;
+ nvmem-cell-names = "macaddr";
+};
+
+ðernet {
+ nvmem-cells = <&macaddr_factory_28>;
+ nvmem-cell-names = "mac-address";
+};
+
+&pinctrl {
+ ephy-digital;
+
+ sdxc_iot_mode: sdxc_iot_mode {
+ esd {
+ groups = "esd";
+ function = "iot";
+ };
+
+ sdxc {
+ groups = "sdmode";
+ function = "sdxc";
+ };
+ };
+};
+
+&sdhci {
+ status = "okay";
+ pinctrl-0 = <&sdxc_iot_mode>;
+ pinctrl-1 = <&sdxc_iot_mode>;
+ mediatek,cd-low;
+};
+
DEFAULT_SOC := mt7628an
+define Build/creality_wb-01-factory
+ mv $@ $(dir $@)factory.bin
+ $(eval kernel_size=851968)
+ ( \
+ echo '#!/bin/sh'; \
+ echo '[ -z "$$2" ] && file="factory.bin" || file="$$2/factory.bin"'; \
+ echo 'file_size=$$(wc -c < $$file)'; \
+ echo 'rootfs_size=$$((file_size - $(kernel_size)))'; \
+ echo 'mtd_write -o 0 -l $(kernel_size) write $$file Kernel'; \
+ echo 'mtd_write -r -o $(kernel_size) -l $$rootfs_size write $$file RootFS'; \
+ ) > $(dir $@)install.sh
+ tar cjf $@ -C $(dir $@) factory.bin install.sh
+endef
+
define Build/elecom-header
$(eval model_id=$(1))
( \
endef
TARGET_DEVICES += comfast_cf-wr758ac-v2
+define Device/creality_wb-01
+ IMAGE_SIZE := 16064k
+ IMAGES += cxsw_update.tar.bz2
+ IMAGE/cxsw_update.tar.bz2 := $$(sysupgrade_bin) | creality_wb-01-factory
+ DEVICE_VENDOR := Creality
+ DEVICE_MODEL := WB-01
+ DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
+ SUPPORTED_DEVICES += creality_wb-01
+endef
+TARGET_DEVICES += creality_wb-01
+
define Device/cudy_m1200-v1
IMAGE_SIZE := 15872k
DEVICE_VENDOR := Cudy