[PATCH net-next v3 2/9] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC

From: Louis-Alexis Eyraud

Date: Fri Oct 16 2026 - 06:42:49 EST


Add new compatible string and clock definitions for the Ethernet MAC
IP found in MT8189 SoC.

Regarding the required clocks, the MT8189 datasheets list in the
paragraph related to this IP clocks the mac main and ptp reference
clocks as the ones to turn on.

No specific peripheral clock for Ethernet MAC is described in the SoC
clock list. But at the same time, the Ethernet MAC block diagram,
present in the datasheets, shows this IP is interconnected to the rest
of SoC with AXI and APB interfaces (and in MT8188 datasheet too).
There is no APB related clock, that is specific to the IP in MT8189,
contrary to MT8188 or MT8195 that have one. But since it is on an APB
bus (likely shared between multiple IPs), then there is a bus clock for
peripheral access. Describing the IP having it makes sense, same thing
for AXI too, so the clock lists for this compatible are reflecting
that.

Also, don't allow mediatek,rmii-clk-from-mac property for MT8189
compatible.

Finally, update "mediatek,rx-delay-ps" and "mediatek,tx-delay-ps" property
description to add MT8189 RX/TX delay stage divider values, as they
differ from existing supported SoC.

Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@xxxxxxxxxxxxx>
---
.../devicetree/bindings/net/mediatek-dwmac.yaml | 54 ++++++++++++++++++----
1 file changed, 45 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
index 14f9683f20fe..6acfe104ef09 100644
--- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
@@ -20,13 +20,11 @@ select:
enum:
- mediatek,mt2712-gmac
- mediatek,mt8188-gmac
+ - mediatek,mt8189-gmac
- mediatek,mt8195-gmac
required:
- compatible

-allOf:
- - $ref: snps,dwmac.yaml#
-
properties:
compatible:
oneOf:
@@ -36,6 +34,7 @@ properties:
- const: snps,dwmac-4.20a
- items:
- enum:
+ - mediatek,mt8189-gmac
- mediatek,mt8195-gmac
- const: snps,dwmac-5.10a
- items:
@@ -45,7 +44,7 @@ properties:
- const: snps,dwmac-5.10a

clocks:
- minItems: 5
+ minItems: 4
items:
- description: AXI clock
- description: APB clock
@@ -55,7 +54,7 @@ properties:
- description: MAC clock gate

clock-names:
- minItems: 5
+ minItems: 4
items:
- const: axi
- const: apb
@@ -86,8 +85,10 @@ properties:
or will round down. Range 0~31*170.
For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
or will round down. Range 0~31*550.
- For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple of 290,
- or will round down. Range 0~31*290.
+ For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a
+ multiple of 290, or will round down. Range 0~31*290.
+ For MT8189 RGMII/RMII/MII interface, Allowed value need to
+ be a multiple of 180, or will round down. Range 0~31*180.

mediatek,rx-delay-ps:
description:
@@ -96,8 +97,10 @@ properties:
or will round down. Range 0~31*170.
For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
or will round down. Range 0~31*550.
- For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple
- of 290, or will round down. Range 0~31*290.
+ For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a
+ multiple of 290, or will round down. Range 0~31*290.
+ For MT8189 RGMII/RMII/MII interface, Allowed value need to
+ be a multiple of 180, or will round down. Range 0~31*180.

mediatek,rmii-rxc:
type: boolean
@@ -147,6 +150,39 @@ required:
- phy-mode
- mediatek,pericfg

+allOf:
+ - $ref: snps,dwmac.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - mediatek,mt2712-gmac
+ - mediatek,mt8188-gmac
+ - mediatek,mt8195-gmac
+ then:
+ properties:
+ clocks:
+ minItems: 5
+
+ clock-names:
+ minItems: 5
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - mediatek,mt8189-gmac
+ then:
+ properties:
+ clocks:
+ maxItems: 4
+ clock-names:
+ maxItems: 4
+
+ mediatek,rmii-clk-from-mac: false
+
unevaluatedProperties: false

examples:

--
2.56.0