diff mbox series

[U-Boot,3/8] dt-bindings: phy: dp83867: Add documentation for disabling clock output

Message ID 20191118210447.7433-4-grygorii.strashko@ti.com
State Accepted
Commit fb6038390ebe8717a66dd3a4e37bffb96e50c07a
Delegated to: Joe Hershberger
Headers show
Series net: phy: dp83867: ti: sync with linux kernel and | expand

Commit Message

Grygorii Strashko Nov. 18, 2019, 9:04 p.m. UTC
Based on commit 980066e6d964 ("dt-bindings: phy: dp83867: Add documentation
for disabling clock output") of mainline linux kernel.

The clock output is generally only used for testing and development and not
used to daisy-chain PHYs.  It's just a source of RF noise afterward.

Add a mux value for "off".  I've added it as another enumeration to the
output property.  In the actual PHY, the mux and the output enable are
independently controllable.  However, it doesn't seem useful to be able
to describe the mux setting when the output is disabled.

Document that PHY's default setting will be left as is if the property
is omitted.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 doc/device-tree-bindings/net/ti,dp83867.txt | 6 ++++--
 include/dt-bindings/net/ti-dp83867.h        | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

Comments

Joe Hershberger Nov. 19, 2019, 9:40 p.m. UTC | #1
On Mon, Nov 18, 2019 at 3:17 PM Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
>
> Based on commit 980066e6d964 ("dt-bindings: phy: dp83867: Add documentation
> for disabling clock output") of mainline linux kernel.
>
> The clock output is generally only used for testing and development and not
> used to daisy-chain PHYs.  It's just a source of RF noise afterward.
>
> Add a mux value for "off".  I've added it as another enumeration to the
> output property.  In the actual PHY, the mux and the output enable are
> independently controllable.  However, it doesn't seem useful to be able
> to describe the mux setting when the output is disabled.
>
> Document that PHY's default setting will be left as is if the property
> is omitted.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
diff mbox series

Patch

diff --git a/doc/device-tree-bindings/net/ti,dp83867.txt b/doc/device-tree-bindings/net/ti,dp83867.txt
index 034146f5f8..268220964a 100644
--- a/doc/device-tree-bindings/net/ti,dp83867.txt
+++ b/doc/device-tree-bindings/net/ti,dp83867.txt
@@ -12,8 +12,10 @@  Required properties:
 		compensate for the board being designed with the lanes swapped.
 	- enet-phy-no-lane-swap - Indicates that PHY will disable swap of the
 		TX/RX lanes.
-	- ti,clk-output-sel - Clock output select - see dt-bindings/net/ti-dp83867.h
-		for applicable values
+	- ti,clk-output-sel - Muxing option for CLK_OUT pin.  See dt-bindings/net/ti-dp83867.h
+			      for applicable values.  The CLK_OUT pin can also
+			      be disabled by this property.  When omitted, the
+			      PHY's default will be left as is.
 
 Default child nodes are standard Ethernet PHY device
 nodes as described in doc/devicetree/bindings/net/ethernet.txt
diff --git a/include/dt-bindings/net/ti-dp83867.h b/include/dt-bindings/net/ti-dp83867.h
index 85d08f6974..cde5aa7e27 100644
--- a/include/dt-bindings/net/ti-dp83867.h
+++ b/include/dt-bindings/net/ti-dp83867.h
@@ -45,5 +45,6 @@ 
 #define DP83867_CLK_O_SEL_CHN_C_TCLK		0xA
 #define DP83867_CLK_O_SEL_CHN_D_TCLK		0xB
 #define DP83867_CLK_O_SEL_REF_CLK		0xC
-
+/* Special flag to indicate clock should be off */
+#define DP83867_CLK_O_SEL_OFF			0xFFFFFFFF
 #endif