devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: serial: arm,sbsa-uart: Convert to json-schema
@ 2022-11-04 10:43 Thierry Reding
  2022-11-04 14:25 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2022-11-04 10:43 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, devicetree, linux-serial

From: Thierry Reding <treding@nvidia.com>

Convert the ARM SBSA UART device tree bindings from the free-form text
format to json-schema.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 .../bindings/serial/arm,sbsa-uart.yaml        | 37 +++++++++++++++++++
 .../bindings/serial/arm_sbsa_uart.txt         | 10 -----
 2 files changed, 37 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
 delete mode 100644 Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt

diff --git a/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml b/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
new file mode 100644
index 000000000000..afaa1ef7f2e6
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/arm,sbsa-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM SBSA defined generic UART
+
+maintainers:
+  - Rob Herring <robh@kernel.org>
+  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+description:
+  This UART uses a subset of the PL011 registers and consequently lives
+  in the PL011 driver. It's baudrate and other communication parameters
+  cannot be adjusted at runtime, so it lacks a clock specifier here.
+
+properties:
+  compatible:
+    const: arm,sbsa-uart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+allOf:
+  - $ref: serial.yaml
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+...
diff --git a/Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt b/Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt
deleted file mode 100644
index 4163e7eb7763..000000000000
--- a/Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-* ARM SBSA defined generic UART
-This UART uses a subset of the PL011 registers and consequently lives
-in the PL011 driver. It's baudrate and other communication parameters
-cannot be adjusted at runtime, so it lacks a clock specifier here.
-
-Required properties:
-- compatible: must be "arm,sbsa-uart"
-- reg: exactly one register range
-- interrupts: exactly one interrupt specifier
-- current-speed: the (fixed) baud rate set by the firmware
-- 
2.38.1


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

* Re: [PATCH] dt-bindings: serial: arm,sbsa-uart: Convert to json-schema
  2022-11-04 10:43 [PATCH] dt-bindings: serial: arm,sbsa-uart: Convert to json-schema Thierry Reding
@ 2022-11-04 14:25 ` Krzysztof Kozlowski
  2022-11-07 20:27   ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-04 14:25 UTC (permalink / raw)
  To: Thierry Reding, Rob Herring, Krzysztof Kozlowski
  Cc: Greg Kroah-Hartman, devicetree, linux-serial

On 04/11/2022 06:43, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Convert the ARM SBSA UART device tree bindings from the free-form text
> format to json-schema.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  .../bindings/serial/arm,sbsa-uart.yaml        | 37 +++++++++++++++++++
>  .../bindings/serial/arm_sbsa_uart.txt         | 10 -----
>  2 files changed, 37 insertions(+), 10 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
>  delete mode 100644 Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt
> 
> diff --git a/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml b/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
> new file mode 100644
> index 000000000000..afaa1ef7f2e6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
> @@ -0,0 +1,37 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/serial/arm,sbsa-uart.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ARM SBSA defined generic UART
> +
> +maintainers:
> +  - Rob Herring <robh@kernel.org>
> +  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This shouldn't be Greg but someone nothing the hardware. Rob might work,
but maybe also Russell who is mentioned in maintainers entry?

Please resend with him cced.

> +
> +description:
> +  This UART uses a subset of the PL011 registers and consequently lives
> +  in the PL011 driver. It's baudrate and other communication parameters
> +  cannot be adjusted at runtime, so it lacks a clock specifier here.
> +
> +properties:
> +  compatible:
> +    const: arm,sbsa-uart
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +allOf:
> +  - $ref: serial.yaml
> +
> +unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +...

Example would be nice, although it  is not a requirement.


Best regards,
Krzysztof


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

* Re: [PATCH] dt-bindings: serial: arm,sbsa-uart: Convert to json-schema
  2022-11-04 14:25 ` Krzysztof Kozlowski
@ 2022-11-07 20:27   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-11-07 20:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Thierry Reding
  Cc: Krzysztof Kozlowski, Greg Kroah-Hartman, devicetree, linux-serial

On Fri, Nov 04, 2022 at 10:25:42AM -0400, Krzysztof Kozlowski wrote:
> On 04/11/2022 06:43, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > Convert the ARM SBSA UART device tree bindings from the free-form text
> > format to json-schema.
> > 
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> >  .../bindings/serial/arm,sbsa-uart.yaml        | 37 +++++++++++++++++++
> >  .../bindings/serial/arm_sbsa_uart.txt         | 10 -----
> >  2 files changed, 37 insertions(+), 10 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/serial/arm_sbsa_uart.txt

Note that NXP LS2160a has a warning with this. The warning is correct 
because both PL011 and SBSA UART is wrong IMO. The question is which one 
is it really. I would assume someone went with SBSA for some reason. The 
pl011 compatible should be ignored given 'arm,primecell' is missing.


> > diff --git a/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml b/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
> > new file mode 100644
> > index 000000000000..afaa1ef7f2e6
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/serial/arm,sbsa-uart.yaml
> > @@ -0,0 +1,37 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/serial/arm,sbsa-uart.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ARM SBSA defined generic UART
> > +
> > +maintainers:
> > +  - Rob Herring <robh@kernel.org>
> > +  - Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> This shouldn't be Greg but someone nothing the hardware. Rob might work,
> but maybe also Russell who is mentioned in maintainers entry?

I'm fine with it given I already have pl011 binding.


> Please resend with him cced.
> 
> > +
> > +description:
> > +  This UART uses a subset of the PL011 registers and consequently lives
> > +  in the PL011 driver. It's baudrate and other communication parameters
> > +  cannot be adjusted at runtime, so it lacks a clock specifier here.

Differences to PL011 are relavent, but location of the (Linux) driver is 
not.

> > +
> > +properties:
> > +  compatible:
> > +    const: arm,sbsa-uart
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +allOf:
> > +  - $ref: serial.yaml
> > +
> > +unevaluatedProperties: false
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - interrupts
> > +...
> 
> Example would be nice, although it  is not a requirement.
> 
> 
> Best regards,
> Krzysztof
> 
> 

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

end of thread, other threads:[~2022-11-07 20:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04 10:43 [PATCH] dt-bindings: serial: arm,sbsa-uart: Convert to json-schema Thierry Reding
2022-11-04 14:25 ` Krzysztof Kozlowski
2022-11-07 20:27   ` Rob Herring

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