[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2022 14:41:15 +0000
From: <Conor.Dooley@...rochip.com>
To: <krzysztof.kozlowski@...aro.org>, <mail@...chuod.ie>,
<robh+dt@...nel.org>, <krzysztof.kozlowski+dt@...aro.org>,
<andrew@...n.ch>, <support.opensource@...semi.com>,
<lee.jones@...aro.org>, <ulf.hansson@...aro.org>,
<palmer@...belt.com>, <paul.walmsley@...ive.com>,
<aou@...s.berkeley.edu>, <stwiss.opensource@...semi.com>
CC: <linux-i2c@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-mmc@...r.kernel.org>,
<linux-riscv@...ts.infradead.org>, <atulkhare@...osinc.com>
Subject: Re: [PATCH v1 2/6] dt-bindings: i2c: convert ocores binding to yaml
On 06/06/2022 09:02, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 05/06/2022 15:32, mail@...chuod.ie wrote:
>> From: Conor Dooley <conor.dooley@...rochip.com>
>>
>> Convert the open cores i2c controller binding from text to yaml.
>>
>> Signed-off-by: Conor Dooley <conor.dooley@...rochip.com>
>> ---
>> .../devicetree/bindings/i2c/i2c-ocores.txt | 78 -----------
>> .../devicetree/bindings/i2c/i2c-ocores.yaml | 132 ++++++++++++++++++
>> 2 files changed, 132 insertions(+), 78 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.txt
>> create mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.yaml
>>
---8<---
>> + reg-shift:
>> + $ref: /schemas/types.yaml#/definitions/uint32
>
> No need for ref, it is coming from the dtschema.
>
>> + description: |
>> + device register offsets are shifted by this value
>
> I guess 0 is default?
>
I had a look around:
sifive and the users of opencores,i2c-ocores use 2
aeroflexgaisler,i2cmst does not exist in a devicetree
From the driver, it looks like if neither this nor regstep
is present it just carries on without setting a value.
So yeah, I guess it is zero.
>
>> +
>> + regstep:
>> + description: |
>> + deprecated, use reg-shift above
>> + deprecated: true
>> +
>> + opencores,ip-clock-frequency:
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + description: |
>> + Frequency of the controller clock in Hz. Mutually exclusive with clocks.
>> + See the note above.
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - "#address-cells"
>> + - "#size-cells"
>> +
>> +oneOf:
>> + - required:
>> + - opencores,ip-clock-frequency
>> + - required:
>> + - clocks
>
> This is correct if your intention was to require one of these
> properties, which seems to match the old bindings.
Cool, thanks! I did test adding both and got a wall-of-text error
from dt_binding_check, so it seemed about right.
Thanks,
Conor.
Powered by blists - more mailing lists