linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements
@ 2023-03-15 14:54 Geert Uytterhoeven
  2023-03-20 16:05 ` Rob Herring
  2023-03-20 18:50 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2023-03-15 14:54 UTC (permalink / raw)
  To: Mark Brown, Rob Herring, Krzysztof Kozlowski
  Cc: linux-spi, devicetree, linux-renesas-soc, Geert Uytterhoeven

Make "clocks" and "power-domains" required everywhere.
Make "resets" required on R-Car Gen2 and newer (i.e. all but SH-Mobile).

Update the example to match reality:
  - Use interrupt binding definitions instead of hardcoded numbers,
  - Convert to new-style CPG/MSSR bindings,
  - Add missing "power-domains" and "resets" properties.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 .../bindings/spi/renesas,sh-msiof.yaml        | 23 +++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml b/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
index 491a695a2deb3b83..00acbbb0f65dcf57 100644
--- a/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
+++ b/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
@@ -149,23 +149,38 @@ required:
   - compatible
   - reg
   - interrupts
+  - clocks
+  - power-domains
   - '#address-cells'
   - '#size-cells'
 
+if:
+  not:
+    properties:
+      compatible:
+        contains:
+          const: renesas,sh-mobile-msiof
+then:
+  required:
+    - resets
+
 unevaluatedProperties: false
 
 examples:
   - |
-    #include <dt-bindings/clock/r8a7791-clock.h>
-    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/r8a7791-sysc.h>
 
     msiof0: spi@e6e20000 {
         compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof";
         reg = <0xe6e20000 0x0064>;
-        interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
-        clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
+        interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpg CPG_MOD 000>;
         dmas = <&dmac0 0x51>, <&dmac0 0x52>;
         dma-names = "tx", "rx";
+        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
+        resets = <&cpg 0>;
         #address-cells = <1>;
         #size-cells = <0>;
     };
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements
  2023-03-15 14:54 [PATCH] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements Geert Uytterhoeven
@ 2023-03-20 16:05 ` Rob Herring
  2023-03-20 16:16   ` Geert Uytterhoeven
  2023-03-20 18:50 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2023-03-20 16:05 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mark Brown, Krzysztof Kozlowski, linux-spi, devicetree,
	linux-renesas-soc

On Wed, Mar 15, 2023 at 03:54:07PM +0100, Geert Uytterhoeven wrote:
> Make "clocks" and "power-domains" required everywhere.
> Make "resets" required on R-Car Gen2 and newer (i.e. all but SH-Mobile).

Breaking the ABI is fine because ???

> 
> Update the example to match reality:
>   - Use interrupt binding definitions instead of hardcoded numbers,
>   - Convert to new-style CPG/MSSR bindings,
>   - Add missing "power-domains" and "resets" properties.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  .../bindings/spi/renesas,sh-msiof.yaml        | 23 +++++++++++++++----
>  1 file changed, 19 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml b/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> index 491a695a2deb3b83..00acbbb0f65dcf57 100644
> --- a/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> +++ b/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> @@ -149,23 +149,38 @@ required:
>    - compatible
>    - reg
>    - interrupts
> +  - clocks
> +  - power-domains
>    - '#address-cells'
>    - '#size-cells'
>  
> +if:
> +  not:
> +    properties:
> +      compatible:
> +        contains:
> +          const: renesas,sh-mobile-msiof
> +then:
> +  required:
> +    - resets
> +
>  unevaluatedProperties: false
>  
>  examples:
>    - |
> -    #include <dt-bindings/clock/r8a7791-clock.h>
> -    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/power/r8a7791-sysc.h>
>  
>      msiof0: spi@e6e20000 {
>          compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof";
>          reg = <0xe6e20000 0x0064>;
> -        interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
> -        clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
> +        interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&cpg CPG_MOD 000>;
>          dmas = <&dmac0 0x51>, <&dmac0 0x52>;
>          dma-names = "tx", "rx";
> +        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
> +        resets = <&cpg 0>;
>          #address-cells = <1>;
>          #size-cells = <0>;
>      };
> -- 
> 2.34.1
> 

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

* Re: [PATCH] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements
  2023-03-20 16:05 ` Rob Herring
