diff mbox series

[net-next,v3,1/7] dt-bindings: net: pse-dt: add bindings for generic PSE controller

Message ID 20220827051033.3903585-2-o.rempel@pengutronix.de (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series add generic PSE support | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
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: 0 this patch: 0
netdev/checkpatch warning WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Oleksij Rempel Aug. 27, 2022, 5:10 a.m. UTC
Add binding for generic Ethernet PSE controller.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
changes v2:
- rename compatible to more generic "ieee802.3-pse"
- add class and type properties for PoDL and PoE variants
- add pairs property
---
 .../bindings/net/pse-pd/generic-pse.yaml      | 95 +++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/pse-pd/generic-pse.yaml
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/pse-pd/generic-pse.yaml b/Documentation/devicetree/bindings/net/pse-pd/generic-pse.yaml
new file mode 100644
index 0000000000000..ecd226df66f4e
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/pse-pd/generic-pse.yaml
@@ -0,0 +1,95 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/pse-pd/generic-pse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic Power Sourcing Equipment
+
+maintainers:
+  - Oleksij Rempel <o.rempel@pengutronix.de>
+
+description: Generic PSE controller. The device must be referenced by the PHY
+  node to control power injection to the Ethernet cable.
+
+properties:
+  compatible:
+    const: ieee802.3-pse
+
+  '#pse-cells':
+    const: 0
+
+  ieee802.3-pse-supply:
+    description: Power supply for the PSE controller
+
+  ieee802.3-pairs:
+    $ref: /schemas/types.yaml#/definitions/int8-array
+    description: Array of number of twisted-pairs capable to deliver power.
+      Since not all circuits are able to support all pair variants, the array of
+      supported variants should be specified.
+      Note - single twisted-pair PSE is formally know as PoDL PSE.
+    items:
+      enum: [1, 2, 4]
+
+  ieee802.3-pse-type:
+    $ref: /schemas/types.yaml#/definitions/uint8
+    minimum: 1
+    maximum: 2
+    description: PSE Type. Describes classification- and class-capabilities.
+      Not compatible with PoDL PSE Type.
+      Type 1 - provides a Class 0, 1, 2, or 3 signature during Physical Layer
+      classification.
+      Type 2 - provides a Class 4 signature during Physical Layer
+      classification, understands 2-Event classification, and is capable of
+      Data Link Layer classification.
+
+  ieee802.3-pse-class:
+    $ref: /schemas/types.yaml#/definitions/int8-array
+    items:
+      enum: [0, 1, 2, 3, 4]
+    description: PSE Class. Array of supported classes by the 2 and 4 pair PSE.
+
+  ieee802.3-podl-pse-type:
+    $ref: /schemas/types.yaml#/definitions/string
+    enum: [a, b, c, d, e]
+    description: PoDL PSE Type. Describes compatibility to physical Layer
+      specifications.
+      Type A - cost optimized for 100BASE-T1
+      Type B - cost optimized for 1000BASE-T1
+      Type C - works with 100BASE-T1 and 1000BASE-T1
+      Type D - optimized for 10BASE-T1S
+      Type E - optimized for 10BASE-T1L
+
+  ieee802.3-podl-pse-class:
+    $ref: /schemas/types.yaml#/definitions/int8-array
+    items:
+      enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
+    description: PoDL PSE Class. Array of supported classes by the
+      single twisted-pair PoDL PSE.
+
+additionalProperties: false
+
+required:
+  - compatible
+  - '#pse-cells'
+  - ieee802.3-pse-supply
+
+examples:
+  - |
+    pse_t1l2: ethernet-pse-1 {
+      compatible = "ieee802.3-pse";
+      ieee802.3-pse-supply = <&reg_t1l1>;
+      ieee802.3-podl-pse-type = "e";
+      ieee802.3-podl-pse-class = /bits/ 8 <0 1>;
+      ieee802.3-pairs = /bits/ 8 <1>;
+      #pse-cells = <0>;
+    };
+  - |
+    pse_poe: ethernet-pse-2 {
+      compatible = "ieee802.3-pse";
+      ieee802.3-pse-supply = <&reg_poe>;
+      ieee802.3-pairs = /bits/ 8 <2 4>;
+      ieee802.3-pse-type = /bits/ 8 <1>;
+      ieee802.3-pse-class = /bits/ 8 <0 1>;
+      #pse-cells = <0>;
+    };