Other Parts Discussed in Thread:AM3358
目前硬件上i2s各个引脚一直为0V 没有信号,供电是正常的。这是什么原因呢
原理图是如上连接:
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_INPUT_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)
>;
};
&mcasp0 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mcasp0_pins>;
pinctrl-1 = <&mcasp0_pins_sleep>;
fsl,mode = "i2s-slave";
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
/* 4 serializers */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 2 0 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
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-cells = <0>;
clock-frequency = <24000000>;
};
sgtl5000: sgtl5000@12{
compatible = "fsl,sgtl5000";
reg = <0x12>;
clocks = <&clk_24M>;
VDDA-supply = <&vaux2_reg>;
VDDIO-supply = <&vaux2_reg>;
VDDD-supply = <&vbat>;
};
设备树如上:
Shine:
图片显示不出来,请点击右下方的“使用高级编辑器编辑文本”插入图片。
,
user6512297:
,
Shine:
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_INPUT_PULLDOWN | MUX_MODE0) /* rmii1_ref_clk.mcasp0_axr1 */
>;
};请问用的是AM3358吗?我看数据手册里,rmii1_ref_clk管脚MUX_MODE0不是mcasp0_ahclkx,而是rmii1_refclk管脚,请再核对一下管脚复用配置。
,
user6512297:
目前更改过mode3 mode4 mode7,仍然没时钟信号。http://www.myir-tech.com/product/myd-am335x-j.htm#loc这是板子的信息
,
Shine:
mcasp0_ahclkx是用的哪根管脚? 是MCASP0_AHCLKX管脚的mode 0模式,还是LCD_DATA15管脚的mode3,还是MII1_TXD2管脚的Mode6,不同的管脚,配置是不一样的。
,
Shine:
具体mcbsp0和哪些管脚复用,请查看datasheet管脚说明表。
,
user6512297:
hi Shine,确认是使用MCASP0_AHCLKX管脚的mode 0模式。请问可能发生问题的原因是?
,
Shine:
请把pinmux管脚复用寄存器dump出来,看一下是否都配置正确了。
如果配置正确,声卡也能识别出来的话,应该会有信号。
,
user6512297:
root@localhost:~#cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pin
pin 100 (44e10990.0): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
pin 101 (44e10994.0): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
pin 102 (44e10998.0): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
pin 103 (44e1099c.0): 48304100.ecap (GPIO UNCLAIMED) function backlight_pins group backlight_pins
pin 104 (44e109a0.0): 48060000.mmc (GPIO UNCLAIMED) function pinmux_mmc1_pins_sleep group pinmux_mmc1_pins_sleep
pin 105 (44e109a4.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 106 (44e109a8.0): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
pin 107 (44e109ac.0): 48038000.mcasp (GPIO UNCLAIMED) function mcasp0_pins group mcasp0_pins
pin 108 (44e109b0.0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 109 (44e109b4.0): 44e10800.pinmux (GPIO UNCLAIMED) function pinmux_clkout2_pin group pinmux_clkout2_pin
10800.pinmux/pinmux-pins
…………………………………………………………………………………[2.138967] davinci_evm sound: sgtl5000 <-> 48038000.mcasp mapping ok
[2.147982] cpu cpu0: of_pm_voltdm_notifier_register: Fail calculating voltage latency[950000<->1260000]:-22
[2.159191] pinctrl-single 44e10800.pinmux: pin 44e10920.0 already requested by 48038000.mcasp; cannot claim for 4a100000.ethernet
[2.171064] pinctrl-single 44e10800.pinmux: pin-72 (4a100000.ethernet) status -22
[2.178598] pinctrl-single 44e10800.pinmux: could not request pin 72 (44e10920.0) from group cpsw_defaulton device pinctrl-single
[2.190503] cpsw 4a100000.ethernet: Error applying setting, reverse things back
[2.261758] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[2.267892] davinci_mdio 4a101000.mdio: no live phy, scanning all
[2.274463] davinci_mdio: probe of 4a101000.mdio failed with error -5
[2.281983] cpsw 4a100000.ethernet: Detected MACID = 10:08:2c:09:c8:61
[2.303192] cpsw 4a100000.ethernet: cpsw: Detected MACID = 10:08:2c:09:c8:63
[2.311824] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 02:12:54 UTC (946692774)
[2.323677] ALSA device list:
[2.326681]#0: AM335x-EVMSK
[2.365429] kjournald starting.Commit interval 5 seconds
[2.372372] EXT3-fs (mmcblk0p2): using internal journal
[2.378912] EXT3-fs (mmcblk0p2): recovery complete
[2.383760] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[2.390728] VFS: Mounted root (ext3 filesystem) on device 179:2.
[2.398507] devtmpfs: mounted
[2.401921] Freeing unused kernel memory: 256K (c083a000 – c087a000)
Mount failed for selinuxfs on /sys/fs/selinux:No such file or directory
[2.584363] random: init urandom read with 53 bits of entropy available
[2.824691] init: plymouth-upstart-bridge main process (816) terminated with status 1
[2.857318] init: plymouth-upstart-bridge main process ended, respawning
[2.964255] init: plymouth-upstart-bridge main process (827) terminated with status 1
[2.978178] init: plymouth-upstart-bridge main process ended, respawning
[2.994205] init: ureadahead main process (819) terminated with status 5
[3.065553] init: plymouth-upstart-bridge main process (832) terminated with status 1
[3.078675] init: plymouth-upstart-bridge main process ended, respawningUbuntu 14.04.6 LTS localhost.localdomain ttyS0
,
Shine:
请问McASP是做辅还是做主?processor SDK版本是多少?