ipq6018: enable mmc workaround

Change-Id: I93e0dae86195b0e434cef25651614d515c724288
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
This commit is contained in:
Antony Arun T 2019-05-25 12:41:28 +05:30
parent 3bd96bd8ba
commit 27df165798
7 changed files with 19 additions and 9 deletions

View file

@ -21,7 +21,7 @@
aliases {
console = "/serial@78B1000";
mmc = "/sdhci@7804000";
mmc = "/sdhci@07804000";
pci0 = "/pci@20000000";
usb0 = "/xhci@8a00000";
};

View file

@ -21,7 +21,7 @@
aliases {
console = "/serial@78B1000";
mmc = "/sdhci@7804000";
mmc = "/sdhci@07804000";
pci0 = "/pci@20000000";
usb0 = "/xhci@8a00000";
usb1 = "/xhci@7000000";

View file

@ -21,7 +21,7 @@
aliases {
console = "/serial@78B1000";
mmc = "/sdhci@7804000";
mmc = "/sdhci@07804000";
pci0 = "/pci@20000000";
usb0 = "/xhci@8a00000";
usb1 = "/xhci@7000000";

View file

@ -112,10 +112,6 @@
nand_gpio {};
};
mmc: sdhci@7804000 {
compatible = "qcom,sdhci-msm";
};
i2c0: i2c@78b6000 {
compatible = "qcom,qup-i2c";
#address-cells = <1>;

View file

@ -66,6 +66,10 @@
reg = <0x7000000 0xcd00>;
};
mmc: sdhci@07804000 {
compatible = "qcom,sdhci-msm";
};
spi {
status = "ok";

View file

@ -225,9 +225,12 @@ void emmc_clock_config()
writel(0x20B, GCC_SDCC1_APPS_CFG_RCGR);
/* Delay for clock operation complete */
udelay(10);
writel(0x1, GCC_SDCC1_APPS_M);
/* writel(0x1, GCC_SDCC1_APPS_M);
writel(0xFC, GCC_SDCC1_APPS_N);
writel(0xFD, GCC_SDCC1_APPS_D);
*/
writel(0, GCC_SDCC1_APPS_M);
writel(0, GCC_SDCC1_APPS_N);
/* Delay for clock operation complete */
udelay(10);
/* Update APPS_CMD_RCGR to reflect source selection */

View file

@ -485,8 +485,15 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
timeout--;
udelay(1000);
}
#ifdef CONFIG_IPQ6018
/*Forcefully change the clk to 24MHz for IPQ6018*/
if (clock == 52000000)
clk |= 0x00000407;
else
clk |= SDHCI_CLOCK_CARD_EN;
#else
clk |= SDHCI_CLOCK_CARD_EN;
#endif
sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
return 0;
}