[PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property

Jim Quinlan posted 2 patches 6 months, 2 weeks ago
[PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Jim Quinlan 6 months, 2 weeks ago
Add optional num-lanes property Broadcom STB PCIe host controllers.

Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
---
 Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
index 29f0e1eb5096..cba227b19a5f 100644
--- a/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
@@ -107,6 +107,10 @@ properties:
       - const: bridge
       - const: swinit
 
+  num-lanes:
+    default: 1
+    maximum: 4
+
 required:
   - compatible
   - reg
-- 
2.43.0
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Rob Herring (Arm) 6 months, 1 week ago
On Fri, 30 May 2025 18:40:32 -0400, Jim Quinlan wrote:
> Add optional num-lanes property Broadcom STB PCIe host controllers.
> 
> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
> ---
>  Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Florian Fainelli 6 months, 2 weeks ago
On 5/30/25 15:40, Jim Quinlan wrote:
> Add optional num-lanes property Broadcom STB PCIe host controllers.
> 
> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Florian Fainelli 6 months, 2 weeks ago
On 5/30/25 16:32, Florian Fainelli wrote:
> On 5/30/25 15:40, Jim Quinlan wrote:
>> Add optional num-lanes property Broadcom STB PCIe host controllers.
>>
>> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
> 
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>

Sorry I take that back, I think this should be:

num-lanes:
   enum: [ 1, 2, 4 ]

We are basically documenting the allowed values, not specifying that we 
can repeat the num-lames property between 1 and 4 times.
-- 
Florian
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Jim Quinlan 6 months, 2 weeks ago
On Tue, Jun 3, 2025 at 12:24 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> On 5/30/25 16:32, Florian Fainelli wrote:
> > On 5/30/25 15:40, Jim Quinlan wrote:
> >> Add optional num-lanes property Broadcom STB PCIe host controllers.
> >>
> >> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
> >
> > Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
>
> Sorry I take that back, I think this should be:
>
> num-lanes:
>    enum: [ 1, 2, 4 ]
>
> We are basically documenting the allowed values, not specifying that we
> can repeat the num-lames property between 1 and 4 times.

num-lanes is already defined as

    enum: [ 1, 2, 4, 8, 16, 32 ]

> --
> Florian
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Florian Fainelli 6 months, 2 weeks ago
On 6/3/25 10:16, Jim Quinlan wrote:
> On Tue, Jun 3, 2025 at 12:24 PM Florian Fainelli
> <florian.fainelli@broadcom.com> wrote:
>>
>> On 5/30/25 16:32, Florian Fainelli wrote:
>>> On 5/30/25 15:40, Jim Quinlan wrote:
>>>> Add optional num-lanes property Broadcom STB PCIe host controllers.
>>>>
>>>> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
>>>
>>> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
>>
>> Sorry I take that back, I think this should be:
>>
>> num-lanes:
>>     enum: [ 1, 2, 4 ]
>>
>> We are basically documenting the allowed values, not specifying that we
>> can repeat the num-lames property between 1 and 4 times.
> 
> num-lanes is already defined as
> 
>      enum: [ 1, 2, 4, 8, 16, 32 ]

Right, but then we need to re-define it with our own specific 
constraints, still, don't we?
-- 
Florian
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Rob Herring 6 months, 2 weeks ago
On Tue, Jun 03, 2025 at 10:17:26AM -0700, Florian Fainelli wrote:
> On 6/3/25 10:16, Jim Quinlan wrote:
> > On Tue, Jun 3, 2025 at 12:24 PM Florian Fainelli
> > <florian.fainelli@broadcom.com> wrote:
> > > 
> > > On 5/30/25 16:32, Florian Fainelli wrote:
> > > > On 5/30/25 15:40, Jim Quinlan wrote:
> > > > > Add optional num-lanes property Broadcom STB PCIe host controllers.
> > > > > 
> > > > > Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
> > > > 
> > > > Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
> > > 
> > > Sorry I take that back, I think this should be:
> > > 
> > > num-lanes:
> > >     enum: [ 1, 2, 4 ]
> > > 
> > > We are basically documenting the allowed values, not specifying that we
> > > can repeat the num-lames property between 1 and 4 times.

Are you confused with maxItems?

> > 
> > num-lanes is already defined as
> > 
> >      enum: [ 1, 2, 4, 8, 16, 32 ]
> 
> Right, but then we need to re-define it with our own specific constraints,
> still, don't we?

It is correct as-is.

Rob
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Florian Fainelli 6 months, 1 week ago
On 6/5/25 15:36, Rob Herring wrote:
> On Tue, Jun 03, 2025 at 10:17:26AM -0700, Florian Fainelli wrote:
>> On 6/3/25 10:16, Jim Quinlan wrote:
>>> On Tue, Jun 3, 2025 at 12:24 PM Florian Fainelli
>>> <florian.fainelli@broadcom.com> wrote:
>>>>
>>>> On 5/30/25 16:32, Florian Fainelli wrote:
>>>>> On 5/30/25 15:40, Jim Quinlan wrote:
>>>>>> Add optional num-lanes property Broadcom STB PCIe host controllers.
>>>>>>
>>>>>> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
>>>>>
>>>>> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
>>>>
>>>> Sorry I take that back, I think this should be:
>>>>
>>>> num-lanes:
>>>>      enum: [ 1, 2, 4 ]
>>>>
>>>> We are basically documenting the allowed values, not specifying that we
>>>> can repeat the num-lames property between 1 and 4 times.
> 
> Are you confused with maxItems?

Yes I am.

> 
>>>
>>> num-lanes is already defined as
>>>
>>>       enum: [ 1, 2, 4, 8, 16, 32 ]
>>
>> Right, but then we need to re-define it with our own specific constraints,
>> still, don't we?
> 
> It is correct as-is.

Thanks!
-- 
Florian
Re: [PATCH 1/2] dt-bindings: PCI: brcm,stb-pcie: Add num-lanes property
Posted by Jim Quinlan 6 months, 2 weeks ago
On Tue, Jun 3, 2025 at 1:17 PM Florian Fainelli
<florian.fainelli@broadcom.com> wrote:
>
> On 6/3/25 10:16, Jim Quinlan wrote:
> > On Tue, Jun 3, 2025 at 12:24 PM Florian Fainelli
> > <florian.fainelli@broadcom.com> wrote:
> >>
> >> On 5/30/25 16:32, Florian Fainelli wrote:
> >>> On 5/30/25 15:40, Jim Quinlan wrote:
> >>>> Add optional num-lanes property Broadcom STB PCIe host controllers.
> >>>>
> >>>> Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
> >>>
> >>> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
> >>
> >> Sorry I take that back, I think this should be:
> >>
> >> num-lanes:
> >>     enum: [ 1, 2, 4 ]
> >>
> >> We are basically documenting the allowed values, not specifying that we
> >> can repeat the num-lames property between 1 and 4 times.
> >
> > num-lanes is already defined as
> >
> >      enum: [ 1, 2, 4, 8, 16, 32 ]
>
> Right, but then we need to re-define it with our own specific
> constraints, still, don't we?
We do; there is the provided enum and we provide the maximum and minimum.
The AND-ing of all constraints yields [1, 2, 4].
Also, I'm not sure one can redefine an existing property or would want to.

> --
> Florian