From patchwork Sat Jul 14 13:55:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 943950 X-Patchwork-Delegate: jagannadh.teki@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=csie.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41SWRX03scz9s29 for ; Sat, 14 Jul 2018 23:56:07 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 92E86C22066; Sat, 14 Jul 2018 13:56:00 +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 A7FD6C21DFB; Sat, 14 Jul 2018 13:55:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7A24AC21DFB; Sat, 14 Jul 2018 13:55:56 +0000 (UTC) Received: from wens.csie.org (mirror2.csie.ntu.edu.tw [140.112.30.76]) by lists.denx.de (Postfix) with ESMTPS id B06BBC21DD9 for ; Sat, 14 Jul 2018 13:55:55 +0000 (UTC) Received: by wens.csie.org (Postfix, from userid 1000) id 2B1F95FB9E; Sat, 14 Jul 2018 21:55:51 +0800 (CST) From: Chen-Yu Tsai To: u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Date: Sat, 14 Jul 2018 21:55:45 +0800 Message-Id: <20180714135545.11803-1-wens@csie.org> X-Mailer: git-send-email 2.18.0 Subject: [U-Boot] [PATCH] sunxi: Enable eMMC on Libre Computer Board ALL-H3-CC boards 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Libretech ALL-H3-CC has a high density connector for attaching an eMMC module. The module form factor and connection is specific to Libretech, and has provisions for split vmmc/vqmmc (core and I/O) voltage supplies, but this board does not wire the vqmmc side. The H2+/H3/H5 SoCs do not support alternate I/O voltages for eMMC either. Only 3.3V is supported. A specific module that ties vqmmc to vmmc, with both at 3.3V, must be used. Given that a) eMMC is not designed to be hotplugged, b) power is always provided on the pins, and c) MMC controllers can deal with missing cards, we can enable this by default. If a module is attached it will be picked up by the system. The device tree change was also submitted to the Linux Kernel and has already been queued up for 4.19. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard --- This patch is based on u-boot master at submission time: 5e9a9645816e mach-stm32: Rename CONFIG_SPL_RESET_SUPPORT to CONFIG_SPL_DM_RESET --- arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi | 9 +++++++++ configs/libretech_all_h3_cc_h2_plus_defconfig | 1 + configs/libretech_all_h3_cc_h3_defconfig | 1 + configs/libretech_all_h3_cc_h5_defconfig | 1 + 4 files changed, 12 insertions(+) diff --git a/arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi b/arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi index 5d01bba180e4..46ae4550c741 100644 --- a/arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi +++ b/arch/arm/dts/sunxi-libretech-all-h3-cc.dtsi @@ -140,6 +140,15 @@ status = "okay"; }; +&mmc2 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc2_8bit_pins>; + vmmc-supply = <®_vcc_io>; + bus-width = <8>; + non-removable; + status = "okay"; +}; + &ohci1 { status = "okay"; }; diff --git a/configs/libretech_all_h3_cc_h2_plus_defconfig b/configs/libretech_all_h3_cc_h2_plus_defconfig index 0cbcd48aadb8..071be93697cb 100644 --- a/configs/libretech_all_h3_cc_h2_plus_defconfig +++ b/configs/libretech_all_h3_cc_h2_plus_defconfig @@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y CONFIG_DRAM_CLK=672 CONFIG_DRAM_ZQ=3881979 CONFIG_DRAM_ODT_EN=y +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-libretech-all-h3-cc" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set # CONFIG_CMD_FLASH is not set diff --git a/configs/libretech_all_h3_cc_h3_defconfig b/configs/libretech_all_h3_cc_h3_defconfig index 185facdf3eab..c20ad9f3a249 100644 --- a/configs/libretech_all_h3_cc_h3_defconfig +++ b/configs/libretech_all_h3_cc_h3_defconfig @@ -5,6 +5,7 @@ CONFIG_MACH_SUN8I_H3=y CONFIG_DRAM_CLK=672 CONFIG_DRAM_ZQ=3881979 CONFIG_DRAM_ODT_EN=y +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-libretech-all-h3-cc" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set # CONFIG_CMD_FLASH is not set diff --git a/configs/libretech_all_h3_cc_h5_defconfig b/configs/libretech_all_h3_cc_h5_defconfig index 061bddc8fd5e..5db8dfcd4f98 100644 --- a/configs/libretech_all_h3_cc_h5_defconfig +++ b/configs/libretech_all_h3_cc_h5_defconfig @@ -5,6 +5,7 @@ CONFIG_MACH_SUN50I_H5=y CONFIG_DRAM_CLK=672 CONFIG_DRAM_ZQ=3881979 CONFIG_DRAM_ODT_EN=y +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-libretech-all-h3-cc" # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set # CONFIG_CMD_FLASH is not set