devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Wolfram Sang <wsa@kernel.org>
Cc: Michal Simek <michal.simek@amd.com>,
	Shubhrajyoti Datta <Shubhrajyoti.datta@amd.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 2/2] dt-bindings: i2c: cadence: Document `cdns,fifo-depth` property
Date: Mon, 6 Feb 2023 07:20:38 -0800	[thread overview]
Message-ID: <018dc6a2-0bde-b387-3dd2-e87ec302cfd1@metafoo.de> (raw)
In-Reply-To: <06920579-74d2-8e35-a534-8a65dee322d1@linaro.org>

Thanks for the review.

On 2/5/23 23:41, Krzysztof Kozlowski wrote:
> On 06/02/2023 00:02, 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.
> Cannot this be inferred from compatible?

The compatible string currently encodes the version of the IP core. The 
FIFO depth is an orthogonal setting. You could of course encode both the 
version and FIFO depth as part of the compatible string. But you'd end 
up with a combinatorial explosion of compatible strings. Like

cdns,i2c-r1p10-fifo-depth-2, ... cdns,i2c-r1p10-fifo-depth-16, ..., 
cdns,i2c-r1p10-fifo-depth-256, cdns,i2c-r1p14-fifo-depth-2, ... 
cdns,i2c-r1p14-fifo-depth-16, ..., cdns,i2c-r1p14-fifo-depth-256,

>
>> 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>
>> ---
>>   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..3daa2fa73257 100644
>> --- a/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
>> +++ b/Documentation/devicetree/bindings/i2c/cdns,i2c-r1p10.yaml
>> @@ -38,6 +38,12 @@ properties:
>>       description: |
>>         Input clock name.
>>   
>> +  cdns,fifo-depth:
>> +    description:
>> +      Size of the data FIFO in words.
>> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> Drop quotes.
>
>> +    default: 16
> maximum
> minimum?

Will add a enum, since it has to be a power of two.




  reply	other threads:[~2023-02-06 15:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05 23:02 [PATCH 1/2] i2c: cadence: Allow to specify the FIFO depth and maximum transfer length Lars-Peter Clausen
2023-02-05 23:02 ` [PATCH 2/2] dt-bindings: i2c: cadence: Document `cdns,fifo-depth` property Lars-Peter Clausen
2023-02-06  7:32   ` Michal Simek
2023-02-06  7:41   ` Krzysztof Kozlowski
2023-02-06 15:20     ` Lars-Peter Clausen [this message]
2023-02-06 16:58   ` Rob Herring
2023-02-06  8:02 ` [PATCH 1/2] i2c: cadence: Allow to specify the FIFO depth and maximum transfer length Michal Simek
2023-02-16 14:12   ` Lars-Peter Clausen
2023-02-17  9:34     ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=018dc6a2-0bde-b387-3dd2-e87ec302cfd1@metafoo.de \
    --to=lars@metafoo.de \
    --cc=Shubhrajyoti.datta@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=robh+dt@kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).