Commit 830877d8 authored by Christian Marangi's avatar Christian Marangi Committed by Jakub Kicinski
Browse files

net: phy: Add support for Aeonsemi AS21xxx PHYs



Add support for Aeonsemi AS21xxx 10G C45 PHYs. These PHYs integrate
an IPC to setup some configuration and require special handling to
sync with the parity bit. The parity bit is a way the IPC use to
follow correct order of command sent.

Supported PHYs AS21011JB1, AS21011PB1, AS21010JB1, AS21010PB1,
AS21511JB1, AS21511PB1, AS21510JB1, AS21510PB1, AS21210JB1,
AS21210PB1 that all register with the PHY ID 0x7500 0x7510
before the firmware is loaded.

They all support up to 5 LEDs with various HW mode supported.

While implementing it was found some strange coincidence with using the
same logic for implementing C22 in MMD regs in Broadcom PHYs.

For reference here the AS21xxx PHY name logic:

AS21x1xxB1
    ^ ^^
    | |J: Supports SyncE/PTP
    | |P: No SyncE/PTP support
    | 1: Supports 2nd Serdes
    | 2: Not 2nd Serdes support
    0: 10G, 5G, 2.5G
    5: 5G, 2.5G
    2: 2.5G

Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
Link: https://patch.msgid.link/20250517201353.5137-6-ansuelsmth@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent d6c45707
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -646,6 +646,12 @@ F: drivers/iio/accel/adxl380.h
F:	drivers/iio/accel/adxl380_i2c.c
F:	drivers/iio/accel/adxl380_spi.c
AEONSEMI PHY DRIVER
M:	Christian Marangi <ansuelsmth@gmail.com>
L:	netdev@vger.kernel.org
S:	Maintained
F:	drivers/net/phy/as21xxx.c
AF8133J THREE-AXIS MAGNETOMETER DRIVER
M:	Ondřej Jirman <megi@xff.cz>
S:	Maintained
+12 −0
Original line number Diff line number Diff line
@@ -76,6 +76,18 @@ config SFP

comment "MII PHY device drivers"

config AS21XXX_PHY
	tristate "Aeonsemi AS21xxx PHYs"
	help
	  Currently supports the Aeonsemi AS21xxx PHY.

	  These are C45 PHYs 10G that require all a generic firmware.

	  Supported PHYs AS21011JB1, AS21011PB1, AS21010JB1, AS21010PB1,
	  AS21511JB1, AS21511PB1, AS21510JB1, AS21510PB1, AS21210JB1,
	  AS21210PB1 that all register with the PHY ID 0x7500 0x7500
	  before the firmware is loaded.

config AIR_EN8811H_PHY
	tristate "Airoha EN8811H 2.5 Gigabit PHY"
	help
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ obj-$(CONFIG_AIR_EN8811H_PHY) += air_en8811h.o
obj-$(CONFIG_AMD_PHY)		+= amd.o
obj-$(CONFIG_AMCC_QT2025_PHY)	+= qt2025.o
obj-$(CONFIG_AQUANTIA_PHY)	+= aquantia/
obj-$(CONFIG_AS21XXX_PHY)	+= as21xxx.o
ifdef CONFIG_AX88796B_RUST_PHY
  obj-$(CONFIG_AX88796B_PHY)	+= ax88796b_rust.o
else
+1087 −0

File added.

Preview size limit exceeded, changes collapsed.