[PATCH 2/2] dt-bindings: net: ti:add support slave interface using internal clock in dual rmii emac mode

From: Xiangyu Chen
Date: Thu Dec 30 2021 - 21:38:03 EST


The am335x support dual emac in rmii mode, the rmii clock can be
provided by external osc or internal soc by ref_clk pin.
When rmii-clock-ext has been set in device tree, both emac has been
set to external clock mode, otherwise both emac has been set to internal
clock mode.

In some case, one slave can be used external clock, another slave can be
used internal clock.

This commit to support define a method to tell driver which slave phy
use internal clock when the "rmii-clock-ext" has been set.

Signed-off-by: Xiangyu Chen <xiangyu.chen@xxxxxxx>
---
.../devicetree/bindings/net/cpsw-phy-sel.txt | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt
index 5d76f991c..d3b91824d 100644
--- a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt
+++ b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt
@@ -13,6 +13,10 @@ Optional properties:
-rmii-clock-ext : If present, the driver will configure the RMII
interface to external clock usage

+-ignore-slave : If dual rmii emac enabled and rmii-clock-ext present,
+ this value will tell driver which slave want to use
+ internal clock instead of external clock
+
Examples:

phy_sel: cpsw-phy-sel@44e10650 {
@@ -28,3 +32,12 @@ Examples:
reg-names = "gmii-sel";
rmii-clock-ext;
};
+
+(or)
+ phy_sel: cpsw-phy-sel@44e10650 {
+ compatible = "ti,am3352-cpsw-phy-sel";
+ reg= <0x44e10650 0x4>;
+ reg-names = "gmii-sel";
+ rmii-clock-ext;
+ ignore-slave = <0>;
+ };
--
2.25.1