Netdev Archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add properties in dwmac-stm32 documentation
@ 2024-03-25  9:42 Christophe Roullier
  2024-03-25  9:42 ` [PATCH v3 1/2] dt-bindings: net: add phy-supply property for stm32 Christophe Roullier
  2024-03-25  9:42 ` [PATCH v3 2/2] dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk Christophe Roullier
  0 siblings, 2 replies; 4+ messages in thread
From: Christophe Roullier @ 2024-03-25  9:42 UTC (permalink / raw
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Richard Cochran, Jose Abreu, Liam Girdwood,
	Mark Brown, Christophe Roullier, Marek Vasut
  Cc: netdev, devicetree, linux-stm32, linux-arm-kernel, linux-kernel

Introduce 2 new properties in dwmac-stm32 documentation

 - phy-supply: to manage PHY regulator.
 - st,ext-phyclk: is present since 2020 in driver so need to explain
   it and avoid dtbs check issue : views/kernel/upstream/net-next/arch/arm/boot/dts/st/stm32mp157c-dk2.dtb: 
ethernet@5800a000: Unevaluated properties are not allowed 
('st,ext-phyclk' was unexpected)
   Furthermore this property will be use in upstream of MP13 dwmac glue. (next step)

V2: - Drop deprecated: property for st,eth-clk-sel and st,eth-ref-clk-sel
V3: - Rework commit message

Christophe Roullier (2):
  dt-bindings: net: add phy-supply property for stm32
  dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk

 Documentation/devicetree/bindings/net/stm32-dwmac.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/2] dt-bindings: net: add phy-supply property for stm32
  2024-03-25  9:42 [PATCH v3 0/2] Add properties in dwmac-stm32 documentation Christophe Roullier
@ 2024-03-25  9:42 ` Christophe Roullier
  2024-03-25  9:42 ` [PATCH v3 2/2] dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk Christophe Roullier
  1 sibling, 0 replies; 4+ messages in thread
From: Christophe Roullier @ 2024-03-25  9:42 UTC (permalink / raw
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Richard Cochran, Jose Abreu, Liam Girdwood,
	Mark Brown, Christophe Roullier, Marek Vasut
  Cc: netdev, devicetree, linux-stm32, linux-arm-kernel, linux-kernel

Phandle to a regulator that provides power to the PHY. This
regulator will be managed during the PHY power on/off sequence.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
---
 Documentation/devicetree/bindings/net/stm32-dwmac.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
index fc8c96b08d7dc..80937b28fa046 100644
--- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
@@ -82,6 +82,9 @@ properties:
       Should be phandle/offset pair. The phandle to the syscon node which
       encompases the glue register, and the offset of the control register
 
+  phy-supply:
+    description: PHY regulator
+
   st,eth-clk-sel:
     description:
       set this property in RGMII PHY when you want to select RCC clock instead of ETH_CLK125.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v3 2/2] dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk
  2024-03-25  9:42 [PATCH v3 0/2] Add properties in dwmac-stm32 documentation Christophe Roullier
  2024-03-25  9:42 ` [PATCH v3 1/2] dt-bindings: net: add phy-supply property for stm32 Christophe Roullier
@ 2024-03-25  9:42 ` Christophe Roullier
  2024-03-25 10:27   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 4+ messages in thread
