diff mbox series

[net-next,v4,11/17] dt-bindings: net: pse-pd: Add another way of describing several PSE PIs

Message ID 20240215-feature_poe-v4-11-35bb4c23266c@bootlin.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net: Add support for Power over Ethernet (PoE) | expand

Checks

Context Check Description
netdev/series_format fail Series longer than 15 patches (and no cover letter)
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; GEN HAS DIFF 2 files changed, 96 insertions(+), 39 deletions(-);
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 fail Errors and warnings before: 13 this patch: 13
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang fail Errors and warnings before: 13 this patch: 13
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 fail Errors and warnings before: 13 this patch: 13
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 98 lines checked
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

Commit Message

Kory Maincent Feb. 15, 2024, 4:02 p.m. UTC
PSE PI setup may encompass multiple PSE controllers or auxiliary circuits
that collectively manage power delivery to one Ethernet port.
Such configurations might support a range of PoE standards and require
the capability to dynamically configure power delivery based on the
operational mode (e.g., PoE2 versus PoE4) or specific requirements of
connected devices. In these instances, a dedicated PSE PI node becomes
essential for accurately documenting the system architecture. This node
would serve to detail the interactions between different PSE controllers,
the support for various PoE modes, and any additional logic required to
coordinate power delivery across the network infrastructure.

The old usage of "#pse-cells" is unsuficient as it carries only the PSE PI
index information.

This patch is sponsored by Dent Project <dentproject@linuxfoundation.org>.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---

Changes in v3:
- New patch

Changes in v4:
- Remove $def
- Fix pairset-names item list
- Upgrade few properties description
- Update the commit message
---
 .../bindings/net/pse-pd/pse-controller.yaml        | 84 +++++++++++++++++++++-
 1 file changed, 81 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) Feb. 15, 2024, 6:46 p.m. UTC | #1
On Thu, 15 Feb 2024 17:02:52 +0100, Kory Maincent wrote:
> PSE PI setup may encompass multiple PSE controllers or auxiliary circuits
> that collectively manage power delivery to one Ethernet port.
> Such configurations might support a range of PoE standards and require
> the capability to dynamically configure power delivery based on the
> operational mode (e.g., PoE2 versus PoE4) or specific requirements of
> connected devices. In these instances, a dedicated PSE PI node becomes
> essential for accurately documenting the system architecture. This node
> would serve to detail the interactions between different PSE controllers,
> the support for various PoE modes, and any additional logic required to
> coordinate power delivery across the network infrastructure.
> 
> The old usage of "#pse-cells" is unsuficient as it carries only the PSE PI
> index information.
> 
> This patch is sponsored by Dent Project <dentproject@linuxfoundation.org>.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> 
> Changes in v3:
> - New patch
> 
> Changes in v4:
> - Remove $def
> - Fix pairset-names item list
> - Upgrade few properties description
> - Update the commit message
> ---
>  .../bindings/net/pse-pd/pse-controller.yaml        | 84 +++++++++++++++++++++-
>  1 file changed, 81 insertions(+), 3 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:74:19: [error] string value is redundantly quoted with any quotes (quoted-strings)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:75:19: [error] string value is redundantly quoted with any quotes (quoted-strings)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:84:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:86:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:87:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:88:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:89:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:90:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:91:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:92:111: [warning] line too long (111 > 110 characters) (line-length)
./Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml:93:111: [warning] line too long (111 > 110 characters) (line-length)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):
Warning: Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml references a file that doesn't exist: Documentation/networking/pse-pd/pse-pi.rst
Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml: Documentation/networking/pse-pd/pse-pi.rst

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240215-feature_poe-v4-11-35bb4c23266c@bootlin.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Rob Herring (Arm) Feb. 16, 2024, 2:16 a.m. UTC | #2
On Thu, Feb 15, 2024 at 05:02:52PM +0100, Kory Maincent wrote:
> PSE PI setup may encompass multiple PSE controllers or auxiliary circuits
> that collectively manage power delivery to one Ethernet port.
> Such configurations might support a range of PoE standards and require
> the capability to dynamically configure power delivery based on the
> operational mode (e.g., PoE2 versus PoE4) or specific requirements of
> connected devices. In these instances, a dedicated PSE PI node becomes
> essential for accurately documenting the system architecture. This node
> would serve to detail the interactions between different PSE controllers,
> the support for various PoE modes, and any additional logic required to
> coordinate power delivery across the network infrastructure.
> 
> The old usage of "#pse-cells" is unsuficient as it carries only the PSE PI
> index information.

