kernel/0043-fix-delete-useless-audio-code.patch

410 lines
11 KiB
Diff
Raw Normal View History

2024-12-19 21:34:44 +00:00
From e325c85dff97f0af5d3ed9dfd30761a7efe41bfb Mon Sep 17 00:00:00 2001
2024-12-15 18:29:23 +00:00
From: denglei <denglei@eswincomputing.com>
Date: Mon, 3 Jun 2024 14:28:29 +0800
Subject: [PATCH 043/219] fix:delete useless audio code.
Changelogs:
delete useless audio code.
---
arch/riscv/boot/dts/eswin/eic7700-evb-a2.dts | 14 --
arch/riscv/boot/dts/eswin/eic7700-evb.dts | 14 --
.../dts/eswin/eswin-win2030-die1-soc.dtsi | 151 ++----------------
arch/riscv/boot/dts/eswin/eswin-win2030.dts | 71 --------
.../boot/dts/eswin/hifive-premier-550.dts | 5 -
5 files changed, 10 insertions(+), 245 deletions(-)
diff --git a/arch/riscv/boot/dts/eswin/eic7700-evb-a2.dts b/arch/riscv/boot/dts/eswin/eic7700-evb-a2.dts
index 41fb37364295..a92e182c073a 100644
--- a/arch/riscv/boot/dts/eswin/eic7700-evb-a2.dts
+++ b/arch/riscv/boot/dts/eswin/eic7700-evb-a2.dts
@@ -90,20 +90,6 @@ npu0_reserved: sprammemory@59000000 {
reg = <0x0 0x59000000 0x0 0x400000>;
};
- /*
- dsp_reserved0: dsp@90000000 {
- compatible = "shared-dma-pool";
- reg = <0x0 0x90000000 0x0 0x1000000>;
- reusable;
- status = "okay";
- };
- */
-
- dsp_reserved1: dsp@91000000 {
- reg = <0 0x91000000 0 0x200000>;
- no-map;
- };
-
smpmemtest_rsv0@91200000 {
reg = <0 0x91200000 0 0x2000000>;
no-map;
diff --git a/arch/riscv/boot/dts/eswin/eic7700-evb.dts b/arch/riscv/boot/dts/eswin/eic7700-evb.dts
index 2aebb21a51a0..bec9f0b54367 100644
--- a/arch/riscv/boot/dts/eswin/eic7700-evb.dts
+++ b/arch/riscv/boot/dts/eswin/eic7700-evb.dts
@@ -89,20 +89,6 @@ npu0_reserved: sprammemory@59000000 {
reg = <0x0 0x59000000 0x0 0x400000>;
};
- /*
- dsp_reserved0: dsp@90000000 {
- compatible = "shared-dma-pool";
- reg = <0x0 0x90000000 0x0 0x1000000>;
- reusable;
- status = "okay";
- };
- */
-
- dsp_reserved1: dsp@91000000 {
- reg = <0 0x91000000 0 0x200000>;
- no-map;
- };
-
smpmemtest_rsv0@91200000 {
reg = <0 0x91200000 0 0x2000000>;
no-map;
diff --git a/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi b/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi
index 48a042d05e8e..2c19ffd3893e 100644
--- a/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi
+++ b/arch/riscv/boot/dts/eswin/eswin-win2030-die1-soc.dtsi
@@ -1198,7 +1198,7 @@ d1_pwm0: pwm@0x70818000 {
};
d1_i2s0: i2s0@70200000 {
- compatible = "eswin,i2s-dsp";
+ compatible = "snps,i2s";
clocks = <&d1_clock WIN2030_CLK_VO_I2S_MCLK>;
clock-names = "mclk";
#address-cells = <1>;
@@ -1207,20 +1207,12 @@ d1_i2s0: i2s0@70200000 {
reg = <0x0 0x70200000 0x0 0x10000>;
dma-names = "rx", "tx";
dmas = <&d1_aon_dmac 4 0>, <&d1_aon_dmac 5 0>;
- memory-region = <&dsp_reserved1>;
vo_mclk_sel,syscrg = <&d1_sys_crg 0x1bc>;
resets = <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_RSTN>,
- <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_PRSTN>;
- reset-names = "i2srst", "i2sprst";
+ <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_PRSTN>,
+ <&d1_reset VO_PHYRST_CTRL SW_VO_PRSTN>;
+ reset-names = "i2srst", "i2sprst", "voprst";
dma-noncoherent;
- ports {
- d1_i2s0_port: port@0 {
- d1_i2s0_endpoint: endpoint {
- remote-endpoint = <&d1_codec_endpoint>;
- dai-format = "i2s";
- };
- };
- };
};
d1_i2s1: i2s1@70210000 {
@@ -1235,17 +1227,10 @@ d1_i2s1: i2s1@70210000 {
dmas = <&d1_aon_dmac 2 1>, <&d1_aon_dmac 3 1>;
vo_mclk_sel,syscrg = <&d1_sys_crg 0x1bc>;
resets = <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_RSTN>,
- <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_PRSTN>;
- reset-names = "i2srst", "i2sprst";
+ <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_PRSTN>,
+ <&d1_reset VO_PHYRST_CTRL SW_VO_PRSTN>;
+ reset-names = "i2srst", "i2sprst", "voprst";
dma-noncoherent;
- ports {
- d1_i2s1_port: port@0 {
- d1_i2s1_endpoint: endpoint {
- remote-endpoint = <&d1_dummy_endpoint1>;
- dai-format = "i2s";
- };
- };
- };
};
d1_i2s2: i2s@70220000 {
@@ -1260,17 +1245,10 @@ d1_i2s2: i2s@70220000 {
dmas = <&d1_aon_dmac 0 2>, <&d1_aon_dmac 1 2>;
vo_mclk_sel,syscrg = <&d1_sys_crg 0x1bc>;
resets = <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_RSTN>,
- <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_PRSTN>;
- reset-names = "i2srst", "i2sprst";
+ <&d1_reset VO_I2SRST_CTRL SW_VO_I2S_PRSTN>,
+ <&d1_reset VO_PHYRST_CTRL SW_VO_PRSTN>;
+ reset-names = "i2srst", "i2sprst", "voprst";
dma-noncoherent;
- ports {
- d1_i2s2_port: port@0 {
- d1_i2s2_endpoint: endpoint {
- remote-endpoint = <&d1_dummy_endpoint2>;
- dai-format = "i2s";
- };
- };
- };
};
d1_dsp_subsys:dsp_subsys@72280400 {
@@ -1407,30 +1385,6 @@ ESWIN_MAIBOX_U84_IRQ_BIT
dsp@0 {
};
};
- d1_sofdsp: sofdsp@4 {
- #sound-dai-cells = <1>;
- #address-cells = <2>;
- #size-cells = <2>;
- compatible = "eswin,vision-dsp";
- reg = <0x0 0x7b000000 0x0 0x10000>,
- <0x0 0x7b100000 0x0 0x40000>;
- /* memory-region = <&dsp_reserved0>; */
- mbox-names = "sof-dsp0";
- mboxes = <&d1_mbox4 0>;
- tplg-name = "sof-win2030-es8316.tplg";
- machine-drv-name = "asoc-simple-card";
- clocks = <&d1_clock WIN2030_CLK_DSP_ACLK_0>;
- clock-names = "aclk";
- process-id = <0>;
- dma-ranges = <0x0 0x40000000 0x0 0xc0000000 0x0 0xc0000000>;
- iommus = <&smmu1 WIN2030_SID_DSP_0>;
- mailbox-dsp-to-u84-addr = <ESWIN_MAILBOX_DSP_0_TO_U84_REG_BASE>;
- mailbox-u84-to-dsp-addr = <ESWIN_MAILBOX_U84_TO_DSP_0_REG_BASE>;
- dsp-uart = <&d1_uart1>;
- ringbuffer-region = <&dsp_reserved1>;
- numa-node-id = <1>;
- dma-noncoherent;
- };
};
die1_rtc: rtc@71818000 {
compatible = "eswin,win2030-rtc";
@@ -1817,14 +1771,6 @@ d1_hdmi_in_dc: endpoint@0 {
remote-endpoint = <&d1_dc_out_hdmi>;
};
};
- port@1 {
- reg = <2>;
- d1_hdmi_endpoint: endpoint {
- reg = <0>;
- system-clock-frequency = <12288000>;
- remote-endpoint = <&d1_i2s0_endpoint>;
- };
- };
};
};
@@ -1952,85 +1898,8 @@ d1_sdhci_emmc: mmc@70450000 {
dma-noncoherent;
};
- d1_soundcard: soundcard {
- compatible = "simple-audio-card";
- simple-audio-card,name = "Eswin sound card";
- simple-audio-card,widgets = "Headphone", "Headphone Jack";
- simple-audio-card,dai-link@0 {
- format = "i2s";
- cpu {
- sound-dai = <&d1_sofdsp 0>;
- };
- codec {
- sound-dai = <&d1_thruout 0>;
- };
- };
-
- simple-audio-card,dai-link@1 {
- format = "i2s";
- cpu {
- sound-dai = <&d1_sofdsp 1>;
- };
- codec {
- sound-dai = <&d1_thruout 1>;
- };
- };
-
- simple-audio-card,dai-link@2 {
- format = "i2s";
- cpu {
- sound-dai = <&d1_i2s0>;
- };
- codec {
- sound-dai = <&d1_es8316>;
- system-clock-frequency = <12288000>;
- };
- plat {
- sound-dai = <&d1_sofdsp 2>;
- };
- };
- };
-
d1_graphcard: graphcard {
compatible = "audio-graph-card";
- dais = <&d1_i2s0_port
- &d1_i2s1_port
- &d1_i2s2_port>;
- };
-
- d1_dummy_codec:codec@0x70230000 {
- status = "disabled";
- reg = <0x00000000 0x70230000 0x00000000 0x00000100>;
- #sound-dai-cells = <0x00000000>;
- compatible = "eswin_dummy_codec";
- ports {
- /*
- port@0 {
- d1_dummy_endpoint0: endpoint {
- system-clock-frequency = <12288000>;
- remote-endpoint = <&d1_i2s0_endpoint>;
- };
- };
- */
- port@1 {
- d1_dummy_endpoint1: endpoint {
- system-clock-frequency = <12288000>;
- remote-endpoint = <&d1_i2s1_endpoint>;
- };
- };
- port@2 {
- d1_dummy_endpoint2: endpoint {
- system-clock-frequency = <12288000>;
- remote-endpoint = <&d1_i2s2_endpoint>;
- };
- };
- };
- };
-
- d1_thruout: thru-out {
- compatible = "eswin,thru-out";
- #sound-dai-cells = <1>;
- memory-region = <&dsp_reserved1>;
};
d1_usbdrd3_0: usb0@70480000 {
diff --git a/arch/riscv/boot/dts/eswin/eswin-win2030.dts b/arch/riscv/boot/dts/eswin/eswin-win2030.dts
index 8e7769e5b509..4f8c9f146ce3 100644
--- a/arch/riscv/boot/dts/eswin/eswin-win2030.dts
+++ b/arch/riscv/boot/dts/eswin/eswin-win2030.dts
@@ -100,20 +100,6 @@ npu1_reserved: sprammemory@79000000 {
no-map;
reg = <0x0 0x79000000 0x0 0x400000>;
};
- //WRAN: dsp reserved space is fixed to 0x90000000 and 0x91000000 in the code, the below space is not working for dsp,it's just for building
- /*
- dsp_reserved0: dsp@4010000000 {
- compatible = "shared-dma-pool";
- reg = <0x40 0x10000000 0 0x1000000>;
- reusable;
- status = "okay";
- };
- */
-
- dsp_reserved1: dsp@4011000000 {
- reg = <0x40 0x11000000 0 0x200000>;
- no-map;
- };
smpmemtest_rsv0@4011200000 {
reg = <0x40 0x11200000 0 0x2000000>;
@@ -194,19 +180,6 @@ npu1_reserved: sprammemory@79000000 {
no-map;
reg = <0x0 0x79000000 0x0 0x400000>;
};
- /*
- dsp_reserved0: dsp@90000000 {
- compatible = "shared-dma-pool";
- reg = <0x0 0x90000000 0x0 0x1000000>;
- reusable;
- status = "okay";
- };
- */
-
- dsp_reserved1: dsp@91000000 {
- reg = <0 0x91000000 0 0x200000>;
- no-map;
- };
smpmemtest_rsv0@91200000 {
reg = <0 0x91200000 0 0x2000000>;
@@ -317,20 +290,6 @@ npu0_reserved: sprammemory@59000000 {
reg = <0x0 0x59000000 0x0 0x400000>;
};
- /*
- dsp_reserved0: dsp@90000000 {
- compatible = "shared-dma-pool";
- reg = <0x0 0x90000000 0x0 0x1000000>;
- reusable;
- status = "okay";
- };
- */
-
- dsp_reserved1: dsp@91000000 {
- reg = <0 0x91000000 0 0x200000>;
- no-map;
- };
-
smpmemtest_rsv0@91200000 {
reg = <0 0x91200000 0 0x2000000>;
no-map;
@@ -406,20 +365,6 @@ npu1_reserved: sprammemory@79000000 {
no-map;
reg = <0x0 0x79000000 0x0 0x400000>;
};
- //WRAN: dsp reserved space is fixed to 0x90000000 and 0x91000000 in the code, the below space is not working for dsp,it's just for building
- /*
- dsp_reserved0: dsp@2010000000 {
- compatible = "shared-dma-pool";
- reg = <0x20 0x10000000 0x0 0x1000000>;
- reusable;
- status = "okay";
- };
- */
-
- dsp_reserved1: dsp@2011000000 {
- reg = <0x20 0x11000000 0 0x200000>;
- no-map;
- };
smpmemtest_rsv0@2011200000 {
reg = <0x20 0x11200000 0 0x2000000>;
@@ -1146,26 +1091,10 @@ &d1_i2s2 {
status = "disabled";
};
-&d1_sofdsp {
- status = "disabled";
-};
-
-&d1_soundcard {
- status = "disabled";
-};
-
&d1_graphcard {
status = "disabled";
};
-&d1_dummy_codec {
- status = "disabled";
-};
-
-&d1_thruout {
- status = "disabled";
-};
-
&d1_aon_i2c0 {
status = "disabled";
aon_eeprom@50 {
diff --git a/arch/riscv/boot/dts/eswin/hifive-premier-550.dts b/arch/riscv/boot/dts/eswin/hifive-premier-550.dts
index e2a203812d12..271a5881d3de 100644
--- a/arch/riscv/boot/dts/eswin/hifive-premier-550.dts
+++ b/arch/riscv/boot/dts/eswin/hifive-premier-550.dts
@@ -81,11 +81,6 @@ linux,cma {
linux,cma-default;
};
- dsp_reserved1: dsp@91000000 {
- reg = <0 0x91000000 0 0x200000>;
- no-map;
- };
-
lpcpu0_reserved: lpcpu@a0000000 {
no-map;
reg = <0x0 0xa0000000 0x0 0x100000>;
--
2.47.0