Test SAI3 while running M7 firmware with remoteproc

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Test SAI3 while running M7 firmware with remoteproc

Test SAI3 while running M7 firmware with remoteproc

 

Test Environment

i.MX8MP EVK

L6.6.52

 

Backgroud

The default BSP will assign SAI3 and I2C3 to M7 when we use imx8mp-evk-rpmsg.dtb. If customer want to assign SAI3 and I2C3 to A53 and test audio in Linux while running M7 sdk with remoterpoc.

 

Test steps

 

1. Delete all of audio related code in SDK in below function.

  • BOARD_BootClockRUN 
  • BOARD_RdcInit

2. Modify Uboot

 

arch/arm/dts/imx8mp-evk-u-boot.dtsi

 

The RDC will assign SAI3, sdma3 and i2c3 to M7 when M7 start. So we need to delete these lines. 

 

Snipaste_2025-02-07_12-51-29.jpg

 

3. Add RDC config in ATF

plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c

 Assign SAI3, sdma3 and i2c3 to A53.

 

Snipaste_2025-02-07_12-51-29.jpg

 4.Modify imx8mp-evk-rpmsg.dts

Delete rpmsg audio and i2c3.

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg-lpv.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg-lpv.dts
index e43c4dafdb88..4edc0cb71b1c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg-lpv.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg-lpv.dts
@@ -4,8 +4,3 @@
  */
 
 #include "imx8mp-evk-rpmsg.dts"
-
-&rpmsg_audio {
-	/delete-property/ fsl,enable-lpa;
-	/delete-property/ fsl,rpmsg-in;
-};
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts
index ddf5f76adc3b..75c9234d84b2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk-rpmsg.dts
@@ -8,11 +8,6 @@
 #include "imx8mp-evk.dts"
 
 / {
-	aliases {
-		i2c0 = &i2c1;
-		i2c1 = &i2c2;
-		i2c2 = &i2c_rpbus_3;
-	};
 
 	reserved-memory {
 		#address-cells = <2>;
@@ -45,70 +40,6 @@ rsc_table: rsc-table@550ff000 {
 			no-map;
 		};
 
-		audio_reserved: audio@81000000 {
-			compatible = "shared-dma-pool";
-			no-map;
-			reg = <0 0x81000000 0 0x10000000>;
-		};
-
-		micfil_reserved: mic_rpmsg@91000000 {
-			compatible = "shared-dma-pool";
-			no-map;
-			reg = <0 0x91000000 0 0x100000>;
-		};
-	};
-
-	sound-wm8960 {
-		status = "disabled";
-	};
-
-	sound-micfil {
-		status = "disabled";
-	};
-
-	rpmsg_audio: rpmsg_audio {
-		compatible = "fsl,imx8mp-rpmsg-audio";
-		model = "wm8960-audio";
-		fsl,rpmsg-channel-name = "rpmsg-audio-channel";
-		fsl,enable-lpa;
-		fsl,rpmsg-out;
-		fsl,rpmsg-in;
-		assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
-		assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
-		assigned-clock-rates = <12288000>;
-		clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI3_IPG>,
-			 <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI3_MCLK1>,
-			 <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SDMA3_ROOT>,
-			 <&clk IMX8MP_AUDIO_PLL1_OUT>,
-			 <&clk IMX8MP_AUDIO_PLL2_OUT>;
-		clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
-		audio-codec = <&codec>;
-		memory-region = <&audio_reserved>;
-		power-domains = <&audiomix_pd>;
-		audio-routing =
-			"LINPUT1", "MICB",
-			"LINPUT3", "MICB";
-		status = "okay";
-	};
-
-	rpmsg_micfil: rpmsg_micfil {
-		compatible = "fsl,imx8mp-rpmsg-audio";
-		model = "micfil-audio";
-		fsl,rpmsg-channel-name = "rpmsg-micfil-channel";
-		fsl,enable-lpa;
-		fsl,rpmsg-in;
-		assigned-clocks = <&clk IMX8MP_CLK_PDM>;
-		assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
-		assigned-clock-rates = <196608000>;
-		clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_IPG>,
-			 <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_PDM_ROOT>,
-			 <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SDMA3_ROOT>,
-			 <&clk IMX8MP_AUDIO_PLL1_OUT>,
-			 <&clk IMX8MP_AUDIO_PLL2_OUT>;
-		clock-names = "ipg", "mclk", "dma", "pll8k", "pll11k";
-		memory-region = <&micfil_reserved>;
-		power-domains = <&audiomix_pd>;
-		status = "okay";
 	};
 
 	imx8mp-cm7 {
@@ -144,72 +75,10 @@ &flexspi {
 	status = "disabled";
 };
 
-/delete-node/ &i2c3;
-
-&i2c_rpbus_3 {
-	compatible = "fsl,i2c-rpbus";
-	#address-cells = <1>;
-	#size-cells = <0>;
-	status = "okay";
-
-	pca6416: gpio@20 {
-		compatible = "ti,tca6416";
-		reg = <0x20>;
-		gpio-controller;
-		#gpio-cells = <2>;
-	};
-
-	ov5640_1: ov5640_mipi@3c {
-		compatible = "ovti,ov5640";
-		reg = <0x3c>;
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>;
-		clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
-		clock-names = "xclk";
-		assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
-		assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
-		assigned-clock-rates = <24000000>;
-		csi_id = <0>;
-		powerdown-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
-		reset-gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;
-		mclk = <24000000>;
-		mclk_source = <0>;
-		mipi_csi;
-		status = "disabled";
-
-		port {
-			ov5640_mipi_1_ep: endpoint {
-				remote-endpoint = <&mipi_csi1_ep>;
-				data-lanes = <1 2>;
-				clock-lanes = <0>;
-			};
-		};
-	};
-
-	codec: wm8960@1a {
-		compatible = "wlf,wm8960,lpa";
-		reg = <0x1a>;
-		wlf,shared-lrclk;
-		SPKVDD1-supply = <&reg_audio_pwr>;
-	};
-};
-
 &pwm4{
 	status = "disabled";
 };
 
-&sai3 {
-	status = "disabled";
-};
-
-&micfil {
-	status = "disabled";
-};
-
-&sdma3{
-	status = "disabled";
-};
-
 &uart3 {
     status = "disabled";
 };

 

Result

We can play audio on wm8960 after we load M7 firmware.

Snipaste_2025-02-20_11-07-59.jpg

无评分
版本历史
最后更新:
‎02-19-2025 08:10 PM
更新人: