linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] dt-bindings: serial: Change to reference the kernel-defined serial.yaml
@ 2021-05-06 13:20 Zhen Lei
  2021-05-06 13:20 ` [PATCH v3 1/2] " Zhen Lei
  2021-05-06 13:20 ` [PATCH v3 2/2] dt-bindings: serial: Add label property in serial.yaml Zhen Lei
  0 siblings, 2 replies; 4+ messages in thread
From: Zhen Lei @ 2021-05-06 13:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Al Cooper, Palmer Dabbelt,
	Paul Walmsley, Maxime Coquelin, Alexandre Torgue, linux-serial,
	devicetree, linux-kernel, bcm-kernel-feedback-list, linux-riscv,
	linux-stm32, linux-arm-kernel
  Cc: Zhen Lei

v2 --> v3:
1) Change all references to "/schemas/serial.yaml" to references to "/schemas/serial/serial.yaml".
2) Change "additionalProperties" in file renesas,em-uart.yaml and st,stm32-uart.yaml to "unevaluatedProperties",
   Because they're currently referring to kernel-defined serial.yaml

v1 --> v2:
1) Change to reference the kernel-defined serial.yaml
2) Move the new added "label: true" into /schemas/serial/serial.yaml

Zhen Lei (2):
  dt-bindings: serial: Change to reference the kernel-defined
    serial.yaml
  dt-bindings: serial: Add label property in serial.yaml

 Documentation/devicetree/bindings/serial/8250.yaml            | 2 +-
 .../devicetree/bindings/serial/brcm,bcm7271-uart.yaml         | 2 +-
 Documentation/devicetree/bindings/serial/ingenic,uart.yaml    | 2 +-
 Documentation/devicetree/bindings/serial/pl011.yaml           | 4 ++--
 Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml | 4 ++--
 Documentation/devicetree/bindings/serial/renesas,em-uart.yaml | 2 +-
 Documentation/devicetree/bindings/serial/samsung_uart.yaml    | 2 +-
 Documentation/devicetree/bindings/serial/serial.yaml          | 2 ++
 Documentation/devicetree/bindings/serial/sifive-serial.yaml   | 4 ++--
 .../devicetree/bindings/serial/snps-dw-apb-uart.yaml          | 2 +-
 Documentation/devicetree/bindings/serial/st,stm32-uart.yaml   | 3 +--
 11 files changed, 15 insertions(+), 14 deletions(-)

-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 1/2] dt-bindings: serial: Change to reference the kernel-defined serial.yaml
  2021-05-06 13:20 [PATCH v3 0/2] dt-bindings: serial: Change to reference the kernel-defined serial.yaml Zhen Lei
@ 2021-05-06 13:20 ` Zhen Lei
  2021-05-07  1:14   ` Rob Herring
  2021-05-06 13:20 ` [PATCH v3 2/2] dt-bindings: serial: Add label property in serial.yaml Zhen Lei
  1 sibling, 1 reply; 4+ messages in thread
From: Zhen Lei @ 2021-05-06 13:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Al Cooper, Palmer Dabbelt,
	Paul Walmsley, Maxime Coquelin, Alexandre Torgue, linux-serial,
	devicetree, linux-kernel, bcm-kernel-feedback-list, linux-riscv,
	linux-stm32, linux-arm-kernel
  Cc: Zhen Lei

The /schemas/serial.yaml from dt-schema only has the property $nodename,
whereas the kernel-defined /schemas/serial/serial.yaml contains more
useful properties, support for more complex application scenarios.

For example:
1) The property "current-speed" in fsl-lx2160a.dtsi
2) The subnode "bluetooth" in hi3660-hikey960.dts

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/devicetree/bindings/serial/8250.yaml            | 2 +-
 .../devicetree/bindings/serial/brcm,bcm7271-uart.yaml         | 2 +-
 Documentation/devicetree/bindings/serial/ingenic,uart.yaml    | 2 +-
 Documentation/devicetree/bindings/serial/pl011.yaml           | 4 ++--
 Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml | 4 ++--
 Documentation/devicetree/bindings/serial/renesas,em-uart.yaml | 2 +-
 Documentation/devicetree/bindings/serial/samsung_uart.yaml    | 2 +-
 Documentation/devicetree/bindings/serial/sifive-serial.yaml   | 4 ++--
 .../devicetree/bindings/serial/snps-dw-apb-uart.yaml          | 2 +-
 Documentation/devicetree/bindings/serial/st,stm32-uart.yaml   | 3 +--
 10 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
index f0506a917793dde..1a849fc17181c8d 100644
--- a/Documentation/devicetree/bindings/serial/8250.yaml
+++ b/Documentation/devicetree/bindings/serial/8250.yaml
@@ -10,7 +10,7 @@ maintainers:
   - devicetree@vger.kernel.org
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
   - if:
       anyOf:
         - required:
diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
index 46c62745f901e2f..6d176588df47d84 100644
--- a/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml
@@ -10,7 +10,7 @@ maintainers:
   - Al Cooper <alcooperx@gmail.com>
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
 description: |+
   The Broadcom UART is based on the basic 8250 UART but with
diff --git a/Documentation/devicetree/bindings/serial/ingenic,uart.yaml b/Documentation/devicetree/bindings/serial/ingenic,uart.yaml
index 7748d8c3bab85b6..b432d4dff730b1f 100644
--- a/Documentation/devicetree/bindings/serial/ingenic,uart.yaml
+++ b/Documentation/devicetree/bindings/serial/ingenic,uart.yaml
@@ -10,7 +10,7 @@ maintainers:
   - Paul Cercueil <paul@crapouillou.net>
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
 properties:
   $nodename:
diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml
index 1f8e9f2644b6b80..142187337c765fa 100644
--- a/Documentation/devicetree/bindings/serial/pl011.yaml
+++ b/Documentation/devicetree/bindings/serial/pl011.yaml
@@ -10,7 +10,7 @@ maintainers:
   - Rob Herring <robh@kernel.org>
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
 # Need a custom select here or 'arm,primecell' will match on lots of nodes
 select:
@@ -103,7 +103,7 @@ dependencies:
   poll-rate-ms: [ auto-poll ]
   poll-timeout-ms: [ auto-poll ]
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml b/Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml
index a344369285b6aa9..a644e5af12b24ba 100644
--- a/Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml
@@ -10,7 +10,7 @@ maintainers:
   - Oleksij Rempel <o.rempel@pengutronix.de>
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
 properties:
   compatible:
@@ -35,7 +35,7 @@ required:
   - clocks
   - clock-names
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml b/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
index 82aefdb0d45e5f1..e98ec48fee46379 100644
--- a/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/renesas,em-uart.yaml
@@ -35,7 +35,7 @@ required:
   - clocks
   - clock-names
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
index 97ec8a093bf303e..0c24e7b1f15ec32 100644
--- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml
+++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml
@@ -82,7 +82,7 @@ required:
 unevaluatedProperties: false
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
   - if:
       properties:
diff --git a/Documentation/devicetree/bindings/serial/sifive-serial.yaml b/Documentation/devicetree/bindings/serial/sifive-serial.yaml
index 5fa94dacbba97b4..09aae43f65a7f4a 100644
--- a/Documentation/devicetree/bindings/serial/sifive-serial.yaml
+++ b/Documentation/devicetree/bindings/serial/sifive-serial.yaml
@@ -12,7 +12,7 @@ maintainers:
   - Palmer Dabbelt <palmer@sifive.com>
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
 properties:
   compatible:
@@ -49,7 +49,7 @@ required:
   - interrupts
   - clocks
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
index 87ef1e218152d1a..99d8888e88a9d18 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
@@ -10,7 +10,7 @@ maintainers:
   - Rob Herring <robh@kernel.org>
 
 allOf:
-  - $ref: /schemas/serial.yaml#
+  - $ref: serial.yaml#
 
 properties:
   compatible:
diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
index 71a6426bc558a1c..f50f4ca893a099d 100644
--- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml
@@ -112,8 +112,7 @@ required:
   - interrupts
   - clocks
 
-additionalProperties:
-  type: object
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 2/2] dt-bindings: serial: Add label property in serial.yaml
  2021-05-06 13:20 [PATCH v3 0/2] dt-bindings: serial: Change to reference the kernel-defined serial.yaml Zhen Lei
  2021-05-06 13:20 ` [PATCH v3 1/2] " Zhen Lei
