From: Fil Dunsky via B4 Relay <devnull+filipp.dunsky.gmail.com@kernel.org>
To: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
Fil Dunsky <filipp.dunsky@gmail.com>
Subject: [PATCH v2 1/2] arm64: dts: meson-gxbb-odroidc2: read the Ethernet MAC address from eFuse
Date: Sun, 11 Oct 2026 21:31:40 +0300 [thread overview]
Message-ID: <20261011-odroidc2-dts-v2-1-a3a4a752f2ab@gmail.com> (raw)
In-Reply-To: <20261011-odroidc2-dts-v2-0-a3a4a752f2ab@gmail.com>
From: Fil Dunsky <filipp.dunsky@gmail.com>
The vendor programs a unique factory MAC address into the SoC eFuse at
offset 0x34, where meson-gx.dtsi already describes the eth_mac nvmem
cell. Reference the cell from the Ethernet controller so the kernel
picks up the factory address itself instead of depending on the
bootloader to populate local-mac-address, or falling back to a random
one when it does not.
The cell is 16 bytes long in meson-gx.dtsi, while
of_get_mac_address_nvmem() only accepts a cell of exactly ETH_ALEN
bytes, so narrow it to the 6 bytes of the address for this board.
Tested on an ODROID-C2 with the bootloader's MAC fixup out of the way
(ethernet0 alias removed from the DTB): with the 16-byte cell the
driver falls back to a random address, with the 6-byte cell eth0 comes
up with the factory address from the eFuse.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 5943bc810..3b74528ef 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -223,6 +223,10 @@ &cec_AO {
hdmi-phandle = <&hdmi_tx>;
};
+ð_mac {
+ reg = <0x34 0x6>;
+};
+
ðmac {
status = "okay";
pinctrl-0 = <ð_rgmii_pins>;
@@ -230,6 +234,9 @@ ðmac {
phy-handle = <ð_phy0>;
phy-mode = "rgmii";
+ nvmem-cells = <ð_mac>;
+ nvmem-cell-names = "mac-address";
+
amlogic,tx-delay-ns = <2>;
mdio {
--
2.53.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2026-10-11 18:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 18:31 [PATCH v2 0/2] arm64: dts: meson-gxbb-odroidc2: eFuse MAC address and LED properties Fil Dunsky via B4 Relay
2026-10-11 18:31 ` Fil Dunsky via B4 Relay [this message]
2026-10-11 20:49 ` [PATCH v2 1/2] arm64: dts: meson-gxbb-odroidc2: read the Ethernet MAC address from eFuse Martin Blumenstingl
2026-10-11 20:59 ` Fil Dunsky
2026-10-11 18:31 ` [PATCH v2 2/2] arm64: dts: meson-gxbb-odroidc2: use color and function for the status LED Fil Dunsky via B4 Relay
2026-10-11 20:39 ` Martin Blumenstingl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261011-odroidc2-dts-v2-1-a3a4a752f2ab@gmail.com \
--to=devnull+filipp.dunsky.gmail.com@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=filipp.dunsky@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®