Hi Krzysztof, On Wed, Sep 21, 2022 at 8:44 AM Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote: > > On 20/09/2022 07:27, Sergio Paracuellos wrote: > > SoC MT7621 SPI bindings used text format, so migrate them to YAML. > > There are some additions to the binding that were not in the original > > 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 'spi' as string so maintain that as const in > > the schema. > > > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx> > > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> Thanks! > > (plus one more comment) > > > --- > > Changes in v2: > > - Address review comment from Krzysztof: > > - Rebase onto last kernel version. > > - Drop address-cells and size-cells. > > - Explain deviations from the original file in commit message. > > - Drop reset-names as required property. > > > > .../bindings/spi/ralink,mt7621-spi.yaml | 61 +++++++++++++++++++ > > .../devicetree/bindings/spi/spi-mt7621.txt | 26 -------- > > 2 files changed, 61 insertions(+), 26 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/spi/ralink,mt7621-spi.yaml > > delete mode 100644 Documentation/devicetree/bindings/spi/spi-mt7621.txt > > > > diff --git a/Documentation/devicetree/bindings/spi/ralink,mt7621-spi.yaml b/Documentation/devicetree/bindings/spi/ralink,mt7621-spi.yaml > > new file mode 100644 > > index 000000000000..22879f7dcb77 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/spi/ralink,mt7621-spi.yaml > > @@ -0,0 +1,61 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/spi/ralink,mt7621-spi.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +maintainers: > > + - Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx> > > + > > +title: Mediatek MT7621/MT7628 SPI controller > > + > > +allOf: > > + - $ref: /schemas/spi/spi-controller.yaml# > > + > > +properties: > > + compatible: > > + const: ralink,mt7621-spi > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 > > + > > + clock-names: > > + const: spi > > + > > + resets: > > + maxItems: 1 > > + > > + reset-names: > > + const: spi > > + > > +required: > > + - compatible > > + - reg > > + - resets > > + - "#address-cells" > > + - "#size-cells" > > You could make clocks required, if you know that they are in fact > required for hardware to operate and they are always provided (e.g. not > hard-wired internally somehow). 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#L187 That is the reason to not include them as required. Thanks, Sergio Paracuellos > > Best regards, > Krzysztof