* [PATCH] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema
@ 2021-08-19 13:48 Rafał Miłecki
2021-08-22 10:33 ` Florian Fainelli
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Rafał Miłecki @ 2021-08-19 13:48 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring
Cc: linux-serial, devicetree, bcm-kernel-feedback-list,
Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This helps validating DTS files.
In example periph_clk@0 was replaced with periph_clk to fix validation.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
I've verified this binding using the
make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
---
.../bindings/serial/brcm,bcm6345-uart.txt | 36 ------------
.../bindings/serial/brcm,bcm6345-uart.yaml | 57 +++++++++++++++++++
2 files changed, 57 insertions(+), 36 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
deleted file mode 100644
index 8b2b0460259a..000000000000
--- a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-* BCM63xx UART
-
-Required properties:
-
-- compatible: "brcm,bcm6345-uart"
-
-- reg: The base address of the UART register bank.
-
-- interrupts: A single interrupt specifier.
-
-- clocks: Clock driving the hardware; used to figure out the baud rate
- divisor.
-
-
-Optional properties:
-
-- clock-names: Should be "refclk".
-
-Example:
-
- uart0: serial@14e00520 {
- compatible = "brcm,bcm6345-uart";
- reg = <0x14e00520 0x18>;
- interrupt-parent = <&periph_intc>;
- interrupts = <2>;
- clocks = <&periph_clk>;
- clock-names = "refclk";
- };
-
- clocks {
- periph_clk: periph_clk@0 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <54000000>;
- };
- };
diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
new file mode 100644
index 000000000000..0d4d03fc58ba
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/brcm,bcm6345-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BCM63xx UART
+
+maintainers:
+ - Rafał Miłecki <rafal@milecki.pl>
+
+allOf:
+ - $ref: serial.yaml#
+
+properties:
+ compatible:
+ const: brcm,bcm6345-uart
+
+ reg:
+ maxItems: 1
+ description: The base address of the UART register bank
+
+ interrupts:
+ description: A single interrupt specifier
+
+ clocks:
+ description: >
+ Clock driving the hardware; used to figure out the baud rate divisor
+
+ clock-names:
+ const: refclk
+
+unevaluatedProperties: false
+
+required:
+ - reg
+ - interrupts
+ - clocks
+
+examples:
+ - |
+ serial@14e00520 {
+ compatible = "brcm,bcm6345-uart";
+ reg = <0x14e00520 0x18>;
+ interrupt-parent = <&periph_intc>;
+ interrupts = <2>;
+ clocks = <&periph_clk>;
+ clock-names = "refclk";
+ };
+
+ clocks {
+ periph_clk: periph_clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <54000000>;
+ };
+ };
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema
2021-08-19 13:48 [PATCH] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema Rafał Miłecki
@ 2021-08-22 10:33 ` Florian Fainelli
2021-08-24 14:27 ` Rob Herring
2021-08-29 13:19 ` [PATCH V2] " Rafał Miłecki
2 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2021-08-22 10:33 UTC (permalink / raw)
To: Rafał Miłecki, Greg Kroah-Hartman, Rob Herring
Cc: linux-serial, devicetree, bcm-kernel-feedback-list,
Rafał Miłecki
On 8/19/2021 3:48 PM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files.
>
> In example periph_clk@0 was replaced with periph_clk to fix validation.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema
2021-08-19 13:48 [PATCH] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema Rafał Miłecki
2021-08-22 10:33 ` Florian Fainelli
@ 2021-08-24 14:27 ` Rob Herring
2021-08-29 13:19 ` [PATCH V2] " Rafał Miłecki
2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-08-24 14:27 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Greg Kroah-Hartman, linux-serial, devicetree,
bcm-kernel-feedback-list, Rafał Miłecki
On Thu, Aug 19, 2021 at 03:48:59PM +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files.
>
> In example periph_clk@0 was replaced with periph_clk to fix validation.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> I've verified this binding using the
> make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
> ---
> .../bindings/serial/brcm,bcm6345-uart.txt | 36 ------------
> .../bindings/serial/brcm,bcm6345-uart.yaml | 57 +++++++++++++++++++
> 2 files changed, 57 insertions(+), 36 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
> create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
>
> diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
> deleted file mode 100644
> index 8b2b0460259a..000000000000
> --- a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -* BCM63xx UART
> -
> -Required properties:
> -
> -- compatible: "brcm,bcm6345-uart"
> -
> -- reg: The base address of the UART register bank.
> -
> -- interrupts: A single interrupt specifier.
> -
> -- clocks: Clock driving the hardware; used to figure out the baud rate
> - divisor.
> -
> -
> -Optional properties:
> -
> -- clock-names: Should be "refclk".
> -
> -Example:
> -
> - uart0: serial@14e00520 {
> - compatible = "brcm,bcm6345-uart";
> - reg = <0x14e00520 0x18>;
> - interrupt-parent = <&periph_intc>;
> - interrupts = <2>;
> - clocks = <&periph_clk>;
> - clock-names = "refclk";
> - };
> -
> - clocks {
> - periph_clk: periph_clk@0 {
> - compatible = "fixed-clock";
> - #clock-cells = <0>;
> - clock-frequency = <54000000>;
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
> new file mode 100644
> index 000000000000..0d4d03fc58ba
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
> @@ -0,0 +1,57 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/serial/brcm,bcm6345-uart.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: BCM63xx UART
> +
> +maintainers:
> + - Rafał Miłecki <rafal@milecki.pl>
> +
> +allOf:
> + - $ref: serial.yaml#
> +
> +properties:
> + compatible:
> + const: brcm,bcm6345-uart
> +
> + reg:
> + maxItems: 1
> + description: The base address of the UART register bank
Drop. Don't need generic descriptions.
> +
> + interrupts:
> + description: A single interrupt specifier
Replace with 'maxItems: 1'
> +
> + clocks:
> + description: >
> + Clock driving the hardware; used to figure out the baud rate divisor
Replace with 'maxItems: 1'
> +
> + clock-names:
> + const: refclk
> +
> +unevaluatedProperties: false
> +
> +required:
> + - reg
> + - interrupts
> + - clocks
> +
> +examples:
> + - |
> + serial@14e00520 {
> + compatible = "brcm,bcm6345-uart";
> + reg = <0x14e00520 0x18>;
> + interrupt-parent = <&periph_intc>;
> + interrupts = <2>;
> + clocks = <&periph_clk>;
> + clock-names = "refclk";
> + };
> +
> + clocks {
> + periph_clk: periph_clk {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <54000000>;
> + };
You don't need to show the clock provider (or any other) in examples.
> + };
> --
> 2.26.2
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V2] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema
2021-08-19 13:48 [PATCH] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema Rafał Miłecki
2021-08-22 10:33 ` Florian Fainelli
2021-08-24 14:27 ` Rob Herring
@ 2021-08-29 13:19 ` Rafał Miłecki
2021-08-30 15:10 ` Rob Herring
2 siblings, 1 reply; 5+ messages in thread
From: Rafał Miłecki @ 2021-08-29 13:19 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring
Cc: linux-serial, devicetree, bcm-kernel-feedback-list,
Rafał Miłecki, Florian Fainelli
From: Rafał Miłecki <rafal@milecki.pl>
This helps validating DTS files.
Redundant generic descriptions (e.g. "The base address of the UART
register bank") were dropped and periph_clk was dropped from example as
not required.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
.../bindings/serial/brcm,bcm6345-uart.txt | 36 --------------
.../bindings/serial/brcm,bcm6345-uart.yaml | 47 +++++++++++++++++++
2 files changed, 47 insertions(+), 36 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
deleted file mode 100644
index 8b2b0460259a..000000000000
--- a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-* BCM63xx UART
-
-Required properties:
-
-- compatible: "brcm,bcm6345-uart"
-
-- reg: The base address of the UART register bank.
-
-- interrupts: A single interrupt specifier.
-
-- clocks: Clock driving the hardware; used to figure out the baud rate
- divisor.
-
-
-Optional properties:
-
-- clock-names: Should be "refclk".
-
-Example:
-
- uart0: serial@14e00520 {
- compatible = "brcm,bcm6345-uart";
- reg = <0x14e00520 0x18>;
- interrupt-parent = <&periph_intc>;
- interrupts = <2>;
- clocks = <&periph_clk>;
- clock-names = "refclk";
- };
-
- clocks {
- periph_clk: periph_clk@0 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <54000000>;
- };
- };
diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
new file mode 100644
index 000000000000..a22285c43f80
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/brcm,bcm6345-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BCM63xx UART
+
+maintainers:
+ - Rafał Miłecki <rafal@milecki.pl>
+
+allOf:
+ - $ref: serial.yaml#
+
+properties:
+ compatible:
+ const: brcm,bcm6345-uart
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: refclk
+
+unevaluatedProperties: false
+
+required:
+ - reg
+ - interrupts
+ - clocks
+
+examples:
+ - |
+ serial@14e00520 {
+ compatible = "brcm,bcm6345-uart";
+ reg = <0x14e00520 0x18>;
+ interrupt-parent = <&periph_intc>;
+ interrupts = <2>;
+ clocks = <&periph_clk>;
+ clock-names = "refclk";
+ };
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V2] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema
2021-08-29 13:19 ` [PATCH V2] " Rafał Miłecki
@ 2021-08-30 15:10 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-08-30 15:10 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Greg Kroah-Hartman, open list:SERIAL DRIVERS, devicetree,
maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE,
Rafał Miłecki, Florian Fainelli
On Sun, Aug 29, 2021 at 8:19 AM Rafał Miłecki <zajec5@gmail.com> wrote:
>
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files.
>
> Redundant generic descriptions (e.g. "The base address of the UART
> register bank") were dropped and periph_clk was dropped from example as
> not required.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> .../bindings/serial/brcm,bcm6345-uart.txt | 36 --------------
> .../bindings/serial/brcm,bcm6345-uart.yaml | 47 +++++++++++++++++++
> 2 files changed, 47 insertions(+), 36 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.txt
> create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm6345-uart.yaml
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-30 15:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19 13:48 [PATCH] dt-bindings: serial: brcm,bcm6345-uart: convert to the json-schema Rafał Miłecki
2021-08-22 10:33 ` Florian Fainelli
2021-08-24 14:27 ` Rob Herring
2021-08-29 13:19 ` [PATCH V2] " Rafał Miłecki
2021-08-30 15:10 ` Rob Herring
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.