From patchwork Thu Dec 27 13:34:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 154570 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6946834ljp; Thu, 27 Dec 2018 05:34:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/WJOBLfQy0V6U7ovl9bI99FwHPcRxSjvz8t6TR47kuC2+/39uO+1NlG8cenUhySF8MzfDJY X-Received: by 2002:a50:9923:: with SMTP id k32mr18939494edb.42.1545917664645; Thu, 27 Dec 2018 05:34:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545917664; cv=none; d=google.com; s=arc-20160816; b=rt9Aku4SPwuX/rCO8Tw2IV9iVQAi3xtcVP/Zmg+Ho2lVh2YCFaip808sKSa9LKzTYJ zBd0TG/7icvBv9wZLl2RmXEr/6FQd1fjp1GkT9yLwjrfr86ZlnAHP5R1+zzCfGHaSu2L bD6MmAlaSQulFklSazF6Aedksyp6aZTJxSpHMNS7IVpk9jrYYQcjAFRfhiIFs6U0/boM 3lkaPArZ0SSvtLE57asRXqpGC1SbFr/Uu935tTwVQArS3CLu5mp5VfSNL+oP/rJw6aEm Y5/q2Va4NftwDfO+tnry9XuMM5lSJGF0X0OtYvQBMEtfZTQwU6b5JoZnnPMmYYVUM0b0 xJSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature; bh=gThVJgz9NZ6bAXkKbLFmAPa0n3Xr1+EbsiIoZpu/Tks=; b=Rh2BcL2IE/SFhVUCOvZRrfaeR9y5qIZO7wi4LP4c0NuEbSNyxtxQaS1742JgA+PYHU e8IRZNH4g0tmMmDSo0m7ve9IeravFI3cfv1cLNbTvF6tcbLHSSTtbp2TvHl2bfJRN5im khE9PfBW+RGPSfvyfzalpOMtSa1ju44zgswwnuKpaVrrm9/SdECuLIaP2trxydVO/8rl JfIHIoQV4WLoIQaJPGSxOkoVu6smd/gFvrNF89M8kMqA2cvPUqZkhjfCPL/orWu5AJkh kXJjucPVaY4HM9y8tpYl1HqsYgTlPtT68muub5pLKrigfSB37v2hcaU+bG4t1KhYOwd+ +9QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Lz+v+fAB; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id r23-v6si3657339ejb.173.2018.12.27.05.34.24; Thu, 27 Dec 2018 05:34:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Lz+v+fAB; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 38C5EC21DB6; Thu, 27 Dec 2018 13:34:23 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID 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 B7C43C21C3F; Thu, 27 Dec 2018 13:34:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 87D41C21C3F; Thu, 27 Dec 2018 13:34:19 +0000 (UTC) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by lists.denx.de (Postfix) with ESMTPS id 8101BC21BE5 for ; Thu, 27 Dec 2018 13:34:18 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id b7so9168786pfi.8 for ; Thu, 27 Dec 2018 05:34:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=29D90Qs9mTLChvpV3Tp7KT42bMCwcEtk1Wf71XYBvDY=; b=Lz+v+fAB/tjucDNHknRxoZ3EeS6CnfWChrgnXr0+0aYXzFKkn+eWcRltodg+AFFBU3 pdZMr/+5nTJ8+jNJyDt9/JpjrHXIiXIxjvV4OVoERMWGaZvbPjjThYEZfoY/EPhd4l2Q T14i0U4X9Q2T/5oAhgBmnwGy5OrzWljgXN8Ac= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=29D90Qs9mTLChvpV3Tp7KT42bMCwcEtk1Wf71XYBvDY=; b=JUD6JVeAdT0lmJzOHwBSUEQBVNl3t2cODBnRSY5A3uy0/hPobG/j+flqdZOPrZuRQq bWEpIwryk7qVS0CEyjvHQuRnTMlghwb9WSLDa0IuBN3ipboDUaFhmYsGuHuAAjuEJycU hdBN/OB5eT7+wx6Z24xfFMByX0U47t54a57ajy2zdh0sW6OdmHxySqX3X44NhfZfJpHN 7M3ENrWlMArhZb42qJqjvllEaTZ+1en5/LofASXE4nbDcrsu6cYbzF5O0W9z2FWz7MT8 qtnRyV6uqr/UjL0F0st+FI5N89P23R+T3BLamQpZ+40Sla7Ph2yOrMfNiHNRVrEO4u+a yCBg== X-Gm-Message-State: AJcUukfi9/i7dmaCKiAuGT8UiZgeTPd9dNDMepTP0or5nmkhX/4ICNJZ chZV1ceRtLtCkX9n7HGiHU1PvywFzw== X-Received: by 2002:a63:b30f:: with SMTP id i15mr22792972pgf.240.1545917656855; Thu, 27 Dec 2018 05:34:16 -0800 (PST) Received: from localhost.localdomain ([2409:4072:609a:eb3:ec1b:e2c3:b711:737a]) by smtp.gmail.com with ESMTPSA id c67sm47826461pfg.170.2018.12.27.05.34.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Dec 2018 05:34:16 -0800 (PST) From: Manivannan Sadhasivam X-Google-Original-From: Manivannan Sadhasivam To: jh80.chung@samsung.com, albert.u.boot@aribaud.net, sjg@chromium.org, trini@konsulko.com Date: Thu, 27 Dec 2018 19:04:03 +0530 Message-Id: <20181227133405.11482-1-manivannanece23@gmail.com> X-Mailer: git-send-email 2.17.1 Cc: u-boot@lists.denx.de, Manivannan Sadhasivam Subject: [U-Boot] [PATCH v2 1/3] include: configs: Add gunzip size for HiKey board 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" From: Manivannan Sadhasivam Default 8MB gunzip size is not enough to load the release kernel, hence fix 64MB size for uncompressing the kernel. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Simon Glass Reviewed-by: Simon Glass --- Changes in v2: Added Simon's Reviewed-by tag. include/configs/hikey.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/hikey.h b/include/configs/hikey.h index 1376d6155de..572a52fad59 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -18,6 +18,8 @@ #define CONFIG_REMAKE_ELF +#define CONFIG_SYS_BOOTM_LEN SZ_64M + /* Physical Memory Map */ /* CONFIG_SYS_TEXT_BASE needs to align with where ATF loads bl33.bin */ From patchwork Thu Dec 27 13:34:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 154571 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6947936ljp; Thu, 27 Dec 2018 05:35:30 -0800 (PST) X-Google-Smtp-Source: AFSGD/XgfZxnH9EiVm9kYSd+ohjz82cr6BOMwGlpIEa/s5lTmffq2SPsxcxTjO7ab+gE2DiSyoP/ X-Received: by 2002:a05:6402:170d:: with SMTP id y13mr19106417edu.45.1545917730281; Thu, 27 Dec 2018 05:35:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545917730; cv=none; d=google.com; s=arc-20160816; b=MCg1AuhdVhxwV+HCorUmohiVh+Cvo+khSyD+1bTdlm0kALy9dETePASu7DdJuq2H9r M8mDAR+MS+SvA0CnLv+x4v1TxbcKSzgT0Um07Q6njDiuzz94TiyUKt0gAS3r4af3IK4u ztJUFmJZw2py5sSe7jpduq4gat+/Oh1TV0u4vcDpMuX5xzESoPVNVo/67RfidS7S/hlX l07ThZUzXKPshLA+oJYDpH4/NY2y/UfUyWlZc1olMAR/mFEIecfhJt/6n8RzQ+/DSoPK mHldMH7SfQck37ijXqUMH3Vjtfm++PWeIZh1axYr9LXLbPLrLTrKOIk/2D6Pamq5ZUc0 MFAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=6IIV1Ot5ZDaU/93iSTgpOyBxvny8l1Zl/apF90QpA9U=; b=n+xTh/Pbpj52FSsyD/M9MTYQV2Wnq1LhBZX1zzgp3VpjtU//XUXj4gzPQZcFBE4BAv 2Uv1IAGVJff9NlKe0qBJZ/Mk8R4/nP0q8L9+LvjxDhdx3nG0hRBIm/wienFfI5evoZDq Npj9aqULLnlkdylelFhHLudX1wsYENOf8i7HGcatVxkIwSbWdpbGCf6DLGdE0kQLHqow RogxL9hw91lTr1cUQd4HTYzhYeui2xlGD22GOstuyC7/BwSH3GCs/IuKbxwOwSo7fQ5r cWleq5q/ESCloSp9nhDkrf5j2KDPidj1Hvbr2FTAMJRTrvcaxeortpavk7TUL+PYuC0+ vZPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=McU3kb3C; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id h1-v6si2301553ejk.295.2018.12.27.05.35.30; Thu, 27 Dec 2018 05:35:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=McU3kb3C; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id CBB73C21DDC; Thu, 27 Dec 2018 13:34:41 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID 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 A79D6C21DA6; Thu, 27 Dec 2018 13:34:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1CC55C21D8E; Thu, 27 Dec 2018 13:34:25 +0000 (UTC) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by lists.denx.de (Postfix) with ESMTPS id CBDFAC21D4A for ; Thu, 27 Dec 2018 13:34:21 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id t13so8779358ply.13 for ; Thu, 27 Dec 2018 05:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XcSA7s+oLgmN85P8ox+EqoDW8pxu/q+x9q7bwXVLZPw=; b=McU3kb3CdGenPhvtRpk5ZBMrzoiiafqWz25AGgy5ibyxbFR/zCcwTa8cdoLpeUol/Y InPwkpLgyqoTrPX77Gso3PxGDKn0kUCAvSEdgE1JsBtdckttnSSgcnIVyVx7OLOjuRjW twhjO3WT5arb4TDXuQuseXPVz3s8N0J64JViA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XcSA7s+oLgmN85P8ox+EqoDW8pxu/q+x9q7bwXVLZPw=; b=gdc8ittGzLQEYJcyXN7QDiN3PgmsIaugkm0Y5mkyI8sJGHP5/fHTkU3m8/m61wcB97 1GgocFJOnTRlANj8MiSoZ3G4qLX2ulbzOPH2Lyp05XtHo7uU2VC43FlfePyTOd11qeYG o9REFrC79UZLDCFXyKlM7597FEZyvfB7BNBuEDXInuggMCK0tQyHdqPcAX7V3sd0+PIp DdgjaPhNO+ucqu/QRqTKmXZdsj8gVrvVWqpiqBwOsReMK3Tmg4zJsIt0dDPjvNP0/Jwz jicp/ziDzQ5Toici+5FZ9Q9wMKhcIs1lahKjEffJg534sg/vU9YrPvGUgeAMaoo5TbYu y91A== X-Gm-Message-State: AJcUukfC1RJdm1l+JYdYM1jaNhTygskjNhZl549UPBnQULX6hvqIg9lY XlEvGlaE3gnEX3KrojlkmhkH X-Received: by 2002:a17:902:b090:: with SMTP id p16mr23720600plr.190.1545917660303; Thu, 27 Dec 2018 05:34:20 -0800 (PST) Received: from localhost.localdomain ([2409:4072:609a:eb3:ec1b:e2c3:b711:737a]) by smtp.gmail.com with ESMTPSA id c67sm47826461pfg.170.2018.12.27.05.34.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Dec 2018 05:34:19 -0800 (PST) From: Manivannan Sadhasivam X-Google-Original-From: Manivannan Sadhasivam To: jh80.chung@samsung.com, albert.u.boot@aribaud.net, sjg@chromium.org, trini@konsulko.com Date: Thu, 27 Dec 2018 19:04:04 +0530 Message-Id: <20181227133405.11482-2-manivannanece23@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181227133405.11482-1-manivannanece23@gmail.com> References: <20181227133405.11482-1-manivannanece23@gmail.com> Cc: u-boot@lists.denx.de, Manivannan Sadhasivam Subject: [U-Boot] [PATCH v2 2/3] mmc: Convert HI6220 MMC driver to driver model 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" From: Manivannan Sadhasivam Convert HiSilicon HI6220 MMC driver based on DWMMC IP to driver model. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Simon Glass --- Changes in v2: Added Simon's Reviewed-by tag. configs/hikey_defconfig | 1 + drivers/mmc/hi6220_dw_mmc.c | 100 +++++++++++++++++++++++++----------- 2 files changed, 70 insertions(+), 31 deletions(-) diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig index 8dc5a2823eb..cced2b4802e 100644 --- a/configs/hikey_defconfig +++ b/configs/hikey_defconfig @@ -18,6 +18,7 @@ CONFIG_DEFAULT_DEVICE_TREE="hi6220-hikey" CONFIG_ENV_IS_IN_FAT=y CONFIG_ENV_FAT_INTERFACE="mmc" CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" +CONFIG_DM_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_DW_K3=y CONFIG_CONS_INDEX=4 diff --git a/drivers/mmc/hi6220_dw_mmc.c b/drivers/mmc/hi6220_dw_mmc.c index ce395d53c94..cc58aff38cc 100644 --- a/drivers/mmc/hi6220_dw_mmc.c +++ b/drivers/mmc/hi6220_dw_mmc.c @@ -5,51 +5,89 @@ */ #include +#include #include +#include +#include #include -#include -#define DWMMC_MAX_CH_NUM 4 +DECLARE_GLOBAL_DATA_PTR; -#define DWMMC_MAX_FREQ 50000000 -#define DWMMC_MIN_FREQ 400000 +struct hi6220_dwmmc_plat { + struct mmc_config cfg; + struct mmc mmc; +}; -/* Source clock is configured to 100MHz by ATF bl1*/ -#define MMC0_DEFAULT_FREQ 100000000 +struct hi6220_dwmmc_priv_data { + struct dwmci_host host; +}; -static int hi6220_dwmci_core_init(struct dwmci_host *host, int index) +static int hi6220_dwmmc_ofdata_to_platdata(struct udevice *dev) { - host->name = "Hisilicon DWMMC"; + struct hi6220_dwmmc_priv_data *priv = dev_get_priv(dev); + struct dwmci_host *host = &priv->host; - host->dev_index = index; + host->name = dev->name; + host->ioaddr = (void *)devfdt_get_addr(dev); + host->buswidth = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), + "bus-width", 4); + + /* use non-removable property for differentiating SD card and eMMC */ + if (dev_read_bool(dev, "non-removable")) + host->dev_index = 0; + else + host->dev_index = 1; + + host->priv = priv; - /* Add the mmc channel to be registered with mmc core */ - if (add_dwmci(host, DWMMC_MAX_FREQ, DWMMC_MIN_FREQ)) { - printf("DWMMC%d registration failed\n", index); - return -1; - } return 0; } -/* - * This function adds the mmc channel to be registered with mmc core. - * index - mmc channel number. - * regbase - register base address of mmc channel specified in 'index'. - * bus_width - operating bus width of mmc channel specified in 'index'. - */ -int hi6220_dwmci_add_port(int index, u32 regbase, int bus_width) +static int hi6220_dwmmc_probe(struct udevice *dev) { - struct dwmci_host *host = NULL; + struct hi6220_dwmmc_plat *plat = dev_get_platdata(dev); + struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); + struct hi6220_dwmmc_priv_data *priv = dev_get_priv(dev); + struct dwmci_host *host = &priv->host; - host = calloc(1, sizeof(struct dwmci_host)); - if (!host) { - pr_err("dwmci_host calloc failed!\n"); - return -ENOMEM; - } + /* Use default bus speed due to absence of clk driver */ + host->bus_hz = 50000000; - host->ioaddr = (void *)(ulong)regbase; - host->buswidth = bus_width; - host->bus_hz = MMC0_DEFAULT_FREQ; + dwmci_setup_cfg(&plat->cfg, host, host->bus_hz, 400000); + host->mmc = &plat->mmc; - return hi6220_dwmci_core_init(host, index); + host->mmc->priv = &priv->host; + upriv->mmc = host->mmc; + host->mmc->dev = dev; + + return dwmci_probe(dev); } + +static int hi6220_dwmmc_bind(struct udevice *dev) +{ + struct hi6220_dwmmc_plat *plat = dev_get_platdata(dev); + int ret; + + ret = dwmci_bind(dev, &plat->mmc, &plat->cfg); + if (ret) + return ret; + + return 0; +} + +static const struct udevice_id hi6220_dwmmc_ids[] = { + { .compatible = "hisilicon,hi6220-dw-mshc" }, + { } +}; + +U_BOOT_DRIVER(hi6220_dwmmc_drv) = { + .name = "hi6220_dwmmc", + .id = UCLASS_MMC, + .of_match = hi6220_dwmmc_ids, + .ofdata_to_platdata = hi6220_dwmmc_ofdata_to_platdata, + .ops = &dm_dwmci_ops, + .bind = hi6220_dwmmc_bind, + .probe = hi6220_dwmmc_probe, + .priv_auto_alloc_size = sizeof(struct hi6220_dwmmc_priv_data), + .platdata_auto_alloc_size = sizeof(struct hi6220_dwmmc_plat), +}; From patchwork Thu Dec 27 13:34:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 154572 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6948494ljp; Thu, 27 Dec 2018 05:36:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/UW4h2GZVV4JRHAVfElFCNr47eZ9eyOnc72b2qw3vY97oThgiZkhR3CizxkMrtsschN6iaE X-Received: by 2002:a50:8689:: with SMTP id r9mr17948871eda.227.1545917764772; Thu, 27 Dec 2018 05:36:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545917764; cv=none; d=google.com; s=arc-20160816; b=suYcXwg7z8yGHBohd4JFJHQWOzZCs+7pUf59mvrtjAU4wpeRLBfT+yaCODA9vKEeLC yJ3Cgce3O581F/dDeB5+tsmiLJbSY/ueOp5ojhkCgoIgtXIT5Uat1NvpRgpe0gke5t0I V1e0OlXD58J2o/e/BUJP0YkjscUv4bxa9gyUacbKEtf80DCfUPR/v2od/1ZJTsHo+753 uUpFplOVUjMst1r5B2QZ3XCQksItsR0J96Mm0Ae6AZ7yBkWzXYNBH+Q58dvf44GTpKUL pz2fblLGMzpLl8/rGXY2Kvv7u53EegExKxki+VEB7kAGrnSTGBfl0ixG+9kV9NgngskC L5TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature; bh=WovvIh38GkpOL3pbqU8266cfDQtR3RsO1C/BOOyuLGw=; b=eGV8YNzmcdlh97MUSh2ZaJV5A8anN5IyYpXie/dJ30lmyAxG4uWzY6Kth9QpGV2xrP c12UXyhoI4/jf++BwowoOgtZ/1lcf+IESJjB+fR1mYih8opkTBYY0DNhwJZtWH4hgquW nJId7SBfeeP/GH1axMIK9hUmi4l/9rHYNOBNdNE+mhHAlUvpCWqPZc9Cw1kTGQdU/D13 +SUZOOCoDPW33fLF4i1OiXAKv9+McZom64LufNA0MQcaax8axS6TLER/x7TwzJpiUpIn IUYRitczoik+7wbM3qPkgfgZO7Ik8Km+NQJSC1Z1eAaxsK9TqFopPI4Vm6QFTWIA74HV GViQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=irj9X9MD; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id p26-v6si935535eji.30.2018.12.27.05.36.04; Thu, 27 Dec 2018 05:36:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=irj9X9MD; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 59F42C21DEC; Thu, 27 Dec 2018 13:34:59 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID 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 9ABCDC21DF8; Thu, 27 Dec 2018 13:34:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 259F7C21DD7; Thu, 27 Dec 2018 13:34:30 +0000 (UTC) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by lists.denx.de (Postfix) with ESMTPS id 626EBC21DF8 for ; Thu, 27 Dec 2018 13:34:26 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id j10so8828031pga.1 for ; Thu, 27 Dec 2018 05:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Uz+xqPaL1M5xb6hQSHbZDU4NiZOXBXFl+dc7CViQsDg=; b=irj9X9MD6lQbjOE9sDWx0d9J8D+aFcsJgCyBumSeW57fHxbUfWFPPDASAVoboI5c5z 1PD/tEeRD5731cUGupXY2LuVSV9zTzA7RVRP+jRgSf8GhoZfUdllPlkNVkV5keQTDU6Q boqOtrs2GKZhtSFIyZpsBIrnY8B3UMXuvXg5I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Uz+xqPaL1M5xb6hQSHbZDU4NiZOXBXFl+dc7CViQsDg=; b=muqKCTOiD+3Uz+iyBJM7FZsXBVpvyWF1kVhReu9PNTxUToqITPGQiHEc+mbMfXbdIZ 3caP8hHeXesRotMh1ORYolFgqhT8bojedEy5OLtze/EyXcNYhUiKR4lqeghR1yI4pqnR 6i7boDdYDLVTS+m11u6iQtlLycrmZIxyP26/5TKCKScuubuxzPhG5jJqEYZypr2p/pfD qk6vn4NO64Pd6p810zaP8eXNvwfemzSgtPCe2f25xHJOBge1KVHE1TWSMuxpYlCb1BQe nsxd+w3zuQaWYCAzoOztwDAuNXp3SS3nWk0sm8MBgvSK6pe8rN3f7vOBOfu9QxE9Joim FcrA== X-Gm-Message-State: AJcUukescThKXFb3OLU+URd+5tmL/ptt4uFXUxf90CYDb+m9t1h1TVvi dZ74vo3PL0t4151BC4PKxP8j X-Received: by 2002:a65:43c5:: with SMTP id n5mr23349759pgp.250.1545917664753; Thu, 27 Dec 2018 05:34:24 -0800 (PST) Received: from localhost.localdomain ([2409:4072:609a:eb3:ec1b:e2c3:b711:737a]) by smtp.gmail.com with ESMTPSA id c67sm47826461pfg.170.2018.12.27.05.34.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Dec 2018 05:34:24 -0800 (PST) From: Manivannan Sadhasivam X-Google-Original-From: Manivannan Sadhasivam To: jh80.chung@samsung.com, albert.u.boot@aribaud.net, sjg@chromium.org, trini@konsulko.com Date: Thu, 27 Dec 2018 19:04:05 +0530 Message-Id: <20181227133405.11482-3-manivannanece23@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181227133405.11482-1-manivannanece23@gmail.com> References: <20181227133405.11482-1-manivannanece23@gmail.com> Cc: u-boot@lists.denx.de, Manivannan Sadhasivam Subject: [U-Boot] [PATCH v2 3/3] arm: dts: Add MMC nodes for HiKey board 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" From: Manivannan Sadhasivam Add MMC nodes for HiKey board based on HI6220 SoC. There are three MMC controllers in this SoC, first one used for eMMC, second one used for SD card and third one is not used by u-boot. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Simon Glass Reviewed-by: Tom Rini --- Changes in v2: * Added hi6220-hikey-u-boot.dtsi for u-boot additions as per Tom's comment. * Added Simon's Reviewed-by tag. arch/arm/dts/hi6220-hikey-u-boot.dtsi | 14 ++++++++++++++ arch/arm/dts/hi6220-hikey.dts | 11 +++++++++++ arch/arm/dts/hi6220.dtsi | 18 ++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 arch/arm/dts/hi6220-hikey-u-boot.dtsi diff --git a/arch/arm/dts/hi6220-hikey-u-boot.dtsi b/arch/arm/dts/hi6220-hikey-u-boot.dtsi new file mode 100644 index 00000000000..31139832401 --- /dev/null +++ b/arch/arm/dts/hi6220-hikey-u-boot.dtsi @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * U-Boot additions + * + * Copyright (c) 2018 Linaro Ltd. + */ + +&mmc0 { + u-boot,dm-pre-reloc; +}; + +&mmc1 { + u-boot,dm-pre-reloc; +}; diff --git a/arch/arm/dts/hi6220-hikey.dts b/arch/arm/dts/hi6220-hikey.dts index 24f09257af0..d63929348bb 100644 --- a/arch/arm/dts/hi6220-hikey.dts +++ b/arch/arm/dts/hi6220-hikey.dts @@ -40,6 +40,17 @@ }; }; +&mmc0 { + status = "okay"; + non-removable; + bus-width = <8>; +}; + +&mmc1 { + status = "okay"; + bus-width = <4>; +}; + &uart2 { label = "LS-UART0"; }; diff --git a/arch/arm/dts/hi6220.dtsi b/arch/arm/dts/hi6220.dtsi index a610ccb6346..501c8906fd6 100644 --- a/arch/arm/dts/hi6220.dtsi +++ b/arch/arm/dts/hi6220.dtsi @@ -162,6 +162,24 @@ #clock-cells = <1>; }; + mmc0: dwmmc@f723d000 { + compatible = "hisilicon,hi6220-dw-mshc"; + reg = <0x0 0xf723d000 0x0 0x1000>; + interrupts = <0x0 0x48 0x4>; + clocks = <&sys_ctrl 2>, <&sys_ctrl 1>; + clock-names = "ciu", "biu"; + status = "disabled"; + }; + + mmc1: dwmmc@f723e000 { + compatible = "hisilicon,hi6220-dw-mshc"; + reg = <0x0 0xf723e000 0x0 0x1000>; + interrupts = <0x0 0x49 0x4>; + clocks = <&sys_ctrl 4>, <&sys_ctrl 3>; + clock-names = "ciu", "biu"; + status = "disabled"; + }; + uart0: uart@f8015000 { /* console */ compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xf8015000 0x0 0x1000>;