diff --git a/source/component/wifi/drv/hi_sdio_detect/hi_sdio_detect.c b/source/component/wifi/drv/hi_sdio_detect/hi_sdio_detect.c index ddb8bcf7c..865b83fa1 100644 --- a/source/component/wifi/drv/hi_sdio_detect/hi_sdio_detect.c +++ b/source/component/wifi/drv/hi_sdio_detect/hi_sdio_detect.c @@ -168,7 +168,6 @@ static int platform_wifi_power_on(void) { int ret = 0; - pr_info("==-----------------------------==\n"); pr_info("WiFi: Powering ON Wi-Fi module...\n"); // Step 1: Enable WL_EN / REG_ON (GPIO 35) @@ -177,17 +176,15 @@ static int platform_wifi_power_on(void) pr_err("Failed to power on Wi-Fi (GPIO set failed)\n"); return ret; } - mdelay(1500); // 延时等待电源稳定*****此处一般为100,但是在我的板上不稳定,所以加长了延时。 + mdelay(200); // 延时等待电源稳定***** // Step 2: 通知内核:插上了 SDIO 卡(拉低检测脚) - pr_info("==------------\n"); ret = hisi_wlan_set_carddetect(1); if (ret != 0) { pr_err("Failed to set card detect\n"); // 即使卡检测失败,也要继续执行,因为电源已经打开 } - mdelay(2000); // 等待模块初始化 & 驱动探测 - pr_info("==------mdelay(2000)------\n"); + mdelay(100); // 等待模块初始化 & 驱动探测 pr_info("WiFi: Power ON & Card Detect DONE.\n"); return 0; } diff --git a/source/kernel/linux-4.4.y/arch/arm/boot/dts/hi3798mv310.dts b/source/kernel/linux-4.4.y/arch/arm/boot/dts/hi3798mv310.dts index 8a1d22da8..2c32b633d 100755 --- a/source/kernel/linux-4.4.y/arch/arm/boot/dts/hi3798mv310.dts +++ b/source/kernel/linux-4.4.y/arch/arm/boot/dts/hi3798mv310.dts @@ -507,6 +507,9 @@ caps = <0x8007000f>; caps2 = <0x4000>; max-frequency = <50000000>; + + no-uhs; // MT7668BS no uhs mode + status = "okay"; }; diff --git a/source/kernel/linux-4.4.y/drivers/mmc/host/himciv300/himciv300.c b/source/kernel/linux-4.4.y/drivers/mmc/host/himciv300/himciv300.c index 6040e2b8e..a287523fd 100755 --- a/source/kernel/linux-4.4.y/drivers/mmc/host/himciv300/himciv300.c +++ b/source/kernel/linux-4.4.y/drivers/mmc/host/himciv300/himciv300.c @@ -1426,6 +1426,15 @@ static int __init himciv300_pltm_probe(struct platform_device *pdev) goto out; } + /* 对 MT7668(SDIO2 @ f9c40000)清 UHS 位 */ + /* dts 里声明 no-uhs 的节点,清掉 UHS 位,避免 CMD11 电压切换 */ + if (of_property_read_bool(np, "no-uhs")) { + mmc->caps &= ~(MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | + MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_SDR104 | + MMC_CAP_UHS_DDR50); + dev_info(&pdev->dev, "UHS disabled by dts (no-uhs)\n"); + } + mmc_add_host(mmc); /* only support eMMC */