public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v1] dt-bindings: net: ethernet-phy: Add forced-master/slave properties for SPE PHYs
Date: Fri, 6 Sep 2024 09:22:29 -0700	[thread overview]
Message-ID: <24097072-1d54-4a24-aaf3-c6b28f31a6cb@gmail.com> (raw)
In-Reply-To: <fde0f28d-3147-4a69-8be5-98e1d578a133@lunn.ch>

On 9/6/24 09:11, Andrew Lunn wrote:
>>> 10Base-T1 often does not have autoneg, so preferred-master &
>>> preferred-slave make non sense in this context, but i wounder if
>>> somebody will want these later. An Ethernet switch is generally
>>> preferred-master for example, but the client is preferred-slave.
>>>
>>> Maybe make the property a string with supported values 'forced-master'
>>> and 'forced-slave', leaving it open for the other two to be added
>>> later.
>>
>> My two cents, don't take it as a nack or any strong disagreement, my
>> experience with SPE is still limited. I agree that for SPE, it's
>> required that PHYs get their role assigned as early as possible,
>> otherwise the link can't establish. I don't see any other place but DT
>> to put that info, as this would be required for say, booting over the
>> network. This to me falls under 'HW representation', as we could do the
>> same with straps.
>>
>> However for preferred-master / preferred-slave, wouldn't we be crossing
>> the blurry line of "HW description => system configuration in the DT" ?
> 
> Yes, we are somewhere near the blurry line. This is why i gave the
> example of an Ethernet switch, vs a client. Again, it could be done
> with straps, so following your argument, it could be considered HW
> representation. But if it is set wrong, it probably does not matter,
> auto-neg should still work. Except for a very small number of PHYs
> whos random numbers are not random...

Having had to deal with an Ethernet PHY that requires operating in slave 
mode "preferably" in order to have a correct RXC duty cycle, if you 
force both sides of the link to "slave", auto-negotiation will fail, 
however thanks to auto-negotiation you can tell that there was a 
master/slave resolution failure. (This reminds me I need to send the 
patch for that PHY errata at some point).

In the case that Oleksij seems to be after, there is no auto-negotiation 
(is that correct?), so it seems to me that the Device Tree is coming to 
the rescue of an improperly strapped HW, and is used as a way to change 
the default HW configuration so as to have a fighting chance of having a 
functional link. That is not unprecedented, but it is definitively a bit 
blurry...
-- 
Florian

  reply	other threads:[~2024-09-06 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 14:49 [PATCH v1] dt-bindings: net: ethernet-phy: Add forced-master/slave properties for SPE PHYs Oleksij Rempel
2024-09-06 15:11 ` Andrew Lunn
2024-09-06 15:50   ` Oleksij Rempel
2024-09-06 15:54   ` Maxime Chevallier
2024-09-06 16:11     ` Andrew Lunn
2024-09-06 16:22       ` Florian Fainelli [this message]
2024-09-06 17:49         ` Oleksij Rempel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24097072-1d54-4a24-aaf3-c6b28f31a6cb@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox