From patchwork Tue Jun 25 20:52:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 1122281 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45YJJ425LQz9s3l for ; Wed, 26 Jun 2019 06:52:20 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E5833C21DED; Tue, 25 Jun 2019 20:52:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EA720C21C3F; Tue, 25 Jun 2019 20:52:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6BB02C21C3F; Tue, 25 Jun 2019 20:52:10 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by lists.denx.de (Postfix) with ESMTPS id 99675C21C29 for ; Tue, 25 Jun 2019 20:52:09 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jun 2019 13:52:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,417,1557212400"; d="scan'208";a="360512816" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 25 Jun 2019 13:52:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 73090130; Tue, 25 Jun 2019 23:52:05 +0300 (EEST) From: Andy Shevchenko To: Simon Glass , Bin Meng , u-boot@lists.denx.de Date: Tue, 25 Jun 2019 23:52:04 +0300 Message-Id: <20190625205204.86807-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: Andy Shevchenko Subject: [U-Boot] [PATCH v2] x86: edison: Enable SD slot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Reviewed-by: Bin Meng --- - fix conflict when applying patch arch/x86/dts/edison.dts | 5 ----- board/intel/edison/edison.c | 10 ++++++++++ configs/edison_defconfig | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/x86/dts/edison.dts b/arch/x86/dts/edison.dts index c0487656d3..df24aa0d26 100644 --- a/arch/x86/dts/edison.dts +++ b/arch/x86/dts/edison.dts @@ -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@ff3fa000 { compatible = "intel,sdhci-tangier"; reg = <0xff3fa000 0x1000>; }; - */ pmu: power@ff00b000 { compatible = "intel,pmu-mid"; diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c index 5faf3c57f2..d80ee3aa8a 100644 --- a/board/intel/edison/edison.c +++ b/board/intel/edison/edison.c @@ -13,9 +13,19 @@ #include #include +#include #include #include +/* 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, diff --git a/configs/edison_defconfig b/configs/edison_defconfig index 468754493e..cac6e4201f 100644 --- a/configs/edison_defconfig +++ b/configs/edison_defconfig @@ -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