如果不使用额外的cd引脚来侦测tf卡的话,则可以使用clk引脚来侦测,以mmc1为例子,给出如下设备节点配置:
&mmc1 {
bus-width = <0x4>;
max-frequency = <50000000>;
cd_clk;
cap-sd-highspeed;
pinctrl-names = "default";
pinctrl-0 = <&mci1_pins>;
status = "okay";
};
如果使用额外的引脚作为tf卡cd引脚,则需要在mmc1的设备节点增添detect-gpio属性,说明cd引脚是哪个·,同时cd引脚要配置成gpio功能,以mmc1为例子,给出如下设备节点配置:
&mmc1 {
bus-width = <0x4>;
max-frequency = <50000000>;
detect-gpio = <&gpio 71 1>;
cap-sd-highspeed;
pinctrl-names = "default";
pinctrl-0 = <&mci1_pins &tf_cd>;
status = "okay";
};