mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-15 18:03:30 +00:00
filogic: improve HUASIFEI WH3000 support
This commit is contained in:
parent
8c11125e5e
commit
b50369007d
@ -1,4 +1,4 @@
|
|||||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
|
||||||
@ -43,38 +43,21 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
gpio-leds {
|
||||||
compatible = "gpio-leds";
|
compatible = "gpio-leds";
|
||||||
|
|
||||||
led_sys_red: led-0 {
|
led_sys_red: led-0 {
|
||||||
function = LED_FUNCTION_STATUS;
|
|
||||||
color = <LED_COLOR_ID_RED>;
|
color = <LED_COLOR_ID_RED>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
gpios = <&pio 11 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
led_sys_green: led-1 {
|
led_sys_green: led-1 {
|
||||||
function = LED_FUNCTION_STATUS;
|
|
||||||
color = <LED_COLOR_ID_GREEN>;
|
color = <LED_COLOR_ID_GREEN>;
|
||||||
|
function = LED_FUNCTION_STATUS;
|
||||||
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
gpios = <&pio 10 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
usb_vbus: regulator-usb {
|
|
||||||
compatible = "regulator-fixed";
|
|
||||||
regulator-name = "usb-vbus";
|
|
||||||
regulator-min-microvolt = <5000000>;
|
|
||||||
regulator-max-microvolt = <5000000>;
|
|
||||||
gpios = <&pio 9 GPIO_ACTIVE_LOW>;
|
|
||||||
regulator-boot-on;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&watchdog {
|
|
||||||
status = "okay";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ð {
|
ð {
|
||||||
@ -87,6 +70,9 @@
|
|||||||
reg = <0>;
|
reg = <0>;
|
||||||
phy-mode = "2500base-x";
|
phy-mode = "2500base-x";
|
||||||
phy-handle = <&phy1>;
|
phy-handle = <&phy1>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_factory_4 2>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
|
|
||||||
gmac1: mac@1 {
|
gmac1: mac@1 {
|
||||||
@ -94,11 +80,14 @@
|
|||||||
reg = <1>;
|
reg = <1>;
|
||||||
phy-mode = "gmii";
|
phy-mode = "gmii";
|
||||||
phy-handle = <&int_gbe_phy>;
|
phy-handle = <&int_gbe_phy>;
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_factory_4 3>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&mdio_bus {
|
&mdio_bus {
|
||||||
phy1: phy@1 {
|
phy1: ethernet-phy@1 {
|
||||||
compatible = "ethernet-phy-ieee802.3-c45";
|
compatible = "ethernet-phy-ieee802.3-c45";
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
reset-assert-us = <100000>;
|
reset-assert-us = <100000>;
|
||||||
@ -110,6 +99,49 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&mmc0 {
|
||||||
|
bus-width = <8>;
|
||||||
|
cap-mmc-highspeed;
|
||||||
|
max-frequency = <52000000>;
|
||||||
|
non-removable;
|
||||||
|
pinctrl-names = "default", "state_uhs";
|
||||||
|
pinctrl-0 = <&mmc0_pins_default>;
|
||||||
|
pinctrl-1 = <&mmc0_pins_uhs>;
|
||||||
|
vmmc-supply = <®_3p3v>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
card@0 {
|
||||||
|
compatible = "mmc-card";
|
||||||
|
reg = <0>;
|
||||||
|
|
||||||
|
block {
|
||||||
|
compatible = "block-device";
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
block-partition-factory {
|
||||||
|
partname = "factory";
|
||||||
|
|
||||||
|
nvmem-layout {
|
||||||
|
compatible = "fixed-layout";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
eeprom_factory_0: eeprom@0 {
|
||||||
|
reg = <0x0 0x1000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_factory_4: macaddr@4 {
|
||||||
|
compatible = "mac-base";
|
||||||
|
reg = <0x4 0x6>;
|
||||||
|
#nvmem-cell-cells = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
&pio {
|
&pio {
|
||||||
mmc0_pins_default: mmc0-pins-default {
|
mmc0_pins_default: mmc0-pins-default {
|
||||||
mux {
|
mux {
|
||||||
@ -125,27 +157,24 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&usb_phy {
|
&usb_phy {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&watchdog {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&wifi {
|
||||||
|
nvmem-cells = <&eeprom_factory_0>;
|
||||||
|
nvmem-cell-names = "eeprom";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&xhci {
|
&xhci {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
vbus-supply = <&usb_vbus>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&wifi {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&mmc0 {
|
|
||||||
pinctrl-names = "default", "state_uhs";
|
|
||||||
pinctrl-0 = <&mmc0_pins_default>;
|
|
||||||
pinctrl-1 = <&mmc0_pins_uhs>;
|
|
||||||
bus-width = <8>;
|
|
||||||
cap-mmc-highspeed;
|
|
||||||
max-frequency = <52000000>;
|
|
||||||
vmmc-supply = <®_3p3v>;
|
|
||||||
non-removable;
|
|
||||||
status = "okay";
|
|
||||||
};
|
};
|
||||||
|
@ -128,11 +128,6 @@ mediatek_setup_macs()
|
|||||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
||||||
label_mac=$wan_mac
|
label_mac=$wan_mac
|
||||||
;;
|
;;
|
||||||
huasifei,wh3000-emmc)
|
|
||||||
label_mac=$(mmc_get_mac_binary factory 0x4)
|
|
||||||
lan_mac="$(macaddr_add $label_mac 2)"
|
|
||||||
wan_mac="$(macaddr_add $label_mac 3)"
|
|
||||||
;;
|
|
||||||
imou,lc-hx3001)
|
imou,lc-hx3001)
|
||||||
lan_mac=$(mtd_get_mac_ascii u-boot-env mac)
|
lan_mac=$(mtd_get_mac_ascii u-boot-env mac)
|
||||||
wan_mac=$(macaddr_add "$lan_mac" 2)
|
wan_mac=$(macaddr_add "$lan_mac" 2)
|
||||||
|
@ -351,7 +351,7 @@ define Device/cmcc_xr30-nand
|
|||||||
DEVICE_VARIANT := (U-Boot mod)
|
DEVICE_VARIANT := (U-Boot mod)
|
||||||
DEVICE_DTS := mt7981b-cmcc-xr30-nand
|
DEVICE_DTS := mt7981b-cmcc-xr30-nand
|
||||||
DEVICE_DTS_DIR := ../dts
|
DEVICE_DTS_DIR := ../dts
|
||||||
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3
|
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3
|
||||||
UBINIZE_OPTS := -E 5
|
UBINIZE_OPTS := -E 5
|
||||||
BLOCKSIZE := 128k
|
BLOCKSIZE := 128k
|
||||||
PAGESIZE := 2048
|
PAGESIZE := 2048
|
||||||
@ -499,6 +499,7 @@ define Device/huasifei_wh3000-emmc
|
|||||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
||||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
|
SUPPORTED_DEVICES += huasifei,wh3000
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += huasifei_wh3000-emmc
|
TARGET_DEVICES += huasifei_wh3000-emmc
|
||||||
|
|
||||||
@ -508,11 +509,11 @@ define Device/hf_m7986r1-emmc
|
|||||||
DEVICE_DTS := mt7986a-hf-m7986r1-emmc
|
DEVICE_DTS := mt7986a-hf-m7986r1-emmc
|
||||||
DEVICE_DTS_DIR := ../dts
|
DEVICE_DTS_DIR := ../dts
|
||||||
DEVICE_PACKAGES := kmod-usb3 kmod-mt7921e kmod-usb-net-rndis kmod-usb-serial-option f2fsck mkf2fs
|
DEVICE_PACKAGES := kmod-usb3 kmod-mt7921e kmod-usb-net-rndis kmod-usb-serial-option f2fsck mkf2fs
|
||||||
SUPPORTED_DEVICES += HF-M7986R1
|
|
||||||
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||||
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||||
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
||||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
|
SUPPORTED_DEVICES += HF-M7986R1
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += hf_m7986r1-emmc
|
TARGET_DEVICES += hf_m7986r1-emmc
|
||||||
|
|
||||||
@ -526,8 +527,8 @@ define Device/hf_m7986r1-nand
|
|||||||
PAGESIZE := 2048
|
PAGESIZE := 2048
|
||||||
KERNEL_IN_UBI := 1
|
KERNEL_IN_UBI := 1
|
||||||
DEVICE_PACKAGES := kmod-usb3 kmod-mt7921e kmod-usb-net-rndis kmod-usb-serial-option
|
DEVICE_PACKAGES := kmod-usb3 kmod-mt7921e kmod-usb-net-rndis kmod-usb-serial-option
|
||||||
SUPPORTED_DEVICES += HF-M7986R1
|
|
||||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
|
SUPPORTED_DEVICES += HF-M7986R1
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += hf_m7986r1-nand
|
TARGET_DEVICES += hf_m7986r1-nand
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user