x86: edison: Enable SD slot
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 25 Jun 2019 20:52:04 +0000 (23:52 +0300)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 9 Aug 2019 14:24:02 +0000 (22:24 +0800)
Enable SD slot on Intel Edison platform.

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/dts/edison.dts
board/intel/edison/edison.c
configs/edison_defconfig

index c0487656d3f03a161109bc19aadef2199cbce510..df24aa0d26aa5c65959dc052bda45569a29b2cef 100644 (file)
                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@ff3fa000 {
                compatible = "intel,sdhci-tangier";
                reg = <0xff3fa000 0x1000>;
        };
- */
 
        pmu: power@ff00b000 {
                compatible = "intel,pmu-mid";
index 5faf3c57f2c71ca023cf3a20f18ca582b80ead60..d80ee3aa8a6389d051d5495f9cce49a6609d3a82 100644 (file)
 #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,
index 468754493eb108bb81eb2c04945345f01bddb43d..cac6e4201fa5fb3179d3e59a41c03fa9cfea336e 100644 (file)
@@ -4,6 +4,7 @@ CONFIG_NR_DRAM_BANKS=3
 CONFIG_VENDOR_INTEL=y
 CONFIG_TARGET_EDISON=y
 CONFIG_SMP=y
+CONFIG_BOARD_EARLY_INIT_R=y
 CONFIG_LAST_STAGE_INIT=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMDLINE_EDITING is not set