diff options
-rw-r--r-- | target/linux/ramips/dts/mt7620a_youku_x2.dts | 38 | ||||
-rw-r--r-- | target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi | 2 | ||||
-rw-r--r-- | target/linux/ramips/image/mt7620.mk | 12 | ||||
-rw-r--r-- | target/linux/ramips/mt7620/base-files/etc/board.d/02_network | 5 |
4 files changed, 56 insertions, 1 deletions
diff --git a/target/linux/ramips/dts/mt7620a_youku_x2.dts b/target/linux/ramips/dts/mt7620a_youku_x2.dts new file mode 100644 index 0000000000..ad9e252f65 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_youku_x2.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7620a_youku_yk-l1.dtsi" + +/ { + compatible = "youku,x2", "ralink,mt7620a-soc"; + model = "Youku X2"; +}; + +ðernet { + mediatek,portmap = "wllll"; +}; + +&firmware { + reg = <0x50000 0xfb0000>; +}; + +&led_wlan { + linux,default-trigger = "phy1tpt"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + + led { + led-sources = <2>; + led-active-low; + }; + }; +}; diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi index 210b0d7d19..5af7b343d9 100644 --- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi +++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi @@ -15,7 +15,7 @@ leds { compatible = "gpio-leds"; - wlan { + led_wlan: wlan { label = "blue:wlan"; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index db6ac93b2a..231f6ad47d 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -1273,6 +1273,18 @@ define Device/xiaomi_miwifi-mini endef TARGET_DEVICES += xiaomi_miwifi-mini +define Device/youku_x2 + SOC := mt7620a + IMAGE_SIZE := 16064k + DEVICE_VENDOR := Youku + DEVICE_MODEL := X2 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \ + kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport + UIMAGE_MAGIC := 0x12291000 + UIMAGE_NAME := 400000000000000000001000 +endef +TARGET_DEVICES += youku_x2 + define Device/youku_yk-l1 SOC := mt7620a IMAGE_SIZE := 32448k 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 79df102056..ac1cf5e62a 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -237,6 +237,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "5:lan" "4:wan" "6@eth0" ;; + youku,x2) + ucidef_add_switch "switch0" \ + "1:lan:2" "4:lan:1" "0:wan" "6@eth0" + ;; youku,yk-l1|\ youku,yk-l1c) ucidef_add_switch "switch0" \ @@ -368,6 +372,7 @@ ramips_setup_macs() ohyeah,oy-0001|\ wavlink,wl-wn530hg4|\ wevo,air-duo|\ + youku,x2|\ youku,yk-l1|\ youku,yk-l1c) wan_mac=$(mtd_get_mac_binary factory 0x2e) |