diff mbox series

[v2] dt-bindings: serial: actions,owl-uart: convert to dtschema

Message ID 20240326085814.6343-1-kanakshilledar@gmail.com
State Superseded
Headers show
Series [v2] dt-bindings: serial: actions,owl-uart: convert to dtschema | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 2 warnings, 46 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Kanak Shilledar March 26, 2024, 8:58 a.m. UTC
From: Kanak Shilledar <kanakshilledar111@protonmail.com>

Convert the Actions Semi Owl UART to newer DT schema.
Created DT schema based on the .txt file which had
`compatible`, `reg` and `interrupts` as the required properties.
This binding is used by Actions S500 and S700 SoC.

Signed-off-by: Kanak Shilledar <kanakshilledar111@protonmail.com>
---
Changes in v2
- Added Clock property to fix the warning of `dts/actions/s700-cubieboard7.dtb: 
serial@e0126000: Unevaluated properties are not allowed 
('clocks' was unexpected)` thrown by `make dtbs_check`
- Changed the compatible identifier for having both the compatible names
earlier was throwing `owl-s500-cubieboard6.dtb: serial@b0120000: compatible:
['actions,s500-uart', 'actions,owl-uart'] is too long` warning.
- Updated commit message


 .../bindings/serial/actions,owl-uart.txt      | 16 -------
 .../bindings/serial/actions,owl-uart.yaml     | 46 +++++++++++++++++++
 2 files changed, 46 insertions(+), 16 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/serial/actions,owl-uart.txt
 create mode 100644 Documentation/devicetree/bindings/serial/actions,owl-uart.yaml

Comments

Krzysztof Kozlowski March 26, 2024, 9:15 a.m. UTC | #1
On 26/03/2024 09:58, Kanak Shilledar wrote:
> From: Kanak Shilledar <kanakshilledar111@protonmail.com>
> 
> Convert the Actions Semi Owl UART to newer DT schema.
> Created DT schema based on the .txt file which had
> `compatible`, `reg` and `interrupts` as the required properties.
> This binding is used by Actions S500 and S700 SoC.

Please mention changes from pure conversion. You added clocks.

> 
> Signed-off-by: Kanak Shilledar <kanakshilledar111@protonmail.com>
> ---
> Changes in v2
> - Added Clock property to fix the warning of `dts/actions/s700-cubieboard7.dtb: 
> serial@e0126000: Unevaluated properties are not allowed 
> ('clocks' was unexpected)` thrown by `make dtbs_check`
> - Changed the compatible identifier for having both the compatible names
> earlier was throwing `owl-s500-cubieboard6.dtb: serial@b0120000: compatible:
> ['actions,s500-uart', 'actions,owl-uart'] is too long` warning.
> - Updated commit message
> 

Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets.

> 
>  .../bindings/serial/actions,owl-uart.txt      | 16 -------
>  .../bindings/serial/actions,owl-uart.yaml     | 46 +++++++++++++++++++
>  2 files changed, 46 insertions(+), 16 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/serial/actions,owl-uart.txt
>  create mode 100644 Documentation/devicetree/bindings/serial/actions,owl-uart.yaml
> 

...

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    serial@b0126000 {
> +        compatible = "actions,s500-uart", "actions,owl-uart";
> +        reg = <0xb0126000 0x1000>;
> +        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;


Please extend the example and make it complete by adding clocks (based
on DTS).

With two changes above:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


---

This is an automated instruction, just in case, because many review tags
are being ignored. If you know the process, you can skip it (please do
not feel offended by me posting it here - no bad intentions intended).
If you do not know the process, here is a short explanation:

Please add Acked-by/Reviewed-by/Tested-by tags when posting new
versions, under or above your Signed-off-by tag. Tag is "received", when
provided in a message replied to you on the mailing list. Tools like b4
can help here. However, there's no need to repost patches *only* to add
the tags. The upstream maintainer will do that for tags received on the
version they apply.

https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577



Best regards,
Krzysztof
Krzysztof Kozlowski March 26, 2024, 11:31 a.m. UTC | #2
On 26/03/2024 10:15, Krzysztof Kozlowski wrote:
>>
>> Signed-off-by: Kanak Shilledar <kanakshilledar111@protonmail.com>
>> ---
>> Changes in v2
>> - Added Clock property to fix the warning of `dts/actions/s700-cubieboard7.dtb: 
>> serial@e0126000: Unevaluated properties are not allowed 
>> ('clocks' was unexpected)` thrown by `make dtbs_check`
>> - Changed the compatible identifier for having both the compatible names
>> earlier was throwing `owl-s500-cubieboard6.dtb: serial@b0120000: compatible:
>> ['actions,s500-uart', 'actions,owl-uart'] is too long` warning.
>> - Updated commit message
>>
> 
> Do not attach (thread) your patchsets to some other threads (unrelated
> or older versions). This buries them deep in the mailbox and might
> interfere with applying entire sets.

You ignored this comment.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/actions,owl-uart.txt b/Documentation/devicetree/bindings/serial/actions,owl-uart.txt
deleted file mode 100644
index aa873eada02d..000000000000
--- a/Documentation/devicetree/bindings/serial/actions,owl-uart.txt
+++ /dev/null
@@ -1,16 +0,0 @@ 
-Actions Semi Owl UART
-
-Required properties:
-- compatible :  "actions,s500-uart", "actions,owl-uart" for S500
-                "actions,s900-uart", "actions,owl-uart" for S900
-- reg        :  Offset and length of the register set for the device.
-- interrupts :  Should contain UART interrupt.
-
-
-Example:
-
-		uart3: serial@b0126000 {
-			compatible = "actions,s500-uart", "actions,owl-uart";
-			reg = <0xb0126000 0x1000>;
-			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-		};
diff --git a/Documentation/devicetree/bindings/serial/actions,owl-uart.yaml b/Documentation/devicetree/bindings/serial/actions,owl-uart.yaml
new file mode 100644
index 000000000000..095f299a851d
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/actions,owl-uart.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/actions,owl-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Actions Semi Owl UART
+
+maintainers:
+  - Kanak Shilledar <kanakshilledar111@protonmail.com>
+
+allOf:
+  - $ref: serial.yaml
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - actions,s500-uart
+          - actions,s900-uart
+      - const: actions,owl-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    serial@b0126000 {
+        compatible = "actions,s500-uart", "actions,owl-uart";
+        reg = <0xb0126000 0x1000>;
+        interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+    };