Skip to contentSkip to conversation

dt-bindings: serial: imx: Document optional DMA properties

PATCH Superseded Marek Vasut 2 participants 4 messages Feb 18, 2023 – Feb 19, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: serial: imx: Document optional DMA properties

The UART IP can be connected to DMA engine, document the properties in DT bindings. Update example to match Linux arch/arm/boot/dts/imx51.dtsi .

---
Cc: Fabio Estevam <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 .../devicetree/bindings/serial/fsl-imx-uart.yaml     | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml +12 -0
index 4cbe76e1715b7..c22aab8c55f83 100644
@@ -49,6 +49,16 @@ properties:
   reg:
     maxItems: 1
 
+  dmas:
+    items:
+      - description: DMA controller phandle and request line for RX
+      - description: DMA controller phandle and request line for TX
+
+  dma-names:
+    items:
+      - const: rx
+      - const: tx
+
   interrupts:
     maxItems: 1
 
@@ -100,6 +110,8 @@ examples:
         compatible = "fsl,imx51-uart", "fsl,imx21-uart";
         reg = <0x73fbc000 0x4000>;
         interrupts = <31>;
+        dmas = <&sdma 18 4 1>, <&sdma 19 4 2>;
+        dma-names = "rx", "tx";
         uart-has-rtscts;
         fsl,dte-mode;
     };
Signature · 1 line
2.39.1
#1 lore raw

PATCH 2/2 dt-bindings: serial: imx: Document mandatory clock properties

The UART IP must be connected to clock, document the properties in DT bindings. Update example to match Linux arch/arm/boot/dts/imx51.dtsi .

---
Cc: Fabio Estevam <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 .../bindings/serial/fsl-imx-uart.yaml         | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml +19 -0
index c22aab8c55f83..d42061331aba3 100644
@@ -49,6 +49,18 @@ properties:
   reg:
     maxItems: 1
 
+  assigned-clocks: true
+  assigned-clock-rates: true
+  assigned-clock-parents: true
+
+  clocks:
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: ipg
+      - const: per
+
   dmas:
     items:
       - description: DMA controller phandle and request line for RX
@@ -96,12 +108,16 @@ properties:
 required:
   - compatible
   - reg
+  - clocks
+  - clock-names
   - interrupts
 
 unevaluatedProperties: false
 
 examples:
   - |
+    #include <dt-bindings/clock/imx5-clock.h>
+
     aliases {
         serial0 = &uart1;
     };
@@ -110,6 +126,9 @@ examples:
         compatible = "fsl,imx51-uart", "fsl,imx21-uart";
         reg = <0x73fbc000 0x4000>;
         interrupts = <31>;
+        clocks = <&clks IMX5_CLK_UART1_IPG_GATE>,
+                 <&clks IMX5_CLK_UART1_PER_GATE>;
+        clock-names = "ipg", "per";
         dmas = <&sdma 18 4 1>, <&sdma 19 4 2>;
         dma-names = "rx", "tx";
         uart-has-rtscts;
Signature · 1 line
2.39.1
#2 lore raw

Re: [PATCH 2/2] dt-bindings: serial: imx: Document mandatory clock properties

Quoted 25 lines · Marek Vasut

The UART IP must be connected to clock, document the properties in DT bindings. Update example to match Linux arch/arm/boot/dts/imx51.dtsi .

---
Cc: Fabio Estevam <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 .../bindings/serial/fsl-imx-uart.yaml         | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml +0 -0
index c22aab8c55f83..d42061331aba3 100644

Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml properties: · line 54

Quoted 6 lines
Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml +3 -0
@@ -49,6 +49,18 @@ properties:
   reg:
     maxItems: 1
 
+  assigned-clocks: true
+  assigned-clock-rates: true
+  assigned-clock-parents: true

You shouldn't need these three.

Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml properties: · line 58

Quoted 4 lines
Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml +4 -0
+
+  clocks:
+    maxItems: 2
+

Best regards,
Krzysztof