diff mbox series

[v11,4/5] dt-bindings: serial: document LiteUART bindings

Message ID 20200923120817.1667149-4-mholenko@antmicro.com
State New
Headers show
Series LiteX SoC controller and LiteUART serial driver | expand

Commit Message

Mateusz Holenko Sept. 23, 2020, 10:09 a.m. UTC
From: Filip Kokosinski <fkokosinski@antmicro.com>

Add documentation for LiteUART devicetree bindings.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---

Notes:
    No changes in v11.

    No changes in v10.

    No changes in v9.

    No changes in v8.

    No changes in v7.

    Changes in v6:
    - fixed license header

    No changes in v5.

    No changes in v4.

    Changes in v3:
    - added Reviewed-by tag
    - patch number changed from 3 to 4
    - removed changes in MAINTAINERS file (moved to patch #2)
    
    Changes in v2:
    - binding description rewritten to a yaml schema file
    - added interrupt line
    - fixed unit address
    - patch number changed from 2 to 3

 .../bindings/serial/litex,liteuart.yaml       | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/litex,liteuart.yaml

Comments

Geert Uytterhoeven Sept. 25, 2020, 1:16 p.m. UTC | #1
Hi Mateusz,

On Wed, Sep 23, 2020 at 12:10 PM Mateusz Holenko <mholenko@antmicro.com> wrote:
> From: Filip Kokosinski <fkokosinski@antmicro.com>

>

> Add documentation for LiteUART devicetree bindings.

>

> Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>

> Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>

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


Thanks for your patch!

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/serial/litex,liteuart.yaml

> @@ -0,0 +1,38 @@

> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

> +

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/serial/litex,liteuart.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: LiteUART serial controller

> +

> +maintainers:

> +  - Karol Gugala <kgugala@antmicro.com>

> +  - Mateusz Holenko <mholenko@antmicro.com>

> +

> +description: |

> +  LiteUART serial controller is a part of LiteX FPGA SoC builder. It supports


part of the

> +  multiple CPU architectures, currently including e.g. OpenRISC and RISC-V.

> +

> +properties:

> +  compatible:

> +    const: litex,liteuart


Have you already decided how to handle future LiteUART variants that add
new features (e.g. CTS/RTS, DMA)?


> +

> +  reg:

> +    maxItems: 1

> +

> +  interrupts:

> +    maxItems: 1

> +

> +required:

> +  - compatible

> +  - reg

> +

> +examples:

> +  - |

> +    uart0: serial@e0001800 {

> +      compatible = "litex,liteuart";

> +      reg = <0xe0001800 0x100>;

> +      interrupts = <2>;

> +    };

> --

> 2.25.1

>



--
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Mateusz Holenko Oct. 6, 2020, 7 a.m. UTC | #2
Hi Geert,

On Fri, Sep 25, 2020 at 3:16 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>

> Hi Mateusz,

>

> On Wed, Sep 23, 2020 at 12:10 PM Mateusz Holenko <mholenko@antmicro.com> wrote:

> > From: Filip Kokosinski <fkokosinski@antmicro.com>

> >

> > Add documentation for LiteUART devicetree bindings.

> >

> > Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>

> > Signed-off-by: Mateusz Holenko <mholenko@antmicro.com>

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

>

> Thanks for your patch!


Thanks for your review!

>

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/serial/litex,liteuart.yaml

> > @@ -0,0 +1,38 @@

> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

> > +

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/serial/litex,liteuart.yaml#

> > +$schema: http://devicetree.org/meta-schemas/core.yaml#

> > +

> > +title: LiteUART serial controller

> > +

> > +maintainers:

> > +  - Karol Gugala <kgugala@antmicro.com>

> > +  - Mateusz Holenko <mholenko@antmicro.com>

> > +

> > +description: |

> > +  LiteUART serial controller is a part of LiteX FPGA SoC builder. It supports

>

> part of the


Right, will fix that.

> > +  multiple CPU architectures, currently including e.g. OpenRISC and RISC-V.

> > +

> > +properties:

> > +  compatible:

> > +    const: litex,liteuart

>

> Have you already decided how to handle future LiteUART variants that add

> new features (e.g. CTS/RTS, DMA)?


We were thinking of adding KConfig options, like

[ ] LiteUART serial port support
< >     LiteUART DMA support

and using ifdefs in the code.

The other option could be to extend LiteX itself so that the UART core
provides information about its configuration via the capabilities register.
That way the driver could configure itself automatically at runtime.

This is, however, not decided yet.

>

> > +

> > +  reg:

> > +    maxItems: 1

> > +

> > +  interrupts:

> > +    maxItems: 1

> > +

> > +required:

> > +  - compatible

> > +  - reg

> > +

> > +examples:

> > +  - |

> > +    uart0: serial@e0001800 {

> > +      compatible = "litex,liteuart";

> > +      reg = <0xe0001800 0x100>;

> > +      interrupts = <2>;

> > +    };

> > --

> > 2.25.1

> >

>

>

> --

> Gr{oetje,eeting}s,

>

>                         Geert

>

> --

> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

>

> In personal conversations with technical people, I call myself a hacker. But

> when I'm talking to journalists I just say "programmer" or something like that.

>                                 -- Linus Torvalds


Best regards,
Mateusz


--
Mateusz Holenko
Antmicro Ltd | www.antmicro.com
Roosevelta 22, 60-829 Poznan, Poland
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/litex,liteuart.yaml b/Documentation/devicetree/bindings/serial/litex,liteuart.yaml
new file mode 100644
index 000000000000..69acb222bb57
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/litex,liteuart.yaml
@@ -0,0 +1,38 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/serial/litex,liteuart.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LiteUART serial controller
+
+maintainers:
+  - Karol Gugala <kgugala@antmicro.com>
+  - Mateusz Holenko <mholenko@antmicro.com>
+
+description: |
+  LiteUART serial controller is a part of LiteX FPGA SoC builder. It supports
+  multiple CPU architectures, currently including e.g. OpenRISC and RISC-V.
+
+properties:
+  compatible:
+    const: litex,liteuart
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    uart0: serial@e0001800 {
+      compatible = "litex,liteuart";
+      reg = <0xe0001800 0x100>;
+      interrupts = <2>;
+    };