All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Sebastian Reichel <sre@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	devicetree@vger.kernel.org,  linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	 Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH v2 1/7] dt-bindings: hsi: hsi-client: convert to YAML
Date: Wed, 27 Mar 2024 20:11:32 +0100	[thread overview]
Message-ID: <20240327-hsi-dt-binding-v2-1-110fab4c32ae@collabora.com> (raw)
In-Reply-To: <20240327-hsi-dt-binding-v2-0-110fab4c32ae@collabora.com>

Convert the legacy txt binding to modern YAML and rename from
client-devices to hsi-client. Also the example got dropped,
since this is a shared schema. No semantic change in the binding
itself.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../devicetree/bindings/hsi/client-devices.txt     | 44 ------------
 .../devicetree/bindings/hsi/hsi-client.yaml        | 81 ++++++++++++++++++++++
 2 files changed, 81 insertions(+), 44 deletions(-)

diff --git a/Documentation/devicetree/bindings/hsi/client-devices.txt b/Documentation/devicetree/bindings/hsi/client-devices.txt
deleted file mode 100644
index 104c9a3e57a4..000000000000
--- a/Documentation/devicetree/bindings/hsi/client-devices.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Each HSI port is supposed to have one child node, which
-symbols the remote device connected to the HSI port. The
-following properties are standardized for HSI clients:
-
-Required HSI configuration properties:
-
-- hsi-channel-ids:	A list of channel ids
-
-- hsi-rx-mode:		Receiver Bit transmission mode ("stream" or "frame")
-- hsi-tx-mode:		Transmitter Bit transmission mode ("stream" or "frame")
-- hsi-mode:		May be used instead hsi-rx-mode and hsi-tx-mode if
-			the transmission mode is the same for receiver and
-			transmitter
-- hsi-speed-kbps:	Max bit transmission speed in kbit/s
-- hsi-flow:		RX flow type ("synchronized" or "pipeline")
-- hsi-arb-mode:		Arbitration mode for TX frame ("round-robin", "priority")
-
-Optional HSI configuration properties:
-
-- hsi-channel-names:	A list with one name per channel specified in the
-			hsi-channel-ids property
-
-
-Device Tree node example for an HSI client:
-
-hsi-controller {
-	hsi-port {
-		modem: hsi-client {
-			compatible = "nokia,n900-modem";
-
-			hsi-channel-ids = <0>, <1>, <2>, <3>;
-			hsi-channel-names = "mcsaab-control",
-					    "speech-control",
-					    "speech-data",
-					    "mcsaab-data";
-			hsi-speed-kbps = <55000>;
-			hsi-mode = "frame";
-			hsi-flow = "synchronized";
-			hsi-arb-mode = "round-robin";
-
-			/* more client specific properties */
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/hsi/hsi-client.yaml b/Documentation/devicetree/bindings/hsi/hsi-client.yaml
new file mode 100644
index 000000000000..9c8d6887e840
--- /dev/null
+++ b/Documentation/devicetree/bindings/hsi/hsi-client.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hsi/hsi-client.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HSI bus peripheral
+
+description:
+  Each HSI port is supposed to have one child node, which
+  symbols the remote device connected to the HSI port.
+
+maintainers:
+  - Sebastian Reichel <sre@kernel.org>
+
+properties:
+  hsi-channel-ids:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 1
+    maxItems: 8
+
+  hsi-channel-names:
+    minItems: 1
+    maxItems: 8
+
+  hsi-rx-mode:
+    enum: [stream, frame]
+    description: Receiver Bit transmission mode
+
+  hsi-tx-mode:
+    enum: [stream, frame]
+    description: Transmitter Bit transmission mode
+
+  hsi-mode:
+    enum: [stream, frame]
+    description:
+      May be used instead hsi-rx-mode and hsi-tx-mode if the
+      transmission mode is the same for receiver and transmitter.
+
+  hsi-speed-kbps:
+    description: Max bit transmission speed in kbit/s
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+  hsi-flow:
+    enum: [synchronized, pipeline]
+    description: RX flow type
+
+  hsi-arb-mode:
+    enum: [round-robin, priority]
+    description: Arbitration mode for TX frame
+
+additionalProperties: true
+
+required:
+  - compatible
+  - hsi-channel-ids
+  - hsi-speed-kbps
+  - hsi-flow
+  - hsi-arb-mode
+
+oneOf:
+  - required:
+      - hsi-mode
+  - required:
+      - hsi-rx-mode
+      - hsi-tx-mode
+
+allOf:
+  - if:
+      required:
+        - hsi-mode
+    then:
+      properties:
+        hsi-rx-mode: false
+        hsi-tx-mode: false
+  - if:
+      required:
+        - hsi-rx-mode
+    then:
+      properties:
+        hsi-mode: false

-- 
2.43.0


  reply	other threads:[~2024-03-27 19:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27 19:11 [PATCH v2 0/7] Convert MIPI HSI DT bindings to YAML Sebastian Reichel
2024-03-27 19:11 ` Sebastian Reichel [this message]
2024-03-28  9:27   ` [PATCH v2 1/7] dt-bindings: hsi: hsi-client: convert " Krzysztof Kozlowski
2024-03-27 19:11 ` [PATCH v2 2/7] dt-bindings: hsi: nokia-modem: " Sebastian Reichel
2024-03-28  9:28   ` Krzysztof Kozlowski
2024-03-27 19:11 ` [PATCH v2 3/7] dt-bindings: hsi: omap-ssi: " Sebastian Reichel
2024-03-28  9:30   ` Krzysztof Kozlowski
2024-03-27 19:11 ` [PATCH v2 4/7] ARM: dts: omap4: fix hsi-port node name Sebastian Reichel
2024-03-28  9:30   ` Krzysztof Kozlowski
2024-03-27 19:11 ` [PATCH v2 5/7] ARM: dts: omap3: fix ssi-port " Sebastian Reichel
2024-03-28  9:30   ` Krzysztof Kozlowski
2024-03-27 19:11 ` [PATCH v2 6/7] ARM: dts: omap3: fix ti,ssi-cawake-gpio property name Sebastian Reichel
2024-03-28  9:30   ` Krzysztof Kozlowski
2024-03-27 19:11 ` [PATCH v2 7/7] ARM: dts: omap3: use generic node name for hsi clients Sebastian Reichel
2024-03-28  9:31   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327-hsi-dt-binding-v2-1-110fab4c32ae@collabora.com \
    --to=sebastian.reichel@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.