Skip to contentSkip to conversation

dt-bindings: serial: mxs: Fix compatible list

PATCH Superseded Fabio Estevam 2 participants 4 messages Sep 21, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 dt-bindings: serial: mxs: Fix compatible list

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#

---
 .../devicetree/bindings/serial/fsl-mxs-auart.yaml   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml +8 -5
index 6a400a5e6fc7..da032effffe6 100644
@@ -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>;
Signature · 1 line
2.34.1
#1 lore raw

Yo,

Quoted 5 lines · 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:

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.

Quoted 43 lines

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#

---
 .../devicetree/bindings/serial/fsl-mxs-auart.yaml   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/serial/fsl-mxs-auart.yaml +8 -5
index 6a400a5e6fc7..da032effffe6 100644
@@ -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>;
Signature · 1 line
2.34.1
author reviewer
#2 lore raw

Hi Conor,

Quoted 4 lines · Conor Dooley

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

Acked-by
#3 lore raw
Quoted 9 lines · Fabio Estevam

Hi Conor,

Quoted 4 lines · Conor Dooley

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.

Quoted 4 lines

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.

Quoted 10 lines

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.

Thanks,
Conor.