Added Lime2 eMMC support to Uboot and kernel, patches are disabled by default
http://forum.armbian.com/index.php/topic/853-armbian-customization/page-2
This commit is contained in:
parent
39b234106a
commit
f8ed96f8de
1118
config/lime2-emmc.fex
Normal file
1118
config/lime2-emmc.fex
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
|
||||
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
|
||||
index 5352cd7..2690b64 100644
|
||||
--- a/drivers/mmc/core/mmc.c
|
||||
+++ b/drivers/mmc/core/mmc.c
|
||||
@@ -481,6 +481,8 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
||||
|
||||
if (card->ext_csd.rev >= 5) {
|
||||
/* check whether the eMMC card supports HPI */
|
||||
+#if 0
|
||||
+// comment for emmc HPI patch
|
||||
if (ext_csd[EXT_CSD_HPI_FEATURES] & 0x1) {
|
||||
card->ext_csd.hpi = 1;
|
||||
if (ext_csd[EXT_CSD_HPI_FEATURES] & 0x2)
|
||||
@@ -495,6 +497,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
||||
ext_csd[EXT_CSD_OUT_OF_INTERRUPT_TIME] * 10;
|
||||
}
|
||||
|
||||
+#endif
|
||||
card->ext_csd.rel_param = ext_csd[EXT_CSD_WR_REL_PARAM];
|
||||
card->ext_csd.rst_n_function = ext_csd[EXT_CSD_RST_N_FUNCTION];
|
||||
}
|
||||
42
patch/kernel/sunxi-next/add-emmc-lime2.patch.disabled
Normal file
42
patch/kernel/sunxi-next/add-emmc-lime2.patch.disabled
Normal file
@ -0,0 +1,42 @@
|
||||
diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
index d5c796c..1f5339d 100644
|
||||
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
@@ -188,6 +188,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins_a>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
|
||||
index 3d5087b..78668aa 100644
|
||||
--- a/drivers/mmc/core/mmc.c
|
||||
+++ b/drivers/mmc/core/mmc.c
|
||||
@@ -504,7 +504,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
||||
pr_info("%s: MAN_BKOPS_EN bit is not set\n",
|
||||
mmc_hostname(card->host));
|
||||
}
|
||||
-
|
||||
+#if 0
|
||||
/* check whether the eMMC card supports HPI */
|
||||
if (!broken_hpi && (ext_csd[EXT_CSD_HPI_FEATURES] & 0x1)) {
|
||||
card->ext_csd.hpi = 1;
|
||||
@@ -519,7 +519,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
|
||||
card->ext_csd.out_of_int_time =
|
||||
ext_csd[EXT_CSD_OUT_OF_INTERRUPT_TIME] * 10;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
card->ext_csd.rel_param = ext_csd[EXT_CSD_WR_REL_PARAM];
|
||||
card->ext_csd.rst_n_function = ext_csd[EXT_CSD_RST_N_FUNCTION];
|
||||
|
||||
32
patch/u-boot/u-boot-default/add-emmc-lime2.patch.disabled
Normal file
32
patch/u-boot/u-boot-default/add-emmc-lime2.patch.disabled
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
index 8acff78..3cdc5d1 100644
|
||||
--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
@@ -182,6 +182,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins_a>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
|
||||
index c9d0f47..1b1ea27 100644
|
||||
--- a/configs/A20-OLinuXino-Lime2_defconfig
|
||||
+++ b/configs/A20-OLinuXino-Lime2_defconfig
|
||||
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
CONFIG_DRAM_CLK=480
|
||||
CONFIG_MMC0_CD_PIN="PH1"
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_USB0_VBUS_PIN="PC17"
|
||||
CONFIG_USB0_VBUS_DET="PH5"
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
|
||||
32
patch/u-boot/u-boot-dev/add-emmc-lime2.patch.disabled
Normal file
32
patch/u-boot/u-boot-dev/add-emmc-lime2.patch.disabled
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
index 8acff78..3cdc5d1 100644
|
||||
--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
@@ -182,6 +182,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins_a>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
|
||||
index c9d0f47..1b1ea27 100644
|
||||
--- a/configs/A20-OLinuXino-Lime2_defconfig
|
||||
+++ b/configs/A20-OLinuXino-Lime2_defconfig
|
||||
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
CONFIG_DRAM_CLK=480
|
||||
CONFIG_MMC0_CD_PIN="PH1"
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_USB0_VBUS_PIN="PC17"
|
||||
CONFIG_USB0_VBUS_DET="PH5"
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
|
||||
32
patch/u-boot/u-boot-next/add-emmc-lime2.patch.disabled
Normal file
32
patch/u-boot/u-boot-next/add-emmc-lime2.patch.disabled
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
index 8acff78..3cdc5d1 100644
|
||||
--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
+++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
|
||||
@@ -182,6 +182,15 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&mmc2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&mmc2_pins_a>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ bus-width = <4>;
|
||||
+ non-removable;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
|
||||
index c9d0f47..1b1ea27 100644
|
||||
--- a/configs/A20-OLinuXino-Lime2_defconfig
|
||||
+++ b/configs/A20-OLinuXino-Lime2_defconfig
|
||||
@@ -3,6 +3,7 @@ CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
CONFIG_DRAM_CLK=480
|
||||
CONFIG_MMC0_CD_PIN="PH1"
|
||||
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
CONFIG_USB0_VBUS_PIN="PC17"
|
||||
CONFIG_USB0_VBUS_DET="PH5"
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2"
|
||||
Loading…
Reference in New Issue
Block a user