* [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2
@ 2024-03-24 15:19 Christian Hewitt
2024-03-24 15:19 ` [PATCH v2 1/2] ARM: dts: fix Ethernet " Christian Hewitt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christian Hewitt @ 2024-03-24 15:19 UTC (permalink / raw)
To: u-boot, u-boot-amlogic, linux-amlogic
In submitting the original patches for WeTek Hub/Play2 I appear to have
squashed an experimental change to place the u-boot.dtsi file on the common
board dtsi, but this was incorrect and results in broken Ethernet. Patch 1
creates per-board u-boot.dtsi files to fix that. However, while the NIC is
now probed correctly the current p200.c board file doesn't find the MAC in
efuse and we get random MAC addresses. Patch 2 adds a fallback method for
generating a MAC from the CPU serial.
Changes from v1:
- Simplified p200.c changes
- Drop patch 3
Christian Hewitt (2):
ARM: dts: fix Ethernet on WeTek Hub/Play2
board: amlogic: add meson_generate_serial_ethaddr fallback to p200
...u-boot.dtsi => meson-gxbb-wetek-hub-u-boot.dtsi} | 0
arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi | 13 +++++++++++++
board/amlogic/p200/p200.c | 2 ++
3 files changed, 15 insertions(+)
rename arch/arm/dts/{meson-gxbb-wetek-u-boot.dtsi => meson-gxbb-wetek-hub-u-boot.dtsi} (100%)
create mode 100644 arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi
--
2.34.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] ARM: dts: fix Ethernet on WeTek Hub/Play2
2024-03-24 15:19 [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2 Christian Hewitt
@ 2024-03-24 15:19 ` Christian Hewitt
2024-03-24 15:19 ` [PATCH v2 2/2] board: amlogic: add meson_generate_serial_ethaddr fallback to p200 Christian Hewitt
2024-03-25 8:18 ` [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2 Neil Armstrong
2 siblings, 0 replies; 4+ messages in thread
From: Christian Hewitt @ 2024-03-24 15:19 UTC (permalink / raw)
To: u-boot, u-boot-amlogic, linux-amlogic
Placing the snps,reset content needed for Ethernet to probe in a common
uboot.dtsi results in the content not being used and broken Ethernet. Fix
this by creating two board specific dtsi files with the right content.
Fixes: 67d5128df950 ("ARM: dts: add support for WeTek Hub and WeTek Play2")
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
...u-boot.dtsi => meson-gxbb-wetek-hub-u-boot.dtsi} | 0
arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi | 13 +++++++++++++
2 files changed, 13 insertions(+)
rename arch/arm/dts/{meson-gxbb-wetek-u-boot.dtsi => meson-gxbb-wetek-hub-u-boot.dtsi} (100%)
create mode 100644 arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi
diff --git a/arch/arm/dts/meson-gxbb-wetek-u-boot.dtsi b/arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi
similarity index 100%
rename from arch/arm/dts/meson-gxbb-wetek-u-boot.dtsi
rename to arch/arm/dts/meson-gxbb-wetek-hub-u-boot.dtsi
diff --git a/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi b/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi
new file mode 100644
index 00000000000..3743053eb9c
--- /dev/null
+++ b/arch/arm/dts/meson-gxbb-wetek-play2-u-boot.dtsi
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS.
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ */
+
+#include "meson-gx-u-boot.dtsi"
+
+ðmac {
+ snps,reset-gpio = <&gpio GPIOZ_14 0>;
+ snps,reset-delays-us = <0 10000 1000000>;
+ snps,reset-active-low;
+};
--
2.34.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] board: amlogic: add meson_generate_serial_ethaddr fallback to p200
2024-03-24 15:19 [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2 Christian Hewitt
2024-03-24 15:19 ` [PATCH v2 1/2] ARM: dts: fix Ethernet " Christian Hewitt
@ 2024-03-24 15:19 ` Christian Hewitt
2024-03-25 8:18 ` [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2 Neil Armstrong
2 siblings, 0 replies; 4+ messages in thread
From: Christian Hewitt @ 2024-03-24 15:19 UTC (permalink / raw)
To: u-boot, u-boot-amlogic, linux-amlogic
Add a fall-back method to generate ethaddr from CPU serial on p200 boards
if the MAC cannot be read from efuse. This prevents random MAC addresses
on the WeTek Hub/Play2 boards.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
board/amlogic/p200/p200.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/board/amlogic/p200/p200.c b/board/amlogic/p200/p200.c
index 7c432f9d281..3061f7a6b3c 100644
--- a/board/amlogic/p200/p200.c
+++ b/board/amlogic/p200/p200.c
@@ -30,6 +30,8 @@ int misc_init_r(void)
mac_addr, EFUSE_MAC_SIZE);
if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
eth_env_set_enetaddr("ethaddr", mac_addr);
+ else
+ meson_generate_serial_ethaddr();
}
if (!env_get("serial#")) {
--
2.34.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2
2024-03-24 15:19 [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2 Christian Hewitt
2024-03-24 15:19 ` [PATCH v2 1/2] ARM: dts: fix Ethernet " Christian Hewitt
2024-03-24 15:19 ` [PATCH v2 2/2] board: amlogic: add meson_generate_serial_ethaddr fallback to p200 Christian Hewitt
@ 2024-03-25 8:18 ` Neil Armstrong
2 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2024-03-25 8:18 UTC (permalink / raw)
To: u-boot, u-boot-amlogic, linux-amlogic, Christian Hewitt
Hi,
On Sun, 24 Mar 2024 15:19:03 +0000, Christian Hewitt wrote:
> In submitting the original patches for WeTek Hub/Play2 I appear to have
> squashed an experimental change to place the u-boot.dtsi file on the common
> board dtsi, but this was incorrect and results in broken Ethernet. Patch 1
> creates per-board u-boot.dtsi files to fix that. However, while the NIC is
> now probed correctly the current p200.c board file doesn't find the MAC in
> efuse and we get random MAC addresses. Patch 2 adds a fallback method for
> generating a MAC from the CPU serial.
>
> [...]
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-amlogic (u-boot-amlogic)
[1/2] ARM: dts: fix Ethernet on WeTek Hub/Play2
https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/cac77418d6be11445c3e1139f6763b5f5f5fe9fb
[2/2] board: amlogic: add meson_generate_serial_ethaddr fallback to p200
https://source.denx.de/u-boot/custodians/u-boot-amlogic/-/commit/65d5c367b00cb392bda560c3da1834979adcf137
--
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-25 8:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-24 15:19 [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2 Christian Hewitt
2024-03-24 15:19 ` [PATCH v2 1/2] ARM: dts: fix Ethernet " Christian Hewitt
2024-03-24 15:19 ` [PATCH v2 2/2] board: amlogic: add meson_generate_serial_ethaddr fallback to p200 Christian Hewitt
2024-03-25 8:18 ` [PATCH v2 0/2] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2 Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox