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

Tobias Schramm t.schramm at manjaro.org
Fri May 31 16:33:50 CEST 2024


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 at manjaro.org>
---
 drivers/net/sun8i_emac.c | 7 +++++++
 1 file changed, 7 insertions(+)

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 },
 	{ }
 };
 
-- 
2.30.2



More information about the U-Boot mailing list