diff mbox series

[v2,1/6] dt-bindings: net: Add bindings for PHY DP83640

Message ID 20240227093945.21525-2-bastien.curutchet@bootlin.com
State New
Headers show
Series net: phy: Add TI's DP83640 device tree binding | expand

Commit Message

Bastien Curutchet Feb. 27, 2024, 9:39 a.m. UTC
The DP83640 is a PTP PHY. Some of his features can be enabled by
hardware straps. There is not binding yet.

Add a device tree binding to be able to override the hardware strap
configuration when needed.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
---
 .../devicetree/bindings/net/ti,dp83640.yaml   | 77 +++++++++++++++++++
 1 file changed, 77 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/ti,dp83640.yaml

Comments

Conor Dooley Feb. 28, 2024, 11:37 a.m. UTC | #1
On Tue, Feb 27, 2024 at 10:39:40AM +0100, Bastien Curutchet wrote:
> The DP83640 is a PTP PHY. Some of his features can be enabled by
> hardware straps. There is not binding yet.
> 
> Add a device tree binding to be able to override the hardware strap
> configuration when needed.
> 
> Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/ti,dp83640.yaml b/Documentation/devicetree/bindings/net/ti,dp83640.yaml
new file mode 100644
index 000000000000..db1dc909d5cb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/ti,dp83640.yaml
@@ -0,0 +1,77 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2024 Nanometrics Inc
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/ti,dp83640.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI DP83640 ethernet PHY
+
+allOf:
+  - $ref: ethernet-controller.yaml#
+
+maintainers:
+  - Bastien Curutchet <bastien.curutchet@bootlin.com>
+
+description: |
+  The DP83640 Precision PHYTER device is an Ethernet PHY providing PTP
+  capabilities based on IEEE 1588 standard.
+
+  This device interfaces directly to the MAC layer through the
+  IEEE 802.3 Standard Media Independent Interface (MII), or Reduced MII (RMII).
+
+  Specifications about the Ethernet PHY can be found at:
+    https://www.ti.com/lit/gpn/dp83640
+
+properties:
+  reg:
+    maxItems: 1
+
+  ti,fiber-mode:
+    $ref: /schemas/types.yaml#/definitions/string
+    enum: [ disable, enable ]
+    description: |
+      If present, enables or disables the FX Fiber Mode.
+       - disable  = FX Fiber Mode disabled
+       - enable   = FX Fiber Mode enabled
+      Fiber mode enabling can also be strapped. If the strap pin is not set
+      correctly or not set at all then this can be used to configure it.
+
+  leds:
+    type: object
+    $ref: /schemas/leds/common.yaml#
+    description: |
+      Describes the three LEDs of the PHY.
+
+required:
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    mdio0 {
+      #address-cells = <1>;
+      #size-cells = <0>;
+      ethphy0: ethernet-phy@0 {
+        reg = <0>;
+        ti,fiber-mode = "disable";
+        leds {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          led@0 {
+            reg = <0>;
+            label = "activity";
+          };
+          led@1 {
+            reg = <1>;
+            label = "link";
+          };
+          led@2 {
+            reg = <2>;
+            label = "speed";
+          };
+        };
+      };
+    };