diff mbox series

[v2,1/3] dt-bindings: i2c: cadence: Document `fifo-depth` property

Message ID 20230317145441.156880-1-lars@metafoo.de
State Accepted
Headers show
Series [v2,1/3] dt-bindings: i2c: cadence: Document `fifo-depth` property | expand

Commit Message

Lars-Peter Clausen March 17, 2023, 2:54 p.m. UTC
The depth of the FIFO of the Cadence I2C controller IP is a synthesis
configuration parameter. Different instances of the IP can have different
values. For correct operation software needs to be aware of the size of the
FIFO.

Add the documentation for the devicetree property that describes the FIFO
depth of the IP core.

The default value of 16 is for backwards compatibility reasons with
existing hardware descriptions where this property is not specified and
software has assumed that the FIFO depth is 16.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
Changes since v1:
 * Remove quotes around "/schemas/types.yaml#/definitions/uint32"
 * Add `enum` describing valid values
 * Use `fifo-depth` instead of `cdns,fifo-depth`
 * Use `bytes` instead of `words` for the property unit
---
 Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Michal Simek March 20, 2023, 10:13 a.m. UTC | #1
On 3/17/23 15:54, Lars-Peter Clausen wrote:
> The depth of the FIFO of the Cadence I2C controller IP is a synthesis
> configuration parameter. Different instances of the IP can have different
> values. For correct operation software needs to be aware of the size of the
> FIFO.
> 
> Add the documentation for the devicetree property that describes the FIFO
> depth of the IP core.
> 
> The default value of 16 is for backwards compatibility reasons with
> existing hardware descriptions where this property is not specified and
> software has assumed that the FIFO depth is 16.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> Changes since v1:
>   * Remove quotes around "/schemas/types.yaml#/definitions/uint32"
>   * Add `enum` describing valid values
>   * Use `fifo-depth` instead of `cdns,fifo-depth`
>   * Use `bytes` instead of `words` for the property unit
> ---
>   Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml b/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
> index 2e95cda7262a..2401d1e19916 100644
> --- a/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
> +++ b/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
> @@ -38,6 +38,13 @@ properties:
>       description: |
>         Input clock name.
>   
> +  fifo-depth:
> +    description:
> +      Size of the data FIFO in bytes.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    default: 16
> +    enum: [2, 4, 8, 16, 32, 64, 128, 256]
> +
>   required:
>     - compatible
>     - reg
> @@ -57,4 +64,5 @@ examples:
>           clock-frequency = <400000>;
>           #address-cells = <1>;
>           #size-cells = <0>;
> +        fifo-depth = <8>;
>       };


Acked-by: Michal Simek <michal.simek@amd.com>

Thanks,
Michal
Rob Herring (Arm) March 21, 2023, 8:20 p.m. UTC | #2
On Fri, 17 Mar 2023 07:54:39 -0700, Lars-Peter Clausen wrote:
> The depth of the FIFO of the Cadence I2C controller IP is a synthesis
> configuration parameter. Different instances of the IP can have different
> values. For correct operation software needs to be aware of the size of the
> FIFO.
> 
> Add the documentation for the devicetree property that describes the FIFO
> depth of the IP core.
> 
> The default value of 16 is for backwards compatibility reasons with
> existing hardware descriptions where this property is not specified and
> software has assumed that the FIFO depth is 16.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> Changes since v1:
>  * Remove quotes around "/schemas/types.yaml#/definitions/uint32"
>  * Add `enum` describing valid values
>  * Use `fifo-depth` instead of `cdns,fifo-depth`
>  * Use `bytes` instead of `words` for the property unit
> ---
>  Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Wolfram Sang March 29, 2023, 7:19 p.m. UTC | #3
On Fri, Mar 17, 2023 at 07:54:39AM -0700, Lars-Peter Clausen wrote:
> The depth of the FIFO of the Cadence I2C controller IP is a synthesis
> configuration parameter. Different instances of the IP can have different
> values. For correct operation software needs to be aware of the size of the
> FIFO.
> 
> Add the documentation for the devicetree property that describes the FIFO
> depth of the IP core.
> 
> The default value of 16 is for backwards compatibility reasons with
> existing hardware descriptions where this property is not specified and
> software has assumed that the FIFO depth is 16.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml b/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
index 2e95cda7262a..2401d1e19916 100644
--- a/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
+++ b/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
@@ -38,6 +38,13 @@  properties:
     description: |
       Input clock name.
 
+  fifo-depth:
+    description:
+      Size of the data FIFO in bytes.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    default: 16
+    enum: [2, 4, 8, 16, 32, 64, 128, 256]
+
 required:
   - compatible
   - reg
@@ -57,4 +64,5 @@  examples:
         clock-frequency = <400000>;
         #address-cells = <1>;
         #size-cells = <0>;
+        fifo-depth = <8>;
     };