diff mbox series

[net-next] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings

Message ID 20240623194225.76667-1-marex@denx.de (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 30 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-06-25--09-00 (tests: 662)

Commit Message

Marek Vasut June 23, 2024, 7:41 p.m. UTC
Extract known PHY IDs from Linux kernel realtek PHY driver
and convert them into supported compatible string list for
this DT binding document.

Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Joakim Zhang <qiangqing.zhang@nxp.com>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: kernel@dh-electronics.com
Cc: netdev@vger.kernel.org
---
 .../bindings/net/realtek,rtl82xx.yaml         | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Andrew Lunn June 23, 2024, 8 p.m. UTC | #1
>    - $ref: ethernet-phy.yaml#
>  
>  properties:
> +  compatible:
> +    enum:
> +      - ethernet-phy-id0000.8201

I'm not sure that one should be listed. It is not an official ID,
since it does not have an OUI. In fact, this is one of the rare cases
where actually listing a compatible in DT makes sense, because you can
override the broken hardware and give a correct ID in realtek address
space.

	Andrew
Marek Vasut June 23, 2024, 11:52 p.m. UTC | #2
On 6/23/24 10:00 PM, Andrew Lunn wrote:
>>     - $ref: ethernet-phy.yaml#
>>   
>>   properties:
>> +  compatible:
>> +    enum:
>> +      - ethernet-phy-id0000.8201
> 
> I'm not sure that one should be listed. It is not an official ID,
> since it does not have an OUI. In fact, this is one of the rare cases
> where actually listing a compatible in DT makes sense, because you can
> override the broken hardware and give a correct ID in realtek address
> space.

Hmmm, so, shall I drop this ID or keep it ?

I generally put the PHY IDs into DT so the PHY drivers can correctly 
handle clock and reset sequencing for those PHYs, before the PHY ID 
registers can be read out of the PHY.
Andrew Lunn June 24, 2024, 1:52 p.m. UTC | #3
On Mon, Jun 24, 2024 at 01:52:49AM +0200, Marek Vasut wrote:
> On 6/23/24 10:00 PM, Andrew Lunn wrote:
> > >     - $ref: ethernet-phy.yaml#
> > >   properties:
> > > +  compatible:
> > > +    enum:
> > > +      - ethernet-phy-id0000.8201
> > 
> > I'm not sure that one should be listed. It is not an official ID,
> > since it does not have an OUI. In fact, this is one of the rare cases
> > where actually listing a compatible in DT makes sense, because you can
> > override the broken hardware and give a correct ID in realtek address
> > space.
> 
> Hmmm, so, shall I drop this ID or keep it ?
> 
> I generally put the PHY IDs into DT so the PHY drivers can correctly handle
> clock and reset sequencing for those PHYs, before the PHY ID registers can
> be read out of the PHY.

Are there any in kernel .dts files using it? We could add it, if it is
needed to keep the DT validation tools are happy. But we should also
be deprecating this compatible, replacing it with one allocated from
realteks range.

	 Andrew
Marek Vasut June 25, 2024, 12:32 a.m. UTC | #4
On 6/24/24 3:52 PM, Andrew Lunn wrote:
> On Mon, Jun 24, 2024 at 01:52:49AM +0200, Marek Vasut wrote:
>> On 6/23/24 10:00 PM, Andrew Lunn wrote:
>>>>      - $ref: ethernet-phy.yaml#
>>>>    properties:
>>>> +  compatible:
>>>> +    enum:
>>>> +      - ethernet-phy-id0000.8201
>>>
>>> I'm not sure that one should be listed. It is not an official ID,
>>> since it does not have an OUI. In fact, this is one of the rare cases
>>> where actually listing a compatible in DT makes sense, because you can
>>> override the broken hardware and give a correct ID in realtek address
>>> space.
>>
>> Hmmm, so, shall I drop this ID or keep it ?
>>
>> I generally put the PHY IDs into DT so the PHY drivers can correctly handle
>> clock and reset sequencing for those PHYs, before the PHY ID registers can
>> be read out of the PHY.
> 
> Are there any in kernel .dts files using it?

git grep ethernet-phy-id0000.8201 on current next-20240624 says no.

> We could add it, if it is
> needed to keep the DT validation tools are happy. But we should also
> be deprecating this compatible, replacing it with one allocated from
> realteks range.

I think we should drop from the bindings after all, I will prepare a V2 
like that, OK ?
Andrew Lunn June 25, 2024, 1:17 p.m. UTC | #5
> git grep ethernet-phy-id0000.8201 on current next-20240624 says no.
> 
> > We could add it, if it is
> > needed to keep the DT validation tools are happy. But we should also
> > be deprecating this compatible, replacing it with one allocated from
> > realteks range.
> 
> I think we should drop from the bindings after all, I will prepare a V2 like
> that, OK ?

Yes, please drop it.

     Andrew
Marek Vasut June 25, 2024, 6:44 p.m. UTC | #6
On 6/25/24 3:17 PM, Andrew Lunn wrote:
>> git grep ethernet-phy-id0000.8201 on current next-20240624 says no.
>>
>>> We could add it, if it is
>>> needed to keep the DT validation tools are happy. But we should also
>>> be deprecating this compatible, replacing it with one allocated from
>>> realteks range.
>>
>> I think we should drop from the bindings after all, I will prepare a V2 like
>> that, OK ?
> 
> Yes, please drop it.

Done in V2, thanks.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
index bb94a2388520b..8db4d66f1a961 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
@@ -18,6 +18,30 @@  allOf:
   - $ref: ethernet-phy.yaml#
 
 properties:
+  compatible:
+    enum:
+      - ethernet-phy-id0000.8201
+      - ethernet-phy-id001c.c800
+      - ethernet-phy-id001c.c816
+      - ethernet-phy-id001c.c838
+      - ethernet-phy-id001c.c840
+      - ethernet-phy-id001c.c848
+      - ethernet-phy-id001c.c849
+      - ethernet-phy-id001c.c84a
+      - ethernet-phy-id001c.c862
+      - ethernet-phy-id001c.c878
+      - ethernet-phy-id001c.c880
+      - ethernet-phy-id001c.c910
+      - ethernet-phy-id001c.c912
+      - ethernet-phy-id001c.c913
+      - ethernet-phy-id001c.c914
+      - ethernet-phy-id001c.c915
+      - ethernet-phy-id001c.c916
+      - ethernet-phy-id001c.c942
+      - ethernet-phy-id001c.c961
+      - ethernet-phy-id001c.cad0
+      - ethernet-phy-id001c.cb00
+
   realtek,clkout-disable:
     type: boolean
     description: