关于MT6737 SD卡不需要热插拔问题
时间:10-02
整理:3721RD
点击:
关于MT6737 SD卡不需要 热插拔问题,dct已经和MT6572设置一样,现在就是dts怎么设置。默认设置如下 。怎么修改
mmc1: msdc1@11240000{
compatible = "mediatek,mt6735m-mmc";
reg = <0x11240000 0x10000 /* MSDC1_BASE */
0x10000e84 0x2>; /* FPGA PWR_GPIO, PWR_GPIO_EO */
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
status = "disabled";
};
&mmc1 {
clk_src = /bits/ 8 <MSDC30_CLKSRC_200MHZ>;
bus-width = <4>;
max-frequency = <200000000>;
msdc-sys-suspend;
cap-sd-highspeed;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
sd-uhs-ddr50;
pinctl = <&mmc1_pins_default>;
pinctl_sdr104 = <&mmc1_pins_sdr104>;
pinctl_sdr50 = <&mmc1_pins_sdr50>;
pinctl_ddr50 = <&mmc1_pins_ddr50>;
register_setting = <&mmc1_register_setting_default>;
host_function = /bits/ 8 <MSDC_SD>;
cd_level = /bits/ 8 <MSDC_CD_LOW>;
cd-gpios = <&pio 5 0>;
status = "okay";
};
mmc1: msdc1@11240000{
compatible = "mediatek,mt6735m-mmc";
reg = <0x11240000 0x10000 /* MSDC1_BASE */
0x10000e84 0x2>; /* FPGA PWR_GPIO, PWR_GPIO_EO */
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
status = "disabled";
};
&mmc1 {
clk_src = /bits/ 8 <MSDC30_CLKSRC_200MHZ>;
bus-width = <4>;
max-frequency = <200000000>;
msdc-sys-suspend;
cap-sd-highspeed;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
sd-uhs-ddr50;
pinctl = <&mmc1_pins_default>;
pinctl_sdr104 = <&mmc1_pins_sdr104>;
pinctl_sdr50 = <&mmc1_pins_sdr50>;
pinctl_ddr50 = <&mmc1_pins_ddr50>;
register_setting = <&mmc1_register_setting_default>;
host_function = /bits/ 8 <MSDC_SD>;
cd_level = /bits/ 8 <MSDC_CD_LOW>;
cd-gpios = <&pio 5 0>;
status = "okay";
};
不太清楚你的需求,你是要开机直接初始化sd卡?
是的,是开机直接初始化SD卡,不支持热插拔
从你的dts上看,代码流程应该是sd卡插入之后做中断处理。如果你要去掉热插拔的话,应该在代码里把中断处理函数拿出来直接执行,改dts我觉得没什么意义吧
在MT6572上,只需要去掉2个标志就可以了 MSDC_CD_PIN_EN | MSDC_REMOVABLE ,就不支持热插拔,要是MT6737要修改源码支持,那工作量很大了,
如果是这样的话,你可以看看代码里面有没有相关的配置宏。或者研究一下MT6572上对dts配置的具体处理