public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: serial: Convert cirrus,ep7209-uart to DT schema
@ 2025-05-06 22:00 Rob Herring (Arm)
  2025-05-07 13:56 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring (Arm) @ 2025-05-06 22:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Krzysztof Kozlowski, Conor Dooley,
	Alexander Shiyan
  Cc: linux-kernel, linux-serial, devicetree

Convert the Cirrus EP7209 UART binding to DT schema. There is no user of
"cirrus,ep7312-uart" other than the example, so drop it. Drop the
"aliases" node part as it is not relevant to the schema. The modem
control GPIOs are covered by the serial.yaml schema and don't have to be
listed in the schema.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/serial/cirrus,clps711x-uart.txt  | 31 ----------
 .../bindings/serial/cirrus,ep7209-uart.yaml   | 56 +++++++++++++++++++
 2 files changed, 56 insertions(+), 31 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/serial/cirrus,clps711x-uart.txt
 create mode 100644 Documentation/devicetree/bindings/serial/cirrus,ep7209-uart.yaml

diff --git a/Documentation/devicetree/bindings/serial/cirrus,clps711x-uart.txt b/Documentation/devicetree/bindings/serial/cirrus,clps711x-uart.txt
deleted file mode 100644
index 07013fa60a48..000000000000
--- a/Documentation/devicetree/bindings/serial/cirrus,clps711x-uart.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-* Cirrus Logic CLPS711X Universal Asynchronous Receiver/Transmitter (UART)
-
-Required properties:
-- compatible: Should be "cirrus,ep7209-uart".
-- reg: Address and length of the register set for the device.
-- interrupts: Should contain UART TX and RX interrupt.
-- clocks: Should contain UART core clock number.
-- syscon: Phandle to SYSCON node, which contain UART control bits.
-
-Optional properties:
-- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD
-  line respectively.
-
-Note: Each UART port should have an alias correctly numbered
-in "aliases" node.
-
-Example:
-	aliases {
-		serial0 = &uart1;
-	};
-
-	uart1: uart@80000480 {
-		compatible = "cirrus,ep7312-uart","cirrus,ep7209-uart";
-		reg = <0x80000480 0x80>;
-		interrupts = <12 13>;
-		clocks = <&clks 11>;
-		syscon = <&syscon1>;
-		cts-gpios = <&sysgpio 0 GPIO_ACTIVE_LOW>;
-		dsr-gpios = <&sysgpio 1 GPIO_ACTIVE_LOW>;
-		dcd-gpios = <&sysgpio 2 GPIO_ACTIVE_LOW>;
-	};
diff --git a/Documentation/devicetree/bindings/serial/cirrus,ep7209-uart.yaml b/Documentation/devicetree/bindings/serial/cirrus,ep7209-uart.yaml
new file mode 100644
index 000000000000..c9976e86872b
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/cirrus,ep7209-uart.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/cirrus,ep7209-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic CLPS711X Universal Asynchronous Receiver/Transmitter (UART)
+
+maintainers:
+  - Alexander Shiyan <shc_work@mail.ru>
+
+allOf:
+  - $ref: /schemas/serial/serial.yaml#
+
+properties:
+  compatible:
+    const: cirrus,ep7209-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: UART TX interrupt
+      - description: UART RX interrupt
+
+  clocks:
+    maxItems: 1
+
+  syscon:
+    description: Phandle to SYSCON node, which contains UART control bits.
+    $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - syscon
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    serial@80000480 {
+        compatible = "cirrus,ep7209-uart";
+        reg = <0x80000480 0x80>;
+        interrupts = <12>, <13>;
+        clocks = <&clks 11>;
+        syscon = <&syscon1>;
+        cts-gpios = <&sysgpio 0 GPIO_ACTIVE_LOW>;
+        dsr-gpios = <&sysgpio 1 GPIO_ACTIVE_LOW>;
+        dcd-gpios = <&sysgpio 2 GPIO_ACTIVE_LOW>;
+    };
-- 
2.47.2


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

* Re: [PATCH] dt-bindings: serial: Convert cirrus,ep7209-uart to DT schema
  2025-05-06 22:00 [PATCH] dt-bindings: serial: Convert cirrus,ep7209-uart to DT schema Rob Herring (Arm)
@ 2025-05-07 13:56 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2025-05-07 13:56 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: Greg Kroah-Hartman, Jiri Slaby, Krzysztof Kozlowski, Conor Dooley,
	Alexander Shiyan, linux-kernel, linux-serial, devicetree

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

On Tue, May 06, 2025 at 05:00:19PM -0500, Rob Herring (Arm) wrote:
> Convert the Cirrus EP7209 UART binding to DT schema. There is no user of
> "cirrus,ep7312-uart" other than the example, so drop it. Drop the
> "aliases" node part as it is not relevant to the schema. The modem
> control GPIOs are covered by the serial.yaml schema and don't have to be
> listed in the schema.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
>  .../bindings/serial/cirrus,clps711x-uart.txt  | 31 ----------
>  .../bindings/serial/cirrus,ep7209-uart.yaml   | 56 +++++++++++++++++++
>  2 files changed, 56 insertions(+), 31 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/serial/cirrus,clps711x-uart.txt
>  create mode 100644 Documentation/devicetree/bindings/serial/cirrus,ep7209-uart.yaml

Reviewed-by: Thierry Reding <treding@nvidia.com>

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

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

end of thread, other threads:[~2025-05-07 13:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-06 22:00 [PATCH] dt-bindings: serial: Convert cirrus,ep7209-uart to DT schema Rob Herring (Arm)
2025-05-07 13:56 ` Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox