🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
4 messages
4 total messages Started by Rob Herring Wed, 07 Oct 2026 21:04
Re: [PATCH net-next v3 1/2] dt-bindings: net: pse-pd: Add bindings for LTC4266 PSE Controller
#341
Author: Rob Herring
Date: Wed, 07 Oct 2026 21:04
113 lines
9375 bytes
On Sun, Sep 27, 2026 at 09:29:48PM +0000, Kyle Swenson wrote:
> Add the LTC4266 Power Sourcing Equipment controller device tree bindings
> documentation.
> 
> Signed-off-by: Kyle Swenson <kyle.swenson@est.tech>
> ---
>  .../bindings/net/pse-pd/lltc,ltc4266.yaml     | 180 ++++++++++++++++++
>  1 file changed, 180 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> 
> diff --git a/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> new file mode 100644
> index 000000000000..e11c9d601eee
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> @@ -0,0 +1,180 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/pse-pd/lltc,ltc4266.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Linear Technology LTC4266 Power Sourcing Equipment controller
> +
> +maintainers:
> +  - Kyle Swenson <kyle.swenson@est.tech>
> +
> +allOf:
> +  - $ref: pse-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - lltc,ltc4266
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  channels:
> +    type: object
> +    additionalProperties: false
> +    description:
> +      Defines the 4 physical delivery channels on the controller that can be
> +      referenced by PSE PIs through their "pairsets" property. The actual port
> +      matrix mapping is created when PSE PIs reference these channels in their
> +      pairsets.
> +
> +    properties:
> +      '#address-cells':
> +        const: 1
> +
> +      '#size-cells':
> +        const: 0
> +
> +    patternProperties:
> +      '^channel@[0-3]$':
> +        type: object
> +        additionalProperties: false
> +
> +        properties:
> +          reg:
> +            maxItems: 1
> +
> +          sense-resistor-micro-ohms:
> +            description: Sense resistor connected to the channel's MOSFET, used
> +              for current measurement and for overcurrent detection. The I_CUT
> +              and I_LIM register encodings depend on which value is fitted, so
> +              a wrong value programs the wrong thresholds.
> +            enum: [250000, 500000]
> +
> +        required:
> +          - reg
> +          - sense-resistor-micro-ohms
> +
> +    required:
> +      - '#address-cells'
> +      - '#size-cells'
> +
> +  pse-pis:
> +    type: object
> +    additionalProperties: false
> +
> +    properties:
> +      '#address-cells':
> +        const: 1
> +
> +      '#size-cells':
> +        const: 0
> +
> +    patternProperties:
> +      '^pse-pi@[0-3]$':
> +        type: object
> +        additionalProperties: true

This cannot be true. That allows adding any property.

> +        properties:
> +          pairsets:
> +            description: The LTC4266 delivers power to a PI over a single
> +              pairset, driven by one of the controller's four channels. There
> +              is no 4-pair mode spreading a PI over two channels, so exactly
> +              one channel phandle is expected.
> +            maxItems: 1
> +          pairset-names:
> +            maxItems: 1

An empty node is valid? Needs 'required'.

Rob
Re: [PATCH net-next v3 1/2] dt-bindings: net: pse-pd: Add bindings for LTC4266 PSE Controller
#1591
Author: Kyle Swenson
Date: Sat, 10 Oct 2026 07:30
175 lines
18726 bytes
Hello Rob,

