SDIO device

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SDIO device

660 次查看
chengxinyu
Contributor I

我现在想测试 SDIO 控制器的设备模式,但我没有该设备的驱动程序代码。您能否提供设备模式的驱动程序代码

0 项奖励
回复
2 回复数

617 次查看
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @chengxinyu 

I hope you are doing very well.

 

I am not sure what processor you are using or BSP version, but you can refer to this segment of the Device tree (in this case for i.MX8MP):

&usdhc2 {
	assigned-clocks = <&clk IMX8MP_CLK_USDHC2>;
	assigned-clock-rates = <400000000>;
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
	pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
	pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
	cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
	vmmc-supply = <&reg_usdhc2_vmmc>;
	bus-width = <4>;
	status = "okay";
};

&usdhc3 {
	assigned-clocks = <&clk IMX8MP_CLK_USDHC3>;
	assigned-clock-rates = <400000000>;
	pinctrl-names = "default", "state_100mhz", "state_200mhz";
	pinctrl-0 = <&pinctrl_usdhc3>;
	pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
	pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
	bus-width = <8>;
	non-removable;
	status = "okay";
};

 There you can configure your USDHC interfaces.

 

I hope this can helps to you.

 

Best regards,

Salas.

0 项奖励
回复

604 次查看
chengxinyu
Contributor I
您好,我使用的是RISC-V处理器,使用的是FreeRTOS实时操作系统。我想讨要一份SDIO控制器的device模式的驱动代码。
0 项奖励
回复