From: Roger Quadros <rogerq@kernel.org>
To: Md Danish Anwar <a0501179@ti.com>, Rob Herring <robh@kernel.org>,
MD Danish Anwar <danishanwar@ti.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vignesh Raghavendra <vigneshr@ti.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Simon Horman <horms@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
netdev@vger.kernel.org, srk@ti.com, r-gunasekaran@ti.com
Subject: Re: [RFC PATCH net-next 1/2] dt-bindings: net: Add documentation for Half duplex support.
Date: Thu, 7 Sep 2023 15:16:43 +0300 [thread overview]
Message-ID: <f4431158-c177-8d09-4125-3fb01062f1fd@kernel.org> (raw)
In-Reply-To: <90669794-2fc1-bff1-104b-cf1daa2e9998@ti.com>
On 01/09/2023 08:21, Md Danish Anwar wrote:
> Hi Rob,
>
> On 31/08/23 11:46 pm, Rob Herring wrote:
>> On Wed, Aug 30, 2023 at 05:01:33PM +0530, MD Danish Anwar wrote:
>>> In order to support half-duplex operation at 10M and 100M link speeds, the
>>> PHY collision detection signal (COL) should be routed to ICSSG
>>> GPIO pin (PRGx_PRU0/1_GPI10) so that firmware can detect collision signal
>>> and apply the CSMA/CD algorithm applicable for half duplex operation. A DT
>>> property, "ti,half-duplex-capable" is introduced for this purpose. If
>>> board has PHY COL pin conencted to PRGx_PRU1_GPIO10, this DT property can
>>> be added to eth node of ICSSG, MII port to support half duplex operation at
>>> that port.
>>
>> I take it the GPIO here is not visble to the OS and that's why it's not
>> described in DT?
>>
>
> Yes the GPIO here is not visible in the OS and we need to indicate whether the
> PHY COL signal is routed to PRGx_PRU0/1_GPI10 pin or not by setting the
> property "ti,half-duplex-capable" as true.
>
>>>
>>> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
>>> ---
>>> Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
>>> index 13371159515a..59da9aeaee7e 100644
>>> --- a/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
>>> +++ b/Documentation/devicetree/bindings/net/ti,icssg-prueth.yaml
>>> @@ -107,6 +107,13 @@ properties:
>>> phandle to system controller node and register offset
>>> to ICSSG control register for RGMII transmit delay
>>>
>>> + ti,half-duplex-capable:
>>
>> capable or...
>>
>>> + type: boolean
>>> + description:
>>> + Enable half duplex operation on ICSSG MII port. This requires
>>
>> enable the mode?
>>
>
> I think capable is good here. The property "ti,half-duplex-capable" indicates
> that the board is capable of half duplex operation. This doesn't necessarily
> means we have to enable the half duplex mode. The user can modify the duplex
> settings from ethtool and enable / disable is controlled by the user. This
> property basically let's the driver know that it can support half duplex
> operations and when user enables half duplex mode through ethtool, the driver
> can do the necessary configurations.
>
> When this property is false, half duplex is not supported. If user still wants
> to change the duplex mode, it will get an error saying half duplex is not
> supported.
>
> So the property "ti,half-duplex-capable" let's the driver know whether half
> duplex is supported or not. Enable / disable is controlled by user through ethtool.
>
>> Maybe too late if it's already been assumed not supported, but shouldn't
>> supporting half duplex be the default? I guess half duplex isn't too
>> common any more.
>>
>
> Unfortunately ICSSG doesn't support half duplex by default. Routing the PHY COL
> signal is necessary.
But the half-duplex advertising is always enabled by default. Whether it gets
used or not will depend on negotiation with link partner.
That's why you had to explicitly disable them in your next patch with
+ if (!emac->half_duplex) {
+ dev_dbg(prueth->dev, "half duplex mode is not supported\n");
+ phy_remove_link_mode(ndev->phydev, ETHTOOL_LINK_MODE_10baseT_Half_BIT);
+ phy_remove_link_mode(ndev->phydev, ETHTOOL_LINK_MODE_100baseT_Half_BIT);
+ }
--
cheers,
-roger
next prev parent reply other threads:[~2023-09-07 16:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 11:31 [RFC PATCH net-next 0/2] Add Half Duplex support for ICSSG Driver MD Danish Anwar
2023-08-30 11:31 ` [RFC PATCH net-next 1/2] dt-bindings: net: Add documentation for Half duplex support MD Danish Anwar
2023-08-31 18:16 ` Rob Herring
2023-09-01 5:21 ` Md Danish Anwar
2023-09-07 12:16 ` Roger Quadros [this message]
2023-08-30 11:31 ` [RFC PATCH net-next 2/2] net: ti: icssg-prueth: Add support for half duplex operation MD Danish Anwar
2023-09-04 14:17 ` Andrew Lunn
2023-09-07 12:20 ` [RFC PATCH net-next 0/2] Add Half Duplex support for ICSSG Driver Roger Quadros
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=f4431158-c177-8d09-4125-3fb01062f1fd@kernel.org \
--to=rogerq@kernel.org \
--cc=a0501179@ti.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=r-gunasekaran@ti.com \
--cc=robh@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.com \
/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
Powered by JetHome