On Wed, Oct 07, 2026 at 04:04:54PM -0500, Rob Herring wrote:
> On Sun, Sep 27, 2026 at 09:29:48PM +0000, Kyle Swenson wrote:
> > Add the LTC4266 Power Sourcing Equipment controller device tree bindings
> > documentation.
> > 
> > Signed-off-by: Kyle Swenson <kyle.swenson@est.tech>
> > ---
> >  .../bindings/net/pse-pd/lltc,ltc4266.yaml     | 180 ++++++++++++++++++
> >  1 file changed, 180 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > new file mode 100644
> > index 000000000000..e11c9d601eee
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > @@ -0,0 +1,180 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/net/pse-pd/lltc,ltc4266.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Linear Technology LTC4266 Power Sourcing Equipment controller
> > +
> > +maintainers:
> > +  - Kyle Swenson <kyle.swenson@est.tech>
> > +
> > +allOf:
> > +  - $ref: pse-controller.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - lltc,ltc4266
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  channels:
> > +    type: object
> > +    additionalProperties: false
> > +    description:
> > +      Defines the 4 physical delivery channels on the controller that can be
> > +      referenced by PSE PIs through their "pairsets" property. The actual port
> > +      matrix mapping is created when PSE PIs reference these channels in their
> > +      pairsets.
> > +
> > +    properties:
> > +      '#address-cells':
> > +        const: 1
> > +
> > +      '#size-cells':
> > +        const: 0
> > +
> > +    patternProperties:
> > +      '^channel@[0-3]$':
> > +        type: object
> > +        additionalProperties: false
> > +
> > +        properties:
> > +          reg:
> > +            maxItems: 1
> > +
> > +          sense-resistor-micro-ohms:
> > +            description: Sense resistor connected to the channel's MOSFET, used
> > +              for current measurement and for overcurrent detection. The I_CUT
> > +              and I_LIM register encodings depend on which value is fitted, so
> > +              a wrong value programs the wrong thresholds.
> > +            enum: [250000, 500000]
> > +
> > +        required:
> > +          - reg
> > +          - sense-resistor-micro-ohms
> > +
> > +    required:
> > +      - '#address-cells'
> > +      - '#size-cells'
> > +
> > +  pse-pis:
> > +    type: object
> > +    additionalProperties: false
> > +
> > +    properties:
> > +      '#address-cells':
> > +        const: 1
> > +
> > +      '#size-cells':
> > +        const: 0
> > +
> > +    patternProperties:
> > +      '^pse-pi@[0-3]$':
> > +        type: object
> > +        additionalProperties: true
> 
> This cannot be true. That allows adding any property.
> 

So my intent with the additionalProperties: true was to avoid
replicating the entire pse-pis node from pse-controller.yaml.
Conceptually, my goal was to inherit everything from the
pse-controller.yaml binding, except limit the maxItems to 1 (since the
LTC4266 only supports power over a single PI).

Is there a better way to express this?

> > +        properties:
> > +          pairsets:
> > +            description: The LTC4266 delivers power to a PI over a single
> > +              pairset, driven by one of the controller's four channels. There
> > +              is no 4-pair mode spreading a PI over two channels, so exactly
> > +              one channel phandle is expected.
> > +            maxItems: 1
> > +          pairset-names:
> > +            maxItems: 1
> 
> An empty node is valid? Needs 'required'.

I thought the 'required' comes from the pse-controller.yaml binding.
If I adjust the example dts in the binding with something like

           pse_pi2: pse-pi@2 {
-            reg = <2>;
-            #pse-cells = <0>;
-            pairset-names = "alternative-a";
-            pairsets = <&phys2>;
-            polarity-supported = "MDI";
-            vpwr-supply = <&vreg_pse>;
           };

Then make dt_binding_check will fail with 

  DTEX    Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.example.dts
  DTC [C] Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.example.dtb
Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.example.dts:83.33-84.17: Warning (unit_address_vs_reg): /example-0/i2c/ethernet-pse@2f/pse-pis/pse-pi@2: node has a unit name, but no reg or ranges property
Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.example.dtb: ethernet-pse@2f (lltc,ltc4266): pse-pis:pse-pi@2: 'reg' is a required property
	from schema $id: http://devicetree.org/schemas/net/pse-pd/lltc,ltc4266.yaml
Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.example.dtb: ethernet-pse@2f (lltc,ltc4266): pse-pis:pse-pi@2: '#pse-cells' is a required property
	from schema $id:
	http://devicetree.org/schemas/net/pse-pd/lltc,ltc4266.yaml

But I'm probably missing something obvious, so please don't hesitate to
point it out or point me to docs.

> 
> Rob