Every time I read this sentence I'm just going to ask why not add more 
data besides index to the cells?

This all still looks pretty much the same. I guess there was 
explanation in the long response on the last version, but I haven't had 
time to digest it and won't until I'm back next week at the earliest.

Rob
Kory Maincent Feb. 16, 2024, 8:56 a.m. UTC | #3
On Thu, 15 Feb 2024 12:46:16 -0600
Rob Herring <robh@kernel.org> wrote:

> On Thu, 15 Feb 2024 17:02:52 +0100, Kory Maincent wrote:
> > PSE PI setup may encompass multiple PSE controllers or auxiliary circuits
> > that collectively manage power delivery to one Ethernet port.
> > Such configurations might support a range of PoE standards and require
> > the capability to dynamically configure power delivery based on the
> > operational mode (e.g., PoE2 versus PoE4) or specific requirements of
> > connected devices. In these instances, a dedicated PSE PI node becomes
> > essential for accurately documenting the system architecture. This node
> > would serve to detail the interactions between different PSE controllers,
> > the support for various PoE modes, and any additional logic required to
> > coordinate power delivery across the network infrastructure.
> > 
> > The old usage of "#pse-cells" is unsuficient as it carries only the PSE PI
> > index information.
> > 
> > This patch is sponsored by Dent Project <dentproject@linuxfoundation.org>.
> > 
> > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > ---
> > 
> > Changes in v3:
> > - New patch
> > 
> > Changes in v4:
> > - Remove $def
> > - Fix pairset-names item list
> > - Upgrade few properties description
> > - Update the commit message
> > ---
> >  .../bindings/net/pse-pd/pse-controller.yaml        | 84
> > +++++++++++++++++++++- 1 file changed, 81 insertions(+), 3 deletions(-)
> >   
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):

Weird, I don't get your errors even with dt-schema up to date.
Maybe I have version mismatch in other tools.

Regards,
Kory Maincent Feb. 16, 2024, 8:58 a.m. UTC | #4
On Fri, 16 Feb 2024 09:56:16 +0100
Köry Maincent <kory.maincent@bootlin.com> wrote:

> On Thu, 15 Feb 2024 12:46:16 -0600
> Rob Herring <robh@kernel.org> wrote:
> 
> > On Thu, 15 Feb 2024 17:02:52 +0100, Kory Maincent wrote:  
> > > PSE PI setup may encompass multiple PSE controllers or auxiliary circuits
> > > that collectively manage power delivery to one Ethernet port.
> > > Such configurations might support a range of PoE standards and require
> > > the capability to dynamically configure power delivery based on the
> > > operational mode (e.g., PoE2 versus PoE4) or specific requirements of
> > > connected devices. In these instances, a dedicated PSE PI node becomes
> > > essential for accurately documenting the system architecture. This node
> > > would serve to detail the interactions between different PSE controllers,
> > > the support for various PoE modes, and any additional logic required to
> > > coordinate power delivery across the network infrastructure.
> > > 
> > > The old usage of "#pse-cells" is unsuficient as it carries only the PSE PI
> > > index information.
> > > 
> > > This patch is sponsored by Dent Project <dentproject@linuxfoundation.org>.
> > > 
> > > Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> > > ---
> > > 
> > > Changes in v3:
> > > - New patch
> > > 
> > > Changes in v4:
> > > - Remove $def
> > > - Fix pairset-names item list
> > > - Upgrade few properties description
> > > - Update the commit message
> > > ---
> > >  .../bindings/net/pse-pd/pse-controller.yaml        | 84
> > > +++++++++++++++++++++- 1 file changed, 81 insertions(+), 3 deletions(-)
> > >     
> > 
> > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> > on your patch (DT_CHECKER_FLAGS is new in v5.13):  
> 
> Weird, I don't get your errors even with dt-schema up to date.
> Maybe I have version mismatch in other tools.

