* [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings
@ 2024-06-25 18:42 Marek Vasut
2024-06-25 19:05 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Marek Vasut @ 2024-06-25 18:42 UTC (permalink / raw)
To: netdev
Cc: Marek Vasut, Andrew Lunn, Conor Dooley, David S . Miller,
Eric Dumazet, Florian Fainelli, Heiner Kallweit, Jakub Kicinski,
Joakim Zhang, Krzysztof Kozlowski, Paolo Abeni, Rob Herring,
devicetree, kernel
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
---
V2: Drop ethernet-phy-id0000.8201 entry
---
.../bindings/net/realtek,rtl82xx.yaml | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
index bb94a2388520b..18ee72f5c74a8 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
@@ -18,6 +18,29 @@ allOf:
- $ref: ethernet-phy.yaml#
properties:
+ compatible:
+ enum:
+ - 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:
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings
2024-06-25 18:42 [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings Marek Vasut
@ 2024-06-25 19:05 ` Andrew Lunn
2024-06-28 8:00 ` patchwork-bot+netdevbpf
2024-07-01 15:06 ` Geert Uytterhoeven
2 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2024-06-25 19:05 UTC (permalink / raw)
To: Marek Vasut
Cc: netdev, Conor Dooley, David S . Miller, Eric Dumazet,
Florian Fainelli, Heiner Kallweit, Jakub Kicinski, Joakim Zhang,
Krzysztof Kozlowski, Paolo Abeni, Rob Herring, devicetree, kernel
On Tue, Jun 25, 2024 at 08:42:28PM +0200, Marek Vasut wrote:
> 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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings
2024-06-25 18:42 [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings Marek Vasut
2024-06-25 19:05 ` Andrew Lunn
@ 2024-06-28 8:00 ` patchwork-bot+netdevbpf
2024-07-01 15:06 ` Geert Uytterhoeven
2 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-28 8:00 UTC (permalink / raw)
To: Marek Vasut
Cc: netdev, andrew, conor+dt, davem, edumazet, f.fainelli, hkallweit1,
kuba, qiangqing.zhang, krzk+dt, pabeni, robh, devicetree, kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 25 Jun 2024 20:42:28 +0200 you wrote:
> 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
>
> [...]
Here is the summary with links:
- [net-next,v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings
https://git.kernel.org/netdev/net-next/c/8fda53719a59
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings
2024-06-25 18:42 [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings Marek Vasut
2024-06-25 19:05 ` Andrew Lunn
2024-06-28 8:00 ` patchwork-bot+netdevbpf
@ 2024-07-01 15:06 ` Geert Uytterhoeven
2024-07-01 18:35 ` Marek Vasut
2 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2024-07-01 15:06 UTC (permalink / raw)
To: Marek Vasut
Cc: netdev, Andrew Lunn, Conor Dooley, David S . Miller, Eric Dumazet,
Florian Fainelli, Heiner Kallweit, Jakub Kicinski, Joakim Zhang,
Krzysztof Kozlowski, Paolo Abeni, Rob Herring, devicetree, kernel
Hi Marek,
On Tue, Jun 25, 2024 at 8:46 PM Marek Vasut <marex@denx.de> wrote:
> 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>
Thanks for your patch, which is now commit 8fda53719a596fa2
("dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as
compatible strings") in net-next/main (next-20240628 and later).
> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> @@ -18,6 +18,29 @@ allOf:
> - $ref: ethernet-phy.yaml#
>
> properties:
> + compatible:
> + enum:
> + - 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
Can you please elaborate why you didn't add an
"ethernet-phy-ieee802.3-c22" fallback?
> +
> realtek,clkout-disable:
> type: boolean
> description:
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings
2024-07-01 15:06 ` Geert Uytterhoeven
@ 2024-07-01 18:35 ` Marek Vasut
2024-07-01 19:34 ` Andrew Lunn
0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2024-07-01 18:35 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: netdev, Andrew Lunn, Conor Dooley, David S . Miller, Eric Dumazet,
Florian Fainelli, Heiner Kallweit, Jakub Kicinski, Joakim Zhang,
Krzysztof Kozlowski, Paolo Abeni, Rob Herring, devicetree, kernel
On 7/1/24 5:06 PM, Geert Uytterhoeven wrote:
> Hi Marek,
Hi,
> On Tue, Jun 25, 2024 at 8:46 PM Marek Vasut <marex@denx.de> wrote:
>> 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>
>
> Thanks for your patch, which is now commit 8fda53719a596fa2
> ("dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as
> compatible strings") in net-next/main (next-20240628 and later).
>
>> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
>> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
>> @@ -18,6 +18,29 @@ allOf:
>> - $ref: ethernet-phy.yaml#
>>
>> properties:
>> + compatible:
>> + enum:
>> + - 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
>
> Can you please elaborate why you didn't add an
> "ethernet-phy-ieee802.3-c22" fallback?
I'll quote Andrew's comment on
[PATCH 2/2] arm64: dts: renesas: Drop ethernet-phy-ieee802.3-c22 from
PHY compatible string on all RZ boards
"
"ethernet-phy-ieee802.3-c22" is pretty much pointless. I don't
remember seeing a DT description which actually needs it. It is in the
binding more for completion, since "ethernet-phy-ieee802.3-c45" is
needed sometimes, and -c22 just completes the list.
"
But also, statistically, the in-kernel DTs contain both options, the one
with "ethernet-phy-ieee802.3-c22" fallback is less common:
$ git grep -ho ethernet-phy-id001c....... | sort | uniq -c
1 ethernet-phy-id001c.c816",
2 ethernet-phy-id001c.c915",
2 ethernet-phy-id001c.c915";
5 ethernet-phy-id001c.c916",
13 ethernet-phy-id001c.c916";
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings
2024-07-01 18:35 ` Marek Vasut
@ 2024-07-01 19:34 ` Andrew Lunn
0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2024-07-01 19:34 UTC (permalink / raw)
To: Marek Vasut
Cc: Geert Uytterhoeven, netdev, Conor Dooley, David S . Miller,
Eric Dumazet, Florian Fainelli, Heiner Kallweit, Jakub Kicinski,
Joakim Zhang, Krzysztof Kozlowski, Paolo Abeni, Rob Herring,
devicetree, kernel
> > > properties:
> > > + compatible:
> > > + enum:
> > > + - 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
> >
> > Can you please elaborate why you didn't add an
> > "ethernet-phy-ieee802.3-c22" fallback?
Sorry, missed the original email.
"ethernet-phy-ieee802.3-c22" is not a fallback. It simply states you
can talk to the PHY using clause 22. This is the default. You can also
use "ethernet-phy-ieee802.3-c45" to say use clause 45 to talk to the
PHY. So you are basically saying which protocol the device is
compatible with, not what driver the device is compatible with.
In general, you don't need a compatible. The bus will be probed and
the ID registers read. A driver matching those IDs will be found and
loaded.
If the PHY does not respond, for example because its clocks are off,
or it is held in reset, you might need to specific the values of the
ID registers in DT. The driver for those ID values will then be
loaded, and the driver can arrange to enable the clocks/reset etc. No
checking is performed if the ID values in DT match the actual
hardware, so use with caution. It is known for boards to swap for a
pin compatible PHY during the life of a product. If you don't have a
compatible, the right thing should happen. With a compatible, you
force the use of the wrong driver.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-07-01 19:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-25 18:42 [net-next,PATCH v2] dt-bindings: net: realtek,rtl82xx: Document known PHY IDs as compatible strings Marek Vasut
2024-06-25 19:05 ` Andrew Lunn
2024-06-28 8:00 ` patchwork-bot+netdevbpf
2024-07-01 15:06 ` Geert Uytterhoeven
2024-07-01 18:35 ` Marek Vasut
2024-07-01 19:34 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).