Thanks so much for the review!
Kyle
Re: [PATCH net-next v3 1/2] dt-bindings: net: pse-pd: Add bindings for LTC4266 PSE Controller
#3701
Author: Rob Herring
Date: Thu, 15 Oct 2026 19:25
149 lines
11277 bytes
On Sat, Oct 10, 2026 at 07:30:50AM +0000, Kyle Swenson wrote:
> Hello Rob,
> 
> On Wed, Oct 07, 2026 at 04:04:54PM -0500, Rob Herring wrote:
> > On Sun, Sep 27, 2026 at 09:29:48PM +0000, Kyle Swenson wrote:
> > > Add the LTC4266 Power Sourcing Equipment controller device tree bindings
> > > documentation.
> > > 
> > > Signed-off-by: Kyle Swenson <kyle.swenson@est.tech>
> > > ---
> > >  .../bindings/net/pse-pd/lltc,ltc4266.yaml     | 180 ++++++++++++++++++
> > >  1 file changed, 180 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > 
> > > diff --git a/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > new file mode 100644
> > > index 000000000000..e11c9d601eee
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > @@ -0,0 +1,180 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/net/pse-pd/lltc,ltc4266.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Linear Technology LTC4266 Power Sourcing Equipment controller
> > > +
> > > +maintainers:
> > > +  - Kyle Swenson <kyle.swenson@est.tech>
> > > +
> > > +allOf:
> > > +  - $ref: pse-controller.yaml#
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - lltc,ltc4266
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  interrupts:
> > > +    maxItems: 1
> > > +
> > > +  channels:
> > > +    type: object
> > > +    additionalProperties: false
> > > +    description:
> > > +      Defines the 4 physical delivery channels on the controller that can be
> > > +      referenced by PSE PIs through their "pairsets" property. The actual port
> > > +      matrix mapping is created when PSE PIs reference these channels in their
> > > +      pairsets.
> > > +
> > > +    properties:
> > > +      '#address-cells':
> > > +        const: 1
> > > +
> > > +      '#size-cells':
> > > +        const: 0
> > > +
> > > +    patternProperties:
> > > +      '^channel@[0-3]$':
> > > +        type: object
> > > +        additionalProperties: false
> > > +
> > > +        properties:
> > > +          reg:
> > > +            maxItems: 1
> > > +
> > > +          sense-resistor-micro-ohms:
> > > +            description: Sense resistor connected to the channel's MOSFET, used
> > > +              for current measurement and for overcurrent detection. The I_CUT
> > > +              and I_LIM register encodings depend on which value is fitted, so
> > > +              a wrong value programs the wrong thresholds.
> > > +            enum: [250000, 500000]
> > > +
> > > +        required:
> > > +          - reg
> > > +          - sense-resistor-micro-ohms
> > > +
> > > +    required:
> > > +      - '#address-cells'
> > > +      - '#size-cells'
> > > +
> > > +  pse-pis:
> > > +    type: object
> > > +    additionalProperties: false
> > > +
> > > +    properties:
> > > +      '#address-cells':
> > > +        const: 1
> > > +
> > > +      '#size-cells':
> > > +        const: 0
> > > +
> > > +    patternProperties:
> > > +      '^pse-pi@[0-3]$':
> > > +        type: object
> > > +        additionalProperties: true
> > 
> > This cannot be true. That allows adding any property.
> > 
> 
> So my intent with the additionalProperties: true was to avoid
> replicating the entire pse-pis node from pse-controller.yaml.
> Conceptually, my goal was to inherit everything from the
> pse-controller.yaml binding, except limit the maxItems to 1 (since the
> LTC4266 only supports power over a single PI).

pse-controller.yaml doesn't have the constraint there either. It is fine 
if the constraint is there. However, that means custom properties are not 
allowed in pse-pi nodes. Maybe that's fine and is certainly easier for 
the schema. If you do forsee a need for device specific properties in 
this node, then you need a $ref in this node with all the common 
properties. IOW, similar to how the graph schema is structured.


> > > +        properties:
> > > +          pairsets:
> > > +            description: The LTC4266 delivers power to a PI over a single
> > > +              pairset, driven by one of the controller's four channels. There
> > > +              is no 4-pair mode spreading a PI over two channels, so exactly
> > > +              one channel phandle is expected.
> > > +            maxItems: 1
> > > +          pairset-names:
> > > +            maxItems: 1
> > 
> > An empty node is valid? Needs 'required'.
> 
> I thought the 'required' comes from the pse-controller.yaml binding.
> If I adjust the example dts in the binding with something like

Indeed. My mistake.

