This series ports PHY polarity inversion support via generic device tree
properties from Linux kernel, synchronizing with Merge tag 'phy-for-7.0'
of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy.

Patch 1 renames the existing transmit-amplitude.yaml DT binding to the
broader phy-common-props.yaml, and extends it with two new standard
properties: rx-polarity and tx-polarity. These allow per-mode polarity
configuration with a "default" fallback.

Patch 2 introduces a new PHY_COMMON_PROPS library providing helper
functions (phy_get_rx_polarity, phy_get_tx_polarity, and their
"manual" variants) for PHY drivers to read these properties from the
device tree. Also adds include/dt-bindings/phy/phy.h with the
PHY_POL_NORMAL, PHY_POL_INVERT, and PHY_POL_AUTO constants.

Patch 3 deprecates the proprietary airoha,pnswap-rx and airoha,pnswap-tx
boolean properties in the EN8811H bindings, and updates the example to
use the standard rx-polarity property instead.

Patch 4 updates the Airoha EN8811H PHY driver to use the new standard
rx-polarity and tx-polarity properties, with backward compatibility
fallback to the now-deprecated airoha,pnswap-rx and airoha,pnswap-tx
boolean properties.

Lucien.Jheng (4):
  dt-bindings: phy: rename transmit-amplitude to phy-common-props and
    add polarity
  phy: add common PHY properties support
  dt-bindings: net: airoha,en8811h: deprecate pnswap-rx and pnswap-tx
  net: phy: air_en8811h: use standard rx-polarity/tx-polarity properties

 drivers/net/phy/airoha/Kconfig                |   1 +
 drivers/net/phy/airoha/air_en8811.c           |  91 +++++-
 drivers/phy/Kconfig                           |   8 +
 drivers/phy/Makefile                          |   1 +
 drivers/phy/phy-common-props.c                | 286 ++++++++++++++++++
 dts/upstream/Bindings/net/airoha,en8811h.yaml |  11 +-
 ...t-amplitude.yaml => phy-common-props.yaml} |  92 ++++--
 include/dt-bindings/phy/phy.h                 |  32 ++
 include/linux/phy/phy-common-props.h          |  70 +++++
 9 files changed, 557 insertions(+), 35 deletions(-)
 create mode 100644 drivers/phy/phy-common-props.c
 rename dts/upstream/Bindings/phy/{transmit-amplitude.yaml => 
phy-common-props.yaml} (44%)
 create mode 100644 include/dt-bindings/phy/phy.h
 create mode 100644 include/linux/phy/phy-common-props.h

-- 
2.34.1

Reply via email to