linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
@ 2025-05-22 10:47 Amit Kumar Mahapatra
  2025-05-22 11:09 ` Mark Brown
  2025-05-22 15:52 ` Conor Dooley
  0 siblings, 2 replies; 7+ messages in thread
From: Amit Kumar Mahapatra @ 2025-05-22 10:47 UTC (permalink / raw)
  To: broonie, robh, krzk+dt, conor+dt
  Cc: linux-spi, devicetree, linux-kernel, git, amitrkcian2002,
	Amit Kumar Mahapatra

The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires only
one reset entry. To reflect this, the maxItems for "resets" and
"reset-names" has been set to 1 for AMD Versal SoCs, and the minItems for
these properties has also been updated to 1.

Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
---
BRANCH: mtd/next

Changes in v2:
 - Removed "resets" & "reset-names" from required properties.
 - To address review comments, removed "maxItems" from "reset-names".
---
 .../devicetree/bindings/spi/cdns,qspi-nor.yaml        | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
index d48ecd6cd5ad..648b8452877c 100644
--- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
+++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
@@ -17,6 +17,13 @@ allOf:
           contains:
             const: xlnx,versal-ospi-1.0
     then:
+      properties:
+        resets:
+          maxItems: 1
+
+        reset-names:
+          items:
+            enum: [ qspi ]
       required:
         - power-domains
   - if:
@@ -132,11 +139,11 @@ properties:
     maxItems: 1
 
   resets:
-    minItems: 2
+    minItems: 1
     maxItems: 3
 
   reset-names:
-    minItems: 2
+    minItems: 1
     maxItems: 3
     items:
       enum: [ qspi, qspi-ocp, rstc_ref ]
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
  2025-05-22 10:47 [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller Amit Kumar Mahapatra
@ 2025-05-22 11:09 ` Mark Brown
  2025-05-22 15:52 ` Conor Dooley
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2025-05-22 11:09 UTC (permalink / raw)
  To: Amit Kumar Mahapatra
  Cc: robh, krzk+dt, conor+dt, linux-spi, devicetree, linux-kernel, git,
	amitrkcian2002

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

On Thu, May 22, 2025 at 04:17:45PM +0530, Amit Kumar Mahapatra wrote:
> The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires only
> one reset entry. To reflect this, the maxItems for "resets" and
> "reset-names" has been set to 1 for AMD Versal SoCs, and the minItems for
> these properties has also been updated to 1.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
  2025-05-22 10:47 [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller Amit Kumar Mahapatra
  2025-05-22 11:09 ` Mark Brown
@ 2025-05-22 15:52 ` Conor Dooley
  2025-05-26  7:07   ` Mahapatra, Amit Kumar
  1 sibling, 1 reply; 7+ messages in thread
From: Conor Dooley @ 2025-05-22 15:52 UTC (permalink / raw)
  To: Amit Kumar Mahapatra
  Cc: broonie, robh, krzk+dt, conor+dt, linux-spi, devicetree,
	linux-kernel, git, amitrkcian2002

[-- Attachment #1: Type: text/plain, Size: 1849 bytes --]

On Thu, May 22, 2025 at 04:17:45PM +0530, Amit Kumar Mahapatra wrote:
> The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires only
> one reset entry. To reflect this, the maxItems for "resets" and
> "reset-names" has been set to 1 for AMD Versal SoCs, and the minItems for
> these properties has also been updated to 1.
> 
> Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
> ---
> BRANCH: mtd/next
> 
> Changes in v2:
>  - Removed "resets" & "reset-names" from required properties.
>  - To address review comments, removed "maxItems" from "reset-names".
> ---
>  .../devicetree/bindings/spi/cdns,qspi-nor.yaml        | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> index d48ecd6cd5ad..648b8452877c 100644
> --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> @@ -17,6 +17,13 @@ allOf:
>            contains:
>              const: xlnx,versal-ospi-1.0
>      then:
> +      properties:
> +        resets:
> +          maxItems: 1
> +
> +        reset-names:
> +          items:
> +            enum: [ qspi ]
>        required:
>          - power-domains
>    - if:
> @@ -132,11 +139,11 @@ properties:
>      maxItems: 1
>  
>    resets:
> -    minItems: 2
> +    minItems: 1

I think you're still missing one of the things Krzysztof requested on
v1, cos you reduce minItems for all platforms without restricting
it back to 2 for non-versal platforms.

>      maxItems: 3
>  
>    reset-names:
> -    minItems: 2
> +    minItems: 1
>      maxItems: 3
>      items:
>        enum: [ qspi, qspi-ocp, rstc_ref ]
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
  2025-05-22 15:52 ` Conor Dooley
@ 2025-05-26  7:07   ` Mahapatra, Amit Kumar
  2025-05-26 12:56     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Mahapatra, Amit Kumar @ 2025-05-26  7:07 UTC (permalink / raw)
  To: Conor Dooley
  Cc: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	git (AMD-Xilinx), amitrkcian2002@gmail.com

[AMD Official Use Only - AMD Internal Distribution Only]

> Subject: Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems
> of resets for Cadence OSPI controller
>
> On Thu, May 22, 2025 at 04:17:45PM +0530, Amit Kumar Mahapatra wrote:
> > The Cadence Octal SPI (OSPI) controller on AMD Versal SoCs requires
> > only one reset entry. To reflect this, the maxItems for "resets" and
> > "reset-names" has been set to 1 for AMD Versal SoCs, and the minItems
> > for these properties has also been updated to 1.
> >
> > Signed-off-by: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
> > ---
> > BRANCH: mtd/next
> >
> > Changes in v2:
> >  - Removed "resets" & "reset-names" from required properties.
> >  - To address review comments, removed "maxItems" from "reset-names".
> > ---
> >  .../devicetree/bindings/spi/cdns,qspi-nor.yaml        | 11 +++++++++--
> >  1 file changed, 9 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> > b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> > index d48ecd6cd5ad..648b8452877c 100644
> > --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> > +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml
> > @@ -17,6 +17,13 @@ allOf:
> >            contains:
> >              const: xlnx,versal-ospi-1.0
> >      then:
> > +      properties:
> > +        resets:
> > +          maxItems: 1
> > +
> > +        reset-names:
> > +          items:
> > +            enum: [ qspi ]
> >        required:
> >          - power-domains
> >    - if:
> > @@ -132,11 +139,11 @@ properties:
> >      maxItems: 1
> >
> >    resets:
> > -    minItems: 2
> > +    minItems: 1
>
> I think you're still missing one of the things Krzysztof requested on v1, cos you
> reduce minItems for all platforms without restricting it back to 2 for non-versal
> platforms.

I believe we can remove the "resets" and corresponding "reset-names"
properties from here, as their default minItems/maxItems are already
taken care of in the else block [1].

[1] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L39

Regards,
Amit
>
> >      maxItems: 3
> >
> >    reset-names:
> > -    minItems: 2
> > +    minItems: 1
> >      maxItems: 3
> >      items:
> >        enum: [ qspi, qspi-ocp, rstc_ref ]
> > --
> > 2.34.1
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
  2025-05-26  7:07   ` Mahapatra, Amit Kumar
@ 2025-05-26 12:56     ` Krzysztof Kozlowski
  2025-05-27  6:05       ` Mahapatra, Amit Kumar
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-26 12:56 UTC (permalink / raw)
  To: Mahapatra, Amit Kumar, Conor Dooley
  Cc: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	git (AMD-Xilinx), amitrkcian2002@gmail.com

On 26/05/2025 09:07, Mahapatra, Amit Kumar wrote:
>>>    - if:
>>> @@ -132,11 +139,11 @@ properties:
>>>      maxItems: 1
>>>
>>>    resets:
>>> -    minItems: 2
>>> +    minItems: 1
>>
>> I think you're still missing one of the things Krzysztof requested on v1, cos you
>> reduce minItems for all platforms without restricting it back to 2 for non-versal
>> platforms.
> 
> I believe we can remove the "resets" and corresponding "reset-names"
> properties from here, as their default minItems/maxItems are already
> taken care of in the else block [1].
> 
> [1] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L39
I don't see anything fixed there.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
  2025-05-26 12:56     ` Krzysztof Kozlowski
@ 2025-05-27  6:05       ` Mahapatra, Amit Kumar
  2025-05-27  6:22         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Mahapatra, Amit Kumar @ 2025-05-27  6:05 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Conor Dooley
  Cc: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	git (AMD-Xilinx), amitrkcian2002@gmail.com

[AMD Official Use Only - AMD Internal Distribution Only]

> Subject: Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems
> of resets for Cadence OSPI controller
>
> On 26/05/2025 09:07, Mahapatra, Amit Kumar wrote:
> >>>    - if:
> >>> @@ -132,11 +139,11 @@ properties:
> >>>      maxItems: 1
> >>>
> >>>    resets:
> >>> -    minItems: 2
> >>> +    minItems: 1
> >>
> >> I think you're still missing one of the things Krzysztof requested on
> >> v1, cos you reduce minItems for all platforms without restricting it
> >> back to 2 for non-versal platforms.
> >
> > I believe we can remove the "resets" and corresponding "reset-names"
> > properties from here, as their default minItems/maxItems are already
> > taken care of in the else block [1].
> >
> > [1]
> > https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14
> > ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L
> > 39
> I don't see anything fixed there.

The intention was to point out the redundancy related to the 'resets' and
'reset-names' properties. At [1], the default minItems and maxItems values
are already defined for all platforms. However, the same constraints are
redefined at [2] with different minItems and maxItems values , again
applying to all platforms. Based on my understanding, the definitions at
[2] for 'resets' and the corresponding 'reset-names' can be safely
removed.

[1] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L41
[2] https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L139

Regards,
Amit

>
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller
  2025-05-27  6:05       ` Mahapatra, Amit Kumar
@ 2025-05-27  6:22         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-27  6:22 UTC (permalink / raw)
  To: Mahapatra, Amit Kumar, Conor Dooley
  Cc: broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	git (AMD-Xilinx), amitrkcian2002@gmail.com

On 27/05/2025 08:05, Mahapatra, Amit Kumar wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
> 
>> Subject: Re: [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems
>> of resets for Cadence OSPI controller
>>
>> On 26/05/2025 09:07, Mahapatra, Amit Kumar wrote:
>>>>>    - if:
>>>>> @@ -132,11 +139,11 @@ properties:
>>>>>      maxItems: 1
>>>>>
>>>>>    resets:
>>>>> -    minItems: 2
>>>>> +    minItems: 1
>>>>
>>>> I think you're still missing one of the things Krzysztof requested on
>>>> v1, cos you reduce minItems for all platforms without restricting it
>>>> back to 2 for non-versal platforms.
>>>
>>> I believe we can remove the "resets" and corresponding "reset-names"
>>> properties from here, as their default minItems/maxItems are already
>>> taken care of in the else block [1].
>>>
>>> [1]
>>> https://github.com/torvalds/linux/blob/0ff41df1cb268fc69e703a08a57ee14
>>> ae967d0ca/Documentation/devicetree/bindings/spi/cdns%2Cqspi-nor.yaml#L
>>> 39
>> I don't see anything fixed there.
> 
> The intention was to point out the redundancy related to the 'resets' and
> 'reset-names' properties. At [1], the default minItems and maxItems values
> are already defined for all platforms. However, the same constraints are
> redefined at [2] with different minItems and maxItems values , again
> applying to all platforms. Based on my understanding, the definitions at
> [2] for 'resets' and the corresponding 'reset-names' can be safely
> removed.
It is not about redefining. You need to constrain your properties. They
have to be fixed, not flexible.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-27  6:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 10:47 [PATCH v2] spi: dt-bindings: cdns,qspi-nor: Update minItems/maxItems of resets for Cadence OSPI controller Amit Kumar Mahapatra
2025-05-22 11:09 ` Mark Brown
2025-05-22 15:52 ` Conor Dooley
2025-05-26  7:07   ` Mahapatra, Amit Kumar
2025-05-26 12:56     ` Krzysztof Kozlowski
2025-05-27  6:05       ` Mahapatra, Amit Kumar
2025-05-27  6:22         ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).