linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema
@ 2024-05-22 13:28 Rob Herring (Arm)
  2024-05-22 14:22 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2024-05-22 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Krzysztof Kozlowski, Conor Dooley,
	Mark Brown, Lubomir Rintel
  Cc: Andy Shevchenko, linux-kernel, linux-serial, devicetree,
	linux-spi

The Marvell PXA SSP block is the same or similiar to the MMP2 variant.
The only difference in the binding is the PXA version supports DMA (and
that's probably a binding difference rather than an actual h/w
difference).

The old binding didn't belong under 'serial' as it is not a UART. The
SSP block also supports audio devices, so 'spi' is not a perfect fit
either. As the existing schema for MMP2 is there, just leave things
as-is.

The examples in the old text binding were pretty out of sync with
reality. 'clock-names' and 'ssp-id' aren't documented nor used.

Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/serial/mrvl,pxa-ssp.txt          | 64 -------------------
 .../bindings/spi/marvell,mmp2-ssp.yaml        | 35 ++++++++--
 2 files changed, 31 insertions(+), 68 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt

diff --git a/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt b/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt
deleted file mode 100644
index d10cc06c0c37..000000000000
--- a/Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-Device tree bindings for Marvell PXA SSP ports
-
-Required properties:
-
-	- compatible:	Must be one of
-				mrvl,pxa25x-ssp
-				mvrl,pxa25x-nssp
-				mrvl,pxa27x-ssp
-				mrvl,pxa3xx-ssp
-				mvrl,pxa168-ssp
-				mrvl,pxa910-ssp
-				mrvl,ce4100-ssp
-
-	- reg:		The memory base
-	- dmas:		Two dma phandles, one for rx, one for tx
-	- dma-names:	Must be "rx", "tx"
-
-
-Example for PXA3xx:
-
-	ssp0: ssp@41000000 {
-		compatible = "mrvl,pxa3xx-ssp";
-		reg = <0x41000000 0x40>;
-		ssp-id = <1>;
-		interrupts = <24>;
-		clock-names = "pxa27x-ssp.0";
-		dmas = <&dma 13
-			&dma 14>;
-		dma-names = "rx", "tx";
-	};
-
-	ssp1: ssp@41700000 {
-		compatible = "mrvl,pxa3xx-ssp";
-		reg = <0x41700000 0x40>;
-		ssp-id = <2>;
-		interrupts = <16>;
-		clock-names = "pxa27x-ssp.1";
-		dmas = <&dma 15
-			&dma 16>;
-		dma-names = "rx", "tx";
-	};
-
-	ssp2: ssp@41900000 {
-		compatibl3 = "mrvl,pxa3xx-ssp";
-		reg = <0x41900000 0x40>;
-		ssp-id = <3>;
-		interrupts = <0>;
-		clock-names = "pxa27x-ssp.2";
-		dmas = <&dma 66
-			&dma 67>;
-		dma-names = "rx", "tx";
-	};
-
-	ssp3: ssp@41a00000 {
-		compatible = "mrvl,pxa3xx-ssp";
-		reg = <0x41a00000 0x40>;
-		ssp-id = <4>;
-		interrupts = <13>;
-		clock-names = "pxa27x-ssp.3";
-		dmas = <&dma 2
-			&dma 3>;
-		dma-names = "rx", "tx";
-	};
-
diff --git a/Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml b/Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml
index 5f4f6b5615d0..0a1bada8f800 100644
--- a/Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml
+++ b/Documentation/devicetree/bindings/spi/marvell,mmp2-ssp.yaml
@@ -10,12 +10,17 @@ title: PXA2xx SSP SPI Controller
 maintainers:
   - Lubomir Rintel <lkundrak@v3.sk>
 
-allOf:
-  - $ref: spi-controller.yaml#
-
 properties:
   compatible:
-    const: marvell,mmp2-ssp
+    enum:
+      - marvell,mmp2-ssp
+      - mrvl,ce4100-ssp
+      - mvrl,pxa168-ssp
+      - mrvl,pxa25x-ssp
+      - mvrl,pxa25x-nssp
+      - mrvl,pxa27x-ssp
+      - mrvl,pxa3xx-ssp
+      - mrvl,pxa910-ssp
 
   interrupts:
     maxItems: 1
@@ -26,6 +31,16 @@ properties:
   clocks:
     maxItems: 1
 
+  dmas:
+    items:
+      - description: Receive DMA
+      - description: Transmit DMA
+
+  dma-names:
+    items:
+      - const: rx
+      - const: tx
+
   ready-gpios:
     description: |
       GPIO used to signal a SPI master that the FIFO is filled and we're
