mediatek: add CMCC RAX3000M eMMC custom U-Boot layout
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
c351fa1d0a
commit
76bc8200cc
@ -0,0 +1,52 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include "mt7981b-cmcc-rax3000m.dts"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "CMCC RAX3000M eMMC version (custom U-Boot layout)";
|
||||||
|
compatible = "cmcc,rax3000m-emmc-ubootmod", "mediatek,mt7981";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
bootargs = "root=PARTLABEL=rootfs rootwait rootfstype=squashfs,f2fs";
|
||||||
|
};
|
||||||
|
|
||||||
|
reg_1p8v: regulator-1p8v {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "fixed-1.8V";
|
||||||
|
regulator-min-microvolt = <1800000>;
|
||||||
|
regulator-max-microvolt = <1800000>;
|
||||||
|
regulator-boot-on;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&mmc0 {
|
||||||
|
bus-width = <8>;
|
||||||
|
max-frequency = <26000000>;
|
||||||
|
no-sd;
|
||||||
|
no-sdio;
|
||||||
|
non-removable;
|
||||||
|
pinctrl-names = "default", "state_uhs";
|
||||||
|
pinctrl-0 = <&mmc0_pins_default>;
|
||||||
|
pinctrl-1 = <&mmc0_pins_uhs>;
|
||||||
|
vmmc-supply = <®_3p3v>;
|
||||||
|
vqmmc-supply = <®_1p8v>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pio {
|
||||||
|
mmc0_pins_default: mmc0-pins {
|
||||||
|
mux {
|
||||||
|
function = "flash";
|
||||||
|
groups = "emmc_45";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc0_pins_uhs: mmc0-uhs-pins {
|
||||||
|
mux {
|
||||||
|
function = "flash";
|
||||||
|
groups = "emmc_45";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
@ -37,6 +37,7 @@ mediatek_setup_interfaces()
|
|||||||
ucidef_set_interfaces_lan_wan eth1 eth0
|
ucidef_set_interfaces_lan_wan eth1 eth0
|
||||||
;;
|
;;
|
||||||
cmcc,rax3000m|\
|
cmcc,rax3000m|\
|
||||||
|
cmcc,rax3000m-emmc-ubootmod|\
|
||||||
cmcc,rax3000m-nand-ubootmod|\
|
cmcc,rax3000m-nand-ubootmod|\
|
||||||
h3c,magic-nx30-pro|\
|
h3c,magic-nx30-pro|\
|
||||||
h3c,magic-nx30-pro-nmbm|\
|
h3c,magic-nx30-pro-nmbm|\
|
||||||
@ -102,6 +103,11 @@ mediatek_setup_macs()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
cmcc,rax3000m-emmc-ubootmod)
|
||||||
|
wan_mac=$(mmc_get_mac_binary factory 0x2a)
|
||||||
|
lan_mac=$(mmc_get_mac_binary factory 0x24)
|
||||||
|
label=$wan_mac
|
||||||
|
;;
|
||||||
h3c,magic-nx30-pro|\
|
h3c,magic-nx30-pro|\
|
||||||
h3c,magic-nx30-pro-nmbm)
|
h3c,magic-nx30-pro-nmbm)
|
||||||
wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
|
wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
|
||||||
|
|||||||
@ -23,6 +23,7 @@ case "$FIRMWARE" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
cmcc,rax3000m-emmc-ubootmod|\
|
||||||
ubnt,unifi-6-plus)
|
ubnt,unifi-6-plus)
|
||||||
caldata_extract_mmc "factory" 0x0 0x1000
|
caldata_extract_mmc "factory" 0x0 0x1000
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -47,6 +47,9 @@ case "$board" in
|
|||||||
esac
|
esac
|
||||||
[ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
|
[ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
|
cmcc,rax3000m-emmc-ubootmod)
|
||||||
|
[ "$PHYNBR" = "1" ] && mmc_get_mac_binary factory 0xa > /sys${DEVPATH}/macaddress
|
||||||
|
;;
|
||||||
cmcc,rax3000m-nand-ubootmod)
|
cmcc,rax3000m-nand-ubootmod)
|
||||||
[ "$PHYNBR" = "1" ] && mtd_get_mac_binary Factory 0xa > /sys${DEVPATH}/macaddress
|
[ "$PHYNBR" = "1" ] && mtd_get_mac_binary Factory 0xa > /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -93,6 +93,11 @@ platform_do_upgrade() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
cmcc,rax3000m-emmc-ubootmod)
|
||||||
|
CI_KERNPART="kernel"
|
||||||
|
CI_ROOTPART="rootfs"
|
||||||
|
emmc_do_upgrade "$1"
|
||||||
|
;;
|
||||||
cudy,wr3000-v1)
|
cudy,wr3000-v1)
|
||||||
default_do_upgrade "$1"
|
default_do_upgrade "$1"
|
||||||
;;
|
;;
|
||||||
@ -164,6 +169,7 @@ platform_copy_config() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
cmcc,rax3000m-emmc-ubootmod|\
|
||||||
ubnt,unifi-6-plus)
|
ubnt,unifi-6-plus)
|
||||||
emmc_copy_config
|
emmc_copy_config
|
||||||
;;
|
;;
|
||||||
|
|||||||
@ -259,6 +259,20 @@ define Device/cmcc_rax3000m
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += cmcc_rax3000m
|
TARGET_DEVICES += cmcc_rax3000m
|
||||||
|
|
||||||
|
define Device/cmcc_rax3000m-emmc-ubootmod
|
||||||
|
DEVICE_VENDOR := CMCC
|
||||||
|
DEVICE_MODEL := RAX3000M eMMC version (custom U-Boot layout)
|
||||||
|
DEVICE_DTS := mt7981b-cmcc-rax3000m-emmc-ubootmod
|
||||||
|
DEVICE_DTS_DIR := ../dts
|
||||||
|
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
|
||||||
|
automount f2fsck mkf2fs
|
||||||
|
KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||||
|
KERNEL_INITRAMFS := kernel-bin | lzma | \
|
||||||
|
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
|
||||||
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||||
|
endef
|
||||||
|
TARGET_DEVICES += cmcc_rax3000m-emmc-ubootmod
|
||||||
|
|
||||||
define Device/cmcc_rax3000m-nand-ubootmod
|
define Device/cmcc_rax3000m-nand-ubootmod
|
||||||
DEVICE_VENDOR := CMCC
|
DEVICE_VENDOR := CMCC
|
||||||
DEVICE_MODEL := RAX3000M NAND version (custom U-Boot layout)
|
DEVICE_MODEL := RAX3000M NAND version (custom U-Boot layout)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user