mbox series

[v1,0/6] clear riscv dtbs_check errors

Message ID 20220605133300.376161-1-mail@conchuod.ie
Headers show
Series clear riscv dtbs_check errors | expand

Message

Conor Dooley June 5, 2022, 1:32 p.m. UTC
From: Conor Dooley <conor.dooley@microchip.com>

Hey,
Couple conversions from txt to yaml here with the intent of fixing the
the dtbs_check warnings for riscv. Atul Khare already sent patches for
the gpio-line-names & cache-sets (which went awol) and will clear the
remaining two errors.

Rob/Krzysztof:
Have I correctly expressed the mutually exclusive properties?
I had a look around, but wasn't able to find an obvious binding to ape.

Wasn't sure if a txt -> yaml conversion's MAINTAINERS update was meant
to be in the same patch or not, so feel free to squash.
Thanks,
Conor.

Conor Dooley (6):
  dt-bindings: mmc: convert mmc-spi-slot to yaml
  dt-bindings: i2c: convert ocores binding to yaml
  MAINTAINERS: convert ocores i2c dt-binding to yaml
  dt-bindings: mfd: convert da9063 to yaml
  MAINTAINERS: convert da9063 to yaml
  riscv: dts: sifive: "fix" pmic watchdog node name

 .../devicetree/bindings/i2c/i2c-ocores.txt    |  78 -----------
 .../devicetree/bindings/i2c/i2c-ocores.yaml   | 132 ++++++++++++++++++
 .../devicetree/bindings/mfd/da9063.txt        | 111 ---------------
 .../devicetree/bindings/mfd/da9063.yaml       | 123 ++++++++++++++++
 .../devicetree/bindings/mmc/mmc-spi-slot.txt  |  29 ----
 .../devicetree/bindings/mmc/mmc-spi-slot.yaml |  76 ++++++++++
 .../devicetree/bindings/trivial-devices.yaml  |   2 -
 MAINTAINERS                                   |   3 +-
 .../boot/dts/sifive/hifive-unmatched-a00.dts  |   2 +-
 9 files changed, 334 insertions(+), 222 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.yaml
 delete mode 100644 Documentation/devicetree/bindings/mfd/da9063.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/da9063.yaml
 delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
 create mode 100644 Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml

Comments

Rob Herring June 6, 2022, 12:53 p.m. UTC | #1
On Sun, 05 Jun 2022 14:32:57 +0100, 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
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/i2c/i2c-ocores.example.dtb:0:0: /example-0/i2c@a0000000/dummy@60: failed to match any schema with compatible: ['dummy']
Documentation/devicetree/bindings/i2c/i2c-ocores.example.dtb:0:0: /example-0/i2c@b0000000/dummy@60: failed to match any schema with compatible: ['dummy']

doc reference errors (make refcheckdocs):
Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/i2c/i2c-ocores.txt
MAINTAINERS: Documentation/devicetree/bindings/i2c/i2c-ocores.txt

See https://patchwork.ozlabs.org/patch/

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Conor Dooley June 6, 2022, 2:41 p.m. UTC | #2
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.
Atul Khare June 8, 2022, 10:27 p.m. UTC | #3
Conor,

Thanks for the feedback. I will rebase and send out a v2 series
shortly (it appears that the 1024 hart context patch is redundant as
well).

