Skip to content

net: phy: mediatek: calibration for AN7581/3

Christian Marangi linux-arm-kernel linux-mediatek lkml netdev oe-kbuild-all 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 0 repliesNew
  2. v46 patches 10 repliesSuperseded
  3. v36 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v26 patches4 repliesSuperseded
v15 patches6 repliesSuperseded

Changes in v5 from the cover letter

- Add review tag
- Add additional helper for phy package
- Use __phy_package helper instead of phydev_p0
- Better use lock and unlock for phy package
- Configure base address for the phy package

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: phy: mediatek: export __mtk_tr_writedrivers/net/phy/mediatek/mtk-phy-lib.c drivers/net/phy/mediatek/mtk.h+5 -20 replies
2/6net: phy: mediatek: move MTK GE SoC registers define to dedicated headerMAINTAINERS drivers/net/phy/mediatek/mtk-ge-soc.c drivers/net/phy/mediatek/mtk-ge-soc.h+359 -3480 replies
3/6net: phy: add additional helper for PHY packagedrivers/net/phy/phy_package.c drivers/net/phy/phylib.h+130 -00 replies
4/6net: phy: mediatek: split Airoha code to dedicated sourceMAINTAINERS drivers/net/phy/mediatek/Kconfig drivers/net/phy/mediatek/Makefile +5 more+239 -1780 replies
5/6net: phy: mediatek: add calibration logic for AN7581drivers/net/phy/mediatek/airoha-ge-soc.c drivers/net/phy/mediatek/mtk-ge-soc.h+1580 -00 replies
6/6net: phy: mediatek: add calibration logic for AN7583drivers/net/phy/mediatek/airoha-ge-soc.c drivers/net/phy/mediatek/mtk.h+230 -30 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchAndrew Lunn
1/6R-b
2/6R-b
3/6
4/6R-b
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH net-next v5 0/6] net: phy: mediatek: calibration for AN7581/3

This small series adds calibration support for Airoha AN7581 and AN7583 integrated PHYs.

The calibration logic is quite big so I decided to split the driver from the mediatek one to keep things organized.

Minor change were needed and just additional symbol to use what is common between mediatek and airoha PHYs.

I followed the naming pattern of mtk by calling the new source airoha-ge-soc and related config.

The calibration use lots of static table and software calibration at runtime instead of using efuse to calibrate.

There is one pecularity where some register and calibration needs to be done on port0 first and then with the related port.

This is O.K. as port0 presence is mandatory for the functionality of the integrated switch and it's assumed to be always present on the MDIO bus.

MAINTAINERS is updated to reflect the changed code.

(this was tested from a long time and also verified by Airoha for correct order of calibration)

Changes v5:
- Add review tag
- Add additional helper for phy package
- Use __phy_package helper instead of phydev_p0
- Better use lock and unlock for phy package
- Configure base address for the phy package

Changes v4:
- Fix typo in Kconfig
- Prevent out-of-bounds for zcal_ctrl
- Protect concurrent rext_sw_calib_done
- Validate port 0 presence for calibration
- Correctly set shared local variable
- Use phy_package_init_once for shared tables
- Better handle early exit restore
- Better handle phy_select_page

Changes v3:
- Address comments from sashiko bot
- Apply review and suggested changes from Airoha
- Rebase on top of net-next

Changes v2:
- Split header register patch from cal_cycle part
- Fix missing EXPORT_SYMBOL_GPL

Christian Marangi (6):
net: phy: mediatek: export __mtk_tr_write
net: phy: mediatek: move MTK GE SoC registers define to dedicated
header
net: phy: add additional helper for PHY package
net: phy: mediatek: split Airoha code to dedicated source
net: phy: mediatek: add calibration logic for AN7581
net: phy: mediatek: add calibration logic for AN7583

 MAINTAINERS                              |    9 +
 drivers/net/phy/mediatek/Kconfig         |   18 +-
 drivers/net/phy/mediatek/Makefile        |    1 +
 drivers/net/phy/mediatek/airoha-ge-soc.c | 1917 ++++++++++++++++++++++
 drivers/net/phy/mediatek/mtk-ge-soc.c    |  521 +-----
 drivers/net/phy/mediatek/mtk-ge-soc.h    |  374 +++++
 drivers/net/phy/mediatek/mtk-phy-lib.c   |   77 +-
 drivers/net/phy/mediatek/mtk.h           |   15 +
 drivers/net/phy/phy_package.c            |   57 +
 drivers/net/phy/phylib.h                 |   73 +
 10 files changed, 2537 insertions(+), 525 deletions(-)
 create mode 100644 drivers/net/phy/mediatek/airoha-ge-soc.c
 create mode 100644 drivers/net/phy/mediatek/mtk-ge-soc.h
Signature · 1 line
2.55.0