[PATCH net-next 1/9] dt-bindings: phy: rename transmit-amplitude.yaml to phy-common-props.yaml
Vladimir Oltean
vladimir.oltean at nxp.com
Wed Nov 26 02:51:20 PST 2025
On Wed, Nov 26, 2025 at 10:45:31AM +0000, Holger Brunck wrote:
> 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 at 10 {
> compatible = "marvell,mv88e6085";
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <0x10>;
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
> port at 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 at 4" node.
phy_handle is NULL, because the "port at 4" node has no "phy-handle" property.
of_property_read_u32(phy_handle, "tx-p2p-microvolt") does not run
so chip->info->ops->serdes_set_tx_amplitude() is never called
I'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.
More information about the Linux-mediatek
mailing list