From: Marc Zyngier <maz@kernel.org>
To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Mark Kettenis <kettenis@openbsd.org>,
Sven Peter <sven@svenpeter.dev>, Hector Martin <marcan@marcan.st>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
kernel-team@android.com
Subject: [PATCH 5/5] arm64: dts: apple: j274: Expose PCI node for the Ethernet MAC address
Date: Mon, 25 Oct 2021 22:10:18 +0100 [thread overview]
Message-ID: <20211025211018.744363-6-maz@kernel.org> (raw)
In-Reply-To: <20211025211018.744363-1-maz@kernel.org>
At the moment, all the Minis running Linux have the same MAC
address (00:10:18:00:00:00), which is a bit annoying.
Expose the PCI node corresponding to the Ethernet device, and
declare a 'local-mac-address' property. The bootloader will update
it (m1n1 already has the required feature). And if it doesn't, then
the default value is already present in the DT.
This relies on forcing the bus number for each port so that the
endpoints connected to them are correctly numbered (and keeps dtc
quiet).
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/boot/dts/apple/t8103-j274.dts | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64/boot/dts/apple/t8103-j274.dts b/arch/arm64/boot/dts/apple/t8103-j274.dts
index e0f6775b9878..33a80f9501dc 100644
--- a/arch/arm64/boot/dts/apple/t8103-j274.dts
+++ b/arch/arm64/boot/dts/apple/t8103-j274.dts
@@ -17,6 +17,7 @@ / {
aliases {
serial0 = &serial0;
+ ethernet0 = ðernet0;
};
chosen {
@@ -43,3 +44,25 @@ memory@800000000 {
&serial0 {
status = "okay";
};
+
+/*
+ * Force the bus number assignments so that we can declare some of the
+ * on-board devices and properties that are populated by the bootloader
+ * (such as MAC addresses).
+ */
+&port00 {
+ bus-range = <1 1>;
+};
+
+&port01 {
+ bus-range = <2 2>;
+};
+
+&port02 {
+ bus-range = <3 3>;
+ ethernet0: pci@0,0 {
+ reg = <0x30000 0x0 0x0 0x0 0x0>;
+ /* To be filled by the loader */
+ local-mac-address = [00 10 18 00 00 00];
+ };
+};
--
2.30.2
next prev parent reply other threads:[~2021-10-25 21:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 21:10 [PATCH 0/5] arm64: apple: DT updates for M1 PCIe support Marc Zyngier
2021-10-25 21:10 ` [PATCH 1/5] arm64: apple: Add pinctrl nodes Marc Zyngier
2021-10-25 21:10 ` [PATCH 2/5] arm64: apple: Add PCIe node Marc Zyngier
2021-10-25 21:10 ` [PATCH 3/5] arm64: dts: apple: t8103: Add PCIe DARTs Marc Zyngier
2021-10-25 21:10 ` [PATCH 4/5] arm64: dts: apple: t8103: Add root port interrupt routing Marc Zyngier
2021-10-25 21:10 ` Marc Zyngier [this message]
2021-10-25 21:45 ` [PATCH 5/5] arm64: dts: apple: j274: Expose PCI node for the Ethernet MAC address Alyssa Rosenzweig
2021-10-27 2:10 ` [PATCH 0/5] arm64: apple: DT updates for M1 PCIe support Hector Martin
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=20211025211018.744363-6-maz@kernel.org \
--to=maz@kernel.org \
--cc=alyssa@rosenzweig.io \
--cc=devicetree@vger.kernel.org \
--cc=kernel-team@android.com \
--cc=kettenis@openbsd.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marcan@marcan.st \
--cc=sven@svenpeter.dev \
/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;
as well as URLs for NNTP newsgroup(s).