> 
>            pse_pi2: pse-pi@2 {
> -            reg = <2>;
> -            #pse-cells = <0>;
> -            pairset-names = "alternative-a";
> -            pairsets = <&phys2>;
> -            polarity-supported = "MDI";
> -            vpwr-supply = <&vreg_pse>;

If instead, you add 'foo-bar' property, you won't see any failure. 
That's the 1st issue.

Rob
Re: [PATCH net-next v3 1/2] dt-bindings: net: pse-pd: Add bindings for LTC4266 PSE Controller
#3705
Author: Rob Herring
Date: Thu, 15 Oct 2026 19:30
137 lines
10797 bytes
On Tue, Oct 13, 2026 at 04:57:29PM +0200, Kory Maincent wrote:
> 
> 
> On 10/10/26 09:30, Kyle Swenson wrote:
> > Hello Rob,
> > 
> > On Wed, Oct 07, 2026 at 04:04:54PM -0500, Rob Herring wrote:
> > > On Sun, Sep 27, 2026 at 09:29:48PM +0000, Kyle Swenson wrote:
> > > > Add the LTC4266 Power Sourcing Equipment controller device tree bindings
> > > > documentation.
> > > > 
> > > > Signed-off-by: Kyle Swenson <kyle.swenson@est.tech>
> > > > ---
> > > >   .../bindings/net/pse-pd/lltc,ltc4266.yaml     | 180 ++++++++++++++++++
> > > >   1 file changed, 180 insertions(+)
> > > >   create mode 100644 Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > > new file mode 100644
> > > > index 000000000000..e11c9d601eee
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > > @@ -0,0 +1,180 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/net/pse-pd/lltc,ltc4266.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Linear Technology LTC4266 Power Sourcing Equipment controller
> > > > +
> > > > +maintainers:
> > > > +  - Kyle Swenson <kyle.swenson@est.tech>
> > > > +
> > > > +allOf:
> > > > +  - $ref: pse-controller.yaml#
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    enum:
> > > > +      - lltc,ltc4266
> > > > +
> > > > +  reg:
> > > > +    maxItems: 1
> > > > +
> > > > +  interrupts:
> > > > +    maxItems: 1
> > > > +
> > > > +  channels:
> > > > +    type: object
> > > > +    additionalProperties: false
> > > > +    description:
> > > > +      Defines the 4 physical delivery channels on the controller that can be
> > > > +      referenced by PSE PIs through their "pairsets" property. The actual port
> > > > +      matrix mapping is created when PSE PIs reference these channels in their
> > > > +      pairsets.
> > > > +
> > > > +    properties:
> > > > +      '#address-cells':
> > > > +        const: 1
> > > > +
> > > > +      '#size-cells':
> > > > +        const: 0
> > > > +
> > > > +    patternProperties:
> > > > +      '^channel@[0-3]$':
> > > > +        type: object
> > > > +        additionalProperties: false
> > > > +
> > > > +        properties:
> > > > +          reg:
> > > > +            maxItems: 1
> > > > +
> > > > +          sense-resistor-micro-ohms:
> > > > +            description: Sense resistor connected to the channel's MOSFET, used
> > > > +              for current measurement and for overcurrent detection. The I_CUT
> > > > +              and I_LIM register encodings depend on which value is fitted, so
> > > > +              a wrong value programs the wrong thresholds.
> > > > +            enum: [250000, 500000]
> > > > +
> > > > +        required:
> > > > +          - reg
> > > > +          - sense-resistor-micro-ohms
> > > > +
> > > > +    required:
> > > > +      - '#address-cells'
> > > > +      - '#size-cells'
> > > > +
> > > > +  pse-pis:
> > > > +    type: object
> > > > +    additionalProperties: false
> > > > +
> > > > +    properties:
> > > > +      '#address-cells':
> > > > +        const: 1
> > > > +
> > > > +      '#size-cells':
> > > > +        const: 0
> > > > +
> > > > +    patternProperties:
> > > > +      '^pse-pi@[0-3]$':
> > > > +        type: object
> > > > +        additionalProperties: true
> > > 
> > > This cannot be true. That allows adding any property.
> > > 
> > 
> > So my intent with the additionalProperties: true was to avoid
> > replicating the entire pse-pis node from pse-controller.yaml.
> > Conceptually, my goal was to inherit everything from the
> > pse-controller.yaml binding, except limit the maxItems to 1 (since the
> > LTC4266 only supports power over a single PI).
> > 
> > Is there a better way to express this?
> 
> I think you can do something like this:
>      patternProperties:
> 
>        '^pse-pi@[0-3]$':
> 
>          type: object
> 
>          $ref:
> pse-controller.yaml#/properties/pse-pis/patternProperties/^pse-pi@[0-9a-f]+$
> 
>          unevaluatedProperties: false

Yes, if you want/need to allow custom properties, like this is what I 
meant.

However, it is hit or miss if a $ref to a regex works. Instead, 
pse-controller.yaml would need a $defs section that the pattern and this 
schema can reference. Multiple levels of nodes and allowing them to be 
extended gets messy.

Rob
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads