linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
@ 2021-04-06  1:33 Adam Ford
  2021-04-06  1:33 ` [PATCH 2/2] arm64: dts: imx8mm: Add spba1 and spba2 buses Adam Ford
  2021-05-11  2:46 ` [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus Shawn Guo
  0 siblings, 2 replies; 10+ messages in thread
From: Adam Ford @ 2021-04-06  1:33 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Adam Ford, Rob Herring, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

The i.MX8MN has an SPBA bus which covers much of the audio, but
there is a second SPBA bus which covers many of the serial interfaces
like SPI and UARTs currently missing from the device tree. The reference
manual calls the bus handling the audio peripherals SPBA2, and the bus
handling the serial peripherals is called SPBA1.

Rename the existing spba bus to spba2 and add spba1.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index 4dac4da38f4c..e961acd237a8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -255,7 +255,7 @@ aips1: bus@30000000 {
 			#size-cells = <1>;
 			ranges;
 
-			spba: spba-bus@30000000 {
+			spba2: spba-bus@30000000 {
 				compatible = "fsl,spba-bus", "simple-bus";
 				#address-cells = <1>;
 				#size-cells = <1>;
@@ -681,80 +681,88 @@ aips3: bus@30800000 {
 			#size-cells = <1>;
 			ranges;
 
-			ecspi1: spi@30820000 {
-				compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
+			spba1: spba-bus@30800000 {
+				compatible = "fsl,spba-bus", "simple-bus";
 				#address-cells = <1>;
-				#size-cells = <0>;
-				reg = <0x30820000 0x10000>;
-				interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MN_CLK_ECSPI1_ROOT>,
-					 <&clk IMX8MN_CLK_ECSPI1_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				#size-cells = <1>;
+				reg = <0x30800000 0x100000>;
+				ranges;
 
-			ecspi2: spi@30830000 {
-				compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
-				#address-cells = <1>;
-				#size-cells = <0>;
-				reg = <0x30830000 0x10000>;
-				interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MN_CLK_ECSPI2_ROOT>,
-					 <&clk IMX8MN_CLK_ECSPI2_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				ecspi1: spi@30820000 {
+					compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
+					#address-cells = <1>;
+					#size-cells = <0>;
+					reg = <0x30820000 0x10000>;
+					interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MN_CLK_ECSPI1_ROOT>,
+						 <&clk IMX8MN_CLK_ECSPI1_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			ecspi3: spi@30840000 {
-				compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
-				#address-cells = <1>;
-				#size-cells = <0>;
-				reg = <0x30840000 0x10000>;
-				interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MN_CLK_ECSPI3_ROOT>,
-					 <&clk IMX8MN_CLK_ECSPI3_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				ecspi2: spi@30830000 {
+					compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
+					#address-cells = <1>;
+					#size-cells = <0>;
+					reg = <0x30830000 0x10000>;
+					interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MN_CLK_ECSPI2_ROOT>,
+						 <&clk IMX8MN_CLK_ECSPI2_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			uart1: serial@30860000 {
-				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
-				reg = <0x30860000 0x10000>;
-				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
-					 <&clk IMX8MN_CLK_UART1_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				ecspi3: spi@30840000 {
+					compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
+					#address-cells = <1>;
+					#size-cells = <0>;
+					reg = <0x30840000 0x10000>;
+					interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MN_CLK_ECSPI3_ROOT>,
+						 <&clk IMX8MN_CLK_ECSPI3_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			uart3: serial@30880000 {
-				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
-				reg = <0x30880000 0x10000>;
-				interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MN_CLK_UART3_ROOT>,
-					 <&clk IMX8MN_CLK_UART3_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				uart1: serial@30860000 {
+					compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
+					reg = <0x30860000 0x10000>;
+					interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
+						 <&clk IMX8MN_CLK_UART1_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			uart2: serial@30890000 {
-				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
-				reg = <0x30890000 0x10000>;
-				interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MN_CLK_UART2_ROOT>,
-					 <&clk IMX8MN_CLK_UART2_ROOT>;
-				clock-names = "ipg", "per";
-				status = "disabled";
+				uart3: serial@30880000 {
+					compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
+					reg = <0x30880000 0x10000>;
+					interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MN_CLK_UART3_ROOT>,
+						 <&clk IMX8MN_CLK_UART3_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
+
+				uart2: serial@30890000 {
+					compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
+					reg = <0x30890000 0x10000>;
+					interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MN_CLK_UART2_ROOT>,
+						 <&clk IMX8MN_CLK_UART2_ROOT>;
+					clock-names = "ipg", "per";
+					status = "disabled";
+				};
 			};
 
 			crypto: crypto@30900000 {
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] arm64: dts: imx8mm: Add spba1 and spba2 buses
  2021-04-06  1:33 [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus Adam Ford
@ 2021-04-06  1:33 ` Adam Ford
  2021-05-11  2:46 ` [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus Shawn Guo
  1 sibling, 0 replies; 10+ messages in thread
From: Adam Ford @ 2021-04-06  1:33 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Adam Ford, Rob Herring, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

The i.MX8MM reference manual shows there are two spba busses.
SPBA1 handles much of the serial interfaces, and SPBA2 covers much
of the audio.

Add both of them.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index a27e02bee6b4..64aa38fd2b6e 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -271,117 +271,125 @@ aips1: bus@30000000 {
 			#size-cells = <1>;
 			ranges = <0x30000000 0x30000000 0x400000>;
 
-			sai1: sai@30010000 {
-				#sound-dai-cells = <0>;
-				compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-				reg = <0x30010000 0x10000>;
-				interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_SAI1_IPG>,
-					 <&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";
-				status = "disabled";
-			};
+			spba2: spba-bus@30000000 {
+				compatible = "fsl,spba-bus", "simple-bus";
+				#address-cells = <1>;
+				#size-cells = <1>;
+				reg = <0x30000000 0x100000>;
+				ranges;
+
+				sai1: sai@30010000 {
+					#sound-dai-cells = <0>;
+					compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
+					reg = <0x30010000 0x10000>;
+					interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_SAI1_IPG>,
+						 <&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";
+					status = "disabled";
+				};
 
-			sai2: sai@30020000 {
-				#sound-dai-cells = <0>;
-				compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-				reg = <0x30020000 0x10000>;
-				interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_SAI2_IPG>,
-					<&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";
-				status = "disabled";
-			};
+				sai2: sai@30020000 {
+					#sound-dai-cells = <0>;
+					compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
+					reg = <0x30020000 0x10000>;
+					interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_SAI2_IPG>,
+						<&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";
+					status = "disabled";
+				};
 
-			sai3: sai@30030000 {
-				#sound-dai-cells = <0>;
-				compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-				reg = <0x30030000 0x10000>;
-				interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_SAI3_IPG>,
-					 <&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";
-				status = "disabled";
-			};
+				sai3: sai@30030000 {
+					#sound-dai-cells = <0>;
+					compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
+					reg = <0x30030000 0x10000>;
+					interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_SAI3_IPG>,
+						 <&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";
+					status = "disabled";
+				};
 
-			sai5: sai@30050000 {
-				#sound-dai-cells = <0>;
-				compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-				reg = <0x30050000 0x10000>;
-				interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_SAI5_IPG>,
-					 <&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";
-				status = "disabled";
-			};
+				sai5: sai@30050000 {
+					#sound-dai-cells = <0>;
+					compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
+					reg = <0x30050000 0x10000>;
+					interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_SAI5_IPG>,
+						 <&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";
+					status = "disabled";
+				};
 
-			sai6: sai@30060000 {
-				#sound-dai-cells = <0>;
-				compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
-				reg = <0x30060000 0x10000>;
-				interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_SAI6_IPG>,
-					 <&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";
-				status = "disabled";
-			};
+				sai6: sai@30060000 {
+					#sound-dai-cells = <0>;
+					compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
+					reg = <0x30060000 0x10000>;
+					interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_SAI6_IPG>,
+						 <&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";
+					status = "disabled";
+				};
 
-			micfil: audio-controller@30080000 {
-				compatible = "fsl,imx8mm-micfil";
-				reg = <0x30080000 0x10000>;
-				interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
-					     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
-					     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
-					     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_PDM_IPG>,
-					 <&clk IMX8MM_CLK_PDM_ROOT>,
-					 <&clk IMX8MM_AUDIO_PLL1_OUT>,
-					 <&clk IMX8MM_AUDIO_PLL2_OUT>,
-					 <&clk IMX8MM_CLK_EXT3>;
-				clock-names = "ipg_clk", "ipg_clk_app",
-					      "pll8k", "pll11k", "clkext3";
-				dmas = <&sdma2 24 25 0x80000000>;
-				dma-names = "rx";
-				status = "disabled";
-			};
+				micfil: audio-controller@30080000 {
+					compatible = "fsl,imx8mm-micfil";
+					reg = <0x30080000 0x10000>;
+					interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+						     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+						     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+						     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_PDM_IPG>,
+						 <&clk IMX8MM_CLK_PDM_ROOT>,
+						 <&clk IMX8MM_AUDIO_PLL1_OUT>,
+						 <&clk IMX8MM_AUDIO_PLL2_OUT>,
+						 <&clk IMX8MM_CLK_EXT3>;
+					clock-names = "ipg_clk", "ipg_clk_app",
+						      "pll8k", "pll11k", "clkext3";
+					dmas = <&sdma2 24 25 0x80000000>;
+					dma-names = "rx";
+					status = "disabled";
+				};
 
-			spdif1: spdif@30090000 {
-				compatible = "fsl,imx35-spdif";
-				reg = <0x30090000 0x10000>;
-				interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_AUDIO_AHB>, /* core */
-					 <&clk IMX8MM_CLK_24M>, /* rxtx0 */
-					 <&clk IMX8MM_CLK_SPDIF1>, /* rxtx1 */
-					 <&clk IMX8MM_CLK_DUMMY>, /* rxtx2 */
-					 <&clk IMX8MM_CLK_DUMMY>, /* rxtx3 */
-					 <&clk IMX8MM_CLK_DUMMY>, /* rxtx4 */
-					 <&clk IMX8MM_CLK_AUDIO_AHB>, /* rxtx5 */
-					 <&clk IMX8MM_CLK_DUMMY>, /* rxtx6 */
-					 <&clk IMX8MM_CLK_DUMMY>, /* rxtx7 */
-					 <&clk IMX8MM_CLK_DUMMY>; /* spba */
-				clock-names = "core", "rxtx0",
-					      "rxtx1", "rxtx2",
-					      "rxtx3", "rxtx4",
-					      "rxtx5", "rxtx6",
-					      "rxtx7", "spba";
-				dmas = <&sdma2 28 18 0>, <&sdma2 29 18 0>;
-				dma-names = "rx", "tx";
-				status = "disabled";
+				spdif1: spdif@30090000 {
+					compatible = "fsl,imx35-spdif";
+					reg = <0x30090000 0x10000>;
+					interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_AUDIO_AHB>, /* core */
+						 <&clk IMX8MM_CLK_24M>, /* rxtx0 */
+						 <&clk IMX8MM_CLK_SPDIF1>, /* rxtx1 */
+						 <&clk IMX8MM_CLK_DUMMY>, /* rxtx2 */
+						 <&clk IMX8MM_CLK_DUMMY>, /* rxtx3 */
+						 <&clk IMX8MM_CLK_DUMMY>, /* rxtx4 */
+						 <&clk IMX8MM_CLK_AUDIO_AHB>, /* rxtx5 */
+						 <&clk IMX8MM_CLK_DUMMY>, /* rxtx6 */
+						 <&clk IMX8MM_CLK_DUMMY>, /* rxtx7 */
+						 <&clk IMX8MM_CLK_DUMMY>; /* spba */
+					clock-names = "core", "rxtx0",
+						      "rxtx1", "rxtx2",
+						      "rxtx3", "rxtx4",
+						      "rxtx5", "rxtx6",
+						      "rxtx7", "spba";
+					dmas = <&sdma2 28 18 0>, <&sdma2 29 18 0>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 			};
 
 			gpio1: gpio@30200000 {
@@ -670,80 +678,88 @@ aips3: bus@30800000 {
 			ranges = <0x30800000 0x30800000 0x400000>,
 				 <0x8000000 0x8000000 0x10000000>;
 
-			ecspi1: spi@30820000 {
-				compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
+			spba1: spba-bus@30800000 {
+				compatible = "fsl,spba-bus", "simple-bus";
 				#address-cells = <1>;
-				#size-cells = <0>;
-				reg = <0x30820000 0x10000>;
-				interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_ECSPI1_ROOT>,
-					 <&clk IMX8MM_CLK_ECSPI1_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				#size-cells = <1>;
+				reg = <0x30800000 0x100000>;
+				ranges;
+
+				ecspi1: spi@30820000 {
+					compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
+					#address-cells = <1>;
+					#size-cells = <0>;
+					reg = <0x30820000 0x10000>;
+					interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_ECSPI1_ROOT>,
+						 <&clk IMX8MM_CLK_ECSPI1_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			ecspi2: spi@30830000 {
-				compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
-				#address-cells = <1>;
-				#size-cells = <0>;
-				reg = <0x30830000 0x10000>;
-				interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_ECSPI2_ROOT>,
-					 <&clk IMX8MM_CLK_ECSPI2_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				ecspi2: spi@30830000 {
+					compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
+					#address-cells = <1>;
+					#size-cells = <0>;
+					reg = <0x30830000 0x10000>;
+					interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_ECSPI2_ROOT>,
+						 <&clk IMX8MM_CLK_ECSPI2_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			ecspi3: spi@30840000 {
-				compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
-				#address-cells = <1>;
-				#size-cells = <0>;
-				reg = <0x30840000 0x10000>;
-				interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_ECSPI3_ROOT>,
-					 <&clk IMX8MM_CLK_ECSPI3_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				ecspi3: spi@30840000 {
+					compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
+					#address-cells = <1>;
+					#size-cells = <0>;
+					reg = <0x30840000 0x10000>;
+					interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_ECSPI3_ROOT>,
+						 <&clk IMX8MM_CLK_ECSPI3_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			uart1: serial@30860000 {
-				compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";
-				reg = <0x30860000 0x10000>;
-				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_UART1_ROOT>,
-					 <&clk IMX8MM_CLK_UART1_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				uart1: serial@30860000 {
+					compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";
+					reg = <0x30860000 0x10000>;
+					interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_UART1_ROOT>,
+						 <&clk IMX8MM_CLK_UART1_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			uart3: serial@30880000 {
-				compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";
-				reg = <0x30880000 0x10000>;
-				interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_UART3_ROOT>,
-					 <&clk IMX8MM_CLK_UART3_ROOT>;
-				clock-names = "ipg", "per";
-				dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
-				dma-names = "rx", "tx";
-				status = "disabled";
-			};
+				uart3: serial@30880000 {
+					compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";
+					reg = <0x30880000 0x10000>;
+					interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_UART3_ROOT>,
+						 <&clk IMX8MM_CLK_UART3_ROOT>;
+					clock-names = "ipg", "per";
+					dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
+					dma-names = "rx", "tx";
+					status = "disabled";
+				};
 
-			uart2: serial@30890000 {
-				compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";
-				reg = <0x30890000 0x10000>;
-				interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clk IMX8MM_CLK_UART2_ROOT>,
-					 <&clk IMX8MM_CLK_UART2_ROOT>;
-				clock-names = "ipg", "per";
-				status = "disabled";
+				uart2: serial@30890000 {
+					compatible = "fsl,imx8mm-uart", "fsl,imx6q-uart";
+					reg = <0x30890000 0x10000>;
+					interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+					clocks = <&clk IMX8MM_CLK_UART2_ROOT>,
+						 <&clk IMX8MM_CLK_UART2_ROOT>;
+					clock-names = "ipg", "per";
+					status = "disabled";
+				};
 			};
 
 			crypto: crypto@30900000 {
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-04-06  1:33 [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus Adam Ford
  2021-04-06  1:33 ` [PATCH 2/2] arm64: dts: imx8mm: Add spba1 and spba2 buses Adam Ford
@ 2021-05-11  2:46 ` Shawn Guo
  2021-05-11 10:45   ` Adam Ford
  1 sibling, 1 reply; 10+ messages in thread
From: Shawn Guo @ 2021-05-11  2:46 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, Rob Herring, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	devicetree, linux-kernel

On Mon, Apr 05, 2021 at 08:33:42PM -0500, Adam Ford wrote:
> The i.MX8MN has an SPBA bus which covers much of the audio, but
> there is a second SPBA bus which covers many of the serial interfaces
> like SPI and UARTs currently missing from the device tree. The reference
> manual calls the bus handling the audio peripherals SPBA2, and the bus
> handling the serial peripherals is called SPBA1.
> 
> Rename the existing spba bus to spba2 and add spba1.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> index 4dac4da38f4c..e961acd237a8 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> @@ -255,7 +255,7 @@ aips1: bus@30000000 {
>  			#size-cells = <1>;
>  			ranges;
>  
> -			spba: spba-bus@30000000 {
> +			spba2: spba-bus@30000000 {
>  				compatible = "fsl,spba-bus", "simple-bus";

Just noticed that "fsl,spba-bus" is undocumented, no?

Also may I ask if you have a real use case for this bus node?

Shawn

>  				#address-cells = <1>;
>  				#size-cells = <1>;
> @@ -681,80 +681,88 @@ aips3: bus@30800000 {
>  			#size-cells = <1>;
>  			ranges;
>  
> -			ecspi1: spi@30820000 {
> -				compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> +			spba1: spba-bus@30800000 {
> +				compatible = "fsl,spba-bus", "simple-bus";
>  				#address-cells = <1>;
> -				#size-cells = <0>;
> -				reg = <0x30820000 0x10000>;
> -				interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> -				clocks = <&clk IMX8MN_CLK_ECSPI1_ROOT>,
> -					 <&clk IMX8MN_CLK_ECSPI1_ROOT>;
> -				clock-names = "ipg", "per";
> -				dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
> -				dma-names = "rx", "tx";
> -				status = "disabled";
> -			};
> +				#size-cells = <1>;
> +				reg = <0x30800000 0x100000>;
> +				ranges;
>  
> -			ecspi2: spi@30830000 {
> -				compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -				reg = <0x30830000 0x10000>;
> -				interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> -				clocks = <&clk IMX8MN_CLK_ECSPI2_ROOT>,
> -					 <&clk IMX8MN_CLK_ECSPI2_ROOT>;
> -				clock-names = "ipg", "per";
> -				dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
> -				dma-names = "rx", "tx";
> -				status = "disabled";
> -			};
> +				ecspi1: spi@30820000 {
> +					compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					reg = <0x30820000 0x10000>;
> +					interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> +					clocks = <&clk IMX8MN_CLK_ECSPI1_ROOT>,
> +						 <&clk IMX8MN_CLK_ECSPI1_ROOT>;
> +					clock-names = "ipg", "per";
> +					dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
> +					dma-names = "rx", "tx";
> +					status = "disabled";
> +				};
>  
> -			ecspi3: spi@30840000 {
> -				compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -				reg = <0x30840000 0x10000>;
> -				interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> -				clocks = <&clk IMX8MN_CLK_ECSPI3_ROOT>,
> -					 <&clk IMX8MN_CLK_ECSPI3_ROOT>;
> -				clock-names = "ipg", "per";
> -				dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
> -				dma-names = "rx", "tx";
> -				status = "disabled";
> -			};
> +				ecspi2: spi@30830000 {
> +					compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					reg = <0x30830000 0x10000>;
> +					interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> +					clocks = <&clk IMX8MN_CLK_ECSPI2_ROOT>,
> +						 <&clk IMX8MN_CLK_ECSPI2_ROOT>;
> +					clock-names = "ipg", "per";
> +					dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
> +					dma-names = "rx", "tx";
> +					status = "disabled";
> +				};
>  
> -			uart1: serial@30860000 {
> -				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> -				reg = <0x30860000 0x10000>;
> -				interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> -				clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
> -					 <&clk IMX8MN_CLK_UART1_ROOT>;
> -				clock-names = "ipg", "per";
> -				dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
> -				dma-names = "rx", "tx";
> -				status = "disabled";
> -			};
> +				ecspi3: spi@30840000 {
> +					compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					reg = <0x30840000 0x10000>;
> +					interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> +					clocks = <&clk IMX8MN_CLK_ECSPI3_ROOT>,
> +						 <&clk IMX8MN_CLK_ECSPI3_ROOT>;
> +					clock-names = "ipg", "per";
> +					dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
> +					dma-names = "rx", "tx";
> +					status = "disabled";
> +				};
>  
> -			uart3: serial@30880000 {
> -				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> -				reg = <0x30880000 0x10000>;
> -				interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
> -				clocks = <&clk IMX8MN_CLK_UART3_ROOT>,
> -					 <&clk IMX8MN_CLK_UART3_ROOT>;
> -				clock-names = "ipg", "per";
> -				dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
> -				dma-names = "rx", "tx";
> -				status = "disabled";
> -			};
> +				uart1: serial@30860000 {
> +					compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> +					reg = <0x30860000 0x10000>;
> +					interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> +					clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
> +						 <&clk IMX8MN_CLK_UART1_ROOT>;
> +					clock-names = "ipg", "per";
> +					dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
> +					dma-names = "rx", "tx";
> +					status = "disabled";
> +				};
>  
> -			uart2: serial@30890000 {
> -				compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> -				reg = <0x30890000 0x10000>;
> -				interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
> -				clocks = <&clk IMX8MN_CLK_UART2_ROOT>,
> -					 <&clk IMX8MN_CLK_UART2_ROOT>;
> -				clock-names = "ipg", "per";
> -				status = "disabled";
> +				uart3: serial@30880000 {
> +					compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> +					reg = <0x30880000 0x10000>;
> +					interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
> +					clocks = <&clk IMX8MN_CLK_UART3_ROOT>,
> +						 <&clk IMX8MN_CLK_UART3_ROOT>;
> +					clock-names = "ipg", "per";
> +					dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
> +					dma-names = "rx", "tx";
> +					status = "disabled";
> +				};
> +
> +				uart2: serial@30890000 {
> +					compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> +					reg = <0x30890000 0x10000>;
> +					interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
> +					clocks = <&clk IMX8MN_CLK_UART2_ROOT>,
> +						 <&clk IMX8MN_CLK_UART2_ROOT>;
> +					clock-names = "ipg", "per";
> +					status = "disabled";
> +				};
>  			};
>  
>  			crypto: crypto@30900000 {
> -- 
> 2.25.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-05-11  2:46 ` [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus Shawn Guo
@ 2021-05-11 10:45   ` Adam Ford
  2021-05-11 12:20     ` Robin Gong
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Ford @ 2021-05-11 10:45 UTC (permalink / raw)
  To: Shawn Guo
  Cc: arm-soc, Rob Herring, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, devicetree,
	Linux Kernel Mailing List

On Mon, May 10, 2021 at 9:46 PM Shawn Guo <shawnguo@kernel.org> wrote:
>
> On Mon, Apr 05, 2021 at 08:33:42PM -0500, Adam Ford wrote:
> > The i.MX8MN has an SPBA bus which covers much of the audio, but
> > there is a second SPBA bus which covers many of the serial interfaces
> > like SPI and UARTs currently missing from the device tree. The reference
> > manual calls the bus handling the audio peripherals SPBA2, and the bus
> > handling the serial peripherals is called SPBA1.
> >
> > Rename the existing spba bus to spba2 and add spba1.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > index 4dac4da38f4c..e961acd237a8 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> > @@ -255,7 +255,7 @@ aips1: bus@30000000 {
> >                       #size-cells = <1>;
> >                       ranges;
> >
> > -                     spba: spba-bus@30000000 {
> > +                     spba2: spba-bus@30000000 {
> >                               compatible = "fsl,spba-bus", "simple-bus";
>
> Just noticed that "fsl,spba-bus" is undocumented, no?

I attempted to push the bindings, and I was told it was applied, but
when I asked where the bindings were applied I never got a response -
[1].

Do you want me to resend the bindings?

>
> Also may I ask if you have a real use case for this bus node?

The reference manual shows the SPBA bus tells the DMA controller which
peripherals are associated with it.  Nearly all the i.MX boards use
this.  The boards I support have Bluetooth devices connected to a UART
running high speeds, and if the DMA driver isn't loaded, I can see a
performance change.  In fact, if the DMA firmware isn't loaded, I
often get transfer errors.

adam

[1] - https://lore.kernel.org/linux-devicetree/CAHCN7x+om4W5jqnuAW4-nMkZLc5nrYu7NUsbM36r0wyFSYa4-g@mail.gmail.com/T/

>
> Shawn
>
> >                               #address-cells = <1>;
> >                               #size-cells = <1>;
> > @@ -681,80 +681,88 @@ aips3: bus@30800000 {
> >                       #size-cells = <1>;
> >                       ranges;
> >
> > -                     ecspi1: spi@30820000 {
> > -                             compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> > +                     spba1: spba-bus@30800000 {
> > +                             compatible = "fsl,spba-bus", "simple-bus";
> >                               #address-cells = <1>;
> > -                             #size-cells = <0>;
> > -                             reg = <0x30820000 0x10000>;
> > -                             interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> > -                             clocks = <&clk IMX8MN_CLK_ECSPI1_ROOT>,
> > -                                      <&clk IMX8MN_CLK_ECSPI1_ROOT>;
> > -                             clock-names = "ipg", "per";
> > -                             dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
> > -                             dma-names = "rx", "tx";
> > -                             status = "disabled";
> > -                     };
> > +                             #size-cells = <1>;
> > +                             reg = <0x30800000 0x100000>;
> > +                             ranges;
> >
> > -                     ecspi2: spi@30830000 {
> > -                             compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> > -                             #address-cells = <1>;
> > -                             #size-cells = <0>;
> > -                             reg = <0x30830000 0x10000>;
> > -                             interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> > -                             clocks = <&clk IMX8MN_CLK_ECSPI2_ROOT>,
> > -                                      <&clk IMX8MN_CLK_ECSPI2_ROOT>;
> > -                             clock-names = "ipg", "per";
> > -                             dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
> > -                             dma-names = "rx", "tx";
> > -                             status = "disabled";
> > -                     };
> > +                             ecspi1: spi@30820000 {
> > +                                     compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> > +                                     #address-cells = <1>;
> > +                                     #size-cells = <0>;
> > +                                     reg = <0x30820000 0x10000>;
> > +                                     interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
> > +                                     clocks = <&clk IMX8MN_CLK_ECSPI1_ROOT>,
> > +                                              <&clk IMX8MN_CLK_ECSPI1_ROOT>;
> > +                                     clock-names = "ipg", "per";
> > +                                     dmas = <&sdma1 0 7 1>, <&sdma1 1 7 2>;
> > +                                     dma-names = "rx", "tx";
> > +                                     status = "disabled";
> > +                             };
> >
> > -                     ecspi3: spi@30840000 {
> > -                             compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> > -                             #address-cells = <1>;
> > -                             #size-cells = <0>;
> > -                             reg = <0x30840000 0x10000>;
> > -                             interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> > -                             clocks = <&clk IMX8MN_CLK_ECSPI3_ROOT>,
> > -                                      <&clk IMX8MN_CLK_ECSPI3_ROOT>;
> > -                             clock-names = "ipg", "per";
> > -                             dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
> > -                             dma-names = "rx", "tx";
> > -                             status = "disabled";
> > -                     };
> > +                             ecspi2: spi@30830000 {
> > +                                     compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> > +                                     #address-cells = <1>;
> > +                                     #size-cells = <0>;
> > +                                     reg = <0x30830000 0x10000>;
> > +                                     interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
> > +                                     clocks = <&clk IMX8MN_CLK_ECSPI2_ROOT>,
> > +                                              <&clk IMX8MN_CLK_ECSPI2_ROOT>;
> > +                                     clock-names = "ipg", "per";
> > +                                     dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
> > +                                     dma-names = "rx", "tx";
> > +                                     status = "disabled";
> > +                             };
> >
> > -                     uart1: serial@30860000 {
> > -                             compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> > -                             reg = <0x30860000 0x10000>;
> > -                             interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> > -                             clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
> > -                                      <&clk IMX8MN_CLK_UART1_ROOT>;
> > -                             clock-names = "ipg", "per";
> > -                             dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
> > -                             dma-names = "rx", "tx";
> > -                             status = "disabled";
> > -                     };
> > +                             ecspi3: spi@30840000 {
> > +                                     compatible = "fsl,imx8mn-ecspi", "fsl,imx51-ecspi";
> > +                                     #address-cells = <1>;
> > +                                     #size-cells = <0>;
> > +                                     reg = <0x30840000 0x10000>;
> > +                                     interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
> > +                                     clocks = <&clk IMX8MN_CLK_ECSPI3_ROOT>,
> > +                                              <&clk IMX8MN_CLK_ECSPI3_ROOT>;
> > +                                     clock-names = "ipg", "per";
> > +                                     dmas = <&sdma1 4 7 1>, <&sdma1 5 7 2>;
> > +                                     dma-names = "rx", "tx";
> > +                                     status = "disabled";
> > +                             };
> >
> > -                     uart3: serial@30880000 {
> > -                             compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> > -                             reg = <0x30880000 0x10000>;
> > -                             interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
> > -                             clocks = <&clk IMX8MN_CLK_UART3_ROOT>,
> > -                                      <&clk IMX8MN_CLK_UART3_ROOT>;
> > -                             clock-names = "ipg", "per";
> > -                             dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
> > -                             dma-names = "rx", "tx";
> > -                             status = "disabled";
> > -                     };
> > +                             uart1: serial@30860000 {
> > +                                     compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> > +                                     reg = <0x30860000 0x10000>;
> > +                                     interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> > +                                     clocks = <&clk IMX8MN_CLK_UART1_ROOT>,
> > +                                              <&clk IMX8MN_CLK_UART1_ROOT>;
> > +                                     clock-names = "ipg", "per";
> > +                                     dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
> > +                                     dma-names = "rx", "tx";
> > +                                     status = "disabled";
> > +                             };
> >
> > -                     uart2: serial@30890000 {
> > -                             compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> > -                             reg = <0x30890000 0x10000>;
> > -                             interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
> > -                             clocks = <&clk IMX8MN_CLK_UART2_ROOT>,
> > -                                      <&clk IMX8MN_CLK_UART2_ROOT>;
> > -                             clock-names = "ipg", "per";
> > -                             status = "disabled";
> > +                             uart3: serial@30880000 {
> > +                                     compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> > +                                     reg = <0x30880000 0x10000>;
> > +                                     interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
> > +                                     clocks = <&clk IMX8MN_CLK_UART3_ROOT>,
> > +                                              <&clk IMX8MN_CLK_UART3_ROOT>;
> > +                                     clock-names = "ipg", "per";
> > +                                     dmas = <&sdma1 26 4 0>, <&sdma1 27 4 0>;
> > +                                     dma-names = "rx", "tx";
> > +                                     status = "disabled";
> > +                             };
> > +
> > +                             uart2: serial@30890000 {
> > +                                     compatible = "fsl,imx8mn-uart", "fsl,imx6q-uart";
> > +                                     reg = <0x30890000 0x10000>;
> > +                                     interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
> > +                                     clocks = <&clk IMX8MN_CLK_UART2_ROOT>,
> > +                                              <&clk IMX8MN_CLK_UART2_ROOT>;
> > +                                     clock-names = "ipg", "per";
> > +                                     status = "disabled";
> > +                             };
> >                       };
> >
> >                       crypto: crypto@30900000 {
> > --
> > 2.25.1
> >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-05-11 10:45   ` Adam Ford
@ 2021-05-11 12:20     ` Robin Gong
  2021-05-11 14:48       ` Adam Ford
  0 siblings, 1 reply; 10+ messages in thread
From: Robin Gong @ 2021-05-11 12:20 UTC (permalink / raw)
  To: Adam Ford, Shawn Guo
  Cc: arm-soc, Rob Herring, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, dl-linux-imx, devicetree,
	Linux Kernel Mailing List

On 2021/05/11 18:45 Adam Ford <aford173@gmail.com> wrote:
> > Also may I ask if you have a real use case for this bus node?
> 
> The reference manual shows the SPBA bus tells the DMA controller which
> peripherals are associated with it.  Nearly all the i.MX boards use this.  The
> boards I support have Bluetooth devices connected to a UART running high
> speeds, and if the DMA driver isn't loaded, I can see a performance change.
Compare PIO with DMA on UART, but not w/o this  'spba bus node ' patch? 

> In fact, if the DMA firmware isn't loaded, I often get transfer errors.
UART use SDMA ROM firmware instead of RAM firmware, so it should work
even without sdma RAM firmware loaded.  Still curious what really happen in
your board without this patch. 


 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-05-11 12:20     ` Robin Gong
@ 2021-05-11 14:48       ` Adam Ford
  2021-05-13  2:09         ` Shawn Guo
  2021-05-14 14:57         ` Robin Gong
  0 siblings, 2 replies; 10+ messages in thread
From: Adam Ford @ 2021-05-11 14:48 UTC (permalink / raw)
  To: Robin Gong
  Cc: Shawn Guo, arm-soc, Rob Herring, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, devicetree,
	Linux Kernel Mailing List

On Tue, May 11, 2021 at 7:20 AM Robin Gong <yibin.gong@nxp.com> wrote:
>
> On 2021/05/11 18:45 Adam Ford <aford173@gmail.com> wrote:
> > > Also may I ask if you have a real use case for this bus node?
> >
> > The reference manual shows the SPBA bus tells the DMA controller which
> > peripherals are associated with it.  Nearly all the i.MX boards use this.  The
> > boards I support have Bluetooth devices connected to a UART running high
> > speeds, and if the DMA driver isn't loaded, I can see a performance change.
> Compare PIO with DMA on UART, but not w/o this  'spba bus node ' patch?
>
> > In fact, if the DMA firmware isn't loaded, I often get transfer errors.
> UART use SDMA ROM firmware instead of RAM firmware, so it should work
> even without sdma RAM firmware loaded.  Still curious what really happen in
> your board without this patch.

What I am seeing is that at times, the HCI UART loading before the DMA
firmware is loaded.

[   10.582037] Bluetooth: HCI UART driver ver 2.3
[   10.586867] Bluetooth: HCI UART protocol H4 registered
[   10.593566] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
[   10.594548] Bluetooth: HCI UART protocol Broadcom registered
[   10.600108] imx-uart 30860000.serial: We cannot prepare for the RX slave dma!

When I get the above message, the bluetooth chip I have throws
timeouts and does not function.

[   10.615090] imx-sdma 302c0000.dma-controller: loaded firmware 4.5

Once the firmware is loaded, I can unload the HCI Uart driver and
re-load Bluetooth works again.

Based on that, I've been having my system delay the loading of the
Bluetooth modules until after the firmware is loaded, but this tells
me there is a relationship between the DMA and UART.

adam
>
>
>
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-05-11 14:48       ` Adam Ford
@ 2021-05-13  2:09         ` Shawn Guo
  2021-05-14 14:57         ` Robin Gong
  1 sibling, 0 replies; 10+ messages in thread
From: Shawn Guo @ 2021-05-13  2:09 UTC (permalink / raw)
  To: Adam Ford
  Cc: Robin Gong, arm-soc, Rob Herring, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, devicetree,
	Linux Kernel Mailing List

On Tue, May 11, 2021 at 09:48:38AM -0500, Adam Ford wrote:
> On Tue, May 11, 2021 at 7:20 AM Robin Gong <yibin.gong@nxp.com> wrote:
> >
> > On 2021/05/11 18:45 Adam Ford <aford173@gmail.com> wrote:
> > > > Also may I ask if you have a real use case for this bus node?
> > >
> > > The reference manual shows the SPBA bus tells the DMA controller which
> > > peripherals are associated with it.  Nearly all the i.MX boards use this.  The
> > > boards I support have Bluetooth devices connected to a UART running high
> > > speeds, and if the DMA driver isn't loaded, I can see a performance change.
> > Compare PIO with DMA on UART, but not w/o this  'spba bus node ' patch?
> >
> > > In fact, if the DMA firmware isn't loaded, I often get transfer errors.
> > UART use SDMA ROM firmware instead of RAM firmware, so it should work
> > even without sdma RAM firmware loaded.  Still curious what really happen in
> > your board without this patch.
> 
> What I am seeing is that at times, the HCI UART loading before the DMA
> firmware is loaded.
> 
> [   10.582037] Bluetooth: HCI UART driver ver 2.3
> [   10.586867] Bluetooth: HCI UART protocol H4 registered
> [   10.593566] imx-sdma 30bd0000.dma-controller: sdma firmware not ready!
> [   10.594548] Bluetooth: HCI UART protocol Broadcom registered
> [   10.600108] imx-uart 30860000.serial: We cannot prepare for the RX slave dma!
> 
> When I get the above message, the bluetooth chip I have throws
> timeouts and does not function.
> 
> [   10.615090] imx-sdma 302c0000.dma-controller: loaded firmware 4.5
> 
> Once the firmware is loaded, I can unload the HCI Uart driver and
> re-load Bluetooth works again.
> 
> Based on that, I've been having my system delay the loading of the
> Bluetooth modules until after the firmware is loaded, but this tells
> me there is a relationship between the DMA and UART.

Yeah, I can see how DMA firmware impacts your Bluetooth device, but do
not follow how this spba node change make a difference here.

Nevertheless, patches look good.  Applied, thanks.

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-05-11 14:48       ` Adam Ford
  2021-05-13  2:09         ` Shawn Guo
@ 2021-05-14 14:57         ` Robin Gong
  2021-05-14 15:27           ` Adam Ford
  1 sibling, 1 reply; 10+ messages in thread
From: Robin Gong @ 2021-05-14 14:57 UTC (permalink / raw)
  To: Adam Ford
  Cc: Shawn Guo, arm-soc, Rob Herring, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, devicetree,
	Linux Kernel Mailing List

On 5/11/21 22:49 Adam Ford <aford173@gmail.com> wrote:

> > Compare PIO with DMA on UART, but not w/o this  'spba bus node ' patch?
> >
> > > In fact, if the DMA firmware isn't loaded, I often get transfer errors.
> > UART use SDMA ROM firmware instead of RAM firmware, so it should work
> > even without sdma RAM firmware loaded.  Still curious what really
> > happen in your board without this patch.
> 
> What I am seeing is that at times, the HCI UART loading before the DMA
> firmware is loaded.
> 
> [   10.582037] Bluetooth: HCI UART driver ver 2.3
> [   10.586867] Bluetooth: HCI UART protocol H4 registered
> [   10.593566] imx-sdma 30bd0000.dma-controller: sdma firmware not
> ready!
Seems you apply my patch set ' add ecspi ERR009165 for i.mx6/7 soc family'
https://www.spinics.net/lists/linux-spi/msg26728.html 
where 'sdma firmware not ready' added?

> [   10.594548] Bluetooth: HCI UART protocol Broadcom registered
> [   10.600108] imx-uart 30860000.serial: We cannot prepare for the RX slave
> dma!
Why not use ROM script for UART as mailine linux-next did (even the above patch set)?
If so, I don't think you could such issue on your board. What script(peripheral types) you
set in uart dts such as below is 4-- MCU domain UART-> IMX_DMATYPE_UART->app_2_mcu:
 
dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;

> 
> When I get the above message, the bluetooth chip I have throws timeouts and
> does not function.
> 
> [   10.615090] imx-sdma 302c0000.dma-controller: loaded firmware 4.5
> 
> Once the firmware is loaded, I can unload the HCI Uart driver and re-load
> Bluetooth works again.
> 
> Based on that, I've been having my system delay the loading of the Bluetooth
> modules until after the firmware is loaded, but this tells me there is a
> relationship between the DMA and UART. 
If you use ram script, of course you should use it after firmware loaded. Actually 
Spba bus in dts is only used for per_2_per script judging if the peripheral address
could be accessed directly by SDMA over SPBA, if yes, set SDMA_WATERMARK_LEVEL_SP
to let per_2_per script access peripheral over SPBA, otherwise, access peripheral by
AIPS instead like ARM side did. Please check with below commit for more.
Besides, per_2_per script is used for audio data sample rate convert between ASRC and
various audio input. So audio peripherals include ASRC should be in register scope of 
'spba-bus' . But with your patch, there are two 'spba-bus' device node in dts, so the first
Spba-bus should contain audio peripheral, otherwise, 'of_find_compatible_node
(NULL, NULL, "fsl,spba-bus")' may find the wrong one so that SDMA_WATERMARK_LEVEL_SP
Never be set.

BTW, do you mean the above firmware load issue you met is gone if this patch applied?
If yes, that really surprised me...

commit 8391ecf465ec5c8ccef547267df6d40beb8999a4
Author: Shengjiu Wang <shengjiu.wang@freescale.com>
Date:   Fri Jul 10 17:08:16 2015 +0800

    dmaengine: imx-sdma: Add device to device support





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-05-14 14:57         ` Robin Gong
@ 2021-05-14 15:27           ` Adam Ford
  2021-05-17  1:35             ` Robin Gong
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Ford @ 2021-05-14 15:27 UTC (permalink / raw)
  To: Robin Gong
  Cc: Shawn Guo, arm-soc, Rob Herring, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, devicetree,
	Linux Kernel Mailing List

On Fri, May 14, 2021 at 9:57 AM Robin Gong <yibin.gong@nxp.com> wrote:
>
> On 5/11/21 22:49 Adam Ford <aford173@gmail.com> wrote:
>
> > > Compare PIO with DMA on UART, but not w/o this  'spba bus node ' patch?
> > >
> > > > In fact, if the DMA firmware isn't loaded, I often get transfer errors.
> > > UART use SDMA ROM firmware instead of RAM firmware, so it should work
> > > even without sdma RAM firmware loaded.  Still curious what really
> > > happen in your board without this patch.
> >
> > What I am seeing is that at times, the HCI UART loading before the DMA
> > firmware is loaded.
> >
> > [   10.582037] Bluetooth: HCI UART driver ver 2.3
> > [   10.586867] Bluetooth: HCI UART protocol H4 registered
> > [   10.593566] imx-sdma 30bd0000.dma-controller: sdma firmware not
> > ready!
> Seems you apply my patch set ' add ecspi ERR009165 for i.mx6/7 soc family'
> https://www.spinics.net/lists/linux-spi/msg26728.html

I did this on the 5.13-rc1 which appears to have this series applied.

> where 'sdma firmware not ready' added?
>
> > [   10.594548] Bluetooth: HCI UART protocol Broadcom registered
> > [   10.600108] imx-uart 30860000.serial: We cannot prepare for the RX slave
> > dma!
> Why not use ROM script for UART as mailine linux-next did (even the above patch set)?



> If so, I don't think you could such issue on your board. What script(peripheral types) you
> set in uart dts such as below is 4-- MCU domain UART-> IMX_DMATYPE_UART->app_2_mcu:
>
> dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;

I didn't change the DMA references from the default, and I didn't
check to verify whether they are right or not.

>
> >
> > When I get the above message, the bluetooth chip I have throws timeouts and
> > does not function.
> >
> > [   10.615090] imx-sdma 302c0000.dma-controller: loaded firmware 4.5
> >
> > Once the firmware is loaded, I can unload the HCI Uart driver and re-load
> > Bluetooth works again.
> >
> > Based on that, I've been having my system delay the loading of the Bluetooth
> > modules until after the firmware is loaded, but this tells me there is a
> > relationship between the DMA and UART.
> If you use ram script, of course you should use it after firmware loaded. Actually
> Spba bus in dts is only used for per_2_per script judging if the peripheral address
> could be accessed directly by SDMA over SPBA, if yes, set SDMA_WATERMARK_LEVEL_SP
> to let per_2_per script access peripheral over SPBA, otherwise, access peripheral by
> AIPS instead like ARM side did. Please check with below commit for more.
> Besides, per_2_per script is used for audio data sample rate convert between ASRC and
> various audio input. So audio peripherals include ASRC should be in register scope of
> 'spba-bus' . But with your patch, there are two 'spba-bus' device node in dts, so the first
> Spba-bus should contain audio peripheral, otherwise, 'of_find_compatible_node
> (NULL, NULL, "fsl,spba-bus")' may find the wrong one so that SDMA_WATERMARK_LEVEL_SP
> Never be set.

I don't pretend to understand the details of the dma driver, but I
attempted to make the patch match the address range of both spba
busses from the technical reference manual,so there should be an spba
bus for the audio peripherals and an spba bus for the serial
peripherals like UART and SPI.  I only named them spba1 and spba2
based on the memory ranges defined in the ref manual. Table 2-5 shows
SBPA1 is 3080_0000 and table 2-3 shows SPBA2 starts at 3000_0000 which
is what I believe I did in this patch.

>
> BTW, do you mean the above firmware load issue you met is gone if this patch applied?
> If yes, that really surprised me...

I wasn't trying to imply that adding the spba-bus fixes my Bluetooth
issue.  I was just stating there is some relationship between the DMA
and the UART and if the UART throws a DMA error, the Bluetooth will
fail too.  What I have been doing to ensure the order of operations is
to make the imx_sdma and the Bluetooth system as modules.  I tell my
sysfs to load the imx_sdma module first, then load the Bluetooth
modules.  When done in that order, I never see the DMA errors. With
UART baud rates at 3Mbps+, I wanted to make sure the DMA was
operational to help potentially reduce the A53 workload.

adam
>
> commit 8391ecf465ec5c8ccef547267df6d40beb8999a4
> Author: Shengjiu Wang <shengjiu.wang@freescale.com>
> Date:   Fri Jul 10 17:08:16 2015 +0800
>
>     dmaengine: imx-sdma: Add device to device support
>
>
>
>
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* RE: [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus
  2021-05-14 15:27           ` Adam Ford
@ 2021-05-17  1:35             ` Robin Gong
  0 siblings, 0 replies; 10+ messages in thread
From: Robin Gong @ 2021-05-17  1:35 UTC (permalink / raw)
  To: Adam Ford
  Cc: Shawn Guo, arm-soc, Rob Herring, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx, devicetree,
	Linux Kernel Mailing List

On 5/14/21 Adam Ford <aford173@gmail.com> wrote:  
> I did this on the 5.13-rc1 which appears to have this series applied.

Sorry, I didn't see it on 5.13-rc2 even....

> > where 'sdma firmware not ready' added?

> >
> > > [   10.594548] Bluetooth: HCI UART protocol Broadcom registered
> > > [   10.600108] imx-uart 30860000.serial: We cannot prepare for the RX
> slave
> > > dma!
> > Why not use ROM script for UART as mailine linux-next did (even the above
> patch set)?
> 
> 
> 
> > If so, I don't think you could such issue on your board. What
> > script(peripheral types) you set in uart dts such as below is 4-- MCU domain
> UART-> IMX_DMATYPE_UART->app_2_mcu:
> >
> > dmas = <&sdma1 22 4 0>, <&sdma1 23 4 0>;
> 
> I didn't change the DMA references from the default, and I didn't check to
> verify whether they are right or not.
If so, I don't think you could see the above firmware load error since UART
use ROM firmware by default instead.

> 
> >
> > >
> > > When I get the above message, the bluetooth chip I have throws
> > > timeouts and does not function.
> > >
> > > [   10.615090] imx-sdma 302c0000.dma-controller: loaded firmware 4.5
> > >
> > > Once the firmware is loaded, I can unload the HCI Uart driver and
> > > re-load Bluetooth works again.
> > >
> > > Based on that, I've been having my system delay the loading of the
> > > Bluetooth modules until after the firmware is loaded, but this tells
> > > me there is a relationship between the DMA and UART.
> > If you use ram script, of course you should use it after firmware
> > loaded. Actually Spba bus in dts is only used for per_2_per script
> > judging if the peripheral address could be accessed directly by SDMA
> > over SPBA, if yes, set SDMA_WATERMARK_LEVEL_SP to let per_2_per script
> > access peripheral over SPBA, otherwise, access peripheral by AIPS instead
> like ARM side did. Please check with below commit for more.
> > Besides, per_2_per script is used for audio data sample rate convert
> > between ASRC and various audio input. So audio peripherals include
> > ASRC should be in register scope of 'spba-bus' . But with your patch,
> > there are two 'spba-bus' device node in dts, so the first Spba-bus
> > should contain audio peripheral, otherwise, 'of_find_compatible_node
> > (NULL, NULL, "fsl,spba-bus")' may find the wrong one so that
> SDMA_WATERMARK_LEVEL_SP Never be set.
> 
> I don't pretend to understand the details of the dma driver, but I attempted to
> make the patch match the address range of both spba busses from the
> technical reference manual,so there should be an spba bus for the audio
> peripherals and an spba bus for the serial peripherals like UART and SPI.  I
> only named them spba1 and spba2 based on the memory ranges defined in
> the ref manual. Table 2-5 shows
> SBPA1 is 3080_0000 and table 2-3 shows SPBA2 starts at 3000_0000 which is
> what I believe I did in this patch.
Okay, I'm not saying your patch is not wrong, just curious about your UART issue
you mentioned :)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-05-17  1:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06  1:33 [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus Adam Ford
2021-04-06  1:33 ` [PATCH 2/2] arm64: dts: imx8mm: Add spba1 and spba2 buses Adam Ford
2021-05-11  2:46 ` [PATCH 1/2] arm64: dts: imx8mn: Add spba1 bus Shawn Guo
2021-05-11 10:45   ` Adam Ford
2021-05-11 12:20     ` Robin Gong
2021-05-11 14:48       ` Adam Ford
2021-05-13  2:09         ` Shawn Guo
2021-05-14 14:57         ` Robin Gong
2021-05-14 15:27           ` Adam Ford
2021-05-17  1:35             ` Robin Gong

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