Rockchip RK3588 kernel dts解析之音频模块

Rockchip RK3588 kernel dts解析之音频模块

RK3588 EVB板子使用的是外接声卡ES8388

DTS配置参考:rk3588-evb1-lp4.dtsi

  • 系统声音配置:
es8388_sound: es8388-sound {
		status = "okay";
		compatible = "rockchip,multicodecs-card";
		rockchip,card-name = "rockchip-es8388";
		hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;  //耳机检测脚
		io-channels = <&saradc 3>;  //耳机adc检测通道
		io-channel-names = "adc-detect";
		keyup-threshold-microvolt = <1800000>; //耳机检测参考电压
		poll-interval = <100>;
		spk-con-gpio = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>; //喇叭控制GPIO
		hp-con-gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; //耳机控制GPIO
		rockchip,format = "i2s";
		rockchip,mclk-fs = <256>;
		rockchip,cpu = <&i2s0_8ch>;  //与RK3588进行数据通信的i2s通道
		rockchip,codec = <&es8388>;
		rockchip,audio-routing =        //配置声音通路
			"Headphone", "LOUT1",
			"Headphone", "ROUT1",
			"Speaker", "LOUT2",
			"Speaker", "ROUT2",
			"Headphone", "Headphone Power",
			"Headphone", "Headphone Power",
			"Speaker", "Speaker Power",
			"Speaker", "Speaker Power",
			"LINPUT1", "Main Mic",
			"LINPUT2", "Main Mic",
			"RINPUT1", "Headset Mic",
			"RINPUT2", "Headset Mic";
		pinctrl-names = "default";
		pinctrl-0 = <&hp_det>;
		play-pause-key {    //配置耳机按键
			label = "playpause";
			linux,code = <KEY_PLAYPAUSE>;
			press-threshold-microvolt = <2000>;
		};
	};
  • 配置I2S0
&i2s0_8ch {
	status = "okay";
	pinctrl-0 = <&i2s0_lrck
		     &i2s0_sclk
		     &i2s0_sdi0
		     &i2s0_sdo0>;
};
  • ES8388设备驱动配置
&i2c7 { //ES8388挂在i2c7上面
	status = "okay";
	es8388: es8388@11 {
		status = "okay";
		#sound-dai-cells = <0>;
		compatible = "everest,es8388", "everest,es8323";
		reg = <0x11>;
		clocks = <&cru I2S0_8CH_MCLKOUT>;
		clock-names = "mclk";
		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
		assigned-clock-rates = <12288000>;
		pinctrl-names = "default";
		pinctrl-0 = <&i2s0_mclk>;
	};
};

上一篇:Rockchip RK3588 kernel dts解析之WIFI/BT
返回: RK3588 Kernel DTS解析

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

loitawu

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

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

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

打赏作者

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

抵扣说明:

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

余额充值