diff mbox series

[4/6] dt-bindings: serial: amlogic, meson-uart: support T7

Message ID 20230615182938.18487-5-tanure@linux.com (mailing list archive)
State Superseded
Headers show
Series Add Amlogic A311D2 and Khadas Vim4 Board Support | expand

Commit Message

Lucas Tanure June 15, 2023, 6:29 p.m. UTC
Add serial bindings support menson T7 SoC family.

Signed-off-by: Lucas Tanure <tanure@linux.com>
---
 Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml | 1 +
 1 file changed, 1 insertion(+)

--
2.41.0

Comments

Conor Dooley June 15, 2023, 9:25 p.m. UTC | #1
On Thu, Jun 15, 2023 at 07:29:36PM +0100, Lucas Tanure wrote:
> Add serial bindings support menson T7 SoC family.
> 
> Signed-off-by: Lucas Tanure <tanure@linux.com>
> ---
>  Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> index 01ec45b3b406..01b01f8840ea 100644
> --- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> +++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> @@ -46,6 +46,7 @@ properties:
>            - amlogic,meson8b-uart
>            - amlogic,meson-gx-uart
>            - amlogic,meson-s4-uart
> +          - amlogic,meson-t7-uart

| diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
| index 2501db5a7aaf..0208f9a6ba7e 100644
| --- a/drivers/tty/serial/meson_uart.c
| +++ b/drivers/tty/serial/meson_uart.c
| @@ -796,6 +796,10 @@ static const struct of_device_id meson_uart_dt_match[] = {
|                 .compatible = "amlogic,meson-s4-uart",
|                 .data = (void *)&meson_g12a_uart_data,
|         },
| +       {
| +               .compatible = "amlogic,meson-t7-uart",
| +               .data = (void *)&meson_g12a_uart_data,
| +       },
|         { /* sentinel */ },
|  };
|  MODULE_DEVICE_TABLE(of, meson_uart_dt_match);

You're adding another element to this enum, but the driver change
implies compatibility with the s4 uart. Should you not set this up with
fallback compatibles?

Cheers,
Conor.

>        - description: Everything-Else power domain UART controller on G12A SoCs
>          items:
>            - const: amlogic,meson-g12a-uart
> --
> 2.41.0
>
Lucas Tanure June 18, 2023, 5:37 p.m. UTC | #2
On Thu, Jun 15, 2023 at 10:25 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Thu, Jun 15, 2023 at 07:29:36PM +0100, Lucas Tanure wrote:
> > Add serial bindings support menson T7 SoC family.
> >
> > Signed-off-by: Lucas Tanure <tanure@linux.com>
> > ---
> >  Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> > index 01ec45b3b406..01b01f8840ea 100644
> > --- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> > +++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> > @@ -46,6 +46,7 @@ properties:
> >            - amlogic,meson8b-uart
> >            - amlogic,meson-gx-uart
> >            - amlogic,meson-s4-uart
> > +          - amlogic,meson-t7-uart
>
> | diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
> | index 2501db5a7aaf..0208f9a6ba7e 100644
> | --- a/drivers/tty/serial/meson_uart.c
> | +++ b/drivers/tty/serial/meson_uart.c
> | @@ -796,6 +796,10 @@ static const struct of_device_id meson_uart_dt_match[] = {
> |                 .compatible = "amlogic,meson-s4-uart",
> |                 .data = (void *)&meson_g12a_uart_data,
> |         },
> | +       {
> | +               .compatible = "amlogic,meson-t7-uart",
> | +               .data = (void *)&meson_g12a_uart_data,
> | +       },
> |         { /* sentinel */ },
> |  };
> |  MODULE_DEVICE_TABLE(of, meson_uart_dt_match);
>
> You're adding another element to this enum, but the driver change
> implies compatibility with the s4 uart. Should you not set this up with
> fallback compatibles?

I will drop this patch and use the s4 and g12a compatible strings.

>
> Cheers,
> Conor.
>
> >        - description: Everything-Else power domain UART controller on G12A SoCs
> >          items:
> >            - const: amlogic,meson-g12a-uart
> > --
> > 2.41.0
> >
Conor Dooley June 18, 2023, 7:18 p.m. UTC | #3
On Sun, Jun 18, 2023 at 06:37:40PM +0100, Lucas Tanure wrote:
> On Thu, Jun 15, 2023 at 10:25 PM Conor Dooley <conor@kernel.org> wrote:
> >
> > On Thu, Jun 15, 2023 at 07:29:36PM +0100, Lucas Tanure wrote:
> > > Add serial bindings support menson T7 SoC family.
> > >
> > > Signed-off-by: Lucas Tanure <tanure@linux.com>
> > > ---
> > >  Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> > > index 01ec45b3b406..01b01f8840ea 100644
> > > --- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> > > +++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
> > > @@ -46,6 +46,7 @@ properties:
> > >            - amlogic,meson8b-uart
> > >            - amlogic,meson-gx-uart
> > >            - amlogic,meson-s4-uart
> > > +          - amlogic,meson-t7-uart
> >
> > | diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
> > | index 2501db5a7aaf..0208f9a6ba7e 100644
> > | --- a/drivers/tty/serial/meson_uart.c
> > | +++ b/drivers/tty/serial/meson_uart.c
> > | @@ -796,6 +796,10 @@ static const struct of_device_id meson_uart_dt_match[] = {
> > |                 .compatible = "amlogic,meson-s4-uart",
> > |                 .data = (void *)&meson_g12a_uart_data,
> > |         },
> > | +       {
> > | +               .compatible = "amlogic,meson-t7-uart",
> > | +               .data = (void *)&meson_g12a_uart_data,
> > | +       },
> > |         { /* sentinel */ },
> > |  };
> > |  MODULE_DEVICE_TABLE(of, meson_uart_dt_match);
> >
> > You're adding another element to this enum, but the driver change
> > implies compatibility with the s4 uart. Should you not set this up with
> > fallback compatibles?
> 
> I will drop this patch and use the s4 and g12a compatible strings.

You still need to add a compatible for the t7, just let it fall back to
one of the others. Eg:
compatible = "amlogic,meson-t7-uart", "amlogic,meson-s4-uart";

Cheers,
Conor.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
index 01ec45b3b406..01b01f8840ea 100644
--- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
@@ -46,6 +46,7 @@  properties:
           - amlogic,meson8b-uart
           - amlogic,meson-gx-uart
           - amlogic,meson-s4-uart
+          - amlogic,meson-t7-uart
       - description: Everything-Else power domain UART controller on G12A SoCs
         items:
           - const: amlogic,meson-g12a-uart