lkml.org 
[lkml]   [2022]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v1 2/6] dt-bindings: i2c: convert ocores binding to yaml
Date
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@conchuod.ie wrote:
>> From: Conor Dooley <conor.dooley@microchip.com>
>>
>> Convert the open cores i2c controller binding from text to yaml.
>>
>> Signed-off-by: Conor Dooley <conor.dooley@microchip.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.

\
 
 \ /
  Last update: 2022-06-06 16:43    [W:0.051 / U:5.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site