From: Sjoerd Simons <sjoerd@collabora.com>
To: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Ryder Lee" <ryder.lee@mediatek.com>,
"Jianjun Wang" <jianjun.wang@mediatek.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
"Vinod Koul" <vkoul@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Lee Jones" <lee@kernel.org>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Felix Fietkau" <nbd@nbd.name>
Cc: kernel@collabora.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-pci@vger.kernel.org,
linux-phy@lists.infradead.org, netdev@vger.kernel.org,
Daniel Golle <daniel@makrotopia.org>,
Bryan Hinton <bryan@bryanhinton.com>,
Sjoerd Simons <sjoerd@collabora.com>
Subject: [PATCH 12/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable Ethernet
Date: Thu, 16 Oct 2025 12:08:48 +0200 [thread overview]
Message-ID: <20251016-openwrt-one-network-v1-12-de259719b6f2@collabora.com> (raw)
In-Reply-To: <20251016-openwrt-one-network-v1-0-de259719b6f2@collabora.com>
Enable the Ethernet subsystem on OpenWrt One board with dual-MAC
configuration:
- GMAC0: Connected to external Airoha EN8811H 2.5GbE PHY via SGMII
(2500base-x mode) for WAN connectivity with LED indicators
- GMAC1: Connected to internal MT7981 1GbE PHY (GMII mode) for LAN
Ethernet aliases are defined to provide consistent network interface
naming (ethernet0 = LAN, ethernet1 = WAN).
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
---
.../boot/dts/mediatek/mt7981b-openwrt-one.dts | 58 ++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
index 9878009385cc6..6e6e4f1515f67 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts
@@ -3,6 +3,8 @@
/dts-v1/;
#include "mt7981b.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
#include "dt-bindings/pinctrl/mt65xx.h"
/ {
@@ -10,6 +12,8 @@ / {
model = "OpenWrt One";
aliases {
+ ethernet0 = &gmac1;
+ ethernet1 = &gmac0;
serial0 = &uart0;
};
@@ -41,6 +45,56 @@ reg_5v: regulator-5v {
};
};
+ð {
+ status = "okay";
+
+ gmac0: mac@0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+ nvmem-cells = <&macaddr_factory_24 0>;
+ nvmem-cell-names = "mac-address";
+ phy-mode = "2500base-x";
+ phy-handle = <&phy15>;
+ };
+
+ gmac1: mac@1 {
+ compatible = "mediatek,eth-mac";
+ reg = <1>;
+ phy-mode = "gmii";
+ phy-handle = <&int_gbe_phy>;
+ };
+};
+
+&mdio_bus {
+ phy15: ethernet-phy@f {
+ compatible = "ethernet-phy-id03a2.a411";
+ reg = <0xf>;
+ interrupt-parent = <&pio>;
+ interrupts = <38 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <10000>;
+ reset-deassert-us = <20000>;
+ airoha,pnswap-rx;
+
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_AMBER>;
+ };
+
+ led@1 {
+ reg = <1>;
+ function = LED_FUNCTION_WAN;
+ color = <LED_COLOR_ID_GREEN>;
+ };
+ };
+ };
+};
+
&pcie {
pinctrl-names = "default";
pinctrl-0 = <&pcie_pins>;
@@ -145,6 +199,10 @@ partition@180000 {
};
};
+&sgmiisys0 {
+ mediatek,pnswap;
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
--
2.51.0
next prev parent reply other threads:[~2025-10-16 10:09 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 10:08 [PATCH 00/15] arm64: dts: mediatek: Add Openwrt One AP functionality Sjoerd Simons
2025-10-16 10:08 ` [PATCH 01/15] arm64: dts: mediatek: mt7981b: Add labels to commonly referenced nodes Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 02/15] arm64: dts: mediatek: mt7981b-openwrt-one: Configure UART0 pinmux Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 12:38 ` Daniel Golle
2025-10-16 14:29 ` AngeloGioacchino Del Regno
2025-10-16 16:37 ` Daniel Golle
2025-10-20 10:23 ` AngeloGioacchino Del Regno
2025-10-20 12:28 ` Daniel Golle
2025-10-20 14:02 ` AngeloGioacchino Del Regno
2025-10-20 17:05 ` Daniel Golle
2025-10-16 10:08 ` [PATCH 03/15] arm64: dts: mediatek: mt7981b: Add reserved memory for TF-A Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 04/15] dt-bindings: mfd: syscon: Add mt7981-topmisc Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:29 ` Conor Dooley
2025-10-16 10:08 ` [PATCH 05/15] dt-bindings: pci: mediatek-pcie-gen3: Add MT7981 PCIe compatible Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:28 ` Conor Dooley
2025-10-16 15:55 ` Bjorn Helgaas
2025-10-16 10:08 ` [PATCH 06/15] dt-bindings: phy: mediatek,tphy: Add support for MT7981 Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:28 ` Conor Dooley
2025-10-16 10:08 ` [PATCH 07/15] arm64: dts: mediatek: mt7981b: Add PCIe and USB support Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 08/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable PCIe and USB Sjoerd Simons
2025-10-16 10:08 ` [PATCH 09/15] dt-bindings: net: mediatek,net: Correct bindings for MT7981 Sjoerd Simons
2025-10-16 11:29 ` AngeloGioacchino Del Regno
2025-10-16 15:27 ` Conor Dooley
2025-10-16 10:08 ` [PATCH 10/15] arm64: dts: mediatek: mt7981b: Add Ethernet and WiFi offload support Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-16 16:47 ` Daniel Golle
2025-10-20 10:27 ` AngeloGioacchino Del Regno
2025-10-20 12:17 ` Daniel Golle
2025-10-30 20:34 ` Sjoerd Simons
2025-10-16 10:08 ` [PATCH 11/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable SPI NOR Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-30 21:26 ` Sjoerd Simons
2025-10-16 10:08 ` Sjoerd Simons [this message]
2025-10-17 17:31 ` [PATCH 12/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable Ethernet Andrew Lunn
2025-10-21 20:21 ` Sjoerd Simons
2025-10-21 20:40 ` Andrew Lunn
2025-10-22 6:56 ` Sjoerd Simons
2025-10-28 11:14 ` Eric Woudstra
2025-10-28 13:24 ` Sjoerd Simons
2025-10-29 15:41 ` Lucien.Jheng
2025-10-16 10:08 ` [PATCH 13/15] arm64: dts: mediatek: mt7981b: Add wifi memory region Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-11-01 12:40 ` Sjoerd Simons
2025-10-16 10:08 ` [PATCH 14/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable wifi Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-16 10:08 ` [PATCH 15/15] arm64: dts: mediatek: mt7981b-openwrt-one: Enable leds Sjoerd Simons
2025-10-16 11:28 ` AngeloGioacchino Del Regno
2025-10-17 17:35 ` Andrew Lunn
2025-10-22 7:26 ` Sjoerd Simons
2025-10-22 12:35 ` Andrew Lunn
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=20251016-openwrt-one-network-v1-12-de259719b6f2@collabora.com \
--to=sjoerd@collabora.com \
--cc=andrew+netdev@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bhelgaas@google.com \
--cc=bryan@bryanhinton.com \
--cc=chunfeng.yun@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=jianjun.wang@mediatek.com \
--cc=kernel@collabora.com \
--cc=kishon@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=vkoul@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