linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
@ 2022-09-27  3:19 Sergio Paracuellos
  2022-09-27 11:12 ` Mark Brown
  2022-09-27 12:48 ` Mark Brown
  0 siblings, 2 replies; 8+ messages in thread
From: Sergio Paracuellos @ 2022-09-27  3:19 UTC (permalink / raw)
  To: devicetree
  Cc: robh+dt, krzysztof.kozlowski+dt, broonie, linux-spi,
	matthias.bgg, 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 resent:
- Send this patch also to linux-spi and Mark B

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] 8+ messages in thread

* Re: [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-27  3:19 [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML Sergio Paracuellos
@ 2022-09-27 11:12 ` Mark Brown
  2022-09-27 11:36   ` Sergio Paracuellos
  2022-09-27 12:48 ` Mark Brown
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Brown @ 2022-09-27 11:12 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: devicetree, robh+dt, krzysztof.kozlowski+dt, linux-spi,
	matthias.bgg, arinc.unal, Krzysztof Kozlowski

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

On Tue, Sep 27, 2022 at 05:19:29AM +0200, 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

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-27 11:12 ` Mark Brown
@ 2022-09-27 11:36   ` Sergio Paracuellos
  2022-09-27 11:59     ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Sergio Paracuellos @ 2022-09-27 11:36 UTC (permalink / raw)
  To: Mark Brown
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Krzysztof Kozlowski, linux-spi, Matthias Brugger,
	Arınç ÜNAL, Krzysztof Kozlowski

Hi Mark,

On Tue, Sep 27, 2022 at 1:12 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, Sep 27, 2022 at 05:19:29AM +0200, 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
>
> Please submit patches using subject lines reflecting the style for the
> subsystem, this makes it easier for people to identify relevant patches.
> Look at what existing commits in the area you're changing are doing and
> make sure your subject lines visually resemble what they're doing.
> There's no need to resubmit to fix this alone.

Since this is a binding migration change I sent the patch expecting
this going into the devicetree kernel tree. So I just use the common
device tree change style 'dt-bindings: spi: migrate mt7621 text
bindings to YAML' as the subject. So I don't really understand what
you mean above, sorry. What is wrong with this subject? I submitted
this v3 [0] and I was told by Rob to resend it to you and the
linux-spi mail list also.

Thanks in advance for clarification.

Best regards,
    Sergio Paracuellos

[0]: https://lore.kernel.org/linux-devicetree/CAMhs-H-fK=F7Wy7-pti+0SKo8DqyZGWu_g74-5MYLxzBhaihmA@mail.gmail.com/T/#m28f6b6d720a7f4477c1c0e8f49ba8e59ed95d6dc

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

* Re: [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-27 11:36   ` Sergio Paracuellos
@ 2022-09-27 11:59     ` Mark Brown
  2022-09-27 12:09       ` Sergio Paracuellos
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2022-09-27 11:59 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Krzysztof Kozlowski, linux-spi, Matthias Brugger,
	Arınç ÜNAL, Krzysztof Kozlowski

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

On Tue, Sep 27, 2022 at 01:36:04PM +0200, Sergio Paracuellos wrote:
> On Tue, Sep 27, 2022 at 1:12 PM Mark Brown <broonie@kernel.org> wrote:
> > On Tue, Sep 27, 2022 at 05:19:29AM +0200, Sergio Paracuellos wrote:

> > Please submit patches using subject lines reflecting the style for the
> > subsystem, this makes it easier for people to identify relevant patches.

> Since this is a binding migration change I sent the patch expecting
> this going into the devicetree kernel tree. So I just use the common
> device tree change style 'dt-bindings: spi: migrate mt7621 text
> bindings to YAML' as the subject. So I don't really understand what
> you mean above, sorry. What is wrong with this subject? I submitted
> this v3 [0] and I was told by Rob to resend it to you and the
> linux-spi mail list also.

Bindings mostly go through the subsystem rather than the DT tree.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-27 11:59     ` Mark Brown
@ 2022-09-27 12:09       ` Sergio Paracuellos
  2022-09-29 16:48         ` Rob Herring
  0 siblings, 1 reply; 8+ messages in thread
From: Sergio Paracuellos @ 2022-09-27 12:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Krzysztof Kozlowski, linux-spi, Matthias Brugger,
	Arınç ÜNAL, Krzysztof Kozlowski

On Tue, Sep 27, 2022 at 1:59 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, Sep 27, 2022 at 01:36:04PM +0200, Sergio Paracuellos wrote:
> > On Tue, Sep 27, 2022 at 1:12 PM Mark Brown <broonie@kernel.org> wrote:
> > > On Tue, Sep 27, 2022 at 05:19:29AM +0200, Sergio Paracuellos wrote:
>
> > > Please submit patches using subject lines reflecting the style for the
> > > subsystem, this makes it easier for people to identify relevant patches.
>
> > Since this is a binding migration change I sent the patch expecting
> > this going into the devicetree kernel tree. So I just use the common
> > device tree change style 'dt-bindings: spi: migrate mt7621 text
> > bindings to YAML' as the subject. So I don't really understand what
> > you mean above, sorry. What is wrong with this subject? I submitted
> > this v3 [0] and I was told by Rob to resend it to you and the
> > linux-spi mail list also.
>
> Bindings mostly go through the subsystem rather than the DT tree.

I thought when changes are only in the binding side DT tree was
preferred. Sorry for the inconvenience, then. Will take into account
your advice from now on.

Thanks,
    Sergio Paracuellos

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

* Re: [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-27  3:19 [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML Sergio Paracuellos
  2022-09-27 11:12 ` Mark Brown
@ 2022-09-27 12:48 ` Mark Brown
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Brown @ 2022-09-27 12:48 UTC (permalink / raw)
  To: Sergio Paracuellos, devicetree
  Cc: robh+dt, krzysztof.kozlowski+dt, matthias.bgg, linux-spi,
	Krzysztof Kozlowski, arinc.unal

On Tue, 27 Sep 2022 05:19:29 +0200, 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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] dt-bindings: spi: migrate mt7621 text bindings to YAML
      commit: 048f71f7685706dcc859160cc74f73e361cfe6c0

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

* Re: [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-27 12:09       ` Sergio Paracuellos
@ 2022-09-29 16:48         ` Rob Herring
  2022-09-29 17:22           ` Sergio Paracuellos
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2022-09-29 16:48 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: Mark Brown,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Krzysztof Kozlowski, linux-spi, Matthias Brugger,
	Arınç ÜNAL, Krzysztof Kozlowski

On Tue, Sep 27, 2022 at 02:09:21PM +0200, Sergio Paracuellos wrote:
> On Tue, Sep 27, 2022 at 1:59 PM Mark Brown <broonie@kernel.org> wrote:
> >
> > On Tue, Sep 27, 2022 at 01:36:04PM +0200, Sergio Paracuellos wrote:
> > > On Tue, Sep 27, 2022 at 1:12 PM Mark Brown <broonie@kernel.org> wrote:
> > > > On Tue, Sep 27, 2022 at 05:19:29AM +0200, Sergio Paracuellos wrote:
> >
> > > > Please submit patches using subject lines reflecting the style for the
> > > > subsystem, this makes it easier for people to identify relevant patches.
> >
> > > Since this is a binding migration change I sent the patch expecting
> > > this going into the devicetree kernel tree. So I just use the common
> > > device tree change style 'dt-bindings: spi: migrate mt7621 text
> > > bindings to YAML' as the subject. So I don't really understand what
> > > you mean above, sorry. What is wrong with this subject? I submitted
> > > this v3 [0] and I was told by Rob to resend it to you and the
> > > linux-spi mail list also.
> >
> > Bindings mostly go through the subsystem rather than the DT tree.
> 
> I thought when changes are only in the binding side DT tree was
> preferred. Sorry for the inconvenience, then. Will take into account
> your advice from now on.

Sometimes they do, but that's more the exception. The ones from you I've 
picked up don't have a subsystem really or the subsystem maintainer 
isn't too active or doesn't pay much attention to DT only patches. Mark 
is responsive and pays some attention to binding patches, so he takes 
them.

Rob

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

* Re: [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML
  2022-09-29 16:48         ` Rob Herring
@ 2022-09-29 17:22           ` Sergio Paracuellos
  0 siblings, 0 replies; 8+ messages in thread
From: Sergio Paracuellos @ 2022-09-29 17:22 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Brown,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Krzysztof Kozlowski, linux-spi, Matthias Brugger,
	Arınç ÜNAL, Krzysztof Kozlowski

On Thu, Sep 29, 2022 at 6:48 PM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Sep 27, 2022 at 02:09:21PM +0200, Sergio Paracuellos wrote:
> > On Tue, Sep 27, 2022 at 1:59 PM Mark Brown <broonie@kernel.org> wrote:
> > >
> > > On Tue, Sep 27, 2022 at 01:36:04PM +0200, Sergio Paracuellos wrote:
> > > > On Tue, Sep 27, 2022 at 1:12 PM Mark Brown <broonie@kernel.org> wrote:
> > > > > On Tue, Sep 27, 2022 at 05:19:29AM +0200, Sergio Paracuellos wrote:
> > >
> > > > > Please submit patches using subject lines reflecting the style for the
> > > > > subsystem, this makes it easier for people to identify relevant patches.
> > >
> > > > Since this is a binding migration change I sent the patch expecting
> > > > this going into the devicetree kernel tree. So I just use the common
> > > > device tree change style 'dt-bindings: spi: migrate mt7621 text
> > > > bindings to YAML' as the subject. So I don't really understand what
> > > > you mean above, sorry. What is wrong with this subject? I submitted
> > > > this v3 [0] and I was told by Rob to resend it to you and the
> > > > linux-spi mail list also.
> > >
> > > Bindings mostly go through the subsystem rather than the DT tree.
> >
> > I thought when changes are only in the binding side DT tree was
> > preferred. Sorry for the inconvenience, then. Will take into account
> > your advice from now on.
>
> Sometimes they do, but that's more the exception. The ones from you I've
> picked up don't have a subsystem really or the subsystem maintainer
> isn't too active or doesn't pay much attention to DT only patches. Mark
> is responsive and pays some attention to binding patches, so he takes
> them.

Thanks a lot for clarification, Rob. Much appreciated.

Best regards,
    Sergio Paracuellos

>
> Rob

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

end of thread, other threads:[~2022-09-29 17:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27  3:19 [RESEND PATCH v3] dt-bindings: spi: migrate mt7621 text bindings to YAML Sergio Paracuellos
2022-09-27 11:12 ` Mark Brown
2022-09-27 11:36   ` Sergio Paracuellos
2022-09-27 11:59     ` Mark Brown
2022-09-27 12:09       ` Sergio Paracuellos
2022-09-29 16:48         ` Rob Herring
2022-09-29 17:22           ` Sergio Paracuellos
2022-09-27 12:48 ` Mark Brown

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