diff mbox series

[2/2] net: sun8i_emac: add support for EMAC on V3s-based SoCs

Message ID 20240531143350.14855-3-t.schramm@manjaro.org
State Superseded
Delegated to: Andre Przywara
Headers show
Series sunxi: add support for Ethernet on V3s-based SoCs | expand

Commit Message

Tobias Schramm May 31, 2024, 2:33 p.m. UTC
The Allwinner V3s SoC and related SoCs have a fast Ethernet MAC with
internal Ethernet phy. The internal phy is connected via MII and the MII
is not exposed externally on SoC pins.
Add support for this MAC and phy combo to the sun8i EMAC driver.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
 drivers/net/sun8i_emac.c | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 8bff4fe9a9..d9d1825b69 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -903,6 +903,11 @@  static const struct emac_variant emac_variant_h6 = {
 	.support_rmii		= true,
 };
 
+static const struct emac_variant emac_variant_v3s = {
+	.syscon_offset		= 0x30,
+	.soc_has_internal_phy	= true,
+};
+
 static const struct udevice_id sun8i_emac_eth_ids[] = {
 	{ .compatible = "allwinner,sun8i-a83t-emac",
 	  .data = (ulong)&emac_variant_a83t },
@@ -914,6 +919,8 @@  static const struct udevice_id sun8i_emac_eth_ids[] = {
 	  .data = (ulong)&emac_variant_a64 },
 	{ .compatible = "allwinner,sun50i-h6-emac",
 	  .data = (ulong)&emac_variant_h6 },
+	{ .compatible = "allwinner,sun8i-v3s-emac",
+	  .data = (ulong)&emac_variant_v3s },
 	{ }
 };