[PATCH v2 1/2] phy: add common PHY properties support
Vladimir Oltean
vladimir.oltean at nxp.com
Tue Mar 10 09:32:00 CET 2026
On Sun, Mar 08, 2026 at 10:06:13PM +0800, Lucien.Jheng wrote:
> Add a new PHY_COMMON_PROPS library that provides helper functions for
> PHY drivers to read standardized polarity properties from the device
> tree node:
>
> - phy_get_rx_polarity() / phy_get_tx_polarity()
> - phy_get_manual_rx_polarity() / phy_get_manual_tx_polarity()
>
> The dt-bindings/phy/phy.h header with PHY_POL_NORMAL, PHY_POL_INVERT,
> and PHY_POL_AUTO constants is provided via dts/upstream/include, which
> is already in the build include path.
>
> Ported from Merge tag 'phy-for-7.0':
> git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy
>
> Link: https://git.kernel.org/linus/e7556b59ba65179612bce3fa56bb53d1b4fb20db
> Signed-off-by: Lucien.Jheng <lucienzx159 at gmail.com>
> ---
> drivers/phy/Kconfig | 8 +
> drivers/phy/Makefile | 1 +
> drivers/phy/phy-common-props.c | 286 +++++++++++++++++++++++++++
> include/linux/phy/phy-common-props.h | 70 +++++++
> 4 files changed, 365 insertions(+)
> create mode 100644 drivers/phy/phy-common-props.c
> create mode 100644 include/linux/phy/phy-common-props.h
Thanks for doing this. Do you think you can also port the KUnit tests to
U-Boot's own "ut" test framework? Should be testable with the sandbox.
export KBUILD_OUTPUT=output-sandbox
make sandbox_defconfig NO_SDL=1
make -j 8 NO_SDL=1
$KBUILD_OUTPUT/u-boot -d $KBUILD_OUTPUT/arch/sandbox/dts/test.dtb
ut phy # or phy_common_props for the new code
More information about the U-Boot
mailing list