diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dts b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dts new file mode 100644 index 0000000000..5155318b0c --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a_youku_yk-l1.dtsi" + +/ { + compatible = "youku,yk-l1", "ralink,mt7620a-soc"; + model = "Youku YK-L1"; +}; + +&firmware { + reg = <0x50000 0x1fb0000>; +}; diff --git a/target/linux/ramips/dts/mt7620a_youku_yk1.dts b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi similarity index 92% rename from target/linux/ramips/dts/mt7620a_youku_yk1.dts rename to target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index f1c4f264a1..61062a3179 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk1.dts +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -4,9 +4,6 @@ #include / { - compatible = "youku,yk1", "ralink,mt7620a-soc"; - model = "YOUKU YK1"; - aliases { led-boot = &led_power; led-failsafe = &led_power; @@ -63,7 +60,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <80000000>; - broken-flash-reset; m25p,fast-read; partitions { @@ -89,10 +85,10 @@ read-only; }; - partition@50000 { + firmware: partition@50000 { compatible = "denx,uimage"; label = "firmware"; - reg = <0x50000 0x1fb0000>; + /* reg property is set based on flash size in DTS files */ }; }; }; diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1c.dts b/target/linux/ramips/dts/mt7620a_youku_yk-l1c.dts new file mode 100644 index 0000000000..c59f0101bd --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1c.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a_youku_yk-l1.dtsi" + +/ { + compatible = "youku,yk-l1c", "ralink,mt7620a-soc"; + model = "Youku YK-L1c"; +}; + +&firmware { + reg = <0x50000 0xfb0000>; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 8d9c6c2961..436a439b8f 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -1133,16 +1133,26 @@ define Device/xiaomi_miwifi-r3 endef TARGET_DEVICES += xiaomi_miwifi-r3 -define Device/youku_yk1 +define Device/youku_yk-l1 SOC := mt7620a IMAGE_SIZE := 32448k - DEVICE_VENDOR := YOUKU - DEVICE_MODEL := YK1 + DEVICE_VENDOR := Youku + DEVICE_MODEL := YK-L1 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \ kmod-usb-ledtrig-usbport - SUPPORTED_DEVICES += youku-yk1 + SUPPORTED_DEVICES += youku-yk1 youku,yk1 endef -TARGET_DEVICES += youku_yk1 +TARGET_DEVICES += youku_yk-l1 + +define Device/youku_yk-l1c + SOC := mt7620a + IMAGE_SIZE := 16064k + DEVICE_VENDOR := Youku + DEVICE_MODEL := YK-L1c + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \ + kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += youku_yk-l1c define Device/yukai_bocco SOC := mt7620a diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 404b00e4bd..067c377a23 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -223,7 +223,8 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "4:lan" "0:wan" "6@eth0" ;; - youku,yk1) + youku,yk-l1|\ + youku,yk-l1c) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "4:wan" "6@eth0" ;; @@ -344,8 +345,9 @@ ramips_setup_macs() ;; lenovo,newifi-y1|\ lenovo,newifi-y1s|\ - ohyeah,oy-0001) - youku,yk1) + ohyeah,oy-0001|\ + youku,yk-l1|\ + youku,yk-l1c) wan_mac=$(mtd_get_mac_binary factory 0x2e) ;; linksys,e1700)