RE: [PATCH net-next 1/9] dt-bindings: phy: rename transmit-amplitude.yaml to phy-common-props.yaml
From: Holger Brunck <hidden>
Date: 2025-11-26 13:05:22
Also in:
linux-arm-kernel, linux-devicetree, linux-mediatek, linux-phy, lkml
On Wed, Nov 26, 2025 at 10:45:31AM +0000, Holger Brunck wrote:quoted
the Kirkwood based board in question was OOT. Due to the patch we were able to use the mainline driver without patching it to configure the value we wanted. The DTS node looked like this: &mdio { status = "okay"; switch@10 { compatible = "marvell,mv88e6085"; #address-cells = <1>; #size-cells = <0>; reg = <0x10>; ports { #address-cells = <1>; #size-cells = <0>; port@4 { reg = <4>; label = "port4"; phy-connection-type = "sgmii"; tx-p2p-microvolt = <604000>; fixed-link { speed = <1000>; full-duplex; }; }; }; };Perhaps there is some bit I'm missing, but let me try and run the code on your sample device tree. mv88e6xxx_setup_port() if (chip->info->ops->serdes_set_tx_amplitude) { dp = dsa_to_port(ds, port); if (dp) phy_handle = of_parse_phandle(dp->dn, "phy-handle", 0); if (phy_handle && !of_property_read_u32(phy_handle, "tx-p2p-microvolt", &tx_amp)) err = chip->info->ops->serdes_set_tx_amplitude(chip, port, tx_amp); if (phy_handle) { of_node_put(phy_handle); if (err) return err; } } dp->dn is the "port@4" node. phy_handle is NULL, because the "port@4" node has no "phy-handle" property. of_property_read_u32(phy_handle, "tx-p2p-microvolt") does not run so chip-quoted
info->ops->serdes_set_tx_amplitude() is never calledI'm unable to reconcile the placement of the "tx-p2p-microvolt" property in the port OF node with the code that searches for it exclusively in the network PHY node.
you are right I double checked it and it cannot work without a phy-handle. Not sure, about the history of this patch anymore, but the board did run a 5.4 kernel at that time. So I agree that the use case I had does not work as it is implemented here. So the code should be either removed or reworked.