From 774fefceec54ad20e0b79f2c77427eb620792b10 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 17 Jan 2024 13:29:53 +0100 Subject: [PATCH] Update OpenWrt --- 6.6/include/kernel-6.6 | 4 +- .../mediatek/dts/mt7981b-zbt-z8102ax-128m.dts | 13 +++ .../mediatek/dts/mt7981b-zbt-z8102ax-64m.dts | 14 +++ ...t-z8102ax.dts => mt7981b-zbt-z8102ax.dtsi} | 11 +- 6.6/target/linux/mediatek/filogic/config-6.6 | 1 + 6.6/target/linux/mediatek/image/filogic.mk | 21 +++- ...-define-3W-max-power-to-both-SFP-on-.patch | 34 ------ ...rm64-dts-mt7986-change-cooling-trips.patch | 59 ---------- ...t7986-change-thermal-trips-on-BPI-R3.patch | 38 ------- .../100-dts-update-mt7622-rfb1.patch | 107 ------------------ build.sh | 18 +-- 11 files changed, 64 insertions(+), 256 deletions(-) create mode 100644 6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-128m.dts create mode 100644 6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-64m.dts rename 6.6/target/linux/mediatek/dts/{mt7981b-zbt-z8102ax.dts => mt7981b-zbt-z8102ax.dtsi} (96%) delete mode 100644 6.6/target/linux/mediatek/patches-6.6/020-arm64-dts-mt7986-define-3W-max-power-to-both-SFP-on-.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.6/021-arm64-dts-mt7986-change-cooling-trips.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.6/022-arm64-dts-mt7986-change-thermal-trips-on-BPI-R3.patch delete mode 100644 6.6/target/linux/mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch diff --git a/6.6/include/kernel-6.6 b/6.6/include/kernel-6.6 index 3f0ab9d4..92958f71 100644 --- a/6.6/include/kernel-6.6 +++ b/6.6/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = -LINUX_KERNEL_HASH-6.6 = d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0 +LINUX_VERSION-6.6 = .12 +LINUX_KERNEL_HASH-6.6.12 = 1fd7ec8c3d9c4e4b3a41d11e2c6d151e5fbf875dd08b3577f73afd6ee6674605 diff --git a/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-128m.dts b/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-128m.dts new file mode 100644 index 00000000..b272ec0e --- /dev/null +++ b/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-128m.dts @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7981b-zbt-z8102ax.dtsi" + +/ { + model = "ZBT Z8102AX 128M"; + compatible = "z8102ax-128m", "z8102ax", "mediatek,mt7981"; +}; + +&nand_rootfs { + reg = <0x0580000 0x7220000>; +}; + diff --git a/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-64m.dts b/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-64m.dts new file mode 100644 index 00000000..80533529 --- /dev/null +++ b/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax-64m.dts @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7981b-zbt-z8102ax.dtsi" + +/ { + model = "ZBT Z8102AX 64M"; + compatible = "z8102ax-64m", "z8102ax", "mediatek,mt7981"; +}; + + +&nand_rootfs { + reg = <0x0580000 0x4000000>; +}; + diff --git a/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax.dts b/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax.dtsi similarity index 96% rename from 6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax.dts rename to 6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax.dtsi index 29193c9f..1e4799f6 100644 --- a/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax.dts +++ b/6.6/target/linux/mediatek/dts/mt7981b-zbt-z8102ax.dtsi @@ -66,9 +66,13 @@ label = "4g2:status"; gpios = <&pio 13 GPIO_ACTIVE_LOW>; }; - }; - + watchdog { + compatible = "linux,wdt-gpio"; + gpios = <&pio 2 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <1000>; + }; usb_vbus: regulator-usb-vbus { compatible = "regulator-fixed"; regulator-name = "usb_vbus"; @@ -160,9 +164,8 @@ read-only; }; - partition@580000 { + nand_rootfs: partition@580000 { label = "ubi"; - reg = <0x0580000 0x4000000>; }; }; }; diff --git a/6.6/target/linux/mediatek/filogic/config-6.6 b/6.6/target/linux/mediatek/filogic/config-6.6 index c0d36e33..eb23a199 100644 --- a/6.6/target/linux/mediatek/filogic/config-6.6 +++ b/6.6/target/linux/mediatek/filogic/config-6.6 @@ -497,3 +497,4 @@ CONFIG_ZONE_DMA32=y CONFIG_ZSTD_COMMON=y CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_DECOMPRESS=y +# CONFIG_MTD_SPLIT_SEIL_FW is not set diff --git a/6.6/target/linux/mediatek/image/filogic.mk b/6.6/target/linux/mediatek/image/filogic.mk index 97d08ea7..4d868165 100644 --- a/6.6/target/linux/mediatek/image/filogic.mk +++ b/6.6/target/linux/mediatek/image/filogic.mk @@ -695,17 +695,32 @@ TARGET_DEVICES += zyxel_nwa50ax-pro define Device/z8102ax DEVICE_VENDOR := ZBT DEVICE_MODEL := Z8102AX - DEVICE_DTS := mt7981b-zbt-z8102ax +# DEVICE_DTS := mt7981b-zbt-z8102ax DEVICE_DTS_DIR := ../dts DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware + KERNEL_IN_UBI := 1 UBINIZE_OPTS := -E 5 BLOCKSIZE := 128k PAGESIZE := 2048 - IMAGE_SIZE := 51200k ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) ARTIFACTS := initramfs-factory.ubi ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-kernel.bin | ubinize-kernel endif IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef -TARGET_DEVICES += z8102ax \ No newline at end of file + +define Device/z8102ax-64m + $(call Device/z8102ax) + DEVICE_VARIANT := 64 NAND + DEVICE_DTS := mt7981b-zbt-z8102ax-64m + IMAGE_SIZE := 65536k +endef +TARGET_DEVICES += z8102ax-64m + +define Device/z8102ax-128m + $(call Device/z8102ax) + DEVICE_VARIANT := 128 NAND + DEVICE_DTS := mt7981b-zbt-z8102ax-128m + IMAGE_SIZE := 131072k +endef +TARGET_DEVICES += z8102ax-128m diff --git a/6.6/target/linux/mediatek/patches-6.6/020-arm64-dts-mt7986-define-3W-max-power-to-both-SFP-on-.patch b/6.6/target/linux/mediatek/patches-6.6/020-arm64-dts-mt7986-define-3W-max-power-to-both-SFP-on-.patch deleted file mode 100644 index 8cba3b20..00000000 --- a/6.6/target/linux/mediatek/patches-6.6/020-arm64-dts-mt7986-define-3W-max-power-to-both-SFP-on-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f8ed4088ed9c61ae92193da6130d04c37e7b19f2 Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Sun, 20 Aug 2023 17:31:33 +0200 -Subject: [PATCH 20/22] arm64: dts: mt7986: define 3W max power to both SFP on - BPI-R3 - -All SFP power supplies are connected to the system VDD33 which is 3v3/8A. -Set 3A per SFP slot to allow SFPs work which need more power than the -default 1W. - -Fixes: 8e01fb15b815 ("arm64: dts: mt7986: add Bananapi R3") -Signed-off-by: Frank Wunderlich ---- - arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts -+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts -@@ -126,6 +126,7 @@ - compatible = "sff,sfp"; - i2c-bus = <&i2c_sfp1>; - los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>; -+ maximum-power-milliwatt = <3000>; - mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>; - tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>; - tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>; -@@ -137,6 +138,7 @@ - i2c-bus = <&i2c_sfp2>; - los-gpios = <&pio 31 GPIO_ACTIVE_HIGH>; - mod-def0-gpios = <&pio 47 GPIO_ACTIVE_LOW>; -+ maximum-power-milliwatt = <3000>; - tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>; - tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>; - }; diff --git a/6.6/target/linux/mediatek/patches-6.6/021-arm64-dts-mt7986-change-cooling-trips.patch b/6.6/target/linux/mediatek/patches-6.6/021-arm64-dts-mt7986-change-cooling-trips.patch deleted file mode 100644 index 20d4468c..00000000 --- a/6.6/target/linux/mediatek/patches-6.6/021-arm64-dts-mt7986-change-cooling-trips.patch +++ /dev/null @@ -1,59 +0,0 @@ -From aa3d6df9803c267725dc72286bb91602b7579882 Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Sun, 20 Aug 2023 17:31:34 +0200 -Subject: [PATCH 21/22] arm64: dts: mt7986: change cooling trips - -Add Critical and hot trips for emergency system shutdown and limiting -system load. - -Change passive trip to active to make sure fan is activated on the -lowest trip. - -Fixes: 1f5be05132f3 ("arm64: dts: mt7986: add thermal-zones") -Suggested-by: Daniel Golle -Signed-off-by: Frank Wunderlich ---- - arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - ---- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi -@@ -610,22 +610,34 @@ - thermal-sensors = <&thermal 0>; - - trips { -+ cpu_trip_crit: crit { -+ temperature = <125000>; -+ hysteresis = <2000>; -+ type = "critical"; -+ }; -+ -+ cpu_trip_hot: hot { -+ temperature = <120000>; -+ hysteresis = <2000>; -+ type = "hot"; -+ }; -+ - cpu_trip_active_high: active-high { - temperature = <115000>; - hysteresis = <2000>; - type = "active"; - }; - -- cpu_trip_active_low: active-low { -+ cpu_trip_active_med: active-med { - temperature = <85000>; - hysteresis = <2000>; - type = "active"; - }; - -- cpu_trip_passive: passive { -- temperature = <40000>; -+ cpu_trip_active_low: active-low { -+ temperature = <60000>; - hysteresis = <2000>; -- type = "passive"; -+ type = "active"; - }; - }; - }; diff --git a/6.6/target/linux/mediatek/patches-6.6/022-arm64-dts-mt7986-change-thermal-trips-on-BPI-R3.patch b/6.6/target/linux/mediatek/patches-6.6/022-arm64-dts-mt7986-change-thermal-trips-on-BPI-R3.patch deleted file mode 100644 index 7166ab6a..00000000 --- a/6.6/target/linux/mediatek/patches-6.6/022-arm64-dts-mt7986-change-thermal-trips-on-BPI-R3.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 6ddf23526955b8dbedfeaa57e691261fd73f9d4e Mon Sep 17 00:00:00 2001 -From: Frank Wunderlich -Date: Sun, 20 Aug 2023 17:31:35 +0200 -Subject: [PATCH 22/22] arm64: dts: mt7986: change thermal trips on BPI-R3 - -Apply new naming after mt7986 thermal trips were changed. - -Fixes: c26f779a2295 ("arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts") -Suggested-by: Daniel Golle -Signed-off-by: Frank Wunderlich ---- - .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - ---- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts -+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts -@@ -152,16 +152,16 @@ - trip = <&cpu_trip_active_high>; - }; - -- cpu-active-low { -+ cpu-active-med { - /* active: set fan to cooling level 1 */ - cooling-device = <&fan 1 1>; -- trip = <&cpu_trip_active_low>; -+ trip = <&cpu_trip_active_med>; - }; - -- cpu-passive { -- /* passive: set fan to cooling level 0 */ -+ cpu-active-low { -+ /* active: set fan to cooling level 0 */ - cooling-device = <&fan 0 0>; -- trip = <&cpu_trip_passive>; -+ trip = <&cpu_trip_active_low>; - }; - }; - }; diff --git a/6.6/target/linux/mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch b/6.6/target/linux/mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch deleted file mode 100644 index 1c249c03..00000000 --- a/6.6/target/linux/mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch +++ /dev/null @@ -1,107 +0,0 @@ ---- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts -+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts -@@ -1,7 +1,6 @@ - /* -- * Copyright (c) 2017 MediaTek Inc. -- * Author: Ming Huang -- * Sean Wang -+ * Copyright (c) 2018 MediaTek Inc. -+ * Author: Ryder Lee - * - * SPDX-License-Identifier: (GPL-2.0 OR MIT) - */ -@@ -24,7 +23,7 @@ - - chosen { - stdout-path = "serial0:115200n8"; -- bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512"; -+ bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512"; - }; - - cpus { -@@ -45,18 +44,18 @@ - key-factory { - label = "factory"; - linux,code = ; -- gpios = <&pio 0 0>; -+ gpios = <&pio 0 GPIO_ACTIVE_LOW>; - }; - - key-wps { - label = "wps"; - linux,code = ; -- gpios = <&pio 102 0>; -+ gpios = <&pio 102 GPIO_ACTIVE_LOW>; - }; - }; - - memory { -- reg = <0 0x40000000 0 0x20000000>; -+ reg = <0 0x40000000 0 0x40000000>; - }; - - reg_1p8v: regulator-1p8v { -@@ -132,22 +131,22 @@ - - port@0 { - reg = <0>; -- label = "lan0"; -+ label = "lan1"; - }; - - port@1 { - reg = <1>; -- label = "lan1"; -+ label = "lan2"; - }; - - port@2 { - reg = <2>; -- label = "lan2"; -+ label = "lan3"; - }; - - port@3 { - reg = <3>; -- label = "lan3"; -+ label = "lan4"; - }; - - port@4 { -@@ -240,7 +239,22 @@ - status = "okay"; - }; - -+&pcie1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pcie1_pins>; -+ status = "okay"; -+}; -+ - &pio { -+ /* Attention: GPIO 90 is used to switch between PCIe@1,0 and -+ * SATA functions. i.e. output-high: PCIe, output-low: SATA -+ */ -+ asm_sel { -+ gpio-hog; -+ gpios = <90 GPIO_ACTIVE_HIGH>; -+ output-high; -+ }; -+ - /* eMMC is shared pin with parallel NAND */ - emmc_pins_default: emmc-pins-default { - mux { -@@ -517,11 +531,11 @@ - }; - - &sata { -- status = "okay"; -+ status = "disabled"; - }; - - &sata_phy { -- status = "okay"; -+ status = "disabled"; - }; - - &spi0 { diff --git a/build.sh b/build.sh index 6ae619b7..aadf5ea4 100755 --- a/build.sh +++ b/build.sh @@ -119,13 +119,13 @@ if [ "$OMR_OPENWRT" = "default" ]; then _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "8939b43659dabe9b737feee02976949ad0355adc" _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "3e14e055a177dec4bd3a4bd40883b56a6930fd7c" elif [ "$OMR_KERNEL" = "6.1" ]; then - _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "b196a9f6ce8ef7d6b09d20ef79ffcf464d1a15ab" - _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "9130a94425c65f05d315beb00020633825e5b446" - _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "a1f5b6087f04c5e214a31c7201d12c77e65c58e7" + _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "acf40c022e3d8949c7bb1f9c5212eb91512ae8a9" + _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "3ee7b46610e9dbd8fd2bba87bd06024cd0d9c08f" + _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "ddda66aa8caa5e929cf7a542a79e2c3ce69eb66c" elif [ "$OMR_KERNEL" = "6.6" ] || [ "$OMR_KERNEL" = "6.7" ]; then - _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "2872ff7be19cfd20c95c4cbc880c0af38f82ea15" - _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "ee4573cd420888d9ee9d763531865c8c1709728f" - _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "e7650bb86aaacb6ef654c9e10f25cc7c9f799556" + _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "acf40c022e3d8949c7bb1f9c5212eb91512ae8a9" + _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "3ee7b46610e9dbd8fd2bba87bd06024cd0d9c08f" + _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "ddda66aa8caa5e929cf7a542a79e2c3ce69eb66c" fi elif [ "$OMR_OPENWRT" = "coolsnowwolfmix" ]; then _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/coolsnowwolf/lede.git "master" @@ -136,9 +136,9 @@ elif [ "$OMR_OPENWRT" = "coolsnowwolf" ]; then _get_repo feeds/${OMR_KERNEL}/packages https://github.com/coolsnowwolf/packages "master" _get_repo feeds/${OMR_KERNEL}/luci https://github.com/coolsnowwolf/luci "master" elif [ "$OMR_OPENWRT" = "master" ]; then - _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "master" - _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "master" - _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "master" + _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "main" + _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "main" + _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "main" else _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "${OMR_OPENWRT}" _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "${OMR_OPENWRT}"