Skip to contentSkip to conversation

arm64: dts: imx8mq: Swap SAI DMA order

PATCH In review Marek Vasut 2 participants 4 messages Nov 3, 2022 – Nov 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm64: dts: imx8mq: Swap SAI DMA order

Swap the SAI dmas and dma-names to match the order documented in Documentation/devicetree/bindings/sound/fsl-sai.txt using the following regex:

"
s@\(dma[^=]\+= \)\([^,]\+\), \([^;]\+\);@\1\3, \2; "

No functional change.

---
Cc: Adam Ford <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Joakim Zhang <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Markus Niebel <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Tim Harvey <[email protected]>
Cc: [email protected]
To: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/freescale/imx8mq.dtsi +8 -8
index c47e2d7235d3e..f00b040ca03e9 100644
@@ -345,8 +345,8 @@ sai1: sai@30010000 {
 				         <&clk IMX8MQ_CLK_SAI1_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_CLK_DUMMY>;
 				clock-names = "bus", "mclk1", "mclk2", "mclk3";
-				dmas = <&sdma2 8 24 0>, <&sdma1 9 24 0>;
-				dma-names = "rx", "tx";
+				dmas = <&sdma1 9 24 0>, <&sdma2 8 24 0>;
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};
 
@@ -359,8 +359,8 @@ sai6: sai@30030000 {
 				         <&clk IMX8MQ_CLK_SAI6_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_CLK_DUMMY>;
 				clock-names = "bus", "mclk1", "mclk2", "mclk3";
-				dmas = <&sdma2 4 24 0>, <&sdma2 5 24 0>;
-				dma-names = "rx", "tx";
+				dmas = <&sdma2 5 24 0>, <&sdma2 4 24 0>;
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};
 
@@ -373,8 +373,8 @@ sai5: sai@30040000 {
 				         <&clk IMX8MQ_CLK_SAI5_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_CLK_DUMMY>;
 				clock-names = "bus", "mclk1", "mclk2", "mclk3";
-				dmas = <&sdma2 2 24 0>, <&sdma2 3 24 0>;
-				dma-names = "rx", "tx";
+				dmas = <&sdma2 3 24 0>, <&sdma2 2 24 0>;
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};
 
@@ -387,8 +387,8 @@ sai4: sai@30050000 {
 				         <&clk IMX8MQ_CLK_SAI4_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, <&clk IMX8MQ_CLK_DUMMY>;
 				clock-names = "bus", "mclk1", "mclk2", "mclk3";
-				dmas = <&sdma2 0 24 0>, <&sdma2 1 24 0>;
-				dma-names = "rx", "tx";
+				dmas = <&sdma2 1 24 0>, <&sdma2 0 24 0>;
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};
 
Signature · 1 line
2.35.1
#1 lore raw

PATCH 2/3 arm64: dts: imx8mm: Swap SAI DMA order

Swap the SAI dmas and dma-names to match the order documented in Documentation/devicetree/bindings/sound/fsl-sai.txt using the following regex:

"
s@\(dma[^=]\+= \)\([^,]\+\), \([^;]\+\);@\1\3, \2; "

No functional change.