Ah found it! I had yamllint not up to date.
Sorry for the noise.
Krzysztof Kozlowski Feb. 17, 2024, 2:01 p.m. UTC | #5
On 15/02/2024 17:02, Kory Maincent wrote:
> PSE PI setup may encompass multiple PSE controllers or auxiliary circuits
> that collectively manage power delivery to one Ethernet port.
> Such configurations might support a range of PoE standards and require
> the capability to dynamically configure power delivery based on the
> operational mode (e.g., PoE2 versus PoE4) or specific requirements of
> connected devices. In these instances, a dedicated PSE PI node becomes
> essential for accurately documenting the system architecture. This node
> would serve to detail the interactions between different PSE controllers,
> the support for various PoE modes, and any additional logic required to
> coordinate power delivery across the network infrastructure.
> 
> The old usage of "#pse-cells" is unsuficient as it carries only the PSE PI
> index information.
> 
> This patch is sponsored by Dent Project <dentproject@linuxfoundation.org>.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> 
> Changes in v3:
> - New patch
> 
> Changes in v4:
> - Remove $def
> - Fix pairset-names item list
> - Upgrade few properties description
> - Update the commit message
> ---
>  .../bindings/net/pse-pd/pse-controller.yaml        | 84 +++++++++++++++++++++-
>  1 file changed, 81 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml b/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml
> index 2d382faca0e6..6f4faec216a5 100644
> --- a/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml
> +++ b/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml
> @@ -13,6 +13,7 @@ description: Binding for the Power Sourcing Equipment (PSE) as defined in the
>  
>  maintainers:
>    - Oleksij Rempel <o.rempel@pengutronix.de>
> +  - Kory Maincent <kory.maincent@bootlin.com>
>  
>  properties:
>    $nodename:
> @@ -22,11 +23,88 @@ properties:
>      description:
>        Used to uniquely identify a PSE instance within an IC. Will be
>        0 on PSE nodes with only a single output and at least 1 on nodes
> -      controlling several outputs.
> +      controlling several outputs which are not described in the pse_pis
> +      subnode. This property is deprecated, please use pse_pis instead.
>      enum: [0, 1]
>  
> -required:
> -  - "#pse-cells"
> +  pse_pis:

How did this appear here? Underscores are no allowed.

> +    type: object


Missing description.

> +
> +    properties:
> +      "#address-cells":
> +        const: 1
> +
> +      "#size-cells":
> +        const: 0
> +
> +    required:
> +      - "#address-cells"
> +      - "#size-cells"
> +
> +    patternProperties:

No underscores.

> +      "^pse_pi@[0-9a-f]+$":
> +        type: object
> +        description:
> +          PSE PI for power delivery via pairsets, compliant with IEEE
> +          802.3-2022, Section 145.2.4. Each pairset comprises a positive and
> +          a negative VPSE pair, adhering to the pinout configurations
> +          detailed in the standard.
> +          See Documentation/networking/pse-pd/pse-pi.rst for details.
> +
> +        properties:
> +          reg:
> +            description:
> +              Address describing the PSE PI index.
> +            maxItems: 1
> +
> +          "#pse-cells":
> +            const: 0
> +
> +          pairset-names:
> +            $ref: /schemas/types.yaml#/definitions/string-array
> +            description:
> +              Names of the pairsets as per IEEE 802.3-2022, Section 145.2.4.
> +              Valid values are "alternative-a" and "alternative-b". Each name
> +              should correspond to a phandle in the 'pairset' property
> +              pointing to the power supply for that pairset.
> +            minItems: 1
> +            maxItems: 2
> +            items:
> +              enum:
> +                - "alternative-a"
> +                - "alternative-b"

No need for quotes.

I believe you did not test it, so I will skip reviewing the rest.


Best regards,
Krzysztof
Kory Maincent Feb. 19, 2024, 9:22 a.m. UTC | #6
On Sat, 17 Feb 2024 15:01:55 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> > -required:
> > -  - "#pse-cells"
> > +  pse_pis:  
> 
> How did this appear here? Underscores are no allowed.

Didn't know that, sorry.
Indeed it is written in the dts-coding-style.rst, sorry for the error.

