devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
@ 2022-09-21  7:28 Sergio Paracuellos
  2022-09-21  7:29 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Sergio Paracuellos @ 2022-09-21  7:28 UTC (permalink / raw)
  To: devicetree
  Cc: tsbogend, robh+dt, krzysztof.kozlowski+dt, arinc.unal,
	Krzysztof Kozlowski

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.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
Changes in v3:
- Add Krzysztof's Reviewed-by tag.

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@gmail.com>
+
+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"
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/mt7621-clk.h>
+    #include <dt-bindings/reset/mt7621-reset.h>
+
+    spi@b00 {
+      compatible = "ralink,mt7621-spi";
+      reg = <0xb00 0x100>;
+      clocks = <&sysc MT7621_CLK_SPI>;
+      clock-names = "spi";
+      resets = <&sysc MT7621_RST_SPI>;
+      reset-names = "spi";
+
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      pinctrl-names = "default";
+      pinctrl-0 = <&spi_pins>;
+    };
diff --git a/Documentation/devicetree/bindings/spi/spi-mt7621.txt b/Documentation/devicetree/bindings/spi/spi-mt7621.txt
deleted file mode 100644
index d5baec0fa56e..000000000000
--- a/Documentation/devicetree/bindings/spi/spi-mt7621.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Binding for MTK SPI controller (MT7621 MIPS)
-
-Required properties:
-- compatible: Should be one of the following:
-  - "ralink,mt7621-spi": for mt7621/mt7628/mt7688 platforms
-- #address-cells: should be 1.
-- #size-cells: should be 0.
-- reg: Address and length of the register set for the device
-- resets: phandle to the reset controller asserting this device in
-          reset
-  See ../reset/reset.txt for details.
-
-Optional properties:
-- cs-gpios: see spi-bus.txt.
-
-Example:
-
-- SoC Specific Portion:
-spi0: spi@b00 {
-	compatible = "ralink,mt7621-spi";
-	reg = <0xb00 0x100>;
-	#address-cells = <1>;
-	#size-cells = <0>;
-	resets = <&rstctrl 18>;
-	reset-names = "spi";
-};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-21  7:28 [PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML Sergio Paracuellos
@ 2022-09-21  7:29 ` Krzysztof Kozlowski
  2022-09-21  7:31   ` Sergio Paracuellos
  2022-09-26 18:28   ` Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-09-21  7:29 UTC (permalink / raw)
  To: Sergio Paracuellos, devicetree
  Cc: tsbogend, robh+dt, krzysztof.kozlowski+dt, arinc.unal

On 21/09/2022 09:28, 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.
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---
> Changes in v3:
> - Add Krzysztof's Reviewed-by tag.

There's no need to repost patches *only* to add the tags. The upstream
maintainer will do that for acks received on the version they apply.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-21  7:29 ` Krzysztof Kozlowski
@ 2022-09-21  7:31   ` Sergio Paracuellos
  2022-09-26 18:28   ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2022-09-21  7:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Thomas Bogendoerfer, Rob Herring, Krzysztof Kozlowski,
	Arınç ÜNAL

On Wed, Sep 21, 2022 at 9:29 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 21/09/2022 09:28, 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.
> >
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > ---
> > Changes in v3:
> > - Add Krzysztof's Reviewed-by tag.
>
> There's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.

Understood, thanks for letting me know :)

Best regards,
    Sergio Paracuellos

>
> Best regards,
> Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-21  7:29 ` Krzysztof Kozlowski
  2022-09-21  7:31   ` Sergio Paracuellos
@ 2022-09-26 18:28   ` Rob Herring
  2022-09-27  3:21     ` Sergio Paracuellos
  1 sibling, 1 reply; 5+ messages in thread
From: Rob Herring @ 2022-09-26 18:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Sergio Paracuellos
  Cc: devicetree, tsbogend, krzysztof.kozlowski+dt, arinc.unal

On Wed, Sep 21, 2022 at 09:29:00AM +0200, Krzysztof Kozlowski wrote:
> On 21/09/2022 09:28, 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.
> > 
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > ---
> > Changes in v3:
> > - Add Krzysztof's Reviewed-by tag.
> 
> There's no need to repost patches *only* to add the tags. The upstream
> maintainer will do that for acks received on the version they apply.

But not when they aren't Cc'ed. Please resend to Mark B and linux-spi.

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-26 18:28   ` Rob Herring
@ 2022-09-27  3:21     ` Sergio Paracuellos
  0 siblings, 0 replies; 5+ messages in thread
From: Sergio Paracuellos @ 2022-09-27  3:21 UTC (permalink / raw)
  To: Rob Herring
  Cc: Krzysztof Kozlowski,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Thomas Bogendoerfer, Krzysztof Kozlowski,
	Arınç ÜNAL

Hi Rob,

On Mon, Sep 26, 2022 at 8:28 PM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Sep 21, 2022 at 09:29:00AM +0200, Krzysztof Kozlowski wrote:
> > On 21/09/2022 09:28, 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.
> > >
> > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > > ---
> > > Changes in v3:
> > > - Add Krzysztof's Reviewed-by tag.
> >
> > There's no need to repost patches *only* to add the tags. The upstream
> > maintainer will do that for acks received on the version they apply.
>
> But not when they aren't Cc'ed. Please resend to Mark B and linux-spi.

You are right. Patch already resent cc'ing also mark B and linux-spi.

Thanks,
    Sergio Paracuellos

>
> Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-27  3:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21  7:28 [PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML Sergio Paracuellos
2022-09-21  7:29 ` Krzysztof Kozlowski
2022-09-21  7:31   ` Sergio Paracuellos
2022-09-26 18:28   ` Rob Herring
2022-09-27  3:21     ` Sergio Paracuellos

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).