diff mbox series

[2/2] net: sun8i_emac: add support for the V3s

Message ID 20240513205609.1872861-3-mwalle@kernel.org
State New
Delegated to: Andre Przywara
Headers show
Series sunxi: v3s: add network support | expand

Commit Message

Michael Walle May 13, 2024, 8:56 p.m. UTC
Add the compatible string for the emac found on the V3s SoC. The SoC
only supports the internal PHY. There are no (R)MII signals on any pins.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/net/sun8i_emac.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Andre Przywara May 14, 2024, 10:27 a.m. UTC | #1
On Mon, 13 May 2024 22:56:09 +0200
Michael Walle <mwalle@kernel.org> wrote:

Hi,

> Add the compatible string for the emac found on the V3s SoC. The SoC
> only supports the internal PHY. There are no (R)MII signals on any pins.
> 
> Signed-off-by: Michael Walle <mwalle@kernel.org>

Nice, that seems indeed all we need for that SoC.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  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 8bff4fe9a9e..94bcd40acb8 100644
> --- a/drivers/net/sun8i_emac.c
> +++ b/drivers/net/sun8i_emac.c
> @@ -893,6 +893,11 @@ static const struct emac_variant emac_variant_r40 = {
>  	.syscon_offset		= 0x164,
>  };
>  
> +static const struct emac_variant emac_variant_v3s = {
> +	.syscon_offset		= 0x30,
> +	.soc_has_internal_phy	= true,
> +};
> +
>  static const struct emac_variant emac_variant_a64 = {
>  	.syscon_offset		= 0x30,
>  	.support_rmii		= true,
> @@ -910,6 +915,8 @@ static const struct udevice_id sun8i_emac_eth_ids[] = {
>  	  .data = (ulong)&emac_variant_h3 },
>  	{ .compatible = "allwinner,sun8i-r40-gmac",
>  	  .data = (ulong)&emac_variant_r40 },
> +	{ .compatible = "allwinner,sun8i-v3s-emac",
> +	  .data = (ulong)&emac_variant_v3s },
>  	{ .compatible = "allwinner,sun50i-a64-emac",
>  	  .data = (ulong)&emac_variant_a64 },
>  	{ .compatible = "allwinner,sun50i-h6-emac",
diff mbox series

Patch

diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 8bff4fe9a9e..94bcd40acb8 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -893,6 +893,11 @@  static const struct emac_variant emac_variant_r40 = {
 	.syscon_offset		= 0x164,
 };
 
+static const struct emac_variant emac_variant_v3s = {
+	.syscon_offset		= 0x30,
+	.soc_has_internal_phy	= true,
+};
+
 static const struct emac_variant emac_variant_a64 = {
 	.syscon_offset		= 0x30,
 	.support_rmii		= true,
@@ -910,6 +915,8 @@  static const struct udevice_id sun8i_emac_eth_ids[] = {
 	  .data = (ulong)&emac_variant_h3 },
 	{ .compatible = "allwinner,sun8i-r40-gmac",
 	  .data = (ulong)&emac_variant_r40 },
+	{ .compatible = "allwinner,sun8i-v3s-emac",
+	  .data = (ulong)&emac_variant_v3s },
 	{ .compatible = "allwinner,sun50i-a64-emac",
 	  .data = (ulong)&emac_variant_a64 },
 	{ .compatible = "allwinner,sun50i-h6-emac",