8mm平台Linux系统 内核版本:Linux4.14.78 wm8960 默认挂载i2c2,sai2 修改设备树,实现wm8960挂载到i2c3,sai1 设备树和头文件路径: OK8MM-linux-sdk/OK8MM-linux-kernel/arch/arm64/boot/dts/freescale/ok8mm-evk.dts OK8MM-linux-sdk/OK8MM-linux-kernel/arch/arm64/boot/dts/freescale/fsl-imx8mm.dtsi sai 挂载到sai1 :cpu-dai = <&sai1>; 修改热插拔极性 :hp-det-gpios = <&gpio4 22 1>;
3.注释i2c2下的wm8960节点 4.修改&i2c3节点为 &i2c3 { clock-frequency = <100000>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; wm8960: wm8960@1a { compatible = "wlf,wm8960"; reg = <0x1a>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_wm8960_power_en>; wlf,shared-lrclk; clocks = <&clk IMX8MM_CLK_SAI1_ROOT>; clock-names = "mclk"; }; }; 5.注释pinctrl_sai1_dsd节点并修改pinctrl_sai1节点为: pinctrl_sai1: sai1grp { fsl,pins = < MX8MM_IOMUXC_SAI1_TXFS_SAI1_TX_SYNC 0xd6 MX8MM_IOMUXC_SAI1_TXC_SAI1_TX_BCLK 0xd6 MX8MM_IOMUXC_SAI1_MCLK_SAI1_MCLK 0xd6 MX8MM_IOMUXC_SAI1_TXD0_SAI1_TX_DATA0 0xd6 MX8MM_IOMUXC_SAI1_RXD0_SAI1_RX_DATA0 0xd6 MX8MM_IOMUXC_SAI1_RXFS_GPIO4_IO0 0xd6 >; }; 6.修改sai1节点为 &sai1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai1>; assigned-clocks = <&clk IMX8MM_CLK_SAI1_SRC>, <&clk IMX8MM_CLK_SAI1_DIV>; assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; assigned-clock-rates = <0>, <24000000>; status = "okay"; }; 6.保存设备树修改,单独编译后替换到开发板。 U盘的挂载目录: /run/media/sda1 7.可以使用i2c tools工具查看wm8960是否挂载到i2c3下,wm8960地址为0x1a |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-11-22 09:43
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.