Re: [PATCH net-next 2/2] net: lan743x: add support for RMII interface
From: Maxime Chevallier
Date: Fri Mar 27 2026 - 04:52:10 EST
Hi,
On 27/03/2026 06:40, Thangaraj Samynathan wrote:
> Enable RMII interface in the lan743x driver for PHY and MAC
> configuration.
>
> - Select RMII interface in lan743x_phy_interface_select().
> - Update phylink supported_interfaces and MAC capabilities.
> - Enable RMII via RMII_CTL in lan743x_hardware_init().
> - Define RMII_CTL register and enable bit in lan743x_main.h.
>
> Signed-off-by: Thangaraj Samynathan <thangaraj.s@xxxxxxxxxxxxx>
> ---
> drivers/net/ethernet/microchip/lan743x_main.c | 18 ++++++++++++++++++
> drivers/net/ethernet/microchip/lan743x_main.h | 3 +++
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
> index b7b1584d867d..86d35810460f 100644
> --- a/drivers/net/ethernet/microchip/lan743x_main.c
> +++ b/drivers/net/ethernet/microchip/lan743x_main.c
> @@ -1370,6 +1370,8 @@ static void lan743x_phy_interface_select(struct lan743x_adapter *adapter)
>
> if (adapter->is_pci11x1x && adapter->is_sgmii_en)
> adapter->phy_interface = PHY_INTERFACE_MODE_SGMII;
> + else if (adapter->is_pci11x1x && adapter->is_rmii_en)
> + adapter->phy_interface = PHY_INTERFACE_MODE_RMII;
> else if (id_rev == ID_REV_ID_LAN7430_)
> adapter->phy_interface = PHY_INTERFACE_MODE_GMII;
> else if ((id_rev == ID_REV_ID_LAN7431_) && (data & MAC_CR_MII_EN_))
> @@ -3158,6 +3160,13 @@ static int lan743x_phylink_create(struct lan743x_adapter *adapter)
> __set_bit(PHY_INTERFACE_MODE_MII,
> adapter->phylink_config.supported_interfaces);
> break;
> + case PHY_INTERFACE_MODE_RMII:
> + __set_bit(PHY_INTERFACE_MODE_RMII,
> + adapter->phylink_config.supported_interfaces);
> + adapter->phylink_config.mac_capabilities &= ~MAC_1000FD;
Some followup should take care of removing the 1000FD cap for MII as
well. Same for the LPI caps, is there a similiar limitation for MII ?
Otherwise, this patch looks good to me so,
Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
Maxime