storage: emmc: Compatible with G12B revA and revB [1/1]
authorlong yu <long.yu@amlogic.com>
Wed, 6 Mar 2019 06:21:48 +0000 (14:21 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 12 Mar 2019 10:51:10 +0000 (02:51 -0800)
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>
arch/arm/boot/dts/amlogic/mesong12b_a.dtsi
arch/arm64/boot/dts/amlogic/mesong12b_a.dtsi
drivers/amlogic/mmc/aml_sd_emmc.c
include/linux/amlogic/sd.h

index 9e6514f..a397cf8 100644 (file)
 
        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";
index 7b712f3..d76692b 100644 (file)
 
        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";
index f679829..002833f 100644 (file)
@@ -3546,6 +3546,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,
@@ -3645,6 +3670,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,
+       },
 
        {}
 };
index c051df4..045f770 100644 (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 {