storage: emmc: Compatible with G12B revA and revB [1/1]

PD#SWPL-5575

Problem:
not Compatible with G12B version a and b

Solution:
add revA match-data

Verify:
G12B-W400 RevA and RevB

Change-Id: Iee09861f7b162ee0660ea12dab60a238a9ae6be5
Signed-off-by: long yu <long.yu@amlogic.com>
This commit is contained in:
long yu
2019-03-06 14:21:48 +08:00
committed by Luan Yuan
parent e46f696c0b
commit a4c61827ab
4 changed files with 33 additions and 3 deletions

View File

@@ -1406,7 +1406,7 @@
sd_emmc_c: emmc@ffe07000 {
status = "disabled";
compatible = "amlogic, meson-mmc-g12b";
compatible = "amlogic, meson-mmc-g12b-a";
reg = <0xffe07000 0x800>;
interrupts = <0 191 1>;
pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";

View File

@@ -1406,7 +1406,7 @@
sd_emmc_c: emmc@ffe07000 {
status = "disabled";
compatible = "amlogic, meson-mmc-g12b";
compatible = "amlogic, meson-mmc-g12b-a";
reg = <0x0 0xffe07000 0x0 0x800>;
interrupts = <0 191 1>;
pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";

View File

@@ -3536,6 +3536,31 @@ static struct meson_mmc_data mmc_data_g12a = {
.sdmmc.sdr104.tx_phase = 0,
};
static struct meson_mmc_data mmc_data_g12b_a = {
.chip_type = MMC_CHIP_G12B_A,
.port_a_base = 0xffe03000,
.port_b_base = 0xffe05000,
.port_c_base = 0xffe07000,
.pinmux_base = 0xff634400,
.clksrc_base = 0xff63c000,
.ds_pin_poll = 0x3a,
.ds_pin_poll_en = 0x48,
.ds_pin_poll_bit = 13,
.sdmmc.init.core_phase = 3,
.sdmmc.init.tx_phase = 0,
.sdmmc.init.rx_phase = 0,
.sdmmc.calc.core_phase = 0,
.sdmmc.calc.tx_phase = 2,
.sdmmc.hs.core_phase = 1,
.sdmmc.ddr.core_phase = 2,
.sdmmc.ddr.tx_phase = 0,
.sdmmc.hs2.core_phase = 2,
.sdmmc.hs2.tx_phase = 0,
.sdmmc.sd_hs.core_phase = 2,
.sdmmc.sdr104.core_phase = 2,
.sdmmc.sdr104.tx_phase = 0,
};
static struct meson_mmc_data mmc_data_g12b = {
.chip_type = MMC_CHIP_G12B,
.port_a_base = 0xffe03000,
@@ -3632,6 +3657,10 @@ static const struct of_device_id meson_mmc_of_match[] = {
.compatible = "amlogic, meson-mmc-tl1",
.data = &mmc_data_tl1,
},
{
.compatible = "amlogic, meson-mmc-g12b-a",
.data = &mmc_data_g12b_a,
},
{}
};

View File

@@ -188,9 +188,10 @@ enum mmc_chip_e {
MMC_CHIP_GXLX = 0x26,
MMC_CHIP_TXHD = 0x27,
MMC_CHIP_G12A = 0x28,
MMC_CHIP_G12B = 0x29,
MMC_CHIP_G12B_A = 0x29,
MMC_CHIP_GXLX2 = 0x2a,
MMC_CHIP_TL1 = 0X2b,
MMC_CHIP_G12B = 0x29b,
};
struct mmc_phase {