diff mbox series

[v4,4/6] dt-bindings: snps,dw-apb-ssi: Add sparx5 support, plus rx-sample-delay-ns property

Message ID 20200724111404.13293-5-lars.povlsen@microchip.com (mailing list archive)
State Superseded
Headers show
Series spi: Adding support for Microchip Sparx5 SoC | expand

Commit Message

Lars Povlsen July 24, 2020, 11:14 a.m. UTC
This has the following changes for the snps,dw-apb-ss DT bindings:

- Add "microchip,sparx5-spi" as the compatible for the Sparx5 SoC
  controller

- Add the property "rx-sample-delay-ns"

Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
---
 .../bindings/spi/snps,dw-apb-ssi.yaml         | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Rob Herring (Arm) July 27, 2020, 8:38 p.m. UTC | #1
On Fri, Jul 24, 2020 at 01:14:02PM +0200, Lars Povlsen wrote:
> This has the following changes for the snps,dw-apb-ss DT bindings:
> 
> - Add "microchip,sparx5-spi" as the compatible for the Sparx5 SoC
>   controller
> 
> - Add the property "rx-sample-delay-ns"
> 
> Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
> ---
>  .../bindings/spi/snps,dw-apb-ssi.yaml         | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> index c62cbe79f00dd..c0adaad1aa695 100644
> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> @@ -36,6 +36,8 @@ properties:
>                - mscc,ocelot-spi
>                - mscc,jaguar2-spi
>            - const: snps,dw-apb-ssi
> +      - description: Microchip Sparx5 SoC SPI Controller
> +        const: microchip,sparx5-spi
>        - description: Amazon Alpine SPI Controller
>          const: amazon,alpine-dw-apb-ssi
>        - description: Renesas RZ/N1 SPI Controller
> @@ -93,6 +95,12 @@ properties:
>        - const: tx
>        - const: rx
>  
> +  rx-sample-delay-ns:
> +    description: Default value of the rx-sample-delay-ns property.
> +      This value will be used if the property is not explicitly defined
> +      for a SPI slave device. Default value is 0. See below.
> +    $ref: /schemas/types.yaml#/definitions/uint32

Don't need a type for properties with unit suffixes.

Also, add:

'default: 0'

> +
>  patternProperties:
>    "^.*@[0-9a-f]+$":
>      type: object
> @@ -107,6 +115,13 @@ patternProperties:
>        spi-tx-bus-width:
>          const: 1
>  
> +      rx-sample-delay-ns:
> +        description: SPI Rx sample delay offset, unit is nanoseconds.
> +          The delay from the default sample time before the actual
> +          sample of the rxd input signal occurs. The "rx_sample_delay"
> +          is an optional feature of the designware controller, and the
> +          upper limit is also subject to controller configuration.
> +
>  unevaluatedProperties: false
>  
>  required:
> @@ -129,5 +144,11 @@ examples:
>        num-cs = <2>;
>        cs-gpios = <&gpio0 13 0>,
>                   <&gpio0 14 0>;
> +      rx-sample-delay-ns = <3>;
> +      spi-flash@1 {
> +        compatible = "spi-nand";
> +        reg = <1>;
> +        rx-sample-delay-ns = <7>;
> +      };
>      };
>  ...
> -- 
> 2.27.0
>
Lars Povlsen July 28, 2020, 8:11 a.m. UTC | #2
Rob Herring writes:

