[PATCH 1/7] dt-bindings: serial: add binding documentation for TI PRUSS UART

Judith Mendez posted 7 patches 9 months ago
[PATCH 1/7] dt-bindings: serial: add binding documentation for TI PRUSS UART
Posted by Judith Mendez 9 months ago
From: Bin Liu <b-liu@ti.com>

This adds the YAML DT binding for PRUSS UART on TI SoCs.

Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
---
 .../bindings/serial/ti,pruss-uart.yaml        | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml

diff --git a/Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml b/Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml
new file mode 100644
index 000000000000..34a03d572333
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/ti,pruss-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI PRUSS serial UART
+
+maintainers:
+  - Bin Liu <b-liu@ti.com>
+
+description: |
+  The PRU subsystem has a serial UART peripheral based on the industry
+  standard TL16C550, with 16-byte TX/RX FIFOs.
+
+allOf:
+  - $ref: /schemas/serial.yaml#
+
+properties:
+  compatible:
+    items:
+      - const: ti,pruss-uart
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+    description: |
+      PRU UART interrupt mappings, containing an entry of 3 cell-values.
+      The first is the PRU System Event ID for PRU UART Interrupt Request.
+      The second is the PRU interrupt channel ID.
+      The third is the PRU host interrupt ID.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    pruss_uart: serial@28000 {
+        compatible = "ti,pruss-uart";
+        reg = <0x28000 0x40>;
+        clocks = <&k3_clks 81 13>;
+        interrupt-parent = <&pruss_intc>;
+        interrupts = <6 4 4>;
+    };
-- 
2.49.0
Re: [PATCH 1/7] dt-bindings: serial: add binding documentation for TI PRUSS UART
Posted by Krzysztof Kozlowski 9 months ago
On 13/05/2025 23:59, Judith Mendez wrote:
> From: Bin Liu <b-liu@ti.com>
> 
> This adds the YAML DT binding for PRUSS UART on TI SoCs.

Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

A nit, subject: drop second/last, redundant "binding documentation for".
The "dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18


> 
> Signed-off-by: Bin Liu <b-liu@ti.com>
> Signed-off-by: Judith Mendez <jm@ti.com>
> ---
>  .../bindings/serial/ti,pruss-uart.yaml        | 54 +++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml
> 
> diff --git a/Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml b/Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml
> new file mode 100644
> index 000000000000..34a03d572333
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/ti,pruss-uart.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/serial/ti,pruss-uart.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI PRUSS serial UART
> +
> +maintainers:
> +  - Bin Liu <b-liu@ti.com>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> +  The PRU subsystem has a serial UART peripheral based on the industry
> +  standard TL16C550, with 16-byte TX/RX FIFOs.
> +
> +allOf:
> +  - $ref: /schemas/serial.yaml#

Wrong schema. From which file did you take such syntax?

> +
> +properties:
> +  compatible:
> +    items:

You can drop items here.

> +      - const: ti,pruss-uart

Why this isn't SoC compatible?

> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +    description: |
> +      PRU UART interrupt mappings, containing an entry of 3 cell-values.
> +      The first is the PRU System Event ID for PRU UART Interrupt Request.
> +      The second is the PRU interrupt channel ID.
> +      The third is the PRU host interrupt ID.

I do not understand how this description is related to the property.
What if I use cells=1 or cells=4? Binding becomes wrong? Drop.

> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    pruss_uart: serial@28000 {

Drop unused label


Best regards,
Krzysztof