diff mbox series

[4/7] dt-bindings: fsi: fsi2spi: Document new restricted property

Message ID 20200820170228.42053-5-eajames@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series spi: Fix FSI-attached controller and AT25 drivers | expand

Commit Message

Eddie James Aug. 20, 2020, 5:02 p.m. UTC
Add documentation for the "fsi2spi,restricted" property which indicates
a controller shouldn't sequence loops and therefore has a smaller
transfer size.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Acked-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Mark Brown Aug. 20, 2020, 5:14 p.m. UTC | #1
On Thu, Aug 20, 2020 at 12:02:25PM -0500, Eddie James wrote:
> Add documentation for the "fsi2spi,restricted" property which indicates
> a controller shouldn't sequence loops and therefore has a smaller
> transfer size.

In what situation might someone set this?  It sounds like a
configuration option rather than a description of the hardware.
Eddie James Aug. 20, 2020, 9:07 p.m. UTC | #2
On 8/20/20 12:14 PM, Mark Brown wrote:
> On Thu, Aug 20, 2020 at 12:02:25PM -0500, Eddie James wrote:
>> Add documentation for the "fsi2spi,restricted" property which indicates
>> a controller shouldn't sequence loops and therefore has a smaller
>> transfer size.
> In what situation might someone set this?  It sounds like a
> configuration option rather than a description of the hardware.


It is a description of the configuration of the hardware. For 
controllers that are configured to be restricted for security purposes, 
this property will be set.

Thanks,

Eddie
Mark Brown Aug. 21, 2020, 12:03 p.m. UTC | #3
On Thu, Aug 20, 2020 at 04:07:41PM -0500, Eddie James wrote:
> On 8/20/20 12:14 PM, Mark Brown wrote:
> > On Thu, Aug 20, 2020 at 12:02:25PM -0500, Eddie James wrote:

> > > Add documentation for the "fsi2spi,restricted" property which indicates
> > > a controller shouldn't sequence loops and therefore has a smaller
> > > transfer size.

> > In what situation might someone set this?  It sounds like a
> > configuration option rather than a description of the hardware.

> It is a description of the configuration of the hardware. For controllers
> that are configured to be restricted for security purposes, this property
> will be set.

The documentation needs to be a *lot* clearer - users need to be able to
relate this to whatever system configuration this corresponds to.  Right
now it says that the controller shouldn't sequence loops but there's no
indication of why this might be.
Rob Herring (Arm) Sept. 8, 2020, 8:44 p.m. UTC | #4
On Thu, Aug 20, 2020 at 12:02:25PM -0500, Eddie James wrote:
> Add documentation for the "fsi2spi,restricted" property which indicates
> a controller shouldn't sequence loops and therefore has a smaller
> transfer size.
> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> Acked-by: Joel Stanley <joel@jms.id.au>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
>  Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml b/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml
> index b26d4b4be743..0d2fb071fd00 100644
> --- a/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml
> +++ b/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml
> @@ -24,6 +24,16 @@ properties:
>      items:
>        - description: FSI slave address
>  
> +patternProperties:
> +  "^spi(@.*|-[0-9a-f])*$":

Doesn't FSI define the unit-address format already? No need to do it 
again here. Plus the form 'spi-[0-9a-f]' isn't valid. Just "^spi@" 
should be enough.

> +    type: object
> +
> +    properties:
> +      fsi2spi,restricted:

[<vendor>],<property-name>

fsi2spi is not a vendor.

> +        description: indicates the controller should not use looping in the
> +          sequencer and therefore has a smaller maximum transfer size
> +        type: boolean
> +
>  required:
>    - compatible
>    - reg
> -- 
> 2.26.2
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml b/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml
index b26d4b4be743..0d2fb071fd00 100644
--- a/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml
+++ b/Documentation/devicetree/bindings/fsi/ibm,fsi2spi.yaml
@@ -24,6 +24,16 @@  properties:
     items:
       - description: FSI slave address
 
+patternProperties:
+  "^spi(@.*|-[0-9a-f])*$":
+    type: object
+
+    properties:
+      fsi2spi,restricted:
+        description: indicates the controller should not use looping in the
+          sequencer and therefore has a smaller maximum transfer size
+        type: boolean
+
 required:
   - compatible
   - reg