[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AM0PR06MB10396BBF8B568D77556FC46F8F7DEA@AM0PR06MB10396.eurprd06.prod.outlook.com>
Date: Wed, 26 Nov 2025 13:05:18 +0000
From: Holger Brunck <holger.brunck@...achienergy.com>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: Andrew Lunn <andrew@...n.ch>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "linux-phy@...ts.infradead.org"
<linux-phy@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>, Daniel Golle <daniel@...rotopia.org>,
Horatiu Vultur <horatiu.vultur@...rochip.com>, Heiner Kallweit
<hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Vinod Koul <vkoul@...nel.org>, Kishon Vijay Abraham I
<kishon@...nel.org>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, Eric
Woudstra <ericwouds@...il.com>,
Marek Beh√∫n <kabel@...nel.org>, Lee Jones
<lee@...nel.org>, Patrice Chotard <patrice.chotard@...s.st.com>, Maxime
Chevallier <maxime.chevallier@...tlin.com>
Subject: RE: [PATCH net-next 1/9] dt-bindings: phy: rename
transmit-amplitude.yaml to phy-common-props.yaml
>
> 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.
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.
Powered by blists - more mailing lists