* [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support
@ 2026-11-10 12:08 Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 01/10] dt-bindings: net: mediatek-dwmac: fix unit in rx/tx delay property description Louis-Alexis Eyraud
` (9 more replies)
0 siblings, 10 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Krzysztof Kozlowski, Andrew Lunn,
Louis-Alexis Eyraud
This series adds the Ethernet support for Mediatek MT8189 SoC and its
variants (MT8371, MT8391). These SoC integrate a Gigabit Ethernet MAC
with RGMII/RMII/MII interface, with a similar design than previous SoCs
such MT8188 or MT8195.
This series is based on net-next tree (sha1: d26955e57475).
It has been tested on Mediatek Genio 520-EVK (MT8371) and 720-EVK
(MT8391) boards, which both integrate an Airoha AN8801R Ethernet
PHY, with hardware enablement series ([1]).
It has been also tested on Mediatek Genio 510-EVK (MT8370, variant of
MT8188) and 1200-EVK (MT8395, variant of MT8195).
[1]: https://lore.kernel.org/linux-mediatek/20260924-add-mediatek-genio-520-720-evk-v3-0-2ec5c80677d4@collabora.com/
---
Changes in v5:
- Rebased on net-next (sha1: d26955e57475)
- Added received trailers in patch 2 and 3
- Updated commit message in patch 2 (K. Kozlowski)
- Fixed in patch 6 max delay values check and wrong value in error log
in mediatek_dwmac_config_dt function (Sashiko)
- Link to v4: https://lore.kernel.org/r/20261103-dwmac-mediatek-mt8189-v4-0-c86c14fc50f4@collabora.com
Changes in v4:
- Rebased on net-next (sha1: 7b6ab4dbc156)
- Added Reviewed-By and Acked-by trailers in patch 1
- Added patch 2 to add deprecated flag in the mediatek,tx/rx-delay-ps
vendor property and update their description (A. Lunn)
- Dropped in patch 3 mediatek,tx/rx-delay-ps description changes
in bindings and patch description (A. Lunn)
- Patch 4:
- Used single delay stage divider define for both RX and TX case
to simplify implementation
- Added MII delay definitions
- Dropped Reviewed-By trailer due to changes
- Patch 5:
- Fixed MII/RGMII delay stage divider inversion (Sashiko)
- Used single delay stage divider define for both RX and TX case
to simplify implementation
- Added patch 6 to add the standard internal delay properties use
- Patch 7:
- Renamed delay stage divider fields in variant struct (M. Chevallier)
- Simplified patch implementation by using one delay stage divider
per mode in variant structure and commonizing delay computation
in new single private function
- Dropped "net: stmac: mediatek: use TX clock phase shift in RGMII mode
with 1Gbps speed" previously present in v2 and v3, as suggested by A.
Lunn
- Rebased patches 8 to 10 over previous patches modifications
- Link to v3: https://lore.kernel.org/r/20261016-dwmac-mediatek-mt8189-v3-0-25daf2bbcf35@collabora.com
Changes in v3:
- Rebased on net-next (sha1: 6b3e73774815)
- Added Reviewed-By trailers in patch 3 and 5
- Added patch 1 to fix unit in rx/tx delay property description
(Sashiko)
- Patch 2:
- Reworded patch description to add clock list details
- Removed the specific MT8189 clocks list so the axi and apb clocks
are also described for this compatible too and reworked the clock
list and number check
- Added mediatek,rmii-clk-from-mac as not allowed for MT8189 (Sashiko)
- Added patch 4 to simplify TX/RX delay handling in mt2712_set_delay,
as suggested by M. Chevallier and modified following patches
accordingly
- Fixed in patch 7 tx_rgmii_delay_stage_div null case and register value
in mt8195_fix_mac_speed (Sashiko)
- Added in patch 9 the axi and apb clocks to MT8189 clock lists
- Link to v2: https://lore.kernel.org/r/20260924-dwmac-mediatek-mt8189-v2-0-430bd74d5ef9@collabora.com
Changes in v2:
- Rebased on net-next (sha1: 528de6832b21)
- Dropped "net: stmmac: mediatek: rename MT2712 and MT8195 variant
methods" and "net: stmmac: mediatek: add support for TX deallocation
adjustment feature" patches, present in v1 (M. Chevallier)
- Patch 1:
- Removed rmii_internal clock from required clock list (A. Lunn)
- Added MT8189 stage delay divider values in "mediatek,rx-delay-ps" and
"mediatek,rx-delay-ps" property description (Sashiko)
- Updated commit description
- Added patch 2 to simplify TX/RX delay handling in mt8195_set_delay
- Added patch 3 to add RX/TX delay stage divider in platform data
- Patch 4:
- Replace MT8195_PERI_ETH_CTRL_BASE by MT8195_PERI_ETH_CTRL_OFFSET to
harmonize the variable and definition naming (A. Lunn)
- Added Reviewed-By tag
- Added patch 5 to add the TX Clock phase shift use in
RGMII and in 1G speed
- Patch 6:
- Reworded flag and define names to explicit a bit more what the
feature does
- Updated commit description
- Patch 7:
- Added the new definitions and needed fields in platform data
- Updated commit description to add the info about MT8189 RX/TX delay
stage divider and maximum values, and remove reference about
stage fine feature
- Link to v1: https://lore.kernel.org/r/20260707-dwmac-mediatek-mt8189-v1-0-17f345eaaca3@collabora.com
---
Louis-Alexis Eyraud (10):
dt-bindings: net: mediatek-dwmac: fix unit in rx/tx delay property description
dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties
dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC
net: stmmac: mediatek: simplify TX/RX delay handling in mt8195_set_delay
net: stmmac: mediatek: simplify TX/RX delay handling in mt2712_set_delay
net: stmmac: mediatek: use standard internal delay properties
net: stmmac: mediatek: add RX/TX delay stage divider in platform data
net: stmmac: mediatek: add PERI_ETH_CTRLx register offset in platform data
net: stmmac: mediatek: add support for TX clock output enable feature
net: stmmac: mediatek: add support for MT8189 SoC
.../devicetree/bindings/net/mediatek-dwmac.yaml | 52 ++-
.../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 368 +++++++++++++--------
2 files changed, 276 insertions(+), 144 deletions(-)
---
base-commit: d26955e57475434b59d43ba372b2a50d33d5e0ed
change-id: 20260703-dwmac-mediatek-mt8189-9dafe3984951
Best regards,
--
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH net-next v5 01/10] dt-bindings: net: mediatek-dwmac: fix unit in rx/tx delay property description
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 02/10] dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties Louis-Alexis Eyraud
` (8 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Krzysztof Kozlowski, Andrew Lunn,
Louis-Alexis Eyraud
The "mediatek,rx-delay-ps" and "mediatek,tx-delay-ps" descriptions say
their values are in nanoseconds but their names with the "ps" suffix
suggest it is picoseconds.
They are in fact used in both driver and devicetree as picosecond.
So, modify the two properties unit description to fix their unit.
Fixes: 150b6adda6b1 ("net: dt-bindings: dwmac: Convert mediatek-dwmac to DT schema")
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Documentation/devicetree/bindings/net/mediatek-dwmac.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
index 3aab21b8e8de..14f9683f20fe 100644
--- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
@@ -81,7 +81,7 @@ properties:
mediatek,tx-delay-ps:
description:
- The internal TX clock delay (provided by this driver) in nanoseconds.
+ The internal TX clock delay (provided by this driver) in picoseconds.
For MT2712 RGMII interface, Allowed value need to be a multiple of 170,
or will round down. Range 0~31*170.
For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
@@ -91,7 +91,7 @@ properties:
mediatek,rx-delay-ps:
description:
- The internal RX clock delay (provided by this driver) in nanoseconds.
+ The internal RX clock delay (provided by this driver) in picoseconds.
For MT2712 RGMII interface, Allowed value need to be a multiple of 170,
or will round down. Range 0~31*170.
For MT2712 RMII/MII interface, Allowed value need to be a multiple of 550,
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 02/10] dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 01/10] dt-bindings: net: mediatek-dwmac: fix unit in rx/tx delay property description Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 03/10] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC Louis-Alexis Eyraud
` (7 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Krzysztof Kozlowski,
Louis-Alexis Eyraud
Deprecate 'mediatek,rx-delay-ps' and 'mediatek,tx-delay-ps' vendor
properties because they duplicate standard properties from generic
Ethernet controller bindings and have the same unit (picoseconds).
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Documentation/devicetree/bindings/net/mediatek-dwmac.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
index 14f9683f20fe..956240616638 100644
--- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
@@ -80,6 +80,7 @@ properties:
interface and timing delay.
mediatek,tx-delay-ps:
+ deprecated: true
description:
The internal TX clock delay (provided by this driver) in picoseconds.
For MT2712 RGMII interface, Allowed value need to be a multiple of 170,
@@ -88,8 +89,11 @@ properties:
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.
+ Deprecated, this property should not used anymore for RGMII TX internal delays,
+ the standard tx-internal-delay-ps property should be used instead.
mediatek,rx-delay-ps:
+ deprecated: true
description:
The internal RX clock delay (provided by this driver) in picoseconds.
For MT2712 RGMII interface, Allowed value need to be a multiple of 170,
@@ -98,6 +102,8 @@ properties:
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.
+ Deprecated, this property should not used anymore for RGMII RX internal delays,
+ the standard rx-internal-delay-ps property should be used instead.
mediatek,rmii-rxc:
type: boolean
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 03/10] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 01/10] dt-bindings: net: mediatek-dwmac: fix unit in rx/tx delay property description Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 02/10] dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 04/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt8195_set_delay Louis-Alexis Eyraud
` (6 subsequent siblings)
9 siblings, 1 reply; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Krzysztof Kozlowski,
Louis-Alexis Eyraud
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.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../devicetree/bindings/net/mediatek-dwmac.yaml | 42 +++++++++++++++++++---
1 file changed, 37 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
index 956240616638..0fc2eed06646 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
@@ -153,6 +152,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
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 04/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt8195_set_delay
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
` (2 preceding siblings ...)
2026-11-10 12:08 ` [PATCH net-next v5 03/10] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 05/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt2712_set_delay Louis-Alexis Eyraud
` (5 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Louis-Alexis Eyraud
The mt8195_set_delay function modifies at its beginning the TX and RX
internal delay variables, located in the driver data, by dividing
them by a constant (290) and restores their original values by
multiplying them again at the function end. It is done in order to
convert them into a step value, used by the hardware registers for
setting these delays.
But this is rather pointless to modify the driver data for that, while
it could be done locally in the function. The original delay values
cannot be used anymore (if needed) during mt8195_set_delay processing.
Finally, they are altered after the function call if they are not a
multiple of 290.
So, simplify these delay variable handling by using local variables to
convert them into the register value and use those in the write calls.
Also, remove the two private conversion functions, that are not useful
anymore and add definitions for MT8195 RX/TX delay maximum and divider
values.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 91 ++++++++++++----------
1 file changed, 50 insertions(+), 41 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index 30ae0dba7fff..ac473222213f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -63,6 +63,11 @@
#define MT8195_DLY_RMII_TXC_ENABLE BIT(5)
#define MT8195_DLY_RMII_TXC_STAGES GENMASK(4, 0)
+#define MT8195_MII_DLY_STAGE_DIV 290 /* 290ps per stage */
+#define MT8195_MII_DELAY_MAX 9280 /* 32 x 290ps */
+#define MT8195_RGMII_DLY_STAGE_DIV 290 /* 290ps per stage */
+#define MT8195_RGMII_DELAY_MAX 9280 /* 32 x 290ps */
+
struct mac_delay_struct {
u32 tx_delay;
u32 rx_delay;
@@ -293,42 +298,39 @@ static int mt8195_set_interface(struct mediatek_dwmac_plat_data *plat,
return 0;
}
-static void mt8195_delay_ps2stage(struct mediatek_dwmac_plat_data *plat)
-{
- struct mac_delay_struct *mac_delay = &plat->mac_delay;
-
- /* 290ps per stage */
- mac_delay->tx_delay /= 290;
- mac_delay->rx_delay /= 290;
-}
-
-static void mt8195_delay_stage2ps(struct mediatek_dwmac_plat_data *plat)
-{
- struct mac_delay_struct *mac_delay = &plat->mac_delay;
-
- /* 290ps per stage */
- mac_delay->tx_delay *= 290;
- mac_delay->rx_delay *= 290;
-}
-
static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
{
struct mac_delay_struct *mac_delay = &plat->mac_delay;
- u32 gtxc_delay_val = 0, delay_val = 0, rmii_delay_val = 0;
-
- mt8195_delay_ps2stage(plat);
+ u32 rx_delay_stage_val, tx_delay_stage_val;
+ u32 gtxc_delay_val = 0;
+ u32 rmii_delay_val = 0;
+ u32 delay_val = 0;
switch (plat->phy_mode) {
case PHY_INTERFACE_MODE_MII:
- delay_val |= FIELD_PREP(MT8195_DLY_TXC_ENABLE, !!mac_delay->tx_delay);
- delay_val |= FIELD_PREP(MT8195_DLY_TXC_STAGES, mac_delay->tx_delay);
+ rx_delay_stage_val = mac_delay->rx_delay
+ / MT8195_MII_DLY_STAGE_DIV;
+ tx_delay_stage_val = mac_delay->tx_delay
+ / MT8195_MII_DLY_STAGE_DIV;
+
+ delay_val |= FIELD_PREP(MT8195_DLY_TXC_ENABLE,
+ !!tx_delay_stage_val);
+ delay_val |= FIELD_PREP(MT8195_DLY_TXC_STAGES,
+ tx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_TXC_INV, mac_delay->tx_inv);
- delay_val |= FIELD_PREP(MT8195_DLY_RXC_ENABLE, !!mac_delay->rx_delay);
- delay_val |= FIELD_PREP(MT8195_DLY_RXC_STAGES, mac_delay->rx_delay);
+ delay_val |= FIELD_PREP(MT8195_DLY_RXC_ENABLE,
+ !!rx_delay_stage_val);
+ delay_val |= FIELD_PREP(MT8195_DLY_RXC_STAGES,
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_RXC_INV, mac_delay->rx_inv);
break;
case PHY_INTERFACE_MODE_RMII:
+ rx_delay_stage_val = mac_delay->rx_delay
+ / MT8195_MII_DLY_STAGE_DIV;
+ tx_delay_stage_val = mac_delay->tx_delay
+ / MT8195_MII_DLY_STAGE_DIV;
+
if (plat->rmii_clk_from_mac) {
/* case 1: mac provides the rmii reference clock,
* and the clock output to TXC pin.
@@ -336,16 +338,16 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
* The ingress timing can be adjusted by RMII_RXC delay macro circuit.
*/
rmii_delay_val |= FIELD_PREP(MT8195_DLY_RMII_TXC_ENABLE,
- !!mac_delay->tx_delay);
+ !!tx_delay_stage_val);
rmii_delay_val |= FIELD_PREP(MT8195_DLY_RMII_TXC_STAGES,
- mac_delay->tx_delay);
+ tx_delay_stage_val);
rmii_delay_val |= FIELD_PREP(MT8195_DLY_RMII_TXC_INV,
mac_delay->tx_inv);
rmii_delay_val |= FIELD_PREP(MT8195_DLY_RMII_RXC_ENABLE,
- !!mac_delay->rx_delay);
+ !!rx_delay_stage_val);
rmii_delay_val |= FIELD_PREP(MT8195_DLY_RMII_RXC_STAGES,
- mac_delay->rx_delay);
+ rx_delay_stage_val);
rmii_delay_val |= FIELD_PREP(MT8195_DLY_RMII_RXC_INV,
mac_delay->rx_inv);
} else {
@@ -361,9 +363,9 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
* by RXC delay macro circuit.
*/
delay_val |= FIELD_PREP(MT8195_DLY_RXC_ENABLE,
- !!mac_delay->rx_delay);
+ !!rx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_RXC_STAGES,
- mac_delay->rx_delay);
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_RXC_INV,
mac_delay->rx_inv);
} else {
@@ -372,9 +374,9 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
* by TXC delay macro circuit.
*/
delay_val |= FIELD_PREP(MT8195_DLY_TXC_ENABLE,
- !!mac_delay->rx_delay);
+ !!rx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_TXC_STAGES,
- mac_delay->rx_delay);
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_TXC_INV,
mac_delay->rx_inv);
}
@@ -384,12 +386,21 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
case PHY_INTERFACE_MODE_RGMII_TXID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_ID:
- gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_ENABLE, !!mac_delay->tx_delay);
- gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_STAGES, mac_delay->tx_delay);
+ rx_delay_stage_val = mac_delay->rx_delay
+ / MT8195_RGMII_DLY_STAGE_DIV;
+ tx_delay_stage_val = mac_delay->tx_delay
+ / MT8195_RGMII_DLY_STAGE_DIV;
+
+ gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_ENABLE,
+ !!tx_delay_stage_val);
+ gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_STAGES,
+ tx_delay_stage_val);
gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_INV, mac_delay->tx_inv);
- delay_val |= FIELD_PREP(MT8195_DLY_RXC_ENABLE, !!mac_delay->rx_delay);
- delay_val |= FIELD_PREP(MT8195_DLY_RXC_STAGES, mac_delay->rx_delay);
+ delay_val |= FIELD_PREP(MT8195_DLY_RXC_ENABLE,
+ !!rx_delay_stage_val);
+ delay_val |= FIELD_PREP(MT8195_DLY_RXC_STAGES,
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_RXC_INV, mac_delay->rx_inv);
break;
@@ -408,8 +419,6 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
regmap_write(plat->peri_regmap, MT8195_PERI_ETH_CTRL1, delay_val);
regmap_write(plat->peri_regmap, MT8195_PERI_ETH_CTRL2, rmii_delay_val);
- mt8195_delay_stage2ps(plat);
-
return 0;
}
@@ -418,8 +427,8 @@ static const struct mediatek_dwmac_variant mt8195_gmac_variant = {
.dwmac_set_delay = mt8195_set_delay,
.clk_list = mt8195_dwmac_clk_l,
.num_clks = ARRAY_SIZE(mt8195_dwmac_clk_l),
- .rx_delay_max = 9280,
- .tx_delay_max = 9280,
+ .rx_delay_max = MT8195_MII_DELAY_MAX,
+ .tx_delay_max = MT8195_MII_DELAY_MAX,
.dma_bit_mask = 35,
};
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 05/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt2712_set_delay
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
` (3 preceding siblings ...)
2026-11-10 12:08 ` [PATCH net-next v5 04/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt8195_set_delay Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties Louis-Alexis Eyraud
` (4 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Louis-Alexis Eyraud
The mt2712_set_delay function modifies at its beginning the TX and RX
internal delay variables, located in the driver data, by dividing
them by a constant (170 for RGMII, 550 for MII/RMII) and restores their
original values by multiplying them again at the function end. It is
done in order to convert them into a step value, used by the hardware
registers for setting these delays.
But this is rather pointless to modify the driver data for that, while
it could be done locally in the function. The original delay values
cannot be used anymore (if needed) during mt2712_set_delay processing.
Finally, they are altered after the function call if they are not a
multiple of the delay stage divider.
So, simplify these delay variable handling by using local variables to
convert them into the register value and use those in the write calls.
Also, remove the two private conversion functions, that are not useful
anymore and add definitions for MT2712 RX/TX delay maximum and divider
values.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 140 +++++++++------------
1 file changed, 62 insertions(+), 78 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index ac473222213f..cda3f3edde39 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -36,6 +36,11 @@
#define ETH_FINE_DLY_GTXC BIT(1)
#define ETH_FINE_DLY_RXC BIT(0)
+#define MT2712_MII_DLY_STAGE_DIV 550 /* 550ps per stage */
+#define MT2712_MII_DELAY_MAX 17600 /* 32 x 550ps */
+#define MT2712_RGMII_DLY_STAGE_DIV 170 /* 170ps per stage */
+#define MT2712_RGMII_DELAY_MAX 5440 /* 32 x 170ps */
+
/* Peri Configuration register for mt8195 */
#define MT8195_PERI_ETH_CTRL0 0xFD0
#define MT8195_RMII_CLK_SRC_INTERNAL BIT(28)
@@ -129,86 +134,54 @@ static int mt2712_set_interface(struct mediatek_dwmac_plat_data *plat,
return 0;
}
-static void mt2712_delay_ps2stage(struct mediatek_dwmac_plat_data *plat)
-{
- struct mac_delay_struct *mac_delay = &plat->mac_delay;
-
- switch (plat->phy_mode) {
- case PHY_INTERFACE_MODE_MII:
- case PHY_INTERFACE_MODE_RMII:
- /* 550ps per stage for MII/RMII */
- mac_delay->tx_delay /= 550;
- mac_delay->rx_delay /= 550;
- break;
- case PHY_INTERFACE_MODE_RGMII:
- case PHY_INTERFACE_MODE_RGMII_TXID:
- case PHY_INTERFACE_MODE_RGMII_RXID:
- case PHY_INTERFACE_MODE_RGMII_ID:
- /* 170ps per stage for RGMII */
- mac_delay->tx_delay /= 170;
- mac_delay->rx_delay /= 170;
- break;
- default:
- dev_err(plat->dev, "phy interface not supported\n");
- break;
- }
-}
-
-static void mt2712_delay_stage2ps(struct mediatek_dwmac_plat_data *plat)
-{
- struct mac_delay_struct *mac_delay = &plat->mac_delay;
-
- switch (plat->phy_mode) {
- case PHY_INTERFACE_MODE_MII:
- case PHY_INTERFACE_MODE_RMII:
- /* 550ps per stage for MII/RMII */
- mac_delay->tx_delay *= 550;
- mac_delay->rx_delay *= 550;
- break;
- case PHY_INTERFACE_MODE_RGMII:
- case PHY_INTERFACE_MODE_RGMII_TXID:
- case PHY_INTERFACE_MODE_RGMII_RXID:
- case PHY_INTERFACE_MODE_RGMII_ID:
- /* 170ps per stage for RGMII */
- mac_delay->tx_delay *= 170;
- mac_delay->rx_delay *= 170;
- break;
- default:
- dev_err(plat->dev, "phy interface not supported\n");
- break;
- }
-}
-
static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
{
struct mac_delay_struct *mac_delay = &plat->mac_delay;
- u32 delay_val = 0, fine_val = 0;
-
- mt2712_delay_ps2stage(plat);
+ u32 rx_delay_stage_val, tx_delay_stage_val;
+ u32 delay_val = 0;
+ u32 fine_val = 0;
switch (plat->phy_mode) {
case PHY_INTERFACE_MODE_MII:
- delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE, !!mac_delay->tx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_TXC_STAGES, mac_delay->tx_delay);
+ rx_delay_stage_val = mac_delay->rx_delay
+ / MT2712_MII_DLY_STAGE_DIV;
+ tx_delay_stage_val = mac_delay->tx_delay
+ / MT2712_MII_DLY_STAGE_DIV;
+
+ delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE,
+ !!tx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_TXC_STAGES,
+ tx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_TXC_INV, mac_delay->tx_inv);
- delay_val |= FIELD_PREP(ETH_DLY_RXC_ENABLE, !!mac_delay->rx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_RXC_STAGES, mac_delay->rx_delay);
+ delay_val |= FIELD_PREP(ETH_DLY_RXC_ENABLE,
+ !!rx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_RXC_STAGES,
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_RXC_INV, mac_delay->rx_inv);
break;
case PHY_INTERFACE_MODE_RMII:
+ rx_delay_stage_val = mac_delay->rx_delay
+ / MT2712_MII_DLY_STAGE_DIV;
+ tx_delay_stage_val = mac_delay->tx_delay
+ / MT2712_MII_DLY_STAGE_DIV;
+
if (plat->rmii_clk_from_mac) {
/* case 1: mac provides the rmii reference clock,
* and the clock output to TXC pin.
* The egress timing can be adjusted by GTXC delay macro circuit.
* The ingress timing can be adjusted by TXC delay macro circuit.
*/
- delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE, !!mac_delay->rx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_TXC_STAGES, mac_delay->rx_delay);
+ delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE,
+ !!rx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_TXC_STAGES,
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_TXC_INV, mac_delay->rx_inv);
- delay_val |= FIELD_PREP(ETH_DLY_GTXC_ENABLE, !!mac_delay->tx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_GTXC_STAGES, mac_delay->tx_delay);
+ delay_val |= FIELD_PREP(ETH_DLY_GTXC_ENABLE,
+ !!tx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_GTXC_STAGES,
+ tx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_GTXC_INV, mac_delay->tx_inv);
} else {
/* case 2: the rmii reference clock is from external phy,
@@ -222,16 +195,20 @@ static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
* to RXC pin, the reference clock will be adjusted
* by RXC delay macro circuit.
*/
- delay_val |= FIELD_PREP(ETH_DLY_RXC_ENABLE, !!mac_delay->rx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_RXC_STAGES, mac_delay->rx_delay);
+ delay_val |= FIELD_PREP(ETH_DLY_RXC_ENABLE,
+ !!rx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_RXC_STAGES,
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_RXC_INV, mac_delay->rx_inv);
} else {
/* the rmii reference clock from outside is connected
* to TXC pin, the reference clock will be adjusted
* by TXC delay macro circuit.
*/
- delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE, !!mac_delay->rx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_TXC_STAGES, mac_delay->rx_delay);
+ delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE,
+ !!rx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_TXC_STAGES,
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_TXC_INV, mac_delay->rx_inv);
}
/* tx_inv will inverse the tx clock inside mac relateive to
@@ -246,14 +223,23 @@ static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
case PHY_INTERFACE_MODE_RGMII_TXID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_ID:
+ rx_delay_stage_val = mac_delay->rx_delay
+ / MT2712_RGMII_DLY_STAGE_DIV;
+ tx_delay_stage_val = mac_delay->tx_delay
+ / MT2712_RGMII_DLY_STAGE_DIV;
+
fine_val = ETH_FINE_DLY_GTXC | ETH_FINE_DLY_RXC;
- delay_val |= FIELD_PREP(ETH_DLY_GTXC_ENABLE, !!mac_delay->tx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_GTXC_STAGES, mac_delay->tx_delay);
+ delay_val |= FIELD_PREP(ETH_DLY_GTXC_ENABLE,
+ !!tx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_GTXC_STAGES,
+ tx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_GTXC_INV, mac_delay->tx_inv);
- delay_val |= FIELD_PREP(ETH_DLY_RXC_ENABLE, !!mac_delay->rx_delay);
- delay_val |= FIELD_PREP(ETH_DLY_RXC_STAGES, mac_delay->rx_delay);
+ delay_val |= FIELD_PREP(ETH_DLY_RXC_ENABLE,
+ !!rx_delay_stage_val);
+ delay_val |= FIELD_PREP(ETH_DLY_RXC_STAGES,
+ rx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_RXC_INV, mac_delay->rx_inv);
break;
default:
@@ -263,19 +249,17 @@ static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
regmap_write(plat->peri_regmap, PERI_ETH_DLY, delay_val);
regmap_write(plat->peri_regmap, PERI_ETH_DLY_FINE, fine_val);
- mt2712_delay_stage2ps(plat);
-
return 0;
}
static const struct mediatek_dwmac_variant mt2712_gmac_variant = {
- .dwmac_set_phy_interface = mt2712_set_interface,
- .dwmac_set_delay = mt2712_set_delay,
- .clk_list = mt2712_dwmac_clk_l,
- .num_clks = ARRAY_SIZE(mt2712_dwmac_clk_l),
- .rx_delay_max = 17600,
- .tx_delay_max = 17600,
- .dma_bit_mask = 33,
+ .dwmac_set_phy_interface = mt2712_set_interface,
+ .dwmac_set_delay = mt2712_set_delay,
+ .clk_list = mt2712_dwmac_clk_l,
+ .num_clks = ARRAY_SIZE(mt2712_dwmac_clk_l),
+ .rx_delay_max = MT2712_MII_DELAY_MAX,
+ .tx_delay_max = MT2712_MII_DELAY_MAX,
+ .dma_bit_mask = 33,
};
static int mt8195_set_interface(struct mediatek_dwmac_plat_data *plat,
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
` (4 preceding siblings ...)
2026-11-10 12:08 ` [PATCH net-next v5 05/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt2712_set_delay Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-11 12:09 ` sashiko-bot
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 07/10] net: stmmac: mediatek: add RX/TX delay stage divider in platform data Louis-Alexis Eyraud
` (3 subsequent siblings)
9 siblings, 2 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Louis-Alexis Eyraud
Currently, the mediatek-dwmac driver uses the 'mediatek,rx-delay-ps'
and 'mediatek,tx-delay-ps' vendor properties for configuring the RX and
TX internal clock delays for all its supported PHY modes (MII, RMII,
and RGMII).
The generic Ethernet controller bindings provide 'rx-internal-delay-ps'
and 'tx-internal-delay-ps' standard properties to describe the RGMII RX
and TX internal clock delays. Their use is now recommended, rather than
existing vendor properties.
There is no equivalent standard properties for RMII and MII case at the
moment.
So, add in driver data separate config values for MII/RMII and RGMII
delays and modify mediatek_dwmac_config_dt, used to parse devicetree
to populate and check these configs with the following logic:
- read vendor properties for MII and RMII delay timings
- read standard properties for RGMII delay timings
- if not available, fallback to vendor values
Also, modify mt2712/mt8195_set_delay to use these new separate config
values.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 81 ++++++++++++++++------
1 file changed, 60 insertions(+), 21 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index cda3f3edde39..ee43d694099b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -76,6 +76,8 @@
struct mac_delay_struct {
u32 tx_delay;
u32 rx_delay;
+ u32 rgmii_tx_delay;
+ u32 rgmii_rx_delay;
bool tx_inv;
bool rx_inv;
};
@@ -103,8 +105,8 @@ struct mediatek_dwmac_variant {
const char * const *clk_list;
int num_clks;
- u32 rx_delay_max;
- u32 tx_delay_max;
+ u32 mii_delay_max;
+ u32 rgmii_delay_max;
u8 dma_bit_mask;
};
@@ -223,9 +225,9 @@ static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
case PHY_INTERFACE_MODE_RGMII_TXID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_ID:
- rx_delay_stage_val = mac_delay->rx_delay
+ rx_delay_stage_val = mac_delay->rgmii_rx_delay
/ MT2712_RGMII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->tx_delay
+ tx_delay_stage_val = mac_delay->rgmii_tx_delay
/ MT2712_RGMII_DLY_STAGE_DIV;
fine_val = ETH_FINE_DLY_GTXC | ETH_FINE_DLY_RXC;
@@ -257,8 +259,8 @@ static const struct mediatek_dwmac_variant mt2712_gmac_variant = {
.dwmac_set_delay = mt2712_set_delay,
.clk_list = mt2712_dwmac_clk_l,
.num_clks = ARRAY_SIZE(mt2712_dwmac_clk_l),
- .rx_delay_max = MT2712_MII_DELAY_MAX,
- .tx_delay_max = MT2712_MII_DELAY_MAX,
+ .mii_delay_max = MT2712_MII_DELAY_MAX,
+ .rgmii_delay_max = MT2712_RGMII_DELAY_MAX,
.dma_bit_mask = 33,
};
@@ -370,9 +372,9 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
case PHY_INTERFACE_MODE_RGMII_TXID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_ID:
- rx_delay_stage_val = mac_delay->rx_delay
+ rx_delay_stage_val = mac_delay->rgmii_rx_delay
/ MT8195_RGMII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->tx_delay
+ tx_delay_stage_val = mac_delay->rgmii_tx_delay
/ MT8195_RGMII_DLY_STAGE_DIV;
gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_ENABLE,
@@ -411,15 +413,18 @@ static const struct mediatek_dwmac_variant mt8195_gmac_variant = {
.dwmac_set_delay = mt8195_set_delay,
.clk_list = mt8195_dwmac_clk_l,
.num_clks = ARRAY_SIZE(mt8195_dwmac_clk_l),
- .rx_delay_max = MT8195_MII_DELAY_MAX,
- .tx_delay_max = MT8195_MII_DELAY_MAX,
+ .mii_delay_max = MT8195_MII_DELAY_MAX,
+ .rgmii_delay_max = MT8195_RGMII_DELAY_MAX,
.dma_bit_mask = 35,
};
static int mediatek_dwmac_config_dt(struct mediatek_dwmac_plat_data *plat)
{
struct mac_delay_struct *mac_delay = &plat->mac_delay;
- u32 tx_delay_ps, rx_delay_ps;
+ u32 rgmii_tx_delay_ps = 0;
+ u32 rgmii_rx_delay_ps = 0;
+ u32 tx_delay_ps = 0;
+ u32 rx_delay_ps = 0;
plat->peri_regmap = syscon_regmap_lookup_by_phandle(plat->np, "mediatek,pericfg");
if (IS_ERR(plat->peri_regmap)) {
@@ -427,24 +432,58 @@ static int mediatek_dwmac_config_dt(struct mediatek_dwmac_plat_data *plat)
return PTR_ERR(plat->peri_regmap);
}
- if (!of_property_read_u32(plat->np, "mediatek,tx-delay-ps", &tx_delay_ps)) {
- if (tx_delay_ps < plat->variant->tx_delay_max) {
- mac_delay->tx_delay = tx_delay_ps;
- } else {
- dev_err(plat->dev, "Invalid TX clock delay: %dps\n", tx_delay_ps);
+ of_property_read_u32(plat->np, "mediatek,tx-delay-ps", &tx_delay_ps);
+ if (tx_delay_ps >= plat->variant->mii_delay_max) {
+ dev_err(plat->dev, "Invalid TX clock delay: %dps\n",
+ tx_delay_ps);
+ return -EINVAL;
+ }
+
+ /* Read RGMII TX internal delay standard property */
+ if (!of_property_read_u32(plat->np, "tx-internal-delay-ps",
+ &rgmii_tx_delay_ps)) {
+ if (rgmii_tx_delay_ps >= plat->variant->rgmii_delay_max) {
+ dev_err(plat->dev, "Invalid RGMII TX clock delay: %dps\n",
+ rgmii_tx_delay_ps);
return -EINVAL;
}
+ } else {
+ /*
+ * standard property value not available, fallback on vendor
+ * value instead and cap it to max RGMII delay value
+ */
+ rgmii_tx_delay_ps = min(tx_delay_ps,
+ plat->variant->rgmii_delay_max);
}
- if (!of_property_read_u32(plat->np, "mediatek,rx-delay-ps", &rx_delay_ps)) {
- if (rx_delay_ps < plat->variant->rx_delay_max) {
- mac_delay->rx_delay = rx_delay_ps;
- } else {
- dev_err(plat->dev, "Invalid RX clock delay: %dps\n", rx_delay_ps);
+ of_property_read_u32(plat->np, "mediatek,rx-delay-ps", &rx_delay_ps);
+ if (rx_delay_ps >= plat->variant->mii_delay_max) {
+ dev_err(plat->dev, "Invalid RX clock delay: %dps\n",
+ rx_delay_ps);
+ return -EINVAL;
+ }
+
+ /* Read RGMII RX internal delay standard property */
+ if (!of_property_read_u32(plat->np, "rx-internal-delay-ps",
+ &rgmii_rx_delay_ps)) {
+ if (rgmii_rx_delay_ps >= plat->variant->rgmii_delay_max) {
+ dev_err(plat->dev, "Invalid RGMII RX clock delay: %dps\n",
+ rgmii_rx_delay_ps);
return -EINVAL;
}
+ } else {
+ /*
+ * standard property value not available, fallback on vendor
+ * value instead and cap it to max RGMII delay value
+ */
+ rgmii_rx_delay_ps = min(rx_delay_ps,
+ plat->variant->rgmii_delay_max);
}
+ mac_delay->rx_delay = rx_delay_ps;
+ mac_delay->tx_delay = tx_delay_ps;
+ mac_delay->rgmii_rx_delay = rgmii_rx_delay_ps;
+ mac_delay->rgmii_tx_delay = rgmii_tx_delay_ps;
mac_delay->tx_inv = of_property_read_bool(plat->np, "mediatek,txc-inverse");
mac_delay->rx_inv = of_property_read_bool(plat->np, "mediatek,rxc-inverse");
plat->rmii_rxc = of_property_read_bool(plat->np, "mediatek,rmii-rxc");
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 07/10] net: stmmac: mediatek: add RX/TX delay stage divider in platform data
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
` (5 preceding siblings ...)
2026-11-10 12:08 ` [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 08/10] net: stmmac: mediatek: add PERI_ETH_CTRLx register offset " Louis-Alexis Eyraud
` (2 subsequent siblings)
9 siblings, 0 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Louis-Alexis Eyraud
In preparation of newer SoC support, that have like MT8189 SoC
different RX and TX internal delay stage steps than MT8188/MT8195, add
the RX and TX delay stage divider values in the variant platform data
and replace the hardcoded value uses in mt2712_set_delay and
mt8195_set_delay.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 76 +++++++++++++---------
1 file changed, 46 insertions(+), 30 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index ee43d694099b..e39ca83c2a6f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -107,6 +107,8 @@ struct mediatek_dwmac_variant {
u32 mii_delay_max;
u32 rgmii_delay_max;
+ u16 mii_delay_stage_div;
+ u16 rgmii_delay_stage_div;
u8 dma_bit_mask;
};
@@ -119,6 +121,36 @@ static const char * const mt8195_dwmac_clk_l[] = {
"axi", "apb", "mac_cg", "mac_main", "ptp_ref"
};
+static int get_delay_stage(struct mediatek_dwmac_plat_data *plat,
+ u32 *rx_val, u32 *tx_val)
+{
+ struct mac_delay_struct *mac_delay = &plat->mac_delay;
+ u32 rx_delay_conf_val, tx_delay_conf_val;
+ u16 delay_stage_div;
+
+ if (phy_interface_mode_is_rgmii(plat->phy_mode)) {
+ /* RGMII case */
+ delay_stage_div = plat->variant->rgmii_delay_stage_div;
+ rx_delay_conf_val = mac_delay->rgmii_rx_delay;
+ tx_delay_conf_val = mac_delay->rgmii_tx_delay;
+ } else {
+ /* MII/RMII case */
+ delay_stage_div = plat->variant->mii_delay_stage_div;
+ rx_delay_conf_val = mac_delay->rx_delay;
+ tx_delay_conf_val = mac_delay->tx_delay;
+ }
+
+ if (!delay_stage_div) {
+ dev_err(plat->dev, "Invalid internal delay stage divider\n");
+ return -EINVAL;
+ }
+
+ *rx_val = rx_delay_conf_val / delay_stage_div;
+ *tx_val = tx_delay_conf_val / delay_stage_div;
+
+ return 0;
+}
+
static int mt2712_set_interface(struct mediatek_dwmac_plat_data *plat,
u8 phy_intf_sel)
{
@@ -142,14 +174,14 @@ static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
u32 rx_delay_stage_val, tx_delay_stage_val;
u32 delay_val = 0;
u32 fine_val = 0;
+ int ret;
+
+ ret = get_delay_stage(plat, &rx_delay_stage_val, &tx_delay_stage_val);
+ if (ret)
+ return ret;
switch (plat->phy_mode) {
case PHY_INTERFACE_MODE_MII:
- rx_delay_stage_val = mac_delay->rx_delay
- / MT2712_MII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->tx_delay
- / MT2712_MII_DLY_STAGE_DIV;
-
delay_val |= FIELD_PREP(ETH_DLY_TXC_ENABLE,
!!tx_delay_stage_val);
delay_val |= FIELD_PREP(ETH_DLY_TXC_STAGES,
@@ -163,11 +195,6 @@ static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
delay_val |= FIELD_PREP(ETH_DLY_RXC_INV, mac_delay->rx_inv);
break;
case PHY_INTERFACE_MODE_RMII:
- rx_delay_stage_val = mac_delay->rx_delay
- / MT2712_MII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->tx_delay
- / MT2712_MII_DLY_STAGE_DIV;
-
if (plat->rmii_clk_from_mac) {
/* case 1: mac provides the rmii reference clock,
* and the clock output to TXC pin.
@@ -225,11 +252,6 @@ static int mt2712_set_delay(struct mediatek_dwmac_plat_data *plat)
case PHY_INTERFACE_MODE_RGMII_TXID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_ID:
- rx_delay_stage_val = mac_delay->rgmii_rx_delay
- / MT2712_RGMII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->rgmii_tx_delay
- / MT2712_RGMII_DLY_STAGE_DIV;
-
fine_val = ETH_FINE_DLY_GTXC | ETH_FINE_DLY_RXC;
delay_val |= FIELD_PREP(ETH_DLY_GTXC_ENABLE,
@@ -261,6 +283,8 @@ static const struct mediatek_dwmac_variant mt2712_gmac_variant = {
.num_clks = ARRAY_SIZE(mt2712_dwmac_clk_l),
.mii_delay_max = MT2712_MII_DELAY_MAX,
.rgmii_delay_max = MT2712_RGMII_DELAY_MAX,
+ .mii_delay_stage_div = MT2712_MII_DLY_STAGE_DIV,
+ .rgmii_delay_stage_div = MT2712_RGMII_DLY_STAGE_DIV,
.dma_bit_mask = 33,
};
@@ -291,14 +315,14 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
u32 gtxc_delay_val = 0;
u32 rmii_delay_val = 0;
u32 delay_val = 0;
+ int ret;
+
+ ret = get_delay_stage(plat, &rx_delay_stage_val, &tx_delay_stage_val);
+ if (ret)
+ return ret;
switch (plat->phy_mode) {
case PHY_INTERFACE_MODE_MII:
- rx_delay_stage_val = mac_delay->rx_delay
- / MT8195_MII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->tx_delay
- / MT8195_MII_DLY_STAGE_DIV;
-
delay_val |= FIELD_PREP(MT8195_DLY_TXC_ENABLE,
!!tx_delay_stage_val);
delay_val |= FIELD_PREP(MT8195_DLY_TXC_STAGES,
@@ -312,11 +336,6 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
delay_val |= FIELD_PREP(MT8195_DLY_RXC_INV, mac_delay->rx_inv);
break;
case PHY_INTERFACE_MODE_RMII:
- rx_delay_stage_val = mac_delay->rx_delay
- / MT8195_MII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->tx_delay
- / MT8195_MII_DLY_STAGE_DIV;
-
if (plat->rmii_clk_from_mac) {
/* case 1: mac provides the rmii reference clock,
* and the clock output to TXC pin.
@@ -372,11 +391,6 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
case PHY_INTERFACE_MODE_RGMII_TXID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_ID:
- rx_delay_stage_val = mac_delay->rgmii_rx_delay
- / MT8195_RGMII_DLY_STAGE_DIV;
- tx_delay_stage_val = mac_delay->rgmii_tx_delay
- / MT8195_RGMII_DLY_STAGE_DIV;
-
gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_ENABLE,
!!tx_delay_stage_val);
gtxc_delay_val |= FIELD_PREP(MT8195_DLY_GTXC_STAGES,
@@ -415,6 +429,8 @@ static const struct mediatek_dwmac_variant mt8195_gmac_variant = {
.num_clks = ARRAY_SIZE(mt8195_dwmac_clk_l),
.mii_delay_max = MT8195_MII_DELAY_MAX,
.rgmii_delay_max = MT8195_RGMII_DELAY_MAX,
+ .mii_delay_stage_div = MT8195_MII_DLY_STAGE_DIV,
+ .rgmii_delay_stage_div = MT8195_RGMII_DLY_STAGE_DIV,
.dma_bit_mask = 35,
};
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 08/10] net: stmmac: mediatek: add PERI_ETH_CTRLx register offset in platform data
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
` (6 preceding siblings ...)
2026-11-10 12:08 ` [PATCH net-next v5 07/10] net: stmmac: mediatek: add RX/TX delay stage divider in platform data Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 09/10] net: stmmac: mediatek: add support for TX clock output enable feature Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC Louis-Alexis Eyraud
9 siblings, 0 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Louis-Alexis Eyraud
In preparation of newer SoC support, that use like MT8195 the Ethernet
control registers from the peripheral configuration syscon but at a
different base offset, add a new base offset in the variant platform
data to access the PERI_ETH_CTRLx registers and use it in implemented
methods.
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 26 ++++++++++++++++------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index e39ca83c2a6f..3f024d455cbd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -42,7 +42,9 @@
#define MT2712_RGMII_DELAY_MAX 5440 /* 32 x 170ps */
/* Peri Configuration register for mt8195 */
-#define MT8195_PERI_ETH_CTRL0 0xFD0
+#define MT8195_PERI_ETH_CTRL_OFFSET 0xFD0
+
+#define MT8195_PERI_ETH_CTRL0 0x0
#define MT8195_RMII_CLK_SRC_INTERNAL BIT(28)
#define MT8195_RMII_CLK_SRC_RXC BIT(27)
#define MT8195_ETH_INTF_SEL GENMASK(26, 24)
@@ -52,7 +54,7 @@
#define MT8195_DLY_GTXC_ENABLE BIT(5)
#define MT8195_DLY_GTXC_STAGES GENMASK(4, 0)
-#define MT8195_PERI_ETH_CTRL1 0xFD4
+#define MT8195_PERI_ETH_CTRL1 0x4
#define MT8195_DLY_RXC_INV BIT(25)
#define MT8195_DLY_RXC_ENABLE BIT(18)
#define MT8195_DLY_RXC_STAGES GENMASK(17, 13)
@@ -60,7 +62,7 @@
#define MT8195_DLY_TXC_ENABLE BIT(5)
#define MT8195_DLY_TXC_STAGES GENMASK(4, 0)
-#define MT8195_PERI_ETH_CTRL2 0xFD8
+#define MT8195_PERI_ETH_CTRL2 0x8
#define MT8195_DLY_RMII_RXC_INV BIT(25)
#define MT8195_DLY_RMII_RXC_ENABLE BIT(18)
#define MT8195_DLY_RMII_RXC_STAGES GENMASK(17, 13)
@@ -109,6 +111,7 @@ struct mediatek_dwmac_variant {
u32 rgmii_delay_max;
u16 mii_delay_stage_div;
u16 rgmii_delay_stage_div;
+ u32 peri_eth_ctrl_offset;
u8 dma_bit_mask;
};
@@ -292,6 +295,7 @@ static int mt8195_set_interface(struct mediatek_dwmac_plat_data *plat,
u8 phy_intf_sel)
{
u32 intf_val = FIELD_PREP(MT8195_ETH_INTF_SEL, phy_intf_sel);
+ u32 reg_offset = plat->variant->peri_eth_ctrl_offset;
if (phy_intf_sel == PHY_INTF_SEL_RMII) {
if (plat->rmii_clk_from_mac)
@@ -303,7 +307,9 @@ static int mt8195_set_interface(struct mediatek_dwmac_plat_data *plat,
/* MT8195 only support external PHY */
intf_val |= MT8195_EXT_PHY_MODE;
- regmap_write(plat->peri_regmap, MT8195_PERI_ETH_CTRL0, intf_val);
+ regmap_write(plat->peri_regmap,
+ reg_offset + MT8195_PERI_ETH_CTRL0,
+ intf_val);
return 0;
}
@@ -311,6 +317,7 @@ static int mt8195_set_interface(struct mediatek_dwmac_plat_data *plat,
static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
{
struct mac_delay_struct *mac_delay = &plat->mac_delay;
+ u32 reg_offset = plat->variant->peri_eth_ctrl_offset;
u32 rx_delay_stage_val, tx_delay_stage_val;
u32 gtxc_delay_val = 0;
u32 rmii_delay_val = 0;
@@ -410,14 +417,18 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
}
regmap_update_bits(plat->peri_regmap,
- MT8195_PERI_ETH_CTRL0,
+ reg_offset + MT8195_PERI_ETH_CTRL0,
MT8195_RGMII_TXC_PHASE_CTRL |
MT8195_DLY_GTXC_INV |
MT8195_DLY_GTXC_ENABLE |
MT8195_DLY_GTXC_STAGES,
gtxc_delay_val);
- regmap_write(plat->peri_regmap, MT8195_PERI_ETH_CTRL1, delay_val);
- regmap_write(plat->peri_regmap, MT8195_PERI_ETH_CTRL2, rmii_delay_val);
+ regmap_write(plat->peri_regmap,
+ reg_offset + MT8195_PERI_ETH_CTRL1,
+ delay_val);
+ regmap_write(plat->peri_regmap,
+ reg_offset + MT8195_PERI_ETH_CTRL2,
+ rmii_delay_val);
return 0;
}
@@ -432,6 +443,7 @@ static const struct mediatek_dwmac_variant mt8195_gmac_variant = {
.mii_delay_stage_div = MT8195_MII_DLY_STAGE_DIV,
.rgmii_delay_stage_div = MT8195_RGMII_DLY_STAGE_DIV,
.dma_bit_mask = 35,
+ .peri_eth_ctrl_offset = MT8195_PERI_ETH_CTRL_OFFSET,
};
static int mediatek_dwmac_config_dt(struct mediatek_dwmac_plat_data *plat)
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 09/10] net: stmmac: mediatek: add support for TX clock output enable feature
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
` (7 preceding siblings ...)
2026-11-10 12:08 ` [PATCH net-next v5 08/10] net: stmmac: mediatek: add PERI_ETH_CTRLx register offset " Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC Louis-Alexis Eyraud
9 siblings, 1 reply; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Louis-Alexis Eyraud
The MT8189 SoC has in the Ethernet control 0 register from the
peripheral configuration (pericfg) an additional bit to enable the TX
clock signal output.
In preparation of MT8189 SoC support, add its definition, use in the
mt8195_set_interface callback, and a support flag in the platform
data.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index 3f024d455cbd..1a0ab95dfbf0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -41,6 +41,9 @@
#define MT2712_RGMII_DLY_STAGE_DIV 170 /* 170ps per stage */
#define MT2712_RGMII_DELAY_MAX 5440 /* 32 x 170ps */
+/* Peri Configuration register for mt8189 */
+#define MT8189_CTRL0_TXC_OUT_OP_EN BIT(20)
+
/* Peri Configuration register for mt8195 */
#define MT8195_PERI_ETH_CTRL_OFFSET 0xFD0
@@ -113,6 +116,7 @@ struct mediatek_dwmac_variant {
u16 rgmii_delay_stage_div;
u32 peri_eth_ctrl_offset;
u8 dma_bit_mask;
+ bool mac_txclk_out_en;
};
/* list of clocks required for mac */
@@ -307,6 +311,9 @@ static int mt8195_set_interface(struct mediatek_dwmac_plat_data *plat,
/* MT8195 only support external PHY */
intf_val |= MT8195_EXT_PHY_MODE;
+ if (plat->variant->mac_txclk_out_en)
+ intf_val |= MT8189_CTRL0_TXC_OUT_OP_EN;
+
regmap_write(plat->peri_regmap,
reg_offset + MT8195_PERI_ETH_CTRL0,
intf_val);
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
` (8 preceding siblings ...)
2026-11-10 12:08 ` [PATCH net-next v5 09/10] net: stmmac: mediatek: add support for TX clock output enable feature Louis-Alexis Eyraud
@ 2026-11-10 12:08 ` Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-14 16:45 ` Maxime Chevallier
9 siblings, 2 replies; 18+ messages in thread
From: Louis-Alexis Eyraud @ 2026-11-10 12:08 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Richard Cochran,
Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue,
Eric Dumazet, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32, Louis-Alexis Eyraud
Like MT8195 SoC, MT8189 SoC uses the Ethernet control registers from
the peripheral configuration (pericfg) but at a different offset.
It also has different RX and TX internal delay stage dividers (290ps
for MT8195, 180ps for MT8189), and by consequence a reduced value range
for these delays. It finally needs additional feature such as the
TX clock output enable one.
Thus, add compatible, clock definitions and specific platform data to
support the MT8189 SoC.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
.../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 27 ++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index 1a0ab95dfbf0..ce232313014d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -42,8 +42,15 @@
#define MT2712_RGMII_DELAY_MAX 5440 /* 32 x 170ps */
/* Peri Configuration register for mt8189 */
+#define MT8189_PERI_ETH_CTRL_OFFSET 0x270
+
#define MT8189_CTRL0_TXC_OUT_OP_EN BIT(20)
+#define MT8189_MII_DLY_STAGE_DIV 180 /* 180ps per stage */
+#define MT8189_MII_DELAY_MAX 5760 /* 32 x 180ps */
+#define MT8189_RGMII_DLY_STAGE_DIV 180 /* 180ps per stage */
+#define MT8189_RGMII_DELAY_MAX 5760 /* 32 x 180ps */
+
/* Peri Configuration register for mt8195 */
#define MT8195_PERI_ETH_CTRL_OFFSET 0xFD0
@@ -124,6 +131,10 @@ static const char * const mt2712_dwmac_clk_l[] = {
"axi", "apb", "mac_main", "ptp_ref"
};
+static const char * const mt8189_dwmac_clk_l[] = {
+ "axi", "apb", "mac_main", "ptp_ref"
+};
+
static const char * const mt8195_dwmac_clk_l[] = {
"axi", "apb", "mac_cg", "mac_main", "ptp_ref"
};
@@ -440,6 +451,20 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
return 0;
}
+static const struct mediatek_dwmac_variant mt8189_gmac_variant = {
+ .dwmac_set_phy_interface = mt8195_set_interface,
+ .dwmac_set_delay = mt8195_set_delay,
+ .clk_list = mt8189_dwmac_clk_l,
+ .num_clks = ARRAY_SIZE(mt8189_dwmac_clk_l),
+ .dma_bit_mask = 35,
+ .mii_delay_max = MT8189_MII_DELAY_MAX,
+ .rgmii_delay_max = MT8189_RGMII_DELAY_MAX,
+ .mii_delay_stage_div = MT8189_MII_DLY_STAGE_DIV,
+ .rgmii_delay_stage_div = MT8189_RGMII_DLY_STAGE_DIV,
+ .peri_eth_ctrl_offset = MT8189_PERI_ETH_CTRL_OFFSET,
+ .mac_txclk_out_en = true,
+};
+
static const struct mediatek_dwmac_variant mt8195_gmac_variant = {
.dwmac_set_phy_interface = mt8195_set_interface,
.dwmac_set_delay = mt8195_set_delay,
@@ -729,6 +754,8 @@ static void mediatek_dwmac_remove(struct platform_device *pdev)
static const struct of_device_id mediatek_dwmac_match[] = {
{ .compatible = "mediatek,mt2712-gmac",
.data = &mt2712_gmac_variant },
+ { .compatible = "mediatek,mt8189-gmac",
+ .data = &mt8189_gmac_variant },
{ .compatible = "mediatek,mt8195-gmac",
.data = &mt8195_gmac_variant },
{ }
--
2.56.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties
2026-11-10 12:08 ` [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties Louis-Alexis Eyraud
@ 2026-11-11 12:09 ` sashiko-bot
2026-11-14 14:52 ` netdev-bot+sashiko
1 sibling, 0 replies; 18+ messages in thread
From: sashiko-bot @ 2026-11-11 12:09 UTC (permalink / raw)
To: Louis-Alexis Eyraud; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net: stmmac: mediatek: off-by-one RGMII cap in
mediatek_dwmac_config_dt()
--
commit 67e9a961803ad0d99ebf09bcf04f114dc90c181a
Author: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
net: stmmac: mediatek: use standard internal delay properties
This commit adds support for the standard rx-internal-delay-ps and
tx-internal-delay-ps Device Tree properties for RGMII internal clock
delays, falling back to the vendor delay properties when the standard ones
are absent.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> index cda3f3edde39f..ee43d694099bd 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
[ ... ]
> @@ -427,24 +432,58 @@ static int mediatek_dwmac_config_dt(struct mediatek_dwmac_plat_data *plat)
> return PTR_ERR(plat->peri_regmap);
> }
>
> - if (!of_property_read_u32(plat->np, "mediatek,tx-delay-ps", &tx_delay_ps)) {
> - if (tx_delay_ps < plat->variant->tx_delay_max) {
> - mac_delay->tx_delay = tx_delay_ps;
> - } else {
> - dev_err(plat->dev, "Invalid TX clock delay: %dps\n", tx_delay_ps);
> + of_property_read_u32(plat->np, "mediatek,tx-delay-ps", &tx_delay_ps);
> + if (tx_delay_ps >= plat->variant->mii_delay_max) {
> + dev_err(plat->dev, "Invalid TX clock delay: %dps\n",
> + tx_delay_ps);
> + return -EINVAL;
> + }
> +
> + /* Read RGMII TX internal delay standard property */
> + if (!of_property_read_u32(plat->np, "tx-internal-delay-ps",
> + &rgmii_tx_delay_ps)) {
> + if (rgmii_tx_delay_ps >= plat->variant->rgmii_delay_max) {
> + dev_err(plat->dev, "Invalid RGMII TX clock delay: %dps\n",
> + rgmii_tx_delay_ps);
> return -EINVAL;
> }
> + } else {
> + /*
> + * standard property value not available, fallback on vendor
> + * value instead and cap it to max RGMII delay value
> + */
> + rgmii_tx_delay_ps = min(tx_delay_ps,
> + plat->variant->rgmii_delay_max);
> }
>
> - if (!of_property_read_u32(plat->np, "mediatek,rx-delay-ps", &rx_delay_ps)) {
> - if (rx_delay_ps < plat->variant->rx_delay_max) {
> - mac_delay->rx_delay = rx_delay_ps;
> - } else {
> - dev_err(plat->dev, "Invalid RX clock delay: %dps\n", rx_delay_ps);
> + of_property_read_u32(plat->np, "mediatek,rx-delay-ps", &rx_delay_ps);
> + if (rx_delay_ps >= plat->variant->mii_delay_max) {
> + dev_err(plat->dev, "Invalid RX clock delay: %dps\n",
> + rx_delay_ps);
> + return -EINVAL;
> + }
> +
> + /* Read RGMII RX internal delay standard property */
> + if (!of_property_read_u32(plat->np, "rx-internal-delay-ps",
> + &rgmii_rx_delay_ps)) {
> + if (rgmii_rx_delay_ps >= plat->variant->rgmii_delay_max) {
> + dev_err(plat->dev, "Invalid RGMII RX clock delay: %dps\n",
> + rgmii_rx_delay_ps);
> return -EINVAL;
> }
> + } else {
> + /*
> + * standard property value not available, fallback on vendor
> + * value instead and cap it to max RGMII delay value
> + */
> + rgmii_rx_delay_ps = min(rx_delay_ps,
> + plat->variant->rgmii_delay_max);
> }
[Severity: Medium]
Can capping rgmii_tx_delay_ps and rgmii_rx_delay_ps to
plat->variant->rgmii_delay_max overflow the 5-bit stage fields in
mt2712_set_delay()?
rgmii_delay_max is an exclusive upper bound (5440 on MT2712, or 32 * 170ps).
When a fallback vendor delay in [5440, 17599] ps is clamped to 5440,
dividing by MT2712_RGMII_DLY_STAGE_DIV yields stage 32 (0x20), which
FIELD_PREP() truncates to stage 0 in ETH_DLY_GTXC_STAGES and
ETH_DLY_RXC_STAGES instead of clamping to stage 31 (for example via
plat->variant->rgmii_delay_max - 1).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-dwmac-mediatek-mt8189-v5-0-7d99d6292962@collabora.com?part=6
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next v5 02/10] dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties
2026-11-10 12:08 ` [PATCH net-next v5 02/10] dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties Louis-Alexis Eyraud
@ 2026-11-14 14:52 ` netdev-bot+sashiko
0 siblings, 0 replies; 18+ messages in thread
From: netdev-bot+sashiko @ 2026-11-14 14:52 UTC (permalink / raw)
To: louisalexis.eyraud
Cc: andrew+netdev, davem, kuba, pabeni, robh, krzk+dt, conor+dt,
richardcochran, matthias.bgg, angelogioacchino.delregno,
biao.huang, maxime.chevallier, mcoquelin.stm32, alexandre.torgue,
edumazet, kernel, netdev, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, linux-stm32
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In Documentation/devicetree/bindings/net/mediatek-dwmac.yaml,
'deprecated: true' is set on both mediatek,tx-delay-ps (line 83) and…
- [Low] Several leftovers in the migration this patch starts.
--
dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties
This commit marks mediatek,rx-delay-ps and mediatek,tx-delay-ps as
deprecated in the MediaTek dwmac binding. It also adds description text
pointing users to the standard rx-internal-delay-ps and
tx-internal-delay-ps properties.
> diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
> index 14f9683f20fea..9562406166387 100644
> --- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
> @@ -80,6 +80,7 @@ properties:
> interface and timing delay.
>
> mediatek,tx-delay-ps:
> + deprecated: true
[Severity: Medium]
This deprecated: true applies to every phy-mode, and the same is true for
mediatek,rx-delay-ps below. The standard replacement only exists for
RGMII, though.
In ethernet-controller.yaml, rx-internal-delay-ps and tx-internal-delay-ps
are only defined inside an if/then that matches the rgmii* modes:
- if:
properties:
phy-mode:
contains:
enum:
- rgmii
- rgmii-rxid
- rgmii-txid
- rgmii-id
then:
properties:
rx-internal-delay-ps:
...
This binding sets unevaluatedProperties: false. So a node with
phy-mode = "rmii" or "mii" that uses tx-internal-delay-ps or
rx-internal-delay-ps would fail schema validation.
The descriptions here still document the MII/RMII ranges (MT2712 in
steps of 550, MT8188/MT8195 in steps of 290). At the end of the series,
get_delay_stage() in dwmac-mediatek.c still takes the MII/RMII delay
only from the vendor values:
} else {
/* MII/RMII case */
delay_stage_div = plat->variant->mii_delay_stage_div;
rx_delay_conf_val = mac_delay->rx_delay;
tx_delay_conf_val = mac_delay->tx_delay;
The later commit "net: stmmac: mediatek: use standard internal delay
properties" in this series also says "There is no equivalent standard
properties for RMII and MII case at the moment."
Doesn't this leave MII/RMII boards that need a MAC delay with only a
deprecated property and no compliant alternative?
The new description text limits the deprecation to RGMII ("for RGMII TX
internal delays"), but the unconditional deprecated: true says
otherwise. Could the deprecation be limited to the rgmii* phy-modes with
an if/then, or the MII/RMII use be kept non-deprecated?
The commit message also says the vendor properties "duplicate standard
properties from generic Ethernet controller bindings". That doesn't seem
to be true for MII/RMII.
> description:
> The internal TX clock delay (provided by this driver) in picoseconds.
> For MT2712 RGMII interface, Allowed value need to be a multiple of 170,
[ ... ]
> For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple of 290,
> or will round down. Range 0~31*290.
> + Deprecated, this property should not used anymore for RGMII TX internal delays,
> + the standard tx-internal-delay-ps property should be used instead.
[Severity: Low]
This isn't a bug, but "should not used anymore" is missing "be". The
same typo is in the new mediatek,rx-delay-ps text.
The example at the end of this binding still uses the deprecated
property, in exactly the RGMII case this text says to avoid:
phy-mode = "rgmii-rxid";
...
mediatek,tx-delay-ps = <1530>;
Should the example be converted too? It isn't updated later in the
series either.
Four in-tree DTS files also still use the deprecated property:
arch/arm64/boot/dts/mediatek/mt2712-evb.dts (1530)
arch/arm64/boot/dts/mediatek/mt8390-grinn-genio-sbc.dtsi (30)
arch/arm64/boot/dts/mediatek/mt8395-genio-common.dtsi (2030)
arch/arm64/boot/dts/mediatek/mt8395-radxa-nio-12l.dts (2030)
Two of these use 2030 ps as the full RGMII TX delay. However,
ethernet-controller.yaml describes the MAC-node internal delay
properties as fine tuning:
# Sometimes there is a need to fine tune the delays. Often the MAC or
# PHY can perform this fine tuning. In the MAC node, the Device Tree
# properties 'rx-internal-delay-ps' and 'tx-internal-delay-ps' should
# be used to indicate fine tuning performed by the MAC. The values
# expected here are small.
Given that, are the vendor properties really plain duplicates of the
standard ones, as the commit message says? Converting the mt8395 boards
looks like it would also mean revisiting phy-mode, not just renaming the
property.
>
> mediatek,rx-delay-ps:
> + deprecated: true
> description:
> The internal RX clock delay (provided by this driver) in picoseconds.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110-dwmac-mediatek-mt8189-v5-0-7d99d6292962%40collabora.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next v5 03/10] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC
2026-11-10 12:08 ` [PATCH net-next v5 03/10] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC Louis-Alexis Eyraud
@ 2026-11-14 14:52 ` netdev-bot+sashiko
0 siblings, 0 replies; 18+ messages in thread
From: netdev-bot+sashiko @ 2026-11-14 14:52 UTC (permalink / raw)
To: louisalexis.eyraud
Cc: andrew+netdev, davem, kuba, pabeni, robh, krzk+dt, conor+dt,
richardcochran, matthias.bgg, angelogioacchino.delregno,
biao.huang, maxime.chevallier, mcoquelin.stm32, alexandre.torgue,
edumazet, kernel, netdev, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, linux-stm32
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The new compatible `mediatek,mt8189-gmac` is added to the
binding, but the descriptions of `mediatek,tx-delay-ps` and…
--
dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC
This patch adds the mediatek,mt8189-gmac compatible to the MediaTek DWMAC
binding and lowers the clocks/clock-names minItems to 4. It also adds
allOf conditionals that keep 5 clocks for MT2712/MT8188/MT8195, allow at
most 4 for MT8189, and disallow mediatek,rmii-clk-from-mac on MT8189.
> diff --git a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
> index 9562406166387..0fc2eed066464 100644
> --- a/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
> +++ b/Documentation/devicetree/bindings/net/mediatek-dwmac.yaml
[ ... ]
> @@ -153,6 +152,39 @@ required:
> - phy-mode
> - mediatek,pericfg
>
> +allOf:
> + - $ref: snps,dwmac.yaml#
[ ... ]
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - mediatek,mt8189-gmac
> + then:
> + properties:
> + clocks:
> + maxItems: 4
> + clock-names:
> + maxItems: 4
> +
> + mediatek,rmii-clk-from-mac: false
[Severity: Low]
This block only disallows mediatek,rmii-clk-from-mac for MT8189, so
mediatek,tx-delay-ps and mediatek,rx-delay-ps are still allowed there.
Should their descriptions also cover the new compatible?
At the moment they only describe MT2712 and MT8188/MT8195:
mediatek,tx-delay-ps:
...
For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple of 290,
or will round down. Range 0~31*290.
The mediatek,rx-delay-ps description has the same text.
The later patch in this series, "net: stmmac: mediatek: add support for
MT8189 SoC", uses a different step size and maximum for MT8189:
#define MT8189_MII_DLY_STAGE_DIV 180 /* 180ps per stage */
#define MT8189_MII_DELAY_MAX 5760 /* 32 x 180ps */
For MII/RMII, these vendor properties are the only way to set the internal
delays. mediatek_dwmac_config_dt() reads the standard *-internal-delay-ps
properties only for RGMII.
Suppose a value is picked using the documented 290 ps step. The driver will
then program value / 180 stages instead of value / 290. Any value of 5760 ps
or more (for example 20 * 290 = 5800) is rejected with -EINVAL:
of_property_read_u32(plat->np, "mediatek,tx-delay-ps", &tx_delay_ps);
if (tx_delay_ps >= plat->variant->mii_delay_max) {
and probe fails.
Setting mediatek,tx-delay-ps: false for MT8189 would not be the right fix,
because it would remove the only way to configure MII/RMII delays on MT8189.
Could both descriptions get an MT8189 line with the 180 ps step and the
0~31*180 range instead?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110-dwmac-mediatek-mt8189-v5-0-7d99d6292962%40collabora.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties
2026-11-10 12:08 ` [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties Louis-Alexis Eyraud
2026-11-11 12:09 ` sashiko-bot
@ 2026-11-14 14:52 ` netdev-bot+sashiko
1 sibling, 0 replies; 18+ messages in thread
From: netdev-bot+sashiko @ 2026-11-14 14:52 UTC (permalink / raw)
To: louisalexis.eyraud
Cc: andrew+netdev, davem, kuba, pabeni, robh, krzk+dt, conor+dt,
richardcochran, matthias.bgg, angelogioacchino.delregno,
biao.huang, maxime.chevallier, mcoquelin.stm32, alexandre.torgue,
edumazet, kernel, netdev, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, linux-stm32
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] In mediatek_dwmac_config_dt(), the new RGMII fallback caps the
vendor value with min(vendor, rgmii_delay_max).
- [Low] The DT binding and the driver disagree.
- [Low] In mediatek_dwmac_config_dt(), the new 'Invalid RGMII TX/RX clock
delay' messages, and the moved 'Invalid TX/RX clock delay' messages,…
--
net: stmmac: mediatek: use standard internal delay properties
This commit makes the mediatek-dwmac driver keep separate MII/RMII and
RGMII delay values. The RGMII delays now come from the standard
rx/tx-internal-delay-ps properties. If those are absent, the driver falls
back to the mediatek,rx/tx-delay-ps vendor properties.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> index cda3f3edde39f..ee43d694099bd 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
[ ... ]
> @@ -427,24 +432,58 @@ static int mediatek_dwmac_config_dt(struct mediatek_dwmac_plat_data *plat)
> return PTR_ERR(plat->peri_regmap);
> }
>
> - if (!of_property_read_u32(plat->np, "mediatek,tx-delay-ps", &tx_delay_ps)) {
> - if (tx_delay_ps < plat->variant->tx_delay_max) {
> - mac_delay->tx_delay = tx_delay_ps;
> - } else {
> - dev_err(plat->dev, "Invalid TX clock delay: %dps\n", tx_delay_ps);
> + of_property_read_u32(plat->np, "mediatek,tx-delay-ps", &tx_delay_ps);
[Severity: Low]
This one is about the binding change in the same series, not this hunk
directly. The commit "dt-bindings: net: mediatek-dwmac: deprecate rx/tx
delay vendor properties" adds "deprecated: true" to both
mediatek,tx-delay-ps and mediatek,rx-delay-ps with no condition. Its
commit message also says they "duplicate standard properties".
In this patch, though, mediatek_dwmac_config_dt() still uses these vendor
properties as the only source for the MII/RMII delays in
mac_delay->tx_delay and mac_delay->rx_delay. This commit message also
says:
There is no equivalent standard properties for RMII and MII case at the
moment.
ethernet-controller.yaml only defines rx/tx-internal-delay-ps inside an
if/then on rgmii phy-modes. That leaves an MII/RMII node with no
non-deprecated way to describe these delays.
Should the schema limit the deprecation to RGMII, the way the description
text already does?
The binding example also still uses the deprecated property on an RGMII
node:
phy-mode = "rgmii-rxid";
...
mediatek,tx-delay-ps = <1530>;
Also, the stage granularity and ranges are documented only for the
deprecated properties, not for the standard ones. The driver now checks
those standard properties against rgmii_delay_max.
> + if (tx_delay_ps >= plat->variant->mii_delay_max) {
> + dev_err(plat->dev, "Invalid TX clock delay: %dps\n",
> + tx_delay_ps);
> + return -EINVAL;
> + }
> +
> + /* Read RGMII TX internal delay standard property */
> + if (!of_property_read_u32(plat->np, "tx-internal-delay-ps",
> + &rgmii_tx_delay_ps)) {
> + if (rgmii_tx_delay_ps >= plat->variant->rgmii_delay_max) {
> + dev_err(plat->dev, "Invalid RGMII TX clock delay: %dps\n",
> + rgmii_tx_delay_ps);
[Severity: Low]
This isn't a bug, but rgmii_tx_delay_ps is a u32 printed with %d. A
malformed DT value above INT_MAX, such as 0xffffffff, would be logged as
"-1ps". Should this be %u?
The same applies to the "Invalid RGMII RX clock delay" message. It also
applies to the moved "Invalid TX/RX clock delay" messages for tx_delay_ps
and rx_delay_ps.
> + return -EINVAL;
> }
> + } else {
> + /*
> + * standard property value not available, fallback on vendor
> + * value instead and cap it to max RGMII delay value
> + */
> + rgmii_tx_delay_ps = min(tx_delay_ps,
> + plat->variant->rgmii_delay_max);
> }
[Severity: Medium]
Can this cap produce a value that the stage field can't hold?
rgmii_delay_max is used as an exclusive bound elsewhere, including in the
standard-property branch just above:
if (rgmii_tx_delay_ps >= plat->variant->rgmii_delay_max) {
It is also defined as one stage past the largest value that can be
programmed:
#define MT2712_RGMII_DELAY_MAX 5440 /* 32 x 170ps */
On MT2712, mii_delay_max is 17600. A mediatek,tx-delay-ps value in
[5440, 17600) therefore passes the earlier check. If the node has no
tx-internal-delay-ps, min() caps the value to exactly 5440.
Then the RGMII case in mt2712_set_delay() does:
tx_delay_stage_val = mac_delay->rgmii_tx_delay
/ MT2712_RGMII_DLY_STAGE_DIV;
That gives 5440 / 170 = 32. For a non-constant value, FIELD_PREP() masks
32 down to 0 in the 5-bit ETH_DLY_GTXC_STAGES and ETH_DLY_RXC_STAGES
fields. ETH_DLY_GTXC_ENABLE and ETH_DLY_RXC_ENABLE are still set from
!!32.
So the RGMII delay is programmed to zero stages with the enable bit set,
not to the maximum the comment describes, and nothing is logged. The
binding documents the MT2712 RGMII range as 0~31*170, which matches an
exclusive bound. The commit message only says "fallback to vendor
values" and doesn't mention any capping.
Should the cap be rgmii_delay_max - 1? Or should the fallback return
-EINVAL, like the standard-property branch does?
The rgmii_rx_delay_ps fallback below has the same problem. MT8195 and
MT8189 aren't affected, because mii_delay_max equals rgmii_delay_max
there. The behavior seems unchanged later in the series, where
get_delay_stage() divides by rgmii_delay_stage_div (170 on MT2712).
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110-dwmac-mediatek-mt8189-v5-0-7d99d6292962%40collabora.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next v5 09/10] net: stmmac: mediatek: add support for TX clock output enable feature
2026-11-10 12:08 ` [PATCH net-next v5 09/10] net: stmmac: mediatek: add support for TX clock output enable feature Louis-Alexis Eyraud
@ 2026-11-14 14:52 ` netdev-bot+sashiko
0 siblings, 0 replies; 18+ messages in thread
From: netdev-bot+sashiko @ 2026-11-14 14:52 UTC (permalink / raw)
To: louisalexis.eyraud
Cc: andrew+netdev, davem, kuba, pabeni, robh, krzk+dt, conor+dt,
richardcochran, matthias.bgg, angelogioacchino.delregno,
biao.huang, maxime.chevallier, mcoquelin.stm32, alexandre.torgue,
edumazet, kernel, netdev, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, linux-stm32
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] mt8195_set_interface()
(drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c) now sets…
--
net: stmmac: mediatek: add support for TX clock output enable feature
This commit adds a definition for the MT8189 TX clock output enable bit in
the pericfg Ethernet control 0 register. It also adds a mac_txclk_out_en
flag to the variant data and sets the bit in mt8195_set_interface() when
the flag is true.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> index 3f024d455cbd5..1a0ab95dfbf0e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
[ ... ]
> @@ -307,6 +311,9 @@ static int mt8195_set_interface(struct mediatek_dwmac_plat_data *plat,
> /* MT8195 only support external PHY */
> intf_val |= MT8195_EXT_PHY_MODE;
>
> + if (plat->variant->mac_txclk_out_en)
> + intf_val |= MT8189_CTRL0_TXC_OUT_OP_EN;
> +
[Severity: Medium]
Should this bit depend on the interface mode? As written,
MT8189_CTRL0_TXC_OUT_OP_EN is set no matter what phy_intf_sel,
plat->rmii_clk_from_mac or plat->rmii_rxc are.
Later in the series, "net: stmmac: mediatek: add support for MT8189 SoC"
sets .mac_txclk_out_en = true for mt8189_gmac_variant. That means the TX
clock output gets enabled in every mode.
The MT8189 binding forbids the MAC from sourcing the RMII reference clock:
mediatek,rmii-clk-from-mac: false
It still allows mediatek,rmii-rxc, and it does not limit phy-mode. So with
phy-mode = "rmii" and no mediatek,rmii-rxc, the external reference clock
comes in on the TXC pin, as mt8195_set_delay() describes:
/* the rmii reference clock from outside is connected
* to TXC pin, the reference clock will be adjusted
* by TXC delay macro circuit.
*/
mt8195_set_delay() also accepts PHY_INTERFACE_MODE_MII. In MII mode the
PHY drives TX_CLK.
In either of those setups, would the MAC's TXC output driver be turned on
while the PHY or an oscillator is already driving that pin?
If the hardware ignores bit 20 when TXC is used as an input, could the
commit message say so? If it doesn't, would it be safer to set the bit only
for the modes where the MAC drives TXC, such as RGMII?
> regmap_write(plat->peri_regmap,
> reg_offset + MT8195_PERI_ETH_CTRL0,
> intf_val);
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110-dwmac-mediatek-mt8189-v5-0-7d99d6292962%40collabora.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC
2026-11-10 12:08 ` [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC Louis-Alexis Eyraud
@ 2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-14 16:45 ` Maxime Chevallier
1 sibling, 0 replies; 18+ messages in thread
From: netdev-bot+sashiko @ 2026-11-14 14:52 UTC (permalink / raw)
To: louisalexis.eyraud
Cc: andrew+netdev, davem, kuba, pabeni, robh, krzk+dt, conor+dt,
richardcochran, matthias.bgg, angelogioacchino.delregno,
biao.huang, maxime.chevallier, mcoquelin.stm32, alexandre.torgue,
edumazet, kernel, netdev, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, linux-stm32
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] For MT8189, mt8189_gmac_variant sets .mac_txclk_out_en = true
(line 465).
- [Low] This patch makes the driver use a 180 ps step and a 5760 ps limit
(MT8189_MII_DLY_STAGE_DIV / MT8189_MII_DELAY_MAX / MT8189_RGMII_*) for…
--
net: stmmac: mediatek: add support for MT8189 SoC
This adds MT8189 support to dwmac-mediatek. It reuses the MT8195
interface and delay helpers, with a pericfg offset of 0x270 and 180ps
delay stages. It also enables the TX clock output feature for this SoC.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> index 1a0ab95dfbf0e..ce232313014d2 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> @@ -42,8 +42,15 @@
> #define MT2712_RGMII_DELAY_MAX 5440 /* 32 x 170ps */
>
> /* Peri Configuration register for mt8189 */
> +#define MT8189_PERI_ETH_CTRL_OFFSET 0x270
> +
> #define MT8189_CTRL0_TXC_OUT_OP_EN BIT(20)
>
> +#define MT8189_MII_DLY_STAGE_DIV 180 /* 180ps per stage */
> +#define MT8189_MII_DELAY_MAX 5760 /* 32 x 180ps */
> +#define MT8189_RGMII_DLY_STAGE_DIV 180 /* 180ps per stage */
> +#define MT8189_RGMII_DELAY_MAX 5760 /* 32 x 180ps */
[Severity: Low]
This isn't a bug, but should the DT binding document these MT8189
values?
Documentation/devicetree/bindings/net/mediatek-dwmac.yaml already
accepts mediatek,mt8189-gmac. The descriptions of mediatek,tx-delay-ps
and mediatek,rx-delay-ps give a step and range only for MT2712 and
MT8188/MT8195:
For MT8188/MT8195 RGMII/RMII/MII interface, Allowed value need to be a multiple of 290,
or will round down. Range 0~31*290.
With this patch, mediatek_dwmac_config_dt() rejects MT8189 TX/RX
delays >= 5760ps with -EINVAL:
if (tx_delay_ps >= plat->variant->mii_delay_max) {
Smaller values are rounded down to multiples of 180ps. The binding does
not describe either rule.
Could the binding get a matching line, for example "For MT8189
RGMII/RMII/MII interface, Allowed value need to be a multiple of 180, or
will round down. Range 0~31*180."?
> +
> /* Peri Configuration register for mt8195 */
> #define MT8195_PERI_ETH_CTRL_OFFSET 0xFD0
>
[ ... ]
> @@ -440,6 +451,20 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
> return 0;
> }
>
> +static const struct mediatek_dwmac_variant mt8189_gmac_variant = {
> + .dwmac_set_phy_interface = mt8195_set_interface,
> + .dwmac_set_delay = mt8195_set_delay,
> + .clk_list = mt8189_dwmac_clk_l,
> + .num_clks = ARRAY_SIZE(mt8189_dwmac_clk_l),
> + .dma_bit_mask = 35,
> + .mii_delay_max = MT8189_MII_DELAY_MAX,
> + .rgmii_delay_max = MT8189_RGMII_DELAY_MAX,
> + .mii_delay_stage_div = MT8189_MII_DLY_STAGE_DIV,
> + .rgmii_delay_stage_div = MT8189_RGMII_DLY_STAGE_DIV,
> + .peri_eth_ctrl_offset = MT8189_PERI_ETH_CTRL_OFFSET,
> + .mac_txclk_out_en = true,
[Severity: Medium]
Is it safe to enable TXC output in every interface mode?
mt8195_set_interface() sets the bit whenever mac_txclk_out_en is true.
It does not check phy_intf_sel or plat->rmii_rxc:
if (plat->variant->mac_txclk_out_en)
intf_val |= MT8189_CTRL0_TXC_OUT_OP_EN;
In MII mode the PHY drives TX_CLK, so TXC is an input to the MAC.
On MT8189 the binding forbids mediatek,rmii-clk-from-mac, so in RMII
mode the reference clock always comes from the PHY. Without
mediatek,rmii-rxc, that clock arrives on TXC. The driver says so in
mt8195_set_delay():
/* the rmii reference clock from outside is connected
* to TXC pin, the reference clock will be adjusted
* by TXC delay macro circuit.
*/
The previous patch in the series describes this bit as enabling "the TX
clock signal output". If that means the TXC pad output driver, could
the MAC end up driving a line the PHY is already driving, in MII mode
and in RMII mode with the reference clock on TXC?
The register is rewritten on every resume through mediatek_dwmac_init(),
so the setting persists.
The bit might be gated by ETH_INTF_SEL in hardware. Without a datasheet
that can't be confirmed from the tree. Should the bit be set only in
RGMII modes, where the MAC sources TXC? Or could the commit message
explain why it is harmless in MII and RMII?
> +};
> +
> static const struct mediatek_dwmac_variant mt8195_gmac_variant = {
> .dwmac_set_phy_interface = mt8195_set_interface,
> .dwmac_set_delay = mt8195_set_delay,
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261110-dwmac-mediatek-mt8189-v5-0-7d99d6292962%40collabora.com
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC
2026-11-10 12:08 ` [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
@ 2026-11-14 16:45 ` Maxime Chevallier
1 sibling, 0 replies; 18+ messages in thread
From: Maxime Chevallier @ 2026-11-14 16:45 UTC (permalink / raw)
To: Louis-Alexis Eyraud, Andrew Lunn, David S. Miller, Jakub Kicinski,
Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Richard Cochran, Matthias Brugger, AngeloGioacchino Del Regno,
Biao Huang, Maxime Coquelin, Alexandre Torgue, Eric Dumazet
Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, linux-stm32
Hi,
On 11/10/26 13:08, Louis-Alexis Eyraud wrote:
> Like MT8195 SoC, MT8189 SoC uses the Ethernet control registers from
> the peripheral configuration (pericfg) but at a different offset.
> It also has different RX and TX internal delay stage dividers (290ps
> for MT8195, 180ps for MT8189), and by consequence a reduced value range
> for these delays. It finally needs additional feature such as the
> TX clock output enable one.
>
> Thus, add compatible, clock definitions and specific platform data to
> support the MT8189 SoC.
>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
> ---
> .../net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 27 ++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> index 1a0ab95dfbf0..ce232313014d 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
> @@ -42,8 +42,15 @@
> #define MT2712_RGMII_DELAY_MAX 5440 /* 32 x 170ps */
>
> /* Peri Configuration register for mt8189 */
> +#define MT8189_PERI_ETH_CTRL_OFFSET 0x270
> +
> #define MT8189_CTRL0_TXC_OUT_OP_EN BIT(20)
>
> +#define MT8189_MII_DLY_STAGE_DIV 180 /* 180ps per stage */
> +#define MT8189_MII_DELAY_MAX 5760 /* 32 x 180ps */
> +#define MT8189_RGMII_DLY_STAGE_DIV 180 /* 180ps per stage */
> +#define MT8189_RGMII_DELAY_MAX 5760 /* 32 x 180ps */
> +
> /* Peri Configuration register for mt8195 */
> #define MT8195_PERI_ETH_CTRL_OFFSET 0xFD0
>
> @@ -124,6 +131,10 @@ static const char * const mt2712_dwmac_clk_l[] = {
> "axi", "apb", "mac_main", "ptp_ref"
> };
>
> +static const char * const mt8189_dwmac_clk_l[] = {
> + "axi", "apb", "mac_main", "ptp_ref"
> +};
> +
> static const char * const mt8195_dwmac_clk_l[] = {
> "axi", "apb", "mac_cg", "mac_main", "ptp_ref"
> };
> @@ -440,6 +451,20 @@ static int mt8195_set_delay(struct mediatek_dwmac_plat_data *plat)
> return 0;
> }
>
> +static const struct mediatek_dwmac_variant mt8189_gmac_variant = {
> + .dwmac_set_phy_interface = mt8195_set_interface,
> + .dwmac_set_delay = mt8195_set_delay,
> + .clk_list = mt8189_dwmac_clk_l,
> + .num_clks = ARRAY_SIZE(mt8189_dwmac_clk_l),
> + .dma_bit_mask = 35,
> + .mii_delay_max = MT8189_MII_DELAY_MAX,
> + .rgmii_delay_max = MT8189_RGMII_DELAY_MAX,
> + .mii_delay_stage_div = MT8189_MII_DLY_STAGE_DIV,
> + .rgmii_delay_stage_div = MT8189_RGMII_DLY_STAGE_DIV,
> + .peri_eth_ctrl_offset = MT8189_PERI_ETH_CTRL_OFFSET,
> + .mac_txclk_out_en = true,
> +};
> +
> static const struct mediatek_dwmac_variant mt8195_gmac_variant = {
> .dwmac_set_phy_interface = mt8195_set_interface,
> .dwmac_set_delay = mt8195_set_delay,
> @@ -729,6 +754,8 @@ static void mediatek_dwmac_remove(struct platform_device *pdev)
> static const struct of_device_id mediatek_dwmac_match[] = {
> { .compatible = "mediatek,mt2712-gmac",
> .data = &mt2712_gmac_variant },
> + { .compatible = "mediatek,mt8189-gmac",
> + .data = &mt8189_gmac_variant },
> { .compatible = "mediatek,mt8195-gmac",
> .data = &mt8195_gmac_variant },
> { }
>
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2026-11-14 16:45 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 12:08 [PATCH net-next v5 00/10] net/stmmac: Add Mediatek MT8189 support Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 01/10] dt-bindings: net: mediatek-dwmac: fix unit in rx/tx delay property description Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 02/10] dt-bindings: net: mediatek-dwmac: deprecate rx/tx delay vendor properties Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 03/10] dt-bindings: net: mediatek-dwmac: add support for MT8189 SoC Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 04/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt8195_set_delay Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 05/10] net: stmmac: mediatek: simplify TX/RX delay handling in mt2712_set_delay Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 06/10] net: stmmac: mediatek: use standard internal delay properties Louis-Alexis Eyraud
2026-11-11 12:09 ` sashiko-bot
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 07/10] net: stmmac: mediatek: add RX/TX delay stage divider in platform data Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 08/10] net: stmmac: mediatek: add PERI_ETH_CTRLx register offset " Louis-Alexis Eyraud
2026-11-10 12:08 ` [PATCH net-next v5 09/10] net: stmmac: mediatek: add support for TX clock output enable feature Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-10 12:08 ` [PATCH net-next v5 10/10] net: stmmac: mediatek: add support for MT8189 SoC Louis-Alexis Eyraud
2026-11-14 14:52 ` netdev-bot+sashiko
2026-11-14 16:45 ` Maxime Chevallier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox