SM1: Support HS400 for eMMC. [1/1]

PD#SWPL-163871

Problem:
Bring up.

Solution:
Support HS400 for eMMC.

Verify:
SM1_AC200

Change-Id: I8b4f8ffd6acc01e51eaa8c543c51a7cc379b926c
Signed-off-by: jinbiao <jinbiao.ou@amlogic.com>
This commit is contained in:
jinbiao
2024-04-01 12:20:57 +00:00
committed by Dezhen Wang
parent 0ec7daeace
commit 46b3b6fa76
4 changed files with 2154 additions and 108 deletions
@@ -1910,9 +1910,9 @@
max-frequency = <200000000>;
non-removable;
disable-wp;
//mmc-ddr-1_8v;
//mmc-hs200-1_8v;
//mmc-hs400-1_8v;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
//mmc-pwrseq = <&emmc_pwrseq>;
//vmmc-supply = <&vcc_3v3>;
//vqmmc-supply = <&vddio_boot>;
@@ -1937,41 +1937,41 @@
// &ao_to_sd_uart_pins>;
pinctrl-names = "sd_default",
"clk-gate",
"sd_1bit_pins";
// "sd_clk_cmd_uart_pins",
// "sd_1bit_uart_pins",
// "sd_to_ao_uart_pins",
// "ao_to_sd_uart_pins",
// "sd_to_ao_jtag_pins",
// "ao_to_sd_jtag_pins";
bus-width = <4>;
cap-sd-highspeed;
// sd-uhs-sdr12;
// sd-uhs-sdr25;
// sd-uhs-sdr50;
// sd-uhs-sdr104;
max-frequency = <200000000>;
disable-wp;
dat1-gpios = <&gpio GPIOC_1 GPIO_ACTIVE_HIGH>;
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_HIGH>;
//vmmc-supply = <&vddao_3v3>;
//vqmmc-supply = <&emmc_1v8>;
"clk-gate",
"sd_1bit_pins";
// "sd_clk_cmd_uart_pins",
// "sd_1bit_uart_pins",
// "sd_to_ao_uart_pins",
// "ao_to_sd_uart_pins",
// "sd_to_ao_jtag_pins",
// "ao_to_sd_jtag_pins";
bus-width = <4>;
cap-sd-highspeed;
//sd-uhs-sdr12;
//sd-uhs-sdr25;
//sd-uhs-sdr50;
//sd-uhs-sdr104;
max-frequency = <200000000>;
disable-wp;
dat1-gpios = <&gpio GPIOC_1 GPIO_ACTIVE_HIGH>;
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_HIGH>;
//vmmc-supply = <&vddao_3v3>;
//vqmmc-supply = <&emmc_1v8>;
};
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_m_pins>;
pinctrl-1 = <&sdio_m_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
bus-width = <4>;
cap-sd-highspeed;
sd-uhs-sdr104;
non-removable;
max-frequency = <200000000>;
disable-wp;
cap-sdio-irq;
keep-power-in-suspend;
status = "okay";
pinctrl-0 = <&sdio_m_pins>;
pinctrl-1 = <&sdio_m_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
bus-width = <4>;
cap-sd-highspeed;
sd-uhs-sdr104;
non-removable;
max-frequency = <200000000>;
disable-wp;
cap-sdio-irq;
keep-power-in-suspend;
//broken-cd;
};
File diff suppressed because it is too large Load Diff
@@ -1915,9 +1915,9 @@
max-frequency = <200000000>;
non-removable;
disable-wp;
//mmc-ddr-1_8v;
//mmc-hs200-1_8v;
//mmc-hs400-1_8v;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
//mmc-pwrseq = <&emmc_pwrseq>;
//vmmc-supply = <&vcc_3v3>;
//vqmmc-supply = <&vddio_boot>;
@@ -1942,41 +1942,41 @@
// &ao_to_sd_uart_pins>;
pinctrl-names = "sd_default",
"clk-gate",
"sd_1bit_pins";
// "sd_clk_cmd_uart_pins",
// "sd_1bit_uart_pins",
// "sd_to_ao_uart_pins",
// "ao_to_sd_uart_pins",
// "sd_to_ao_jtag_pins",
// "ao_to_sd_jtag_pins";
bus-width = <4>;
cap-sd-highspeed;
// sd-uhs-sdr12;
// sd-uhs-sdr25;
// sd-uhs-sdr50;
// sd-uhs-sdr104;
max-frequency = <200000000>;
disable-wp;
dat1-gpios = <&gpio GPIOC_1 GPIO_ACTIVE_HIGH>;
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_HIGH>;
//vmmc-supply = <&vddao_3v3>;
//vqmmc-supply = <&emmc_1v8>;
"clk-gate",
"sd_1bit_pins";
// "sd_clk_cmd_uart_pins",
// "sd_1bit_uart_pins",
// "sd_to_ao_uart_pins",
// "ao_to_sd_uart_pins",
// "sd_to_ao_jtag_pins",
// "ao_to_sd_jtag_pins";
bus-width = <4>;
cap-sd-highspeed;
//sd-uhs-sdr12;
//sd-uhs-sdr25;
//sd-uhs-sdr50;
//sd-uhs-sdr104;
max-frequency = <200000000>;
disable-wp;
dat1-gpios = <&gpio GPIOC_1 GPIO_ACTIVE_HIGH>;
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_HIGH>;
//vmmc-supply = <&vddao_3v3>;
//vqmmc-supply = <&emmc_1v8>;
};
&sd_emmc_a {
status = "okay";
pinctrl-0 = <&sdio_m_pins>;
pinctrl-1 = <&sdio_m_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
bus-width = <4>;
cap-sd-highspeed;
sd-uhs-sdr104;
non-removable;
max-frequency = <200000000>;
disable-wp;
cap-sdio-irq;
keep-power-in-suspend;
status = "okay";
pinctrl-0 = <&sdio_m_pins>;
pinctrl-1 = <&sdio_m_clk_gate_pins>;
pinctrl-names = "default", "clk-gate";
bus-width = <4>;
cap-sd-highspeed;
sd-uhs-sdr104;
non-removable;
max-frequency = <200000000>;
disable-wp;
cap-sdio-irq;
keep-power-in-suspend;
//broken-cd;
};
-38
View File
@@ -41,10 +41,6 @@
#include "mmc_key.h"
#include "mmc_dtb.h"
#include <linux/proc_fs.h>
//KV_TODO: modify
#if CONFIG_AMLOGIC_KERNEL_VERSION == 13515
#include <trace/hooks/mmc.h>
#endif
#include <linux/moduleparam.h>
#include <linux/amlogic/gki_module.h>
@@ -68,23 +64,6 @@ struct wifi_clk_table wifi_clk[WIFI_CLOCK_TABLE_MAX] = {
struct mmc_host *sdio_host;
static char *caps2_quirks = "none";
//#if CONFIG_AMLOGIC_KERNEL_VERSION == 13515
//void mmc_sd_update_cmdline_timing(void *data, struct mmc_card *card, int *err)
//{
// /* nothing */
// *err = 0;
//}
//
//void mmc_sd_update_dataline_timing(void *data, struct mmc_card *card, int *err)
//{
// /* nothing */
// *err = 0;
//}
//
//#define SD_CMD_TIMING mmc_sd_update_cmdline_timing
//#define SD_DATA_TIMING mmc_sd_update_dataline_timing
//#endif
static inline u32 aml_mv_dly1_nommc(u32 x)
{
return (x) | ((x) << 6) | ((x) << 12) | ((x) << 18);
@@ -4081,23 +4060,6 @@ static int meson_mmc_probe(struct platform_device *pdev)
schedule_delayed_work(&host->dtbkey, 50);
}
#if CONFIG_AMLOGIC_KERNEL_VERSION == 13515
#ifdef CONFIG_ANDROID_VENDOR_HOOKS
if (aml_card_type_non_sdio(host)) {
ret =
register_trace_android_vh_mmc_sd_update_cmdline_timing(SD_CMD_TIMING,
NULL);
if (ret)
pr_err("register update_cmdline_timing failed, err:%d\n", ret);
ret =
register_trace_android_vh_mmc_sd_update_dataline_timing(SD_DATA_TIMING,
NULL);
if (ret)
pr_err("register update_dataline timing failed, err:%d\n", ret);
}
#endif
#endif
#if IS_ENABLED(CONFIG_DEBUG_FS)
if (mmc->debugfs_root && aml_card_type_mmc(host)) {
host->debugfs_root = debugfs_create_dir(dev_name(&pdev->dev), mmc->debugfs_root);