Thread (36 messages) 36 messages, 10 authors, 2025-12-04

Re: [PATCH net-next 1/9] dt-bindings: phy: rename transmit-amplitude.yaml to phy-common-props.yaml

From: Vladimir Oltean <vladimir.oltean@nxp.com>
Date: 2025-11-26 10:51:27
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:
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->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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help