> On Fri, Jul 24, 2020 at 01:14:02PM +0200, Lars Povlsen wrote:
>> This has the following changes for the snps,dw-apb-ss DT bindings:
>>
>> - Add "microchip,sparx5-spi" as the compatible for the Sparx5 SoC
>>   controller
>>
>> - Add the property "rx-sample-delay-ns"
>>
>> Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
>> ---
>>  .../bindings/spi/snps,dw-apb-ssi.yaml         | 21 +++++++++++++++++++
>>  1 file changed, 21 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
>> index c62cbe79f00dd..c0adaad1aa695 100644
>> --- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
>> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
>> @@ -36,6 +36,8 @@ properties:
>>                - mscc,ocelot-spi
>>                - mscc,jaguar2-spi
>>            - const: snps,dw-apb-ssi
>> +      - description: Microchip Sparx5 SoC SPI Controller
>> +        const: microchip,sparx5-spi
>>        - description: Amazon Alpine SPI Controller
>>          const: amazon,alpine-dw-apb-ssi
>>        - description: Renesas RZ/N1 SPI Controller
>> @@ -93,6 +95,12 @@ properties:
>>        - const: tx
>>        - const: rx
>>
>> +  rx-sample-delay-ns:
>> +    description: Default value of the rx-sample-delay-ns property.
>> +      This value will be used if the property is not explicitly defined
>> +      for a SPI slave device. Default value is 0. See below.
>> +    $ref: /schemas/types.yaml#/definitions/uint32
>
> Don't need a type for properties with unit suffixes.
>
> Also, add:
>
> 'default: 0'
>

Hi Rob!

Thank you for your input, all duly noted.

---Lars

>> +
>>  patternProperties:
>>    "^.*@[0-9a-f]+$":
>>      type: object
>> @@ -107,6 +115,13 @@ patternProperties:
>>        spi-tx-bus-width:
>>          const: 1
>>
>> +      rx-sample-delay-ns:
>> +        description: SPI Rx sample delay offset, unit is nanoseconds.
>> +          The delay from the default sample time before the actual
>> +          sample of the rxd input signal occurs. The "rx_sample_delay"
>> +          is an optional feature of the designware controller, and the
>> +          upper limit is also subject to controller configuration.
>> +
>>  unevaluatedProperties: false
>>
>>  required:
>> @@ -129,5 +144,11 @@ examples:
>>        num-cs = <2>;
>>        cs-gpios = <&gpio0 13 0>,
>>                   <&gpio0 14 0>;
>> +      rx-sample-delay-ns = <3>;
>> +      spi-flash@1 {
>> +        compatible = "spi-nand";
>> +        reg = <1>;
>> +        rx-sample-delay-ns = <7>;
>> +      };
>>      };
>>  ...
>> --
>> 2.27.0
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
index c62cbe79f00dd..c0adaad1aa695 100644
--- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
+++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
@@ -36,6 +36,8 @@  properties:
               - mscc,ocelot-spi
               - mscc,jaguar2-spi
           - const: snps,dw-apb-ssi
+      - description: Microchip Sparx5 SoC SPI Controller
+        const: microchip,sparx5-spi
       - description: Amazon Alpine SPI Controller
         const: amazon,alpine-dw-apb-ssi
       - description: Renesas RZ/N1 SPI Controller
@@ -93,6 +95,12 @@  properties:
       - const: tx
       - const: rx
 
+  rx-sample-delay-ns:
+    description: Default value of the rx-sample-delay-ns property.
+      This value will be used if the property is not explicitly defined
+      for a SPI slave device. Default value is 0. See below.
+    $ref: /schemas/types.yaml#/definitions/uint32
+
 patternProperties:
   "^.*@[0-9a-f]+$":
     type: object
@@ -107,6 +115,13 @@  patternProperties:
       spi-tx-bus-width:
         const: 1
 
+      rx-sample-delay-ns:
+        description: SPI Rx sample delay offset, unit is nanoseconds.
+          The delay from the default sample time before the actual
+          sample of the rxd input signal occurs. The "rx_sample_delay"
+          is an optional feature of the designware controller, and the
+          upper limit is also subject to controller configuration.
+
 unevaluatedProperties: false
 
 required:
@@ -129,5 +144,11 @@  examples:
       num-cs = <2>;
       cs-gpios = <&gpio0 13 0>,
                  <&gpio0 14 0>;
+      rx-sample-delay-ns = <3>;
+      spi-flash@1 {
+        compatible = "spi-nand";
+        reg = <1>;
+        rx-sample-delay-ns = <7>;
+      };
     };
 ...