Skip to contentSkip to conversation

x86: edison: Enable SD slot

PATCH Superseded Andy Shevchenko 1 participant 1 message Jun 25, 2019 x86

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: edison: Enable SD slot

Enable SD slot on Intel Edison platform.

By default firmware doesn't put device on active state. Thus, we have to do this explicitly.

---
 arch/x86/dts/edison.dts     |  5 -----
 board/intel/edison/edison.c | 10 ++++++++++
 configs/edison_defconfig    |  1 +
 3 files changed, 11 insertions(+), 5 deletions(-)
arch/x86/dts/edison.dts +0 -5
index c0487656d3..df24aa0d26 100644
@@ -84,15 +84,10 @@
 		reg = <0xff3fc000 0x1000>;
 	};
 
-/*
- * FIXME: For now U-Boot DM model doesn't allow to power up this controller.
- * Enabling it will make U-Boot hang.
- *
 	sdcard: mmc at ff3fa000 {
 		compatible = "intel,sdhci-tangier";
 		reg = <0xff3fa000 0x1000>;
 	};
- */
 
 	pmu: power at ff00b000 {
 		compatible = "intel,pmu-mid";
board/intel/edison/edison.c +10 -0
index 5faf3c57f2..d80ee3aa8a 100644
@@ -13,9 +13,19 @@
 #include <linux/usb/gadget.h>
 
 #include <asm/cache.h>
+#include <asm/pmu.h>
 #include <asm/scu.h>
 #include <asm/u-boot-x86.h>
 
+/* List of Intel Tangier LSSs */
+#define PMU_LSS_TANGIER_SDIO0_01	1
+
+int board_early_init_r(void)
+{
+	pmu_turn_power(PMU_LSS_TANGIER_SDIO0_01, true);
+	return 0;
+}
+
 static struct dwc3_device dwc3_device_data = {
 	.maximum_speed = USB_SPEED_HIGH,
 	.base = CONFIG_SYS_USB_OTG_BASE,
configs/edison_defconfig +1 -0
index 0196db65cf..a21806290f 100644
@@ -5,6 +5,7 @@ CONFIG_VENDOR_INTEL=y
 CONFIG_TARGET_EDISON=y
 CONFIG_SMP=y
 CONFIG_GENERATE_ACPI_TABLE=y
+CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_CPU=y
Signature · 1 line
2.20.1