@ 2023-03-20 16:16   ` Geert Uytterhoeven
  0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2023-03-20 16:16 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Brown, Krzysztof Kozlowski, linux-spi, devicetree,
	linux-renesas-soc

Hi Rob,

On Mon, Mar 20, 2023 at 5:07 PM Rob Herring <robh@kernel.org> wrote:
> On Wed, Mar 15, 2023 at 03:54:07PM +0100, Geert Uytterhoeven wrote:
> > Make "clocks" and "power-domains" required everywhere.
> > Make "resets" required on R-Car Gen2 and newer (i.e. all but SH-Mobile).
>
> Breaking the ABI is fine because ???

This does not break the ABI, as all related DTS already have these properties.
This just aligns the bindings with reality.

> > Update the example to match reality:
> >   - Use interrupt binding definitions instead of hardcoded numbers,
> >   - Convert to new-style CPG/MSSR bindings,
> >   - Add missing "power-domains" and "resets" properties.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > ---
> >  .../bindings/spi/renesas,sh-msiof.yaml        | 23 +++++++++++++++----
> >  1 file changed, 19 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml b/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> > index 491a695a2deb3b83..00acbbb0f65dcf57 100644
> > --- a/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> > +++ b/Documentation/devicetree/bindings/spi/renesas,sh-msiof.yaml
> > @@ -149,23 +149,38 @@ required:
> >    - compatible
> >    - reg
> >    - interrupts
> > +  - clocks
> > +  - power-domains
> >    - '#address-cells'
> >    - '#size-cells'
> >
> > +if:
> > +  not:
> > +    properties:
> > +      compatible:
> > +        contains:
> > +          const: renesas,sh-mobile-msiof
> > +then:
> > +  required:
> > +    - resets
> > +
> >  unevaluatedProperties: false
> >
> >  examples:
> >    - |
> > -    #include <dt-bindings/clock/r8a7791-clock.h>
> > -    #include <dt-bindings/interrupt-controller/irq.h>
> > +    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +    #include <dt-bindings/power/r8a7791-sysc.h>
> >
> >      msiof0: spi@e6e20000 {
> >          compatible = "renesas,msiof-r8a7791", "renesas,rcar-gen2-msiof";
> >          reg = <0xe6e20000 0x0064>;
> > -        interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
> > -        clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
> > +        interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
> > +        clocks = <&cpg CPG_MOD 000>;
> >          dmas = <&dmac0 0x51>, <&dmac0 0x52>;
> >          dma-names = "tx", "rx";
> > +        power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
> > +        resets = <&cpg 0>;
> >          #address-cells = <1>;
> >          #size-cells = <0>;
> >      };

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements
  2023-03-15 14:54 [PATCH] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements Geert Uytterhoeven
  2023-03-20 16:05 ` Rob Herring
@ 2023-03-20 18:50 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-03-20 18:50 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Geert Uytterhoeven
  Cc: linux-spi, devicetree, linux-renesas-soc

On Wed, 15 Mar 2023 15:54:07 +0100, Geert Uytterhoeven wrote:
> Make "clocks" and "power-domains" required everywhere.
> Make "resets" required on R-Car Gen2 and newer (i.e. all but SH-Mobile).
> 
> Update the example to match reality:
>   - Use interrupt binding definitions instead of hardcoded numbers,
>   - Convert to new-style CPG/MSSR bindings,
>   - Add missing "power-domains" and "resets" properties.
> 
> [...]

Applied to

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

Thanks!

[1/1] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements
      commit: a0dcd1ff96293775c3ec30ae0091713982c5c24c

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

end of thread, other threads:[~2023-03-20 18:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 14:54 [PATCH] dt-bindings: spi: renesas,sh-msiof: Miscellaneous improvements Geert Uytterhoeven
2023-03-20 16:05 ` Rob Herring
2023-03-20 16:16   ` Geert Uytterhoeven
2023-03-20 18:50 ` 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).