1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Update OpenWrt

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-01-17 13:29:53 +01:00
parent 819f46b5dd
commit 774fefceec
11 changed files with 64 additions and 256 deletions

View file

@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = LINUX_VERSION-6.6 = .12
LINUX_KERNEL_HASH-6.6 = d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0 LINUX_KERNEL_HASH-6.6.12 = 1fd7ec8c3d9c4e4b3a41d11e2c6d151e5fbf875dd08b3577f73afd6ee6674605

View file

@ -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>;
};

View file

@ -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>;
};

View file

@ -66,9 +66,13 @@
label = "4g2:status"; label = "4g2:status";
gpios = <&pio 13 GPIO_ACTIVE_LOW>; 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 { usb_vbus: regulator-usb-vbus {
compatible = "regulator-fixed"; compatible = "regulator-fixed";
regulator-name = "usb_vbus"; regulator-name = "usb_vbus";
@ -160,9 +164,8 @@
read-only; read-only;
}; };
partition@580000 { nand_rootfs: partition@580000 {
label = "ubi"; label = "ubi";
reg = <0x0580000 0x4000000>;
}; };
}; };
}; };

View file

@ -497,3 +497,4 @@ CONFIG_ZONE_DMA32=y
CONFIG_ZSTD_COMMON=y CONFIG_ZSTD_COMMON=y
CONFIG_ZSTD_COMPRESS=y CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y CONFIG_ZSTD_DECOMPRESS=y
# CONFIG_MTD_SPLIT_SEIL_FW is not set

View file

@ -695,17 +695,32 @@ TARGET_DEVICES += zyxel_nwa50ax-pro
define Device/z8102ax define Device/z8102ax
DEVICE_VENDOR := ZBT DEVICE_VENDOR := ZBT
DEVICE_MODEL := Z8102AX DEVICE_MODEL := Z8102AX
DEVICE_DTS := mt7981b-zbt-z8102ax # DEVICE_DTS := mt7981b-zbt-z8102ax
DEVICE_DTS_DIR := ../dts DEVICE_DTS_DIR := ../dts
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
KERNEL_IN_UBI := 1
UBINIZE_OPTS := -E 5 UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k BLOCKSIZE := 128k
PAGESIZE := 2048 PAGESIZE := 2048
IMAGE_SIZE := 51200k
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
ARTIFACTS := initramfs-factory.ubi ARTIFACTS := initramfs-factory.ubi
ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-kernel.bin | ubinize-kernel ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-kernel.bin | ubinize-kernel
endif endif
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef endef
TARGET_DEVICES += z8102ax
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

View file

@ -1,34 +0,0 @@
From f8ed4088ed9c61ae92193da6130d04c37e7b19f2 Mon Sep 17 00:00:00 2001
From: Frank Wunderlich <frank-w@public-files.de>
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 <frank-w@public-files.de>
---
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>;
};

View file

@ -1,59 +0,0 @@
From aa3d6df9803c267725dc72286bb91602b7579882 Mon Sep 17 00:00:00 2001
From: Frank Wunderlich <frank-w@public-files.de>
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 <daniel@makrotopia.org>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
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";
};
};
};

View file

@ -1,38 +0,0 @@
From 6ddf23526955b8dbedfeaa57e691261fd73f9d4e Mon Sep 17 00:00:00 2001
From: Frank Wunderlich <frank-w@public-files.de>
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 <daniel@makrotopia.org>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
.../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>;
};
};
};

View file

@ -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 <ming.huang@mediatek.com>
- * Sean Wang <sean.wang@mediatek.com>
+ * Copyright (c) 2018 MediaTek Inc.
+ * Author: Ryder Lee <ryder.lee@mediatek.com>
*
* 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 = <BTN_0>;
- gpios = <&pio 0 0>;
+ gpios = <&pio 0 GPIO_ACTIVE_LOW>;
};
key-wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
- 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 {

View file

@ -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}/packages https://github.com/openwrt/packages "8939b43659dabe9b737feee02976949ad0355adc"
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "3e14e055a177dec4bd3a4bd40883b56a6930fd7c" _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "3e14e055a177dec4bd3a4bd40883b56a6930fd7c"
elif [ "$OMR_KERNEL" = "6.1" ]; then elif [ "$OMR_KERNEL" = "6.1" ]; then
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "b196a9f6ce8ef7d6b09d20ef79ffcf464d1a15ab" _get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "acf40c022e3d8949c7bb1f9c5212eb91512ae8a9"
_get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "9130a94425c65f05d315beb00020633825e5b446" _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "3ee7b46610e9dbd8fd2bba87bd06024cd0d9c08f"
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "a1f5b6087f04c5e214a31c7201d12c77e65c58e7" _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "ddda66aa8caa5e929cf7a542a79e2c3ce69eb66c"
elif [ "$OMR_KERNEL" = "6.6" ] || [ "$OMR_KERNEL" = "6.7" ]; then 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 "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "acf40c022e3d8949c7bb1f9c5212eb91512ae8a9"
_get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "ee4573cd420888d9ee9d763531865c8c1709728f" _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "3ee7b46610e9dbd8fd2bba87bd06024cd0d9c08f"
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "e7650bb86aaacb6ef654c9e10f25cc7c9f799556" _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "ddda66aa8caa5e929cf7a542a79e2c3ce69eb66c"
fi fi
elif [ "$OMR_OPENWRT" = "coolsnowwolfmix" ]; then elif [ "$OMR_OPENWRT" = "coolsnowwolfmix" ]; then
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/coolsnowwolf/lede.git "master" _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}/packages https://github.com/coolsnowwolf/packages "master"
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/coolsnowwolf/luci "master" _get_repo feeds/${OMR_KERNEL}/luci https://github.com/coolsnowwolf/luci "master"
elif [ "$OMR_OPENWRT" = "master" ]; then elif [ "$OMR_OPENWRT" = "master" ]; then
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "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 "master" _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "main"
_get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "master" _get_repo feeds/${OMR_KERNEL}/luci https://github.com/openwrt/luci "main"
else else
_get_repo "$OMR_TARGET/${OMR_KERNEL}/source" https://github.com/openwrt/openwrt "${OMR_OPENWRT}" _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}" _get_repo feeds/${OMR_KERNEL}/packages https://github.com/openwrt/packages "${OMR_OPENWRT}"