@ 2021-05-06 13:20 ` Zhen Lei
  1 sibling, 0 replies; 4+ messages in thread
From: Zhen Lei @ 2021-05-06 13:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rob Herring, Al Cooper, Palmer Dabbelt,
	Paul Walmsley, Maxime Coquelin, Alexandre Torgue, linux-serial,
	devicetree, linux-kernel, bcm-kernel-feedback-list, linux-riscv,
	linux-stm32, linux-arm-kernel
  Cc: Zhen Lei

When there is more than one serial port present, the property 'label'
allows a custom name to be used for briefly describe the usage or position
of each serial port.

Without this "label" property, many dtbs_check warnings similar to the
following are reported:
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dt.yaml: \
serial@ffd74000: Additional properties are not allowed ('label' was unexpected)
        From schema: Documentation/devicetree/bindings/serial/pl011.yaml

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/serial/serial.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/serial/serial.yaml b/Documentation/devicetree/bindings/serial/serial.yaml
index 2fdf4ed198da781..c75ba3fb6465005 100644
--- a/Documentation/devicetree/bindings/serial/serial.yaml
+++ b/Documentation/devicetree/bindings/serial/serial.yaml
@@ -23,6 +23,8 @@ properties:
   $nodename:
     pattern: "^serial(@.*)?$"
 
+  label: true
+
   cts-gpios:
     maxItems: 1
     description:
-- 
2.26.0.106.g9fadedd



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 1/2] dt-bindings: serial: Change to reference the kernel-defined serial.yaml
  2021-05-06 13:20 ` [PATCH v3 1/2] " Zhen Lei
@ 2021-05-07  1:14   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-05-07  1:14 UTC (permalink / raw)
  To: Zhen Lei
  Cc: Greg Kroah-Hartman, linux-serial, linux-riscv, linux-stm32,
	Rob Herring, Al Cooper, Paul Walmsley, Maxime Coquelin,
	linux-arm-kernel, bcm-kernel-feedback-list, devicetree,
	Palmer Dabbelt, Alexandre Torgue, linux-kernel

On Thu, 06 May 2021 21:20:48 +0800, Zhen Lei wrote:
> The /schemas/serial.yaml from dt-schema only has the property $nodename,
> whereas the kernel-defined /schemas/serial/serial.yaml contains more
> useful properties, support for more complex application scenarios.
> 
> For example:
> 1) The property "current-speed" in fsl-lx2160a.dtsi
> 2) The subnode "bluetooth" in hi3660-hikey960.dts
> 
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
>  Documentation/devicetree/bindings/serial/8250.yaml            | 2 +-
>  .../devicetree/bindings/serial/brcm,bcm7271-uart.yaml         | 2 +-
>  Documentation/devicetree/bindings/serial/ingenic,uart.yaml    | 2 +-
>  Documentation/devicetree/bindings/serial/pl011.yaml           | 4 ++--
>  Documentation/devicetree/bindings/serial/qca,ar9330-uart.yaml | 4 ++--
>  Documentation/devicetree/bindings/serial/renesas,em-uart.yaml | 2 +-
>  Documentation/devicetree/bindings/serial/samsung_uart.yaml    | 2 +-
>  Documentation/devicetree/bindings/serial/sifive-serial.yaml   | 4 ++--
>  .../devicetree/bindings/serial/snps-dw-apb-uart.yaml          | 2 +-
>  Documentation/devicetree/bindings/serial/st,stm32-uart.yaml   | 3 +--
>  10 files changed, 13 insertions(+), 14 deletions(-)
> 

Thanks for doing this!

Reviewed-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-05-07  1:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-06 13:20 [PATCH v3 0/2] dt-bindings: serial: Change to reference the kernel-defined serial.yaml Zhen Lei
2021-05-06 13:20 ` [PATCH v3 1/2] " Zhen Lei
2021-05-07  1:14   ` Rob Herring
2021-05-06 13:20 ` [PATCH v3 2/2] dt-bindings: serial: Add label property in serial.yaml Zhen Lei

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