net: lan743x: add generic implementation for phy interface selection
authorPavithra Sathyanarayanan <Pavithra.Sathyanarayanan@microchip.com>
Tue, 17 Jan 2023 14:16:13 +0000 (19:46 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 19 Jan 2023 12:50:11 +0000 (13:50 +0100)
commite86c721090e38ebf09c591682ffd70185c8bffaf
tree3f1abd07d3eef0fbb9bb38e9bf55a0b3c166ced8
parent1c9bb44290090d438352ca3ec33c9068262d61f2
net: lan743x: add generic implementation for phy interface selection

Add logic to read the Phy interface from MAC_CR register for LAN743x
driver.

Checks for the LAN7430/31 or pci11x1x devices and the adapter
interface is updated accordingly. For LAN7431, adapter interface is set
based on Bit 19 of MAC_CR register as MII or RGMII which removes the
forced RGMII/GMII configurations in lan743x_phy_open().

Signed-off-by: Pavithra Sathyanarayanan <Pavithra.Sathyanarayanan@microchip.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/lan743x_main.c
drivers/net/ethernet/microchip/lan743x_main.h