---
Cc: Adam Ford <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Joakim Zhang <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Markus Niebel <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Tim Harvey <[email protected]>
Cc: [email protected]
To: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/freescale/imx8mm.dtsi +10 -10
index 45fd7371ee7e9..40cc02c886d7b 100644
@@ -321,8 +321,8 @@ sai1: sai@30010000 {
 						 <&clk IMX8MM_CLK_SAI1_ROOT>,
 						 <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>;
 					clock-names = "bus", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 0 2 0>, <&sdma2 1 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 1 2 0>, <&sdma2 0 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
@@ -335,8 +335,8 @@ sai2: sai@30020000 {
 						<&clk IMX8MM_CLK_SAI2_ROOT>,
 						<&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>;
 					clock-names = "bus", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 2 2 0>, <&sdma2 3 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 3 2 0>, <&sdma2 2 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
@@ -349,8 +349,8 @@ sai3: sai@30030000 {
 						 <&clk IMX8MM_CLK_SAI3_ROOT>,
 						 <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>;
 					clock-names = "bus", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 4 2 0>, <&sdma2 5 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 5 2 0>, <&sdma2 4 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
@@ -363,8 +363,8 @@ sai5: sai@30050000 {
 						 <&clk IMX8MM_CLK_SAI5_ROOT>,
 						 <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>;
 					clock-names = "bus", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 8 2 0>, <&sdma2 9 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 9 2 0>, <&sdma2 8 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
@@ -377,8 +377,8 @@ sai6: sai@30060000 {
 						 <&clk IMX8MM_CLK_SAI6_ROOT>,
 						 <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>;
 					clock-names = "bus", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 10 2 0>, <&sdma2 11 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 11 2 0>, <&sdma2 10 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
Signature · 1 line
2.35.1
#2 lore raw

PATCH 3/3 arm64: dts: imx8mn: Swap SAI DMA order

In reply to Marek Vasut

Swap the SAI dmas and dma-names to match the order documented in Documentation/devicetree/bindings/sound/fsl-sai.txt using the following regex:

"
s@\(dma[^=]\+= \)\([^,]\+\), \([^;]\+\);@\1\3, \2; "

No functional change.

---
Cc: Adam Ford <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Joakim Zhang <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Markus Niebel <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Tim Harvey <[email protected]>
Cc: [email protected]
To: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/freescale/imx8mn.dtsi +10 -10
index 607c97009399e..fba9f5519daa7 100644
@@ -301,8 +301,8 @@ sai2: sai@30020000 {
 						<&clk IMX8MN_CLK_SAI2_ROOT>,
 						<&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_CLK_DUMMY>;
 					clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 2 2 0>, <&sdma2 3 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 3 2 0>, <&sdma2 2 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
@@ -315,8 +315,8 @@ sai3: sai@30030000 {
 						 <&clk IMX8MN_CLK_SAI3_ROOT>,
 						 <&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_CLK_DUMMY>;
 					clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 4 2 0>, <&sdma2 5 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 5 2 0>, <&sdma2 4 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
@@ -329,8 +329,8 @@ sai5: sai@30050000 {
 						 <&clk IMX8MN_CLK_SAI5_ROOT>,
 						 <&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_CLK_DUMMY>;
 					clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 8 2 0>, <&sdma2 9 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 9 2 0>, <&sdma2 8 2 0>;
+					dma-names = "tx", "rx";
 					fsl,shared-interrupt;
 					fsl,dataline = <0 0xf 0xf>;
 					status = "disabled";
@@ -345,8 +345,8 @@ sai6: sai@30060000 {
 						 <&clk IMX8MN_CLK_SAI6_ROOT>,
 						 <&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_CLK_DUMMY>;
 					clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 10 2 0>, <&sdma2 11 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 11 2 0>, <&sdma2 10 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
@@ -402,8 +402,8 @@ sai7: sai@300b0000 {
 						 <&clk IMX8MN_CLK_SAI7_ROOT>,
 						 <&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_CLK_DUMMY>;
 					clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
-					dmas = <&sdma2 12 2 0>, <&sdma2 13 2 0>;
-					dma-names = "rx", "tx";
+					dmas = <&sdma2 13 2 0>, <&sdma2 12 2 0>;
+					dma-names = "tx", "rx";
 					status = "disabled";
 				};
 
Signature · 1 line
2.35.1
#3 lore raw
In reply to Marek Vasut

Hi Marek,

thanks for this patch.

Am Donnerstag, 3. November 2022, 19:19:18 CET schrieb Marek Vasut:

Quoted 2 lines

Swap the SAI dmas and dma-names to match the order documented in Documentation/devicetree/bindings/sound/fsl-sai.txt

This file has been converted to Documentation/devicetree/bindings/sound/ fsl,sai.yaml in commit d563336877b2 ("ASoC: dt-bindings: fsl,sai: Convert format to json-schema"). In next since next-20220816.
In this schema the DMA order 'tx', 'rx' is only for fsl,vf610-sai, all other compatibles use 'rx', 'tx'. So this swap is not needed anymore. Same is for imx8mm and imx8mn.
This change should have been made before schema conversion, so they would have been identical on all compatibles...

Best regards,
Alexander

Quoted 40 lines

using the following regex:

"
s@\(dma[^=]\+= \)\([^,]\+\), \([^;]\+\);@\1\3, \2; "

No functional change.

---
Cc: Adam Ford <[email protected]>
Cc: Alexander Stein <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Joakim Zhang <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Lucas Stach <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Markus Niebel <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Paul Elder <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Richard Zhu <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Tim Harvey <[email protected]>
Cc: [email protected]
To: [email protected]

---
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index
c47e2d7235d3e..f00b040ca03e9 100644

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai1: sai@30010000 { · line 346

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
@@ -345,8 +345,8 @@ sai1: sai@30010000 {
 				         <&clk IMX8MQ_CLK_SAI1_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, 

<&clk IMX8MQ_CLK_DUMMY>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai1: sai@30010000 { · line 347

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
 				clock-names = "bus", "mclk1", "mclk2", 

"mclk3";

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai1: sai@30010000 { · line 348

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -1
-				dmas = <&sdma2 8 24 0>, <&sdma1 9 24 

0>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai1: sai@30010000 { · line 348

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -1
-				dma-names = "rx", "tx";
+				dmas = <&sdma1 9 24 0>, <&sdma2 8 24 

0>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai6: sai@30030000 { · line 360

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};
 
@@ -359,8 +359,8 @@ sai6: sai@30030000 {
 				         <&clk IMX8MQ_CLK_SAI6_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, 

<&clk IMX8MQ_CLK_DUMMY>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai6: sai@30030000 { · line 361

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
 				clock-names = "bus", "mclk1", "mclk2", 

"mclk3";

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai6: sai@30030000 { · line 362

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -1
-				dmas = <&sdma2 4 24 0>, <&sdma2 5 24 

0>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai6: sai@30030000 { · line 362

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -1
-				dma-names = "rx", "tx";
+				dmas = <&sdma2 5 24 0>, <&sdma2 4 24 

0>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai5: sai@30040000 { · line 374

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};
 
@@ -373,8 +373,8 @@ sai5: sai@30040000 {
 				         <&clk IMX8MQ_CLK_SAI5_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, 

<&clk IMX8MQ_CLK_DUMMY>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai5: sai@30040000 { · line 375

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
 				clock-names = "bus", "mclk1", "mclk2", 

"mclk3";

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai5: sai@30040000 { · line 376

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -1
-				dmas = <&sdma2 2 24 0>, <&sdma2 3 24 

0>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai5: sai@30040000 { · line 376

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -1
-				dma-names = "rx", "tx";
+				dmas = <&sdma2 3 24 0>, <&sdma2 2 24 

0>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai4: sai@30050000 { · line 388

Quoted 7 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};
 
@@ -387,8 +387,8 @@ sai4: sai@30050000 {
 				         <&clk IMX8MQ_CLK_SAI4_ROOT>,
 				         <&clk IMX8MQ_CLK_DUMMY>, 

<&clk IMX8MQ_CLK_DUMMY>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai4: sai@30050000 { · line 389

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -0
 				clock-names = "bus", "mclk1", "mclk2", 

"mclk3";

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai4: sai@30050000 { · line 390

Quoted 1 line
arch/arm64/boot/dts/freescale/imx8mq.dtsi +0 -1
-				dmas = <&sdma2 0 24 0>, <&sdma2 1 24 

0>;

arch/arm64/boot/dts/freescale/imx8mq.dtsi sai4: sai@30050000 { · line 390

Quoted 2 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -1
-				dma-names = "rx", "tx";
+				dmas = <&sdma2 1 24 0>, <&sdma2 0 24 

0>;

Quoted 3 lines
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -0
+				dma-names = "tx", "rx";
 				status = "disabled";
 			};