2023-09-13 21:16:27

by Max Filippov

[permalink] [raw]
Subject: [PATCH 1/4] dt-bindings: serial: document esp32-uart bindings

Add documentation for the ESP32xx UART controllers.

Signed-off-by: Max Filippov <[email protected]>
---
.../bindings/serial/esp,esp32-uart.yaml | 48 +++++++++++++++++++
1 file changed, 48 insertions(+)
create mode 100644 Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml

diff --git a/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
new file mode 100644
index 000000000000..8b45ef808107
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/esp,esp32-uart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ESP32 UART controller
+
+maintainers:
+ - Max Filippov <[email protected]>
+
+description: |
+ ESP32 UART controller is a part of ESP32 SoC series.
+
+properties:
+ compatible:
+ oneOf:
+ - description: UART controller for the ESP32 SoC
+ const: esp,esp32-uart
+ - description: UART controller for the ESP32S3 SoC
+ const: esp,esp32s3-uart
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ serial0: serial@60000000 {
+ compatible = "esp,esp32s3-uart";
+ reg = <0x60000000 0x80>;
+ interrupts = <27 1 0>;
+ clocks = <&serial_clk>;
+ };
--
2.30.2


2023-09-14 06:59:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: serial: document esp32-uart bindings

On 13/09/2023 23:14, Max Filippov wrote:
> Add documentation for the ESP32xx UART controllers.
>
> Signed-off-by: Max Filippov <[email protected]>
> ---
> .../bindings/serial/esp,esp32-uart.yaml | 48 +++++++++++++++++++
> 1 file changed, 48 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
>
> diff --git a/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> new file mode 100644
> index 000000000000..8b45ef808107
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> @@ -0,0 +1,48 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/serial/esp,esp32-uart.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ESP32 UART controller
> +
> +maintainers:
> + - Max Filippov <[email protected]>
> +
> +description: |

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

> + ESP32 UART controller is a part of ESP32 SoC series.
> +
> +properties:
> + compatible:
> + oneOf:

That's just enum. Your descriptions are useless - tell nothing - so drop
them.

> + - description: UART controller for the ESP32 SoC
> + const: esp,esp32-uart

Looks quite generic, so just to be sure? This is not a family name,
right? Neither family names nor wildcards are allowed.

> + - description: UART controller for the ESP32S3 SoC
> + const: esp,esp32s3-uart
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + serial0: serial@60000000 {

Drop unused label.

> + compatible = "esp,esp32s3-uart";

Use 4 spaces for example indentation.

> + reg = <0x60000000 0x80>;
> + interrupts = <27 1 0>;

Use proper define for IRQ flags.

> + clocks = <&serial_clk>;
> + };

Best regards,
Krzysztof

2023-09-14 07:19:07

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: serial: document esp32-uart bindings

On 13/09/2023 23:14, Max Filippov wrote:
> Add documentation for the ESP32xx UART controllers.
>
> Signed-off-by: Max Filippov <[email protected]>
> ---
> .../bindings/serial/esp,esp32-uart.yaml | 48 +++++++++++++++++++
> 1 file changed, 48 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
>
> diff --git a/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> new file mode 100644
> index 000000000000..8b45ef808107
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> @@ -0,0 +1,48 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/serial/esp,esp32-uart.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ESP32 UART controller
> +
> +maintainers:
> + - Max Filippov <[email protected]>
> +
> +description: |
> + ESP32 UART controller is a part of ESP32 SoC series.

1. Company name?
2. ESP32 SoC series suggests esp32 is a series.

> +
> +properties:
> + compatible:
> + oneOf:
> + - description: UART controller for the ESP32 SoC
> + const: esp,esp32-uart

Also, the vendor prefix looks incorrect, so again - what is the company
name?

Best regards,
Krzysztof

2023-09-14 22:45:12

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: serial: document esp32-uart bindings

On Thu, Sep 14, 2023 at 07:55:35AM +0200, Krzysztof Kozlowski wrote:
> On 13/09/2023 23:14, Max Filippov wrote:
> > Add documentation for the ESP32xx UART controllers.
> >
> > Signed-off-by: Max Filippov <[email protected]>
> > ---
> > .../bindings/serial/esp,esp32-uart.yaml | 48 +++++++++++++++++++
> > 1 file changed, 48 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> > new file mode 100644
> > index 000000000000..8b45ef808107
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> > @@ -0,0 +1,48 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/serial/esp,esp32-uart.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ESP32 UART controller
> > +
> > +maintainers:
> > + - Max Filippov <[email protected]>
> > +
> > +description: |
> > + ESP32 UART controller is a part of ESP32 SoC series.
>
> 1. Company name?
> 2. ESP32 SoC series suggests esp32 is a series.
>
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - description: UART controller for the ESP32 SoC
> > + const: esp,esp32-uart
>
> Also, the vendor prefix looks incorrect, so again - what is the company
> name?

esp32 is made by expressif, which would match with "esp" as a vendor
prefix.



Attachments:
(No filename) (1.57 kB)
signature.asc (235.00 B)
Download all attachments

2023-09-15 05:50:53

by Max Filippov

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: serial: document esp32-uart bindings

On Thu, Sep 14, 2023 at 7:48 AM Conor Dooley <[email protected]> wrote:
> On Thu, Sep 14, 2023 at 07:55:35AM +0200, Krzysztof Kozlowski wrote:
> > On 13/09/2023 23:14, Max Filippov wrote:
> > > +description: |
> > > + ESP32 UART controller is a part of ESP32 SoC series.
> >
> > 1. Company name?
> > 2. ESP32 SoC series suggests esp32 is a series.
> >
> > > +
> > > +properties:
> > > + compatible:
> > > + oneOf:
> > > + - description: UART controller for the ESP32 SoC
> > > + const: esp,esp32-uart
> >
> > Also, the vendor prefix looks incorrect, so again - what is the company
> > name?
>
> esp32 is made by expressif, which would match with "esp" as a vendor
> prefix.

It's 'Espressif', but otherwise yes, this is a registered vendor prefix. See
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/vendor-prefixes.yaml?h=v6.6-rc1#n443

--
Thanks.
-- Max

2023-09-15 09:02:28

by Max Filippov

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: serial: document esp32-uart bindings

On Wed, Sep 13, 2023 at 10:54 PM Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 13/09/2023 23:14, Max Filippov wrote:
> > Add documentation for the ESP32xx UART controllers.
> >
> > Signed-off-by: Max Filippov <[email protected]>
> > ---
> > .../bindings/serial/esp,esp32-uart.yaml | 48 +++++++++++++++++++
> > 1 file changed, 48 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> > new file mode 100644
> > index 000000000000..8b45ef808107
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/serial/esp,esp32-uart.yaml
> > @@ -0,0 +1,48 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/serial/esp,esp32-uart.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ESP32 UART controller
> > +
> > +maintainers:
> > + - Max Filippov <[email protected]>
> > +
> > +description: |
>
> Do not need '|' unless you need to preserve formatting.

Ok.

> > + ESP32 UART controller is a part of ESP32 SoC series.
> > +
> > +properties:
> > + compatible:
> > + oneOf:
>
> That's just enum. Your descriptions are useless - tell nothing - so drop
> them.

Ok.

> > + - description: UART controller for the ESP32 SoC
> > + const: esp,esp32-uart
>
> Looks quite generic, so just to be sure? This is not a family name,
> right? Neither family names nor wildcards are allowed.

ESP32 is the official name of a specific SoC. More recent SoC models of
that family are named ESP32-S2 and ESP32-S3, sometimes they are
collectively referred to as the 'ESP32 series'. In this binding 'esp32' is used
for the ESP32 SoC and 'esp32s3' is used for the ESP32-S3.

> > + - description: UART controller for the ESP32S3 SoC
> > + const: esp,esp32s3-uart
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + clocks:
> > + maxItems: 1
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + serial0: serial@60000000 {
>
> Drop unused label.

Ok.

> > + compatible = "esp,esp32s3-uart";
>
> Use 4 spaces for example indentation.

Ok.

> > + reg = <0x60000000 0x80>;
> > + interrupts = <27 1 0>;
>
> Use proper define for IRQ flags.

These are not IRQ flags. 1 and 0 are the routing parts
of the IRQ specification.

--
Thanks.
-- Max