On Sun, Jun 5, 2022 at 6:33 AM <mail@conchuod.ie> wrote:
>
> From: Conor Dooley <conor.dooley@microchip.com>
>
> Hey,
> Couple conversions from txt to yaml here with the intent of fixing the
> the dtbs_check warnings for riscv. Atul Khare already sent patches for
> the gpio-line-names & cache-sets (which went awol) and will clear the
> remaining two errors.
>
> Rob/Krzysztof:
> Have I correctly expressed the mutually exclusive properties?
> I had a look around, but wasn't able to find an obvious binding to ape.
>
> Wasn't sure if a txt -> yaml conversion's MAINTAINERS update was meant
> to be in the same patch or not, so feel free to squash.
> Thanks,
> Conor.
>
> Conor Dooley (6):
>   dt-bindings: mmc: convert mmc-spi-slot to yaml
>   dt-bindings: i2c: convert ocores binding to yaml
>   MAINTAINERS: convert ocores i2c dt-binding to yaml
>   dt-bindings: mfd: convert da9063 to yaml
>   MAINTAINERS: convert da9063 to yaml
>   riscv: dts: sifive: "fix" pmic watchdog node name
>
>  .../devicetree/bindings/i2c/i2c-ocores.txt    |  78 -----------
>  .../devicetree/bindings/i2c/i2c-ocores.yaml   | 132 ++++++++++++++++++
>  .../devicetree/bindings/mfd/da9063.txt        | 111 ---------------
>  .../devicetree/bindings/mfd/da9063.yaml       | 123 ++++++++++++++++
>  .../devicetree/bindings/mmc/mmc-spi-slot.txt  |  29 ----
>  .../devicetree/bindings/mmc/mmc-spi-slot.yaml |  76 ++++++++++
>  .../devicetree/bindings/trivial-devices.yaml  |   2 -
>  MAINTAINERS                                   |   3 +-
>  .../boot/dts/sifive/hifive-unmatched-a00.dts  |   2 +-
>  9 files changed, 334 insertions(+), 222 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.txt
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mfd/da9063.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/da9063.yaml
>  delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
>  create mode 100644 Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
>
> --
> 2.36.1
>
Conor Dooley June 8, 2022, 10:42 p.m. UTC | #4
On 08/06/2022 23:27, Atul Khare wrote:
> Conor,
> 
> Thanks for the feedback. I will rebase and send out a v2 series
> shortly (it appears that the 1024 hart context patch is redundant as
> well).

Great, will be nice to get down to zero warnings :)

> 
> On Sun, Jun 5, 2022 at 6:33 AM <mail@conchuod.ie> wrote:
>>
>> From: Conor Dooley <conor.dooley@microchip.com>
>>
>> Hey,
>> Couple conversions from txt to yaml here with the intent of fixing the
>> the dtbs_check warnings for riscv. Atul Khare already sent patches for
>> the gpio-line-names & cache-sets (which went awol) and will clear the
>> remaining two errors.
>>
>> Rob/Krzysztof:
>> Have I correctly expressed the mutually exclusive properties?
>> I had a look around, but wasn't able to find an obvious binding to ape.
>>
>> Wasn't sure if a txt -> yaml conversion's MAINTAINERS update was meant
>> to be in the same patch or not, so feel free to squash.
>> Thanks,
>> Conor.
>>
>> Conor Dooley (6):
>>   dt-bindings: mmc: convert mmc-spi-slot to yaml
>>   dt-bindings: i2c: convert ocores binding to yaml
>>   MAINTAINERS: convert ocores i2c dt-binding to yaml
>>   dt-bindings: mfd: convert da9063 to yaml
>>   MAINTAINERS: convert da9063 to yaml
>>   riscv: dts: sifive: "fix" pmic watchdog node name
>>
>>  .../devicetree/bindings/i2c/i2c-ocores.txt    |  78 -----------
>>  .../devicetree/bindings/i2c/i2c-ocores.yaml   | 132 ++++++++++++++++++
>>  .../devicetree/bindings/mfd/da9063.txt        | 111 ---------------
>>  .../devicetree/bindings/mfd/da9063.yaml       | 123 ++++++++++++++++
>>  .../devicetree/bindings/mmc/mmc-spi-slot.txt  |  29 ----
>>  .../devicetree/bindings/mmc/mmc-spi-slot.yaml |  76 ++++++++++
>>  .../devicetree/bindings/trivial-devices.yaml  |   2 -
>>  MAINTAINERS                                   |   3 +-
>>  .../boot/dts/sifive/hifive-unmatched-a00.dts  |   2 +-
>>  9 files changed, 334 insertions(+), 222 deletions(-)
>>  delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.txt
>>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-ocores.yaml
>>  delete mode 100644 Documentation/devicetree/bindings/mfd/da9063.txt
>>  create mode 100644 Documentation/devicetree/bindings/mfd/da9063.yaml
>>  delete mode 100644 Documentation/devicetree/bindings/mmc/mmc-spi-slot.txt
>>  create mode 100644 Documentation/devicetree/bindings/mmc/mmc-spi-slot.yaml
>>
>> --
>> 2.36.1
>>