1
0
Fork 0
forked from mirror/openwrt

Compare commits

...

2 commits

Author SHA1 Message Date
Daniel Golle
da4342c6db uboot-mediatek: restore Ethernet PHY drivers
Partially revert commit 332645a610 ("uboot-mediatek: sync with
mtk-openwrt/u-boot 20250711") by dropping unused PHY drivers which come
with large embedded firmware (and are hence inacceptable for upstream)
and restoring our previous version of the Airoha EN8811H driver which is
known to work and load firmware from the eMMC boot1 hardware partition
instead of embedding it in the driver.

In future we may switch to the upstream Airoha EN8811H driver which
allows loading the firmware either from a filesystem or overloading the
en8811h_read_fw() for board which may eg. store that firmware directly
inside a eMMC hardware partition or UBI volume, like the BPi-R3 mini
does.

See also:
https://patchwork.ozlabs.org/project/uboot/patch/20250615131243.30770-1-lucienzx159@gmail.com/

Fixes: 332645a610 ("uboot-mediatek: sync with mtk-openwrt/u-boot 20250711")
Reported-by: Adrian Bente
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-07-19 20:41:56 +01:00
Felix Fietkau
bd073e5cd9 cli: fix editor remove call validation
Skip type validation, fix passing values to remove

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-07-19 21:23:18 +02:00
6 changed files with 1940 additions and 53552 deletions

View file

@ -1,32 +0,0 @@
From cedc08e33bf608765464dd80ce3cc170a636a3dd Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Thu, 16 Jan 2025 09:13:10 +0800
Subject: [PATCH 29/30] net: phy: add Marvell CUX3410
Add support for Marvell CUX3410 ethernet PHY
Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
---
drivers/net/phy/aquantia.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -744,3 +744,17 @@ U_BOOT_PHY_DRIVER(aqr412) = {
.shutdown = &gen10g_shutdown,
.data = AQUANTIA_GEN3,
};
+
+U_BOOT_PHY_DRIVER(cux3410) = {
+ .name = "Marvell CUX3410",
+ .uid = 0x31c31dd3,
+ .mask = 0xfffffff0,
+ .features = PHY_10G_FEATURES,
+ .mmds = (MDIO_MMD_PMAPMD | MDIO_MMD_PCS |
+ MDIO_MMD_PHYXS | MDIO_MMD_AN |
+ MDIO_MMD_VEND1),
+ .config = &aquantia_config,
+ .startup = &aquantia_startup,
+ .shutdown = &gen10g_shutdown,
+ .data = AQUANTIA_GEN3,
+};

View file

@ -136,10 +136,18 @@ export function remove_call(ctx, argv, named)
continue;
for (let idx in val) {
let orig_idx = idx;
if (idx != "" + +idx) {
let cur_idx = index(data, idx);
if (cur_idx >= 0)
idx = cur_idx + 1;
else
idx = null;
} else if (+idx > length(data))
idx = null;
if (idx == null) {
ctx.invalid_argument('Invalid value: %s', orig_idx);
continue;
}
data[+idx - 1] = null;
}
@ -148,6 +156,8 @@ export function remove_call(ctx, argv, named)
if (cur.attribute_allow_empty && !length(cur_obj[name]))
delete cur_obj[name];
}
if (length(ctx.result.errors) > 0)
return;
call_change_cb(ctx, this, argv, named);
return ctx.ok();
};
@ -249,6 +259,7 @@ function remove_params(orig_params)
type: "enum",
get_object: val.get_object,
attribute: val.attribute ?? name,
no_validate: true,
value: param_values,
force_helptext: true,
};