调试过程中,我们已经能够在/sys/bus/sdio/devices/下发现设备
mmc2:0001:1 mmc2:0001:2 mmc2:0001:3
硬件:AM4376,wifi模组(IC为BCM43455)
内核: linux3.12
硬件连接: 4根data,cmd,clk【我们没有使用CD检测脚】
dts配置如下:ti,non-removable;和broken-cd;都试过
mmc3: mmc@47810000 {
compatible = "ti,omap4-hsmmc";
reg = <0x47810000 0x1000>;
ti,hwmods = "mmc3";
clocks = <&mmc_clk>, <&clkdiv32k_ick>;
clock-names = "fck", "mmchsdb_fck";
ti,dual-volt;
ti,needs-special-reset;
dmas = <&edma 22
&edma 23>;
dma-names = "tx", "rx";
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
// status = "disabled";
status = "okay";
};
mmc3_pins: pinmux_mmc3_pins {
pinctrl-single,pins = <
0x1f0 (PIN_INPUT_PULLUP | MUX_MODE3)
0x1f4 (PIN_INPUT_PULLUP | MUX_MODE3)
0x1f8 (PIN_INPUT_PULLUP | MUX_MODE3)
0x1fc (PIN_INPUT_PULLUP | MUX_MODE3)
0x200 (PIN_INPUT_PULLUP | MUX_MODE3)
0x204 (PIN_INPUT_PULLUP | MUX_MODE3)
};
mmc3_sleep_pins: pinmux_mmc3_sleep_pins {
pinctrl-single,pins = <
0x1f0 (PIN_INPUT | MUX_MODE3)
0x1f4 (PIN_INPUT | MUX_MODE3)
0x1f8 (PIN_INPUT | MUX_MODE3)
0x1fc (PIN_INPUT | MUX_MODE3)
0x200 (PIN_INPUT | MUX_MODE3)
0x204 (PIN_INPUT | MUX_MODE3)
>;
};
&mmc3 {
status = "okay";
vmmc-supply = <&vmmcsd_fixed>;
bus-width = <4>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mmc3_pins>;
pinctrl-1 = <&mmc3_sleep_pins>;
// ti,non-removable;
broken-cd;
keep-power-in-suspend;
};
Eggsy Pang:
你好, 你的问题是sdio_readl wait_for_completion(&mrq->completion); 阻塞吗?驱动是自己写的吗?
Jupon zhu:
回复 Eggsy Pang:
是别的厂家提供的驱动,之前通过mm1的TF卡座,是可以运行的。但目前放在mmc3却不可以。
Eggsy Pang:
mmc3: mmc@47810000 {compatible = "ti,omap4-hsmmc";reg = <0x47810000 0x1000>;ti,hwmods = "mmc3";clocks = <&mmc_clk>, <&clkdiv32k_ick>;clock-names = "fck", "mmchsdb_fck";ti,dual-volt;ti,needs-special-reset;dmas = <&edma 22&edma 23>;dma-names = "tx", "rx";interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;// status = "disabled";status = "okay";};
不需要改动,保持原有的
mmc3: mmc@47810000 { compatible = "ti,omap4-hsmmc"; reg = <0x47810000 0x1000>; ti,hwmods = "mmc3"; ti,needs-special-reset; interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
然后对于mmc3
&mmc3 { status = "okay"; /* these are on the crossbar and are outlined in the xbar-event-map element */ dmas = <&edma_xbar 30 0 1>, <&edma_xbar 31 0 2>; dma-names = "tx", "rx"; vmmc-supply = <&vmmcwl_fixed>; bus-width = <4>; pinctrl-names = "default", "sleep"; pinctrl-0 = <&mmc3_pins_default>; pinctrl-1 = <&mmc3_pins_sleep>; cap-power-off-card; keep-power-in-suspend; ti,non-removable;
#address-cells = <1>; #size-cells = <0>; wlcore: wlcore@0 { compatible = "ti,wl1835"; reg = <2>; interrupt-parent = <&gpio1>; interrupts = <23 IRQ_TYPE_LEVEL_HIGH>; }; //替换你要的驱动 和中断引脚
//如果你有CS引脚记得添加};
pinmux要注意看MMC3和其他功能引脚有没有冲突。
Jupon zhu:
回复 Eggsy Pang:
1 edma_xbar怎么配置?
2 vmmcwl_fixed怎么配置?
3 compatible = "ti,wl1835"; 换成我们的驱动的compatible是否可以?
4 interrupt-parent = <&gpio1>;中的gpio1怎么配置?
5 interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;这个可以修改不?