> 
> > +    type: object  
> 
> 
> Missing description.

Ah indeed.

> > +            items:
> > +              enum:
> > +                - "alternative-a"
> > +                - "alternative-b"  
> 
> No need for quotes.

Yes I saw that warning with yamllint up to date and have fixed it with for the
next version.

> I believe you did not test it, so I will skip reviewing the rest.

I tested it and did not face any error due to the underscore with
"make DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=pse-controller.yaml"
Did I miss something in the test options?

Regards,
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml b/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml
index 2d382faca0e6..6f4faec216a5 100644
--- a/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml
+++ b/Documentation/devicetree/bindings/net/pse-pd/pse-controller.yaml
@@ -13,6 +13,7 @@  description: Binding for the Power Sourcing Equipment (PSE) as defined in the
 
 maintainers:
   - Oleksij Rempel <o.rempel@pengutronix.de>
+  - Kory Maincent <kory.maincent@bootlin.com>
 
 properties:
   $nodename:
@@ -22,11 +23,88 @@  properties:
     description:
       Used to uniquely identify a PSE instance within an IC. Will be
       0 on PSE nodes with only a single output and at least 1 on nodes
-      controlling several outputs.
+      controlling several outputs which are not described in the pse_pis
+      subnode. This property is deprecated, please use pse_pis instead.
     enum: [0, 1]
 
-required:
-  - "#pse-cells"
+  pse_pis:
+    type: object
+
+    properties:
+      "#address-cells":
+        const: 1
+
+      "#size-cells":
+        const: 0
+
+    required:
+      - "#address-cells"
+      - "#size-cells"
+
+    patternProperties:
+      "^pse_pi@[0-9a-f]+$":
+        type: object
+        description:
+          PSE PI for power delivery via pairsets, compliant with IEEE
+          802.3-2022, Section 145.2.4. Each pairset comprises a positive and
+          a negative VPSE pair, adhering to the pinout configurations
+          detailed in the standard.
+          See Documentation/networking/pse-pd/pse-pi.rst for details.
+
+        properties:
+          reg:
+            description:
+              Address describing the PSE PI index.
+            maxItems: 1
+
+          "#pse-cells":
+            const: 0
+
+          pairset-names:
+            $ref: /schemas/types.yaml#/definitions/string-array
+            description:
+              Names of the pairsets as per IEEE 802.3-2022, Section 145.2.4.
+              Valid values are "alternative-a" and "alternative-b". Each name
+              should correspond to a phandle in the 'pairset' property
+              pointing to the power supply for that pairset.
+            minItems: 1
+            maxItems: 2
+            items:
+              enum:
+                - "alternative-a"
+                - "alternative-b"
+
+          pairsets:
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+            description:
+              List of phandles, each pointing to the power supply for the
+              corresponding pairset named in 'pairset-names'. This property
+              aligns with IEEE 802.3-2022, Section 33.2.3 and 145.2.4.
+              PSE Pinout Alternatives (as per IEEE 802.3-2022 Table 145–3)
+              | Conductor | Alternative A (MDI-X) | Alternative A (MDI) | Alternative B(X) | Alternative B(S) |
+              |-----------|-----------------------|---------------------|------------------|------------------|
+              | 1         | Negative VPSE         | Positive VPSE       | —                | —                |
+              | 2         | Negative VPSE         | Positive VPSE       | —                | —                |
+              | 3         | Positive VPSE         | Negative VPSE       | —                | —                |
+              | 4         | —                     | —                   | Negative VPSE    | Positive VPSE    |
+              | 5         | —                     | —                   | Negative VPSE    | Positive VPSE    |
+              | 6         | Positive VPSE         | Negative VPSE       | —                | —                |
+              | 7         | —                     | —                   | Positive VPSE    | Negative VPSE    |
+              | 8         | —                     | —                   | Positive VPSE    | Negative VPSE    |
+            minItems: 1
+            maxItems: 2
+
+        required:
+          - reg
+          - "#pse-cells"
+          - pairset-names
+          - pairsets
+
+oneOf:
+  - required:
+      - "#pse-cells"
+  - required:
+      - pse_pis
 
 additionalProperties: true