From: Christophe Roullier @ 2024-03-25  9:42 UTC (permalink / raw
  To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Maxime Coquelin,
	Alexandre Torgue, Richard Cochran, Jose Abreu, Liam Girdwood,
	Mark Brown, Christophe Roullier, Marek Vasut
  Cc: netdev, devicetree, linux-stm32, linux-arm-kernel, linux-kernel

The Linux kernel dwmac-stm32 driver currently supports three DT
properties used to configure whether PHY clock are generated by
the MAC or supplied to the MAC from the PHY.

Originally there were two properties, st,eth-clk-sel and
st,eth-ref-clk-sel, each used to configure MAC clocking in
different bus mode and for different MAC clock frequency.
Since it is possible to determine the MAC 'eth-ck' clock
frequency from the clock subsystem and PHY bus mode from
the 'phy-mode' property, two disparate DT properties are
no longer required to configure MAC clocking.

Linux kernel commit
1bb694e20839 ("net: ethernet: stmmac: simplify phy modes management for stm32")
introduced a third, unified, property st,ext-phyclk. This property
covers both use cases of st,eth-clk-sel and st,eth-ref-clk-sel DT
properties, as well as a new use case for 25 MHz clock generated
by the MAC.

The third property st,ext-phyclk is so far undocumented,
document it.

Below table summarizes the clock requirement and clock sources for
supported PHY interface modes.
 __________________________________________________________________________
|PHY_MODE | Normal | PHY wo crystal|   PHY wo crystal   |No 125Mhz from PHY|
|         |        |      25MHz    |        50MHz       |                  |

---------------------------------------------------------------------------
|  MII    |    -   |     eth-ck    |        n/a         |       n/a        |
|         |        | st,ext-phyclk |                    |                  |

---------------------------------------------------------------------------
|  GMII   |    -   |     eth-ck    |        n/a         |       n/a        |
|         |        | st,ext-phyclk |                    |                  |

---------------------------------------------------------------------------
| RGMII   |    -   |     eth-ck    |        n/a         |      eth-ck      |
|         |        | st,ext-phyclk |                    | st,eth-clk-sel or|
|         |        |               |                    | st,ext-phyclk    |

---------------------------------------------------------------------------
| RMII    |    -   |     eth-ck    |      eth-ck        |       n/a        |
|         |        | st,ext-phyclk | st,eth-ref-clk-sel |                  |
|         |        |               | or st,ext-phyclk   |                  |

---------------------------------------------------------------------------

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
---
 Documentation/devicetree/bindings/net/stm32-dwmac.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
index 80937b28fa046..529665d4fc911 100644
--- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml
@@ -85,6 +85,13 @@ properties:
   phy-supply:
     description: PHY regulator
 
+  st,ext-phyclk:
+    description:
+      set this property in RMII mode when you have PHY without crystal 50MHz and want to
+      select RCC clock instead of ETH_REF_CLK. OR in RGMII mode when you want to select
+      RCC clock instead of ETH_CLK125.
+    type: boolean
+
   st,eth-clk-sel:
     description:
       set this property in RGMII PHY when you want to select RCC clock instead of ETH_CLK125.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 2/2] dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk
  2024-03-25  9:42 ` [PATCH v3 2/2] dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk Christophe Roullier
@ 2024-03-25 10:27   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-25 10:27 UTC (permalink / raw
  To: Christophe Roullier, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue, Richard Cochran,
	Jose Abreu, Liam Girdwood, Mark Brown, Marek Vasut
  Cc: netdev, devicetree, linux-stm32, linux-arm-kernel, linux-kernel

On 25/03/2024 10:42, Christophe Roullier wrote:
> The Linux kernel dwmac-stm32 driver currently supports three DT
> properties used to configure whether PHY clock are generated by
> the MAC or supplied to the MAC from the PHY.
> 
> Originally there were two properties, st,eth-clk-sel and
> st,eth-ref-clk-sel, each used to configure MAC clocking in
> different bus mode and for different MAC clock frequency.
> Since it is possible to determine the MAC 'eth-ck' clock
> frequency from the clock subsystem and PHY bus mode from
> the 'phy-mode' property, two disparate DT properties are
> no longer required to configure MAC clocking.
> 
> Linux kernel commit
> 1bb694e20839 ("net: ethernet: stmmac: simplify phy modes management for stm32")

Don't wrap. Word commit must be followed by the commit. Syntax is:
commit deadbeef ("foo
bar").

> introduced a third, unified, property st,ext-phyclk. This property
> covers both use cases of st,eth-clk-sel and st,eth-ref-clk-sel DT
> properties, as well as a new use case for 25 MHz clock generated
> by the MAC.
> 

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-25 10:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25  9:42 [PATCH v3 0/2] Add properties in dwmac-stm32 documentation Christophe Roullier
2024-03-25  9:42 ` [PATCH v3 1/2] dt-bindings: net: add phy-supply property for stm32 Christophe Roullier
2024-03-25  9:42 ` [PATCH v3 2/2] dt-bindings: net: dwmac: Document STM32 property st,ext-phyclk Christophe Roullier
2024-03-25 10:27   ` Krzysztof Kozlowski

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 read-only IMAP folder(s) and NNTP newsgroup(s).