[PATCH 1/3] net: Add support for Broadcom GENETv5 Ethernet controller

Stefan Wahren stefan.wahren at i2se.com
Fri Dec 20 20:29:22 CET 2019


Hi Andre,

Am 18.12.19 um 12:59 schrieb Andre Przywara:
> From: Amit Singh Tomar <amittomer25 at gmail.com>
>
> The Broadcom GENET Ethernet MACs are used in several MIPS based SoCs
> and in the Broadcom 2711/2838 SoC used on the Raspberry Pi 4.
> There is no publicly available documentation, so this driver is based
> on the Linux driver. Compared to that the queue management is
> drastically simplified, also we only support version 5 of the IP and
> RGMII connections between MAC and PHY, as used on the RPi4.
>
> Signed-off-by: Amit Singh Tomar <amittomer25 at gmail.com>
> Reviewed-by: Andre Przywara <andre.przywara at arm.com>
> [Andre: heavy cleanup and a few fixes]
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> ---
>  drivers/net/Kconfig    |   7 +
>  drivers/net/Makefile   |   1 +
>  drivers/net/bcmgenet.c | 702 +++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 710 insertions(+)
>  create mode 100644 drivers/net/bcmgenet.c
>
...
> +
> +/* We only support RGMII (as used on the RPi4). */
> +static int bcmgenet_interface_set(struct bcmgenet_eth_priv *priv)
> +{
> +	phy_interface_t phy_mode = priv->interface;
> +
> +	switch (phy_mode) {
> +	case PHY_INTERFACE_MODE_RGMII:
> +		writel(PORT_MODE_EXT_GPHY, priv->mac_reg + SYS_PORT_CTRL);
> +		break;

This doesn't match the current Linux upstream kernel / DTS. We consider
the PHY mode in the downstream DTS as wrong. It should be
PHY_INTERFACE_MODE_RGMII_RXID. So please add this to keep compatibility
to the upstream devicetree.

Please following this series [1] for more information.

Thank you a lot for this work

Stefan

[1] - https://marc.info/?l=linux-netdev&m=157350191805462&w=2


> +	default:
> +		printf("unknown phy mode: %d\n", priv->interface);
> +		return -EINVAL;
> +	}
> +
> +	return 0;
> +}
> +




More information about the U-Boot mailing list