linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <Conor.Dooley@microchip.com>
To: <krzysztof.kozlowski@linaro.org>, <mail@conchuod.ie>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<andrew@lunn.ch>, <support.opensource@diasemi.com>,
	<lee.jones@linaro.org>, <ulf.hansson@linaro.org>,
	<palmer@dabbelt.com>, <paul.walmsley@sifive.com>,
	<aou@eecs.berkeley.edu>, <stwiss.opensource@diasemi.com>
Cc: <linux-i2c@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-mmc@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>, <atulkhare@rivosinc.com>
Subject: Re: [PATCH v1 2/6] dt-bindings: i2c: convert ocores binding to yaml
Date: Mon, 6 Jun 2022 14:41:15 +0000	[thread overview]
Message-ID: <32934e96-cd37-0ddb-0e4d-1bae7f964549@microchip.com> (raw)
In-Reply-To: <7ed076fb-ee3d-a7ad-7b15-add8c5ffee7f@linaro.org>

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.


  reply	other threads:[~2022-06-06 14:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-05 13:32 [PATCH v1 0/6] clear riscv dtbs_check errors mail
2022-06-05 13:32 ` [PATCH v1 1/6] dt-bindings: mmc: convert mmc-spi-slot to yaml mail
2022-06-06  7:34   ` Krzysztof Kozlowski
2022-06-05 13:32 ` [PATCH v1 2/6] dt-bindings: i2c: convert ocores binding " mail
2022-06-06  8:02   ` Krzysztof Kozlowski
2022-06-06 14:41     ` Conor.Dooley [this message]
2022-06-06 12:53   ` Rob Herring
2022-06-05 13:32 ` [PATCH v1 3/6] MAINTAINERS: convert ocores i2c dt-binding " mail
2022-06-05 13:32 ` [PATCH v1 4/6] dt-bindings: mfd: convert da9063 " mail
2022-06-06 13:11   ` Krzysztof Kozlowski
2022-06-05 13:33 ` [PATCH v1 5/6] MAINTAINERS: " mail
2022-06-05 13:33 ` [PATCH v1 6/6] riscv: dts: sifive: "fix" pmic watchdog node name mail
2022-06-06  8:07   ` Krzysztof Kozlowski
2022-06-06  7:34 ` [PATCH v1 0/6] clear riscv dtbs_check errors Krzysztof Kozlowski
2022-06-06  8:56   ` Conor.Dooley
2022-06-08 22:27 ` Atul Khare
2022-06-08 22:42   ` Conor Dooley

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=32934e96-cd37-0ddb-0e4d-1bae7f964549@microchip.com \
    --to=conor.dooley@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=aou@eecs.berkeley.edu \
    --cc=atulkhare@rivosinc.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mail@conchuod.ie \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=stwiss.opensource@diasemi.com \
    --cc=support.opensource@diasemi.com \
    --cc=ulf.hansson@linaro.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).