@@ -41,6 +56,18 @@ required:
 dependencies:
   ready-gpios: [ spi-slave ]
 
+allOf:
+  - $ref: spi-controller.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: marvell,mmp2-ssp
+    then:
+      properties:
+        dmas: false
+        dma-names: false
+
 unevaluatedProperties: false
 
 examples:
-- 
2.43.0


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

* Re: [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema
  2024-05-22 13:28 [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema Rob Herring (Arm)
@ 2024-05-22 14:22 ` Andy Shevchenko
  2024-05-22 15:45 ` Conor Dooley
  2024-06-04 11:56 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2024-05-22 14:22 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Greg Kroah-Hartman, Jiri Slaby, Krzysztof Kozlowski, Conor Dooley,
	Mark Brown, Lubomir Rintel, linux-kernel, linux-serial,
	devicetree, linux-spi

On Wed, May 22, 2024 at 08:28:58AM -0500, Rob Herring (Arm) wrote:
> The Marvell PXA SSP block is the same or similiar to the MMP2 variant.
> The only difference in the binding is the PXA version supports DMA (and
> that's probably a binding difference rather than an actual h/w
> difference).
> 
> The old binding didn't belong under 'serial' as it is not a UART. The
> SSP block also supports audio devices, so 'spi' is not a perfect fit
> either. As the existing schema for MMP2 is there, just leave things
> as-is.
> 
> The examples in the old text binding were pretty out of sync with
> reality. 'clock-names' and 'ssp-id' aren't documented nor used.

Thank you! I believe this is correct implementation and
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(can't fully review it due to lack of DT knowledge).

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema
  2024-05-22 13:28 [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema Rob Herring (Arm)
  2024-05-22 14:22 ` Andy Shevchenko
@ 2024-05-22 15:45 ` Conor Dooley
  2024-06-04 11:56 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-05-22 15:45 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Greg Kroah-Hartman, Jiri Slaby, Krzysztof Kozlowski, Conor Dooley,
	Mark Brown, Lubomir Rintel, Andy Shevchenko, linux-kernel,
	linux-serial, devicetree, linux-spi

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

On Wed, May 22, 2024 at 08:28:58AM -0500, Rob Herring (Arm) wrote:
> The Marvell PXA SSP block is the same or similiar to the MMP2 variant.
> The only difference in the binding is the PXA version supports DMA (and
> that's probably a binding difference rather than an actual h/w
> difference).
> 
> The old binding didn't belong under 'serial' as it is not a UART. The
> SSP block also supports audio devices, so 'spi' is not a perfect fit
> either. As the existing schema for MMP2 is there, just leave things
> as-is.
> 
> The examples in the old text binding were pretty out of sync with
> reality. 'clock-names' and 'ssp-id' aren't documented nor used.
> 
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Cheers,
Conor.

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

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

* Re: [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema
  2024-05-22 13:28 [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema Rob Herring (Arm)
  2024-05-22 14:22 ` Andy Shevchenko
  2024-05-22 15:45 ` Conor Dooley
@ 2024-06-04 11:56 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-06-04 11:56 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Jiri Slaby, Krzysztof Kozlowski, Conor Dooley, Mark Brown,
	Lubomir Rintel, Andy Shevchenko, linux-kernel, linux-serial,
	devicetree, linux-spi

On Wed, May 22, 2024 at 08:28:58AM -0500, Rob Herring (Arm) wrote:
> The Marvell PXA SSP block is the same or similiar to the MMP2 variant.
> The only difference in the binding is the PXA version supports DMA (and
> that's probably a binding difference rather than an actual h/w
> difference).
> 
> The old binding didn't belong under 'serial' as it is not a UART. The
> SSP block also supports audio devices, so 'spi' is not a perfect fit
> either. As the existing schema for MMP2 is there, just leave things
> as-is.
> 
> The examples in the old text binding were pretty out of sync with
> reality. 'clock-names' and 'ssp-id' aren't documented nor used.
> 
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  .../bindings/serial/mrvl,pxa-ssp.txt          | 64 -------------------
>  .../bindings/spi/marvell,mmp2-ssp.yaml        | 35 ++++++++--
>  2 files changed, 31 insertions(+), 68 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/serial/mrvl,pxa-ssp.txt
> 

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

end of thread, other threads:[~2024-06-04 12:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 13:28 [PATCH] spi: dt-bindings: marvell,mmp2-ssp: Merge PXA SSP into schema Rob Herring (Arm)
2024-05-22 14:22 ` Andy Shevchenko
2024-05-22 15:45 ` Conor Dooley
2024-06-04 11:56 ` Greg Kroah-Hartman

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