zephyr/drivers/ethernet/phy
Stanislav Poboril 6ead65bb2f drivers: ethernet: phy: KSZ8081 PHY Driver improvements
Added changes required for nxp_enet ethernet driver to work
with multiple PHYs and fixed few problems:

- The cfg_link API resets PHY before configuring link. It was moved
  here so the ethernet driver does not have to reset it - not all
  PHYs need reset before configuring link and moving the reset code
  here makes possible to have the reset done in a PHY specific way
  (for example to reset by toggling GPIO pin). It also avoids ethernet
  driver touching PHY registers without locking.
- When reset GPIO is not defined, reset is performed by setting reset
  bit in control register.
- The cfg_link API does not return error when autonegotiation fails.
  This fixes situation when the link is down at system start - ethernet
  driver then skipped setting link-change callback and link was never
  to be detected again.
- Added reset of excessive bits 16-31 when reading register values.
  As only 16 bits are read from PHY, but the API is supposed to read
  into uint32_t, the remaining bits contained previous data after
  a successful read.
- Fixed missing mutex unlock when querying link state and link was down.
- Added missing initializer to link state variables. This could result
  in link state change detection while link was still down, because
  the speed/duplex settings could be random and old and new state
  could be wrongly detected as different.
- Not logging link speed/duplex status when link is not up.

Signed-off-by: Stanislav Poboril <stanislav.poboril@nxp.com>
2024-04-18 11:18:31 +02:00
..
CMakeLists.txt drivers: ethernet: phy: Add KSZ8081 PHY Driver 2023-11-28 14:34:02 -06:00
Kconfig drivers: ethernet: Introduce ETH_DRIVER_RAW_MODE option 2024-03-20 08:05:55 -05:00
Kconfig.tja1103 drivers: eth: phy: tja1103: Handle link change 2024-02-01 14:29:43 -06:00
phy_adin2111.c mdio: introduce Clause 45 APIs 2023-09-28 09:33:10 +02:00
phy_adin2111_priv.h drivers: phy: add adin2111 2023-05-26 09:50:09 -04:00
phy_microchip_ksz8081.c drivers: ethernet: phy: KSZ8081 PHY Driver improvements 2024-04-18 11:18:31 +02:00
phy_mii.c drivers: ethernet: phy_mii: Remove unnecessary bitwise operation 2023-12-05 16:23:43 -06:00
phy_tja1103.c drivers: eth: phy: tja1103: Handle link change 2024-02-01 14:29:43 -06:00