ipq807x: add stock layout variant for redmi ax6

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2023-01-17 20:03:24 +08:00
parent 6a01a7b07b
commit d6bc08f96e
8 changed files with 70 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ edimax,cax1800)
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
;;
redmi,ax6|\
redmi,ax6-stock|\
xiaomi,ax3600|\
xiaomi,ax3600-stock|\
xiaomi,ax9000)

View File

@@ -10,6 +10,7 @@ edgecore,eap102)
ucidef_set_led_netdev "wan" "WAN" "green:wanpoe" "wan"
;;
redmi,ax6|\
redmi,ax6-stock|\
xiaomi,ax3600|\
xiaomi,ax3600-stock)
ucidef_set_led_netdev "wan" "WAN" "blue:network" "wan"

View File

@@ -24,6 +24,7 @@ ipq807x_setup_interfaces()
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 10g-2" "10g-1"
;;
redmi,ax6|\
redmi,ax6-stock|\
xiaomi,ax3600|\
xiaomi,ax3600-stock)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"

View File

@@ -14,6 +14,7 @@ case "$FIRMWARE" in
dynalink,dl-wrx36|\
qnap,301w|\
redmi,ax6|\
redmi,ax6-stock|\
xiaomi,ax3600|\
xiaomi,ax3600-stock|\
xiaomi,ax9000)

View File

@@ -9,6 +9,7 @@ boot() {
# Unset changed flag after sysupgrade complete
fw_setenv changed
;;
redmi,ax6-stock|\
xiaomi,ax3600-stock)
# OTA handling should not be used. Reset it just in case.
fw_setenv flag_ota_reboot 0

View File

@@ -85,6 +85,7 @@ platform_do_upgrade() {
CI_ROOT_UBIPART="rootfs"
nand_do_upgrade "$1"
;;
redmi,ax6-stock|\
xiaomi,ax3600-stock)
part_num="$(fw_printenv -n flag_boot_rootfs)"
if [ "$part_num" -eq "1" ]; then

View File

@@ -0,0 +1,56 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include "ipq8071-ax6.dts"
/ {
model = "Redmi AX6 (stock layout)";
compatible = "redmi,ax6-stock", "qcom,ipq8074";
aliases {
/* Aliases as required by u-boot to patch MAC addresses */
ethernet1 = &dp2;
ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp5;
};
chosen {
bootargs-append = " root=/dev/ubiblock0_1";
};
};
&qpic_nand {
/delete-node/ partitions;
/delete-node/ nand@0;
nand@0 {
reg = <0>;
nand-ecc-strength = <4>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;
partitions {
compatible = "qcom,smem-part";
};
};
};
&dp2 {
/delete-property/ nvmem-cells;
/delete-property/ nvmem-cell-names;
};
&dp3 {
/delete-property/ nvmem-cells;
/delete-property/ nvmem-cell-names;
};
&dp4 {
/delete-property/ nvmem-cells;
/delete-property/ nvmem-cell-names;
};
&dp5 {
/delete-property/ nvmem-cells;
/delete-property/ nvmem-cell-names;
};

View File

@@ -80,6 +80,14 @@ define Device/redmi_ax6
endef
TARGET_DEVICES += redmi_ax6
define Device/redmi_ax6-stock
$(call Device/redmi_ax6)
DEVICE_VARIANT := (stock layout)
KERNEL_SIZE :=
ARTIFACTS :=
endef
TARGET_DEVICES += redmi_ax6-stock
define Device/xiaomi_ax3600
$(call Device/FitImage)
$(call Device/UbiFit)