diff mbox series

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

Message ID 20240227093945.21525-2-bastien.curutchet@bootlin.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: phy: Add TI's DP83640 device tree binding | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Guessed tree name to be net-next, async
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 958 this patch: 958
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch warning WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-27--12-00 (tests: 1453)

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";
+          };
+        };
+      };
+    };