devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: ata: Convert marvell,orion-sata to DT schema
@ 2025-05-12 21:57 Rob Herring (Arm)
  2025-05-12 23:15 ` Andrew Lunn
  2025-05-15 12:37 ` Damien Le Moal
  0 siblings, 2 replies; 3+ messages in thread
From: Rob Herring (Arm) @ 2025-05-12 21:57 UTC (permalink / raw)
  To: Damien Le Moal, Niklas Cassel, Krzysztof Kozlowski, Conor Dooley,
	Andrew Lunn, Gregory Clement
  Cc: linux-ide, devicetree, linux-kernel

Convert the Marvell Orion SATA Controller to DT schema format.

The clocks and clock-names properties were missing. The names for
phy-names were incorrect. The maximum "nr-ports" was determined from the
Linux driver.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/ata/marvell,orion-sata.yaml      | 83 +++++++++++++++++++
 .../devicetree/bindings/ata/marvell.txt       | 22 -----
 2 files changed, 83 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ata/marvell,orion-sata.yaml
 delete mode 100644 Documentation/devicetree/bindings/ata/marvell.txt

diff --git a/Documentation/devicetree/bindings/ata/marvell,orion-sata.yaml b/Documentation/devicetree/bindings/ata/marvell,orion-sata.yaml
new file mode 100644
index 000000000000..f656ea9223d6
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/marvell,orion-sata.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/ata/marvell,orion-sata.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Orion SATA
+
+maintainers:
+  - Andrew Lunn <andrew@lunn.ch>
+  - Gregory Clement <gregory.clement@bootlin.com>
+
+allOf:
+  - $ref: sata-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - marvell,orion-sata
+      - marvell,armada-370-sata
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    minItems: 1
+    maxItems: 8
+
+  clock-names:
+    minItems: 1
+    items:
+      - const: '0'
+      - const: '1'
+      - const: '2'
+      - const: '3'
+      - const: '4'
+      - const: '5'
+      - const: '6'
+      - const: '7'
+
+  interrupts:
+    maxItems: 1
+
+  nr-ports:
+    description:
+      Number of SATA ports in use.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    maximum: 8
+
+  phys:
+    minItems: 1
+    maxItems: 8
+
+  phy-names:
+    minItems: 1
+    items:
+      - const: port0
+      - const: port1
+      - const: port2
+      - const: port3
+      - const: port4
+      - const: port5
+      - const: port6
+      - const: port7
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - nr-ports
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    sata@80000 {
+        compatible = "marvell,orion-sata";
+        reg = <0x80000 0x5000>;
+        interrupts = <21>;
+        phys = <&sata_phy0>, <&sata_phy1>;
+        phy-names = "port0", "port1";
+        nr-ports = <2>;
+    };
diff --git a/Documentation/devicetree/bindings/ata/marvell.txt b/Documentation/devicetree/bindings/ata/marvell.txt
deleted file mode 100644
index b460edd12766..000000000000
--- a/Documentation/devicetree/bindings/ata/marvell.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-* Marvell Orion SATA
-
-Required Properties:
-- compatibility : "marvell,orion-sata" or "marvell,armada-370-sata"
-- reg           : Address range of controller
-- interrupts    : Interrupt controller is using
-- nr-ports      : Number of SATA ports in use.
-
-Optional Properties:
-- phys		: List of phandles to sata phys
-- phy-names	: Should be "0", "1", etc, one number per phandle
-
-Example:
-
-	sata@80000 {
-		compatible = "marvell,orion-sata";
-		reg = <0x80000 0x5000>;
-		interrupts = <21>;
-		phys = <&sata_phy0>, <&sata_phy1>;
-		phy-names = "0", "1";
-		nr-ports = <2>;
-	}
-- 
2.47.2


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

* Re: [PATCH] dt-bindings: ata: Convert marvell,orion-sata to DT schema
  2025-05-12 21:57 [PATCH] dt-bindings: ata: Convert marvell,orion-sata to DT schema Rob Herring (Arm)
@ 2025-05-12 23:15 ` Andrew Lunn
  2025-05-15 12:37 ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-05-12 23:15 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Damien Le Moal, Niklas Cassel, Krzysztof Kozlowski, Conor Dooley,
	Gregory Clement, linux-ide, devicetree, linux-kernel

On Mon, May 12, 2025 at 04:57:48PM -0500, Rob Herring (Arm) wrote:
> Convert the Marvell Orion SATA Controller to DT schema format.
> 
> The clocks and clock-names properties were missing. The names for
> phy-names were incorrect. The maximum "nr-ports" was determined from the
> Linux driver.

Hi Rob

All the SoCs using this IP have either 1 or 2 ports. There was a PCI
card using the same IP which had more ports, but that obviously does
not use the binding.

So if you want you could reduce down all the lists to two items.

	Andrew

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

* Re: [PATCH] dt-bindings: ata: Convert marvell,orion-sata to DT schema
  2025-05-12 21:57 [PATCH] dt-bindings: ata: Convert marvell,orion-sata to DT schema Rob Herring (Arm)
  2025-05-12 23:15 ` Andrew Lunn
@ 2025-05-15 12:37 ` Damien Le Moal
  1 sibling, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2025-05-15 12:37 UTC (permalink / raw)
  To: Rob Herring (Arm), Niklas Cassel, Krzysztof Kozlowski,
	Conor Dooley, Andrew Lunn, Gregory Clement
  Cc: linux-ide, devicetree, linux-kernel

On 5/12/25 23:57, Rob Herring (Arm) wrote:
> Convert the Marvell Orion SATA Controller to DT schema format.
> 
> The clocks and clock-names properties were missing. The names for
> phy-names were incorrect. The maximum "nr-ports" was determined from the
> Linux driver.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Applied to for-6.16. Thanks !

-- 
Damien Le Moal
Western Digital Research

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

end of thread, other threads:[~2025-05-15 12:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 21:57 [PATCH] dt-bindings: ata: Convert marvell,orion-sata to DT schema Rob Herring (Arm)
2025-05-12 23:15 ` Andrew Lunn
2025-05-15 12:37 ` Damien Le Moal

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