02-ax6000.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --- a/target/linux/mediatek/image/filogic.mk
  2. +++ b/target/linux/mediatek/image/filogic.mk
  3. @@ -442,6 +442,24 @@ endif
  4. endef
  5. TARGET_DEVICES += xiaomi_mi-router-wr30u-ubootmod
  6. +define Device/xiaomi_redmi-router-ax6000
  7. + DEVICE_VENDOR := Xiaomi
  8. + DEVICE_MODEL := Redmi Router AX6000
  9. + DEVICE_DTS := mt7986a-xiaomi-redmi-router-ax6000
  10. + DEVICE_DTS_DIR := ../dts
  11. + DEVICE_PACKAGES := kmod-leds-ws2812b kmod-mt7986-firmware mt7986-wo-firmware
  12. + SUPPORTED_DEVICES := xiaomi,redmi-router-ax6000
  13. + UBINIZE_OPTS := -E 5
  14. + BLOCKSIZE := 128k
  15. + PAGESIZE := 2048
  16. + IMAGE_SIZE := 112640k
  17. + KERNEL_IN_UBI := 1
  18. + IMAGES += factory.bin
  19. + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
  20. + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  21. +endef
  22. +TARGET_DEVICES += xiaomi_redmi-router-ax6000
  23. +
  24. define Device/xiaomi_redmi-router-ax6000-stock
  25. DEVICE_VENDOR := Xiaomi
  26. DEVICE_MODEL := Redmi Router AX6000 (stock layout)
  27. new file mode 100644
  28. index 0000000000000..759baae3aeb18
  29. --- /dev/null
  30. +++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dts
  31. @@ -0,0 +1,32 @@
  32. +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
  33. +
  34. +/dts-v1/;
  35. +#include "mt7986a-xiaomi-redmi-router-ax6000.dtsi"
  36. +
  37. +/ {
  38. + model = "Xiaomi Redmi Router AX6000";
  39. + compatible = "xiaomi,redmi-router-ax6000-ubootmod", "mediatek,mt7986a";
  40. +};
  41. +
  42. +&spi_nand_flash {
  43. + mediatek,nmbm;
  44. + mediatek,bmt-max-ratio = <1>;
  45. + mediatek,bmt-max-reserved-blocks = <64>;
  46. +};
  47. +
  48. +&partitions {
  49. + partition@580000 {
  50. + label = "crash";
  51. + reg = <0x580000 0x40000>;
  52. + };
  53. +
  54. + partition@5c0000 {
  55. + label = "crash_log";
  56. + reg = <0x5c0000 0x40000>;
  57. + };
  58. +
  59. + partition@600000 {
  60. + label = "ubi";
  61. + reg = <0x600000 0x6e00000>;
  62. + };
  63. +};
  64. --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
  65. +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
  66. @@ -95,6 +95,8 @@ platform_do_upgrade() {
  67. tplink,tl-xdr6088|\
  68. xiaomi,mi-router-wr30u-112m-nmbm|\
  69. xiaomi,mi-router-wr30u-ubootmod|\
  70. + xiaomi,mi-router-ax3000t|\
  71. + xiaomi,redmi-router-ax6000|\
  72. xiaomi,redmi-router-ax6000-ubootmod)
  73. CI_KERNPART="fit"
  74. nand_do_upgrade "$1"
  75. --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
  76. +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
  77. @@ -26,6 +26,7 @@ xiaomi,mi-router-wr30u-ubootmod)
  78. ucidef_set_led_netdev "wan" "wan" "blue:network" "wan"
  79. ;;
  80. xiaomi,redmi-router-ax6000-stock|\
  81. +xiaomi,redmi-router-ax6000|\
  82. xiaomi,redmi-router-ax6000-ubootmod)
  83. ucidef_set_led_netdev "wan" "wan" "rgb:network" "wan"
  84. ;;
  85. --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
  86. +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
  87. @@ -56,6 +56,7 @@ mediatek_setup_interfaces()
  88. xiaomi,mi-router-wr30u-stock|\
  89. xiaomi,mi-router-wr30u-ubootmod|\
  90. xiaomi,redmi-router-ax6000-stock|\
  91. + xiaomi,redmi-router-ax6000|\
  92. xiaomi,redmi-router-ax6000-ubootmod)
  93. ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" wan
  94. ;;