devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: serial: mxs: Fix compatible list
@ 2023-09-21  0:52 Fabio Estevam
  2023-09-21  9:14 ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2023-09-21  0:52 UTC (permalink / raw)
  To: gregkh
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
	linux-serial, Fabio Estevam

imx28.dtsi uses the following description:

compatible = "fsl,imx28-auart", "fsl,imx23-auart";

Make it valid so that the following schema warning could be avoided:

imx28-apx4devkit.dtb: serial@8006a000: compatible: ['fsl,imx28-auart', 'fsl,imx23-auart'] is too long
	from schema $id: http://devicetree.org/schemas/serial/fsl-mxs-auart.yaml#

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 .../devicetree/bindings/serial/fsl-mxs-auart.yaml   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
index 6a400a5e6fc7..da032effffe6 100644
--- a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
+++ b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
@@ -14,10 +14,13 @@ allOf:
 
 properties:
   compatible:
-    enum:
-      - fsl,imx23-auart
-      - fsl,imx28-auart
-      - alphascale,asm9260-auart
+    oneOf:
+      - const: fsl,imx23-auart
+      - const: alphascale,asm9260-auart
+      - items:
+          - enum:
+              - fsl,imx28-auart
+          - const: fsl,imx23-auart
 
   reg:
     maxItems: 1
@@ -82,7 +85,7 @@ examples:
     };
 
     auart0: serial@8006a000 {
-        compatible = "fsl,imx28-auart";
+        compatible = "fsl,imx28-auart", "fsl,imx23-auart";
         reg = <0x8006a000 0x2000>;
         interrupts = <112>;
         dmas = <&dma_apbx 8>, <&dma_apbx 9>;
-- 
2.34.1


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

* Re: [PATCH] dt-bindings: serial: mxs: Fix compatible list
  2023-09-21  0:52 [PATCH] dt-bindings: serial: mxs: Fix compatible list Fabio Estevam
@ 2023-09-21  9:14 ` Conor Dooley
  2023-09-21 12:53   ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2023-09-21  9:14 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: gregkh, robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
	linux-serial

[-- Attachment #1: Type: text/plain, Size: 1979 bytes --]

Yo,

On Wed, Sep 20, 2023 at 09:52:58PM -0300, Fabio Estevam wrote:
> imx28.dtsi uses the following description:
> 
> compatible = "fsl,imx28-auart", "fsl,imx23-auart";
> 
> Make it valid so that the following schema warning could be avoided:

Dumb question maybe, but it is not mentioned here - they are actually
compatible devices, right? I see that they have some different match
data in the driver (relating to some DMA erratum on the 23 seemingly),
so it's not immediately obvious to me.

Thanks,
Conor.

> 
> imx28-apx4devkit.dtb: serial@8006a000: compatible: ['fsl,imx28-auart', 'fsl,imx23-auart'] is too long
> 	from schema $id: http://devicetree.org/schemas/serial/fsl-mxs-auart.yaml#
> 
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  .../devicetree/bindings/serial/fsl-mxs-auart.yaml   | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
> index 6a400a5e6fc7..da032effffe6 100644
> --- a/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
> +++ b/Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml
> @@ -14,10 +14,13 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - fsl,imx23-auart
> -      - fsl,imx28-auart
> -      - alphascale,asm9260-auart
> +    oneOf:
> +      - const: fsl,imx23-auart
> +      - const: alphascale,asm9260-auart
> +      - items:
> +          - enum:
> +              - fsl,imx28-auart
> +          - const: fsl,imx23-auart
>  
>    reg:
>      maxItems: 1
> @@ -82,7 +85,7 @@ examples:
>      };
>  
>      auart0: serial@8006a000 {
> -        compatible = "fsl,imx28-auart";
> +        compatible = "fsl,imx28-auart", "fsl,imx23-auart";
>          reg = <0x8006a000 0x2000>;
>          interrupts = <112>;
>          dmas = <&dma_apbx 8>, <&dma_apbx 9>;
> -- 
> 2.34.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] dt-bindings: serial: mxs: Fix compatible list
  2023-09-21  9:14 ` Conor Dooley
@ 2023-09-21 12:53   ` Fabio Estevam
  2023-09-21 13:26     ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2023-09-21 12:53 UTC (permalink / raw)
  To: Conor Dooley
  Cc: gregkh, robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
	linux-serial

Hi Conor,

On Thu, Sep 21, 2023 at 6:14 AM Conor Dooley <conor@kernel.org> wrote:

> Dumb question maybe, but it is not mentioned here - they are actually
> compatible devices, right? I see that they have some different match
> data in the driver (relating to some DMA erratum on the 23 seemingly),
> so it's not immediately obvious to me.

That's correct.

imx23 and imx28 are SoCs from the same family (mxs) and they share the
same AUART block, so the same programming model.

imx23 is the first member of this family. It had an AUART erratum.
imx28 is the second member of this family and had this erratum fixed.

This means that using:

compatible = "fsl,imx28-auart", "fsl,imx23-auart";

is valid.

Would you like me to improve the commit log with the information above?

Please advise.

Thanks

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

* Re: [PATCH] dt-bindings: serial: mxs: Fix compatible list
  2023-09-21 12:53   ` Fabio Estevam
@ 2023-09-21 13:26     ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-09-21 13:26 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: gregkh, robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree,
	linux-serial

[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]

On Thu, Sep 21, 2023 at 09:53:44AM -0300, Fabio Estevam wrote:
> Hi Conor,
> 
> On Thu, Sep 21, 2023 at 6:14 AM Conor Dooley <conor@kernel.org> wrote:
> 
> > Dumb question maybe, but it is not mentioned here - they are actually
> > compatible devices, right? I see that they have some different match
> > data in the driver (relating to some DMA erratum on the 23 seemingly),
> > so it's not immediately obvious to me.
> 
> That's correct.
> 
> imx23 and imx28 are SoCs from the same family (mxs) and they share the
> same AUART block, so the same programming model.

Right. I wasn't sure if the erratum workaround would also work on the
28, but sounds like it does.

> imx23 is the first member of this family. It had an AUART erratum.
> imx28 is the second member of this family and had this erratum fixed.
> 
> This means that using:
> 
> compatible = "fsl,imx28-auart", "fsl,imx23-auart";
> 
> is valid.
> 
> Would you like me to improve the commit log with the information above?

Your call.
Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2023-09-21 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-21  0:52 [PATCH] dt-bindings: serial: mxs: Fix compatible list Fabio Estevam
2023-09-21  9:14 ` Conor Dooley
2023-09-21 12:53   ` Fabio Estevam
2023-09-21 13:26     ` Conor Dooley

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