RK3288-android8-es7210-阵列麦克风

ES7210驱动包

应需求调试一个ES7210的阵列麦克风

首先移植

From 234647c69a57c32198c65836e7fc521dc22e444b Mon Sep 17 00:00:00 2001
From: LuoXiaoTan <[email protected]>
Date: Tue, 10 Jul 2018 18:08:50 -0700
Subject: [PATCH] ASoC: codecs: add es7210 adc driver

---
 .../dts/rockchip/rk3399-excavator-sapphire.dtsi    |    3 +-
 .../dts/rockchip/rk3399-sapphire-excavator-edp.dts |   29 +-
 sound/soc/codecs/Kconfig                           |    4 +
 sound/soc/codecs/Makefile                          |    2 +
 sound/soc/codecs/es7210.c                          | 1774 ++++++++++++++++++++
 sound/soc/codecs/es7210.h                          |   76 +


diff --git a/arch/arm64/boot/dts/rockchip/rk3399-excavator-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-excavator-sapphire.dtsi
index c7446fc0..4092486 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-excavator-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-excavator-sapphire.dtsi
@@ -127,7 +127,7 @@
 };
 
 &spdif {
-	status = "okay";
+	status = "disabled";
 	pinctrl-0 = <&spdif_bus>;
 	i2c-scl-rising-time-ns = <450>;
 	i2c-scl-falling-time-ns = <15>;
@@ -140,6 +140,7 @@
 	i2c-scl-falling-time-ns = <15>;
 
 	rt5651: rt5651@1a {
+		status = "disabled";
 		#sound-dai-cells = <0>;
 		compatible = "rockchip,rt5651";
 		reg = <0x1a>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts
index 841e499..1e86ee2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator-edp.dts
@@ -109,8 +109,23 @@
 		compatible = "rockchip,rockchip-rt5651-tc358749x-sound";
 		rockchip,cpu = <&i2s0>;
 		rockchip,codec = <&rt5651 &rt5651 &tc358749x>;
+		status = "disabled";
+	};
+	es7210_sound: es7210-sound {
 		status = "okay";
+		compatible = "simple-audio-card";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,mclk-fs = <256>;
+		simple-audio-card,name = "rockchip,es7210";
+
+		simple-audio-card,cpu {
+			sound-dai = <&i2s0>;
+		};
+		simple-audio-card,codec {
+			sound-dai = <&es7210>;
+		};
 	};
+
 };
 
 &backlight {
@@ -146,7 +161,7 @@
 };
 
 &rt5651 {
-	status = "okay";
+	status = "disabled";
 };
 
 &cdn_dp {
@@ -173,6 +188,7 @@
 	gsl3673: gsl3673@40 {
 		compatible = "GSL,GSL3673";
 		reg = <0x40>;
+		status = "disabled";
 		screen_max_x = <1536>;
 		screen_max_y = <2048>;
 		irq_gpio_number = <&gpio1 20 IRQ_TYPE_LEVEL_LOW>;
@@ -191,7 +207,16 @@
 		int-gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&hdmiin_gpios>;
-		status = "okay";
+		status = "disabled";
+	};
+	es7210: es7210@40 {
+		#sound-dai-cells = <0>;
+		compatible = "MicArray_1";
+		reg = <0x40>;
+		clocks = <&cru SCLK_I2S_8CH_OUT>;
+		clock-names = "mclk";
+		pinctrl-names = "default";
+		pinctrl-0 = <&i2s_8ch_mclk>;
 	};
 };
 
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 3792cf4..7c2189d 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -468,6 +468,10 @@ config SND_SOC_BT_SCO
 config SND_SOC_DMIC
 	tristate
 
+config SND_SOC_ES7210
+	tristate "Everest Semi ES7210 CODEC"
+	depends on I2C
+
 config SND_SOC_ES8316
 	tristate "Everest Semi ES8316 CODEC"
 	depends on I2C
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index aff1c31..99624d2 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -57,6 +57,7 @@ snd-soc-da9055-objs := da9055.o
 snd-soc-dw-hdmi-audio-objs := dw-hdmi-audio.o
 snd-soc-bt-sco-objs := bt-sco.o
 snd-soc-dmic-objs := dmic.o
+snd-soc-es7210-objs := es7210.o
 snd-soc-es8316-objs := es8316.o
 snd-soc-es8323-objs := es8323.o
 snd-soc-es8328-objs := es8328.o
@@ -261,6 +262,7 @@ obj-$(CONFIG_SND_SOC_DA9055)	+= snd-soc-da9055.o
 obj-$(CONFIG_SND_SOC_DW_HDMI_AUDIO)	+= snd-soc-dw-hdmi-audio.o
 obj-$(CONFIG_SND_SOC_BT_SCO)	+= snd-soc-bt-sco.o
 obj-$(CONFIG_SND_SOC_DMIC)	+= snd-soc-dmic.o
+obj-$(CONFIG_SND_SOC_ES7210)	+= snd-soc-es7210.o
 obj-$(CONFIG_SND_SOC_ES8316)	+= snd-soc-es8316.o
 obj-$(CONFIG_SND_SOC_ES8323)	+= snd-soc-es8323.o
 obj-$(CONFIG_SND_SOC_ES8328)	+= snd-soc-es8328.o

 打上补丁,配置DTS,我这个原来的ES8323的芯片保留功放喇叭.

	sound: sound {
		status = "disabled";
		compatible = "simple-audio-card";
		simple-audio-card,format = "i2s";
		simple-audio-card,name = "rockchip,es8323-codec";
		simple-audio-card,mclk-fs = <256>;
		simple-audio-card,widgets =
			"Microphone", "Microphone Jack",
			"Headphone", "Headphone Jack";
		simple-audio-card,routing =
			"MIC1", "Microphone Jack",
			"MIC2", "Microphone Jack",
			"Microphone Jack", "micbias1",
			"Headphone Jack", "HPOL",
			"Headphone Jack", "HPOR";

		simple-audio-card,dai-link@0 {
			format = "i2s";
			cpu {
				sound-dai = <&i2s>;
				system-c
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
以下是一份针对RK3288-EVB-Android SDK的DTS文件修改示例,可以实现SD卡启动: ``` /dts-v1/; /plugin/; / { model = "Rockchip RK3288-EVB board"; compatible = "rockchip,rk3288-evb"; memory@60000000 { device_type = "memory"; reg = <0x60000000 0x40000000>; }; chosen { bootargs = "console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootwait earlyprintk"; stdout-path = &uart2; }; uart2: serial@11004000 { compatible = "rockchip,rk3288-uart", "snps,dw-apb-uart"; reg = <0x11004000 0x1000>; interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; clocks = <&uart2_clk>; clock-names = "uartclk"; status = "okay"; }; sdhci@11014000 { compatible = "rockchip,rk3288-dw-mshc"; reg = <0x11014000 0x1000>; interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru SCLK_SDMMC>, <&cru PCLK_SDMMC>; clock-names = "sdmmc", "apb_pclk"; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4 &sdmmc_bus8 &sdmmc_cd_n>; status = "okay"; mmc-slot@0 { reg = <0>; bus-width = <8>; cd-gpios = <&gpio7 3 GPIO_ACTIVE_LOW>; non-removable; status = "okay"; }; }; &dpu { status = "okay"; }; &lcdc { status = "okay"; }; &backlight { status = "okay"; }; &act8846_reg { status = "okay"; }; &i2c1 { status = "okay"; act8846: act8846@5b { compatible = "active-semi,act8846"; reg = <0x5b>; gpio-controller; #gpio-cells = <2>; interrupt-parent = <&gpio2>; interrupts = <6 IRQ_TYPE_LEVEL_LOW>; status = "okay"; }; }; &mmc { status = "okay"; }; &mmc1 { status = "okay"; }; &mmc2 { status = "okay"; }; &mmc3 { status = "okay"; }; &mmc4 { status = "okay"; }; &sdmmc_clk { rockchip,pins = <RK_GPIO3 8 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_cmd { rockchip,pins = <RK_GPIO3 9 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_bus4 { rockchip,pins = <RK_GPIO3 10 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_bus8 { rockchip,pins = <RK_GPIO3 11 RK_FUNC_2 &pcfg_pull_none>; }; &sdmmc_cd_n { rockchip,pins = <RK_GPIO7 3 RK_FUNC_GPIO &pcfg_pull_up>; }; }; ``` 此外,你还需要在编译内核时加入SD卡启动相关的配置选项。具体方法可以参考RK3288-Android SDK的文档。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

旋风旋风

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值