hi 问一下am335x 中如何配置sgtl5000的设备树
Shine:
请参考下面的wiki网站是否有帮助?
processors.wiki.ti.com/…/Sitara_Linux_Audio_DAC_Example
,
user6512297:
[2.189063] sgtl5000 0-000a: Failed to get mclock: -2
[2.194895] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:16:19 UTC (946685779)
[2.203706] i2c 0-000a: Driver sgtl5000 requests probe deferral
[2.212779] ALSA device list:
[2.215779]No soundcards found.
[2.319931] kjournald starting.Commit interval 5 seconds
[2.326907] EXT3-fs (mmcblk0p2): using internal journal
[2.333460] EXT3-fs (mmcblk0p2): recovery complete
[2.338274] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[2.345540] VFS: Mounted root (ext3 filesystem) on device 179:2.
[2.353543] devtmpfs: mounted
[2.357083] Freeing unused kernel memory: 256K (c0836000 – c0876000)
Mount failed for selinuxfs on /sys/fs/selinux:No such file or directory
[2.535119] random: init urandom read with 53 bits of entropy available
[2.772883] init: plymouth-upstart-bridge main process (813) terminated with status 1
[2.780861] init: plymouth-upstart-bridge main process ended, respawning
[2.917525] init: plymouth-upstart-bridge main process (824) terminated with status 1
[2.925597] init: plymouth-upstart-bridge main process ended, respawning
[2.941008] init: ureadahead main process (816) terminated with status 5
[3.003366] init: plymouth-upstart-bridge main process (829) terminated with status 1
[3.011322] init: plymouth-upstart-bridge main process ended, respawningUbuntu 14.04.5 LTS localhost.localdomain ttyS0
localhost login: [4.571450] Adding 524284k swap on /SWAP.swap.Priority:-1 extents:136 across:678348k SS
[6.423016] sgtl5000 0-000a: Failed to get mclock: -2
[6.445136] sgtl5000 0-000a: Failed to get mclock: -2
[6.481362] sgtl5000 0-000a: Failed to get mclock: -2
[7.242547] sgtl5000 0-000a: Failed to get mclock: -2
[7.459166] sgtl5000 0-000a: Failed to get mclock: -2
[7.524406] sgtl5000 0-000a: Failed to get mclock: -2
[8.143949] sgtl5000 0-000a: Failed to get mclock: -2
[8.408538] sgtl5000 0-000a: Failed to get mclock: -2这个log的内容,源码下的飞思卡尔codec 驱动似乎和am335的设备树配置不一样
,
Shine:
请问用的是哪个版本的processor SDK? 设备树是怎么配置的?
,
user6512297:
hi Shine,目前用的版本是evm-01.00.00.03.
设备树配置如下:sound {compatible = "fsl,imx-audio-sgtl5000";ti,model = "AM335x-EVMSK";ti,audio-codec = <&sgtl5000>;ti,mcasp-controller = <&mcasp0>;ti,codec-clock-rate = <24000000>;ti,audio-routing ="Mic Jack","MIC3L";};
clocks{clk_24M: codec_clock {compatible = "fixed-clock";clock-output-name = "clk_24M";#clock-cells = <0>;clock-frequency = <24000000>;//gpios = <&gpio4 26 1>;};&i2c0 {pinctrl-names = "default";pinctrl-0 = <&i2c0_pins>;
status = "okay";clock-frequency = <400000>;sgtl5000: sgtl5000@12{compatible = "fsl,sgtl5000";reg = <0x12>;clocks = <&clk_24M>;VDDA-supply = <&vaux2_reg>;VDDIO-supply = <&vaux2_reg>;VDDD-supply = <&vbat>;};
};mcasp0_pins: mcasp0_pins {pinctrl-single,pins = <0x1ac (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.mcasp0_ahclkx */0x190 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_crs.mcasp0_aclkx */0x194 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_rxerr.mcasp0_fsx */0x198 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_col.mcasp0_axr0 */0x1a8 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.mcasp0_axr1 */>;};
mcasp0_pins_sleep: mcasp0_pins_sleep {pinctrl-single,pins = <0x1ac (PIN_OUTPUT_PULLDOWN | MUX_MODE0)0x190 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)0x194 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)0x198 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)0x1a8 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)>;};*******************************************************
[2.122875] davinci_evm sound: ASoC: no source widget found for MIC3L
[2.129348] davinci_evm sound: ASoC: Failed to add route MIC3L -> direct -> Mic Jack
[2.139239] ydx evm probe ok
[2.142620] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1260000]:-22
[2.211717] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[2.217857] davinci_mdio 4a101000.mdio: no live phy, scanning all
[2.224401] davinci_mdio: probe of 4a101000.mdio failed with error -5
[2.231936] cpsw 4a100000.ethernet: Detected MACID = 10:08:2c:09:c8:61
[2.253129] cpsw 4a100000.ethernet: cpsw: Detected MACID = 10:08:2c:09:c8:63
[2.261797] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 01:19:11 UTC (946689551)
[2.273688] ALSA device list:
[2.276690]#0: AM335x-EVMSK
******************************************
现在遇到了新的问题,声卡出现了。我只需要mic功能,但是添加失败了
,
user6512297:
补充一下:还修改了davinci-evm.c内容
static const struct of_device_id davinci_evm_dt_ids[] = {{.compatible = "fsl,imx-audio-sgtl5000",.data = &evm_dai_sgtl5000,},{.compatible = "ti,da830-evm-audio",.data = &evm_dai_tlv320aic3x,},{.compatible = "ti,beaglebone-black-audio",.data = &evm_dai_tda998x_hdmi,},{.compatible = "ti,dra7xx-evm-audio",.data = (void *) &dra7xx_evm_link,},{ /* sentinel */ }
};
static struct snd_soc_dai_link evm_dai_sgtl5000 = {.name= "sgtl5000",.stream_name = "SGTL5000",.codec_dai_name = "sgtl5000",.ops= &evm_ops,.init= evm_aic3x_init,.dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_CBM_CFM |SND_SOC_DAIFMT_IB_NF,
};
,
Shine:
这个报错信息可以参考下面的帖子,看一下是否 tlv320aic3x.c, davinci-evm.c and soc-core文件里没有定义MIC3L。
e2e.ti.com/…/704340