Re: [PATCH v3] dt-bindings: i2c: migrate mt7621 text bindings to YAML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 21, 2022 at 8:47 AM Krzysztof Kozlowski
<krzysztof.kozlowski@xxxxxxxxxx> wrote:
>
> On 20/09/2022 07:20, Sergio Paracuellos wrote:
> > SoC MT7621 I2C bindings used text format, so migrate them to YAML.
> > There are some additions to the binding that were not in the original
> > txt file. This binding is used in MT7621 and MT7628a Ralink SoCs. To
> > properly match both dts nodes in tree we need to add to the schema
> > 'clocks', 'clock-names' and 'reset-names'. Both 'clock-names' and
> > 'reset-names' use 'i2c' as string so maintain that as const in
> > the schema. Also, Properly update MAINTAINERS file to align the
> > changes.
> >
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>

Thanks!

>
> plus two comments:
>
> > ---
> > Changes in v3:
> > - Address review comment from Krzysztof:
> >     - Rebase onto last kernel version.
> >     - Drop address-cells and size-cells.
> >     - Properly explain deviations from txt in commit message.
> >     - Drop reset-names as required property.
> >     - Squash previous series two commits in one to be bisectable.
> >
>
> (...)
>
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/i2c/mediatek,mt7621-i2c.yaml
> > @@ -0,0 +1,61 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/i2c/mediatek,mt7621-i2c.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +maintainers:
> > +  - Stefan Roese <sr@xxxxxxx>
>
> You can also add yourself if you have the interest, the hardware or the
> datasheets.

Ok, thanks.

>
> > +
> > +title: Mediatek MT7621/MT7628 I2C master controller
> > +
> > +allOf:
> > +  - $ref: /schemas/i2c/i2c-controller.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    const: mediatek,mt7621-i2c
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    maxItems: 1
> > +
> > +  clock-names:
> > +    const: i2c
> > +
> > +  resets:
> > +    maxItems: 1
> > +
> > +  reset-names:
> > +    const: i2c
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - resets
> > +  - "#address-cells"
> > +  - "#size-cells"
>
> Similarly to spi, the clocks might be added to required properties, if
> they are really needed.

CLocks are required by MT7621 SoC but MT7628 is not using them in current DTS:

https://elixir.bootlin.com/linux/v6.0-rc5/source/arch/mips/boot/dts/ralink/mt7628a.dtsi#L203

That is the reason to not include them as required.

Thanks,
    Sergio Paracuellos

>
> Best regards,
> Krzysztof



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux