mt6735 如何用Device tree配置Audio相关的dts文件和API的使用
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
如何用Device tree配置Audio Driver相关的dts文件和API的使用
[SOLUTION]
1.配置 alps/kernel-3.10/arch/ARM64/boot/dts/$(project).dts
在bus总线下按如下方式添加Node.
MT_SOC_DL1_PCM@0x11220000 {
compatible = "mediatek,mt_soc_pcm_dl1";
reg = <0x11220000 0x1000>;
interrupts = <0 144 0x8>;
audclk-GPIO = <143 0>;
audmiso-gpio = <144 0>;
audmosi-gpio = <145 0>;
vowclk-gpio = <148 0>;
extspkamp-gpio = <129 0>;
extspkamp_2-gpio = <128 0>;
rcvspkswitch-gpio = <120 0>;
I2S1clk-gpio = <135 0>;
i2s1dat-gpio = <137 0>;
i2s1mclk-gpio = <134 0>;
i2s1ws-gpio = <136 0>;
};
2.参考mt_soc_pcm_dl1.c中的Auddrv_OF_ParseGPIO去Parse Node.
3.参考mt_soc_codec_63xx.c 通过调用
GetGPIO_Info, mt_set_gpio_node,mt_set_gpio_pull_enable等函数
设置gpio的使能,方向等功能.
大功告成.
如何用Device tree配置Audio Driver相关的dts文件和API的使用
[SOLUTION]
1.配置 alps/kernel-3.10/arch/ARM64/boot/dts/$(project).dts
在bus总线下按如下方式添加Node.
MT_SOC_DL1_PCM@0x11220000 {
compatible = "mediatek,mt_soc_pcm_dl1";
reg = <0x11220000 0x1000>;
interrupts = <0 144 0x8>;
audclk-GPIO = <143 0>;
audmiso-gpio = <144 0>;
audmosi-gpio = <145 0>;
vowclk-gpio = <148 0>;
extspkamp-gpio = <129 0>;
extspkamp_2-gpio = <128 0>;
rcvspkswitch-gpio = <120 0>;
I2S1clk-gpio = <135 0>;
i2s1dat-gpio = <137 0>;
i2s1mclk-gpio = <134 0>;
i2s1ws-gpio = <136 0>;
};
2.参考mt_soc_pcm_dl1.c中的Auddrv_OF_ParseGPIO去Parse Node.
3.参考mt_soc_codec_63xx.c 通过调用
GetGPIO_Info, mt_set_gpio_node,mt_set_gpio_pull_enable等函数
设置gpio的使能,方向等功能.
大功告成.
66666