From patchwork Mon Feb 3 15:13:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 1232880 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SMSt/1zP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48BBDn3Pjmz9sRm for ; Tue, 4 Feb 2020 02:14:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8C858819B5; Mon, 3 Feb 2020 16:13:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SMSt/1zP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 26E0E8199B; Mon, 3 Feb 2020 16:13:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3898B81993 for ; Mon, 3 Feb 2020 16:13:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux.amoon@gmail.com Received: by mail-pg1-x544.google.com with SMTP id z12so1024340pgl.4 for ; Mon, 03 Feb 2020 07:13:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=AUMdmDeSZuLNuNy+eEUsVTDwLek94aTpts/MbOh/zEE=; b=SMSt/1zPJzcIPD02DLiWs08dTiZUc16VJVhwowRmJbU1hCbKpS8ASRAtis9sZ/zx0z 8OSOd41ahpwoPiwWL7CnCEg331JaLB+6Uo8dEMvw7Ifd9CPuDpFSF9nopvymkD5c3oGP w02NI66WHGHSyHVUIYhoH8JAL02IlGX5MEWHbXrqYt5cKvDeMb1XVLbYp0dZmM/FEiQy FbLfnMrCkHtAo1/HNDQFr/cFOb/iEv1Eajvq3DLPIBP38u0npkI7dirAXku0ZIq7LjkI 6UuTpIwAsKsQhc7beWo7pyHW71jerC8hnoh62HKwnvnpGq838zH7gnaEjZJUp1/UHpX4 6Ubw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AUMdmDeSZuLNuNy+eEUsVTDwLek94aTpts/MbOh/zEE=; b=ZzXeCnWwa62BB2/r/OEAuOmnOUvmApE1IRzdbhTi0Q1GK9hapIcXuCHV6huZx/vS2b Cw88XIIMLFlggM1U1vHqQ/VqrTied+i9jDNdhtadcl2Xppxto8zL2TtftzdCohEWB4oz Q6mQ2D7C8bXcSl2XKUzEjQKhZiZb2+SGpTod3ZBPirnWG10gFXeqeZ9/LOGIB/gn3zdz 9WL658VyKitW1qkNaUlnJ58yM8QIGccJuhGHD3rFwOmUD/63N/z6H6cysJL30Z1c2UGP KrzOpfRmp7fjSwaIKHeMVg8cSFaMrZHQhWWQ9rq8Y3QckcLHJhgG6nlU03LCXoh++prb qKLQ== X-Gm-Message-State: APjAAAXFZp6fM78VDHtPnYYhPbaEYMNHzZ7npX2KPiYNvq9mLHf4cfIs zQJeHRIZ5N9vZJDSltX1xzc= X-Google-Smtp-Source: APXvYqw/HPcPXNvbxDc8mor3TbFXZtGYaeQmiAj2fwgc8dBRne/DuA09w6XGd5ATsmRJUivfxFZY7Q== X-Received: by 2002:a63:d0c:: with SMTP id c12mr7330348pgl.173.1580742812515; Mon, 03 Feb 2020 07:13:32 -0800 (PST) Received: from localhost.localdomain ([45.112.0.38]) by smtp.gmail.com with ESMTPSA id f43sm21609845pje.23.2020.02.03.07.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 07:13:32 -0800 (PST) From: Anand Moon To: Neil Armstrong , Jerome Brunet , Peng Fan , Jaehoon Chung , u-boot-amlogic@groups.io, u-boot@lists.denx.de Subject: [PATCHv5 1/5] mmc: meson-gx: Fix clk phase tuning for MMC Date: Mon, 3 Feb 2020 15:13:19 +0000 Message-Id: <20200203151323.4615-2-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203151323.4615-1-linux.amoon@gmail.com> References: <20200203151323.4615-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean As per mainline line kernel fix the clk tuning phase for mmc, set Core=180, Tx=180, Rx=0 clk phase for mmc initialization. As per S905, S905X, AGX and S922X datasheet set the default values for clk tuning. Signed-off-by: Anand Moon --- arch/arm/include/asm/arch-meson/sd_emmc.h | 28 ++++++++++++------ drivers/mmc/meson_gx_mmc.c | 36 +++++++++++++++++++---- 2 files changed, 50 insertions(+), 14 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/sd_emmc.h b/arch/arm/include/asm/arch-meson/sd_emmc.h index e3a72c8b66..b7a99947b3 100644 --- a/arch/arm/include/asm/arch-meson/sd_emmc.h +++ b/arch/arm/include/asm/arch-meson/sd_emmc.h @@ -7,6 +7,7 @@ #define __SD_EMMC_H__ #include +#include #define SDIO_PORT_A 0 #define SDIO_PORT_B 1 @@ -19,15 +20,24 @@ #define CLK_MAX_DIV 63 #define CLK_SRC_24M (0 << 6) #define CLK_SRC_DIV2 (1 << 6) -#define CLK_CO_PHASE_000 (0 << 8) -#define CLK_CO_PHASE_090 (1 << 8) -#define CLK_CO_PHASE_180 (2 << 8) -#define CLK_CO_PHASE_270 (3 << 8) -#define CLK_TX_PHASE_000 (0 << 10) -#define CLK_TX_PHASE_090 (1 << 10) -#define CLK_TX_PHASE_180 (2 << 10) -#define CLK_TX_PHASE_270 (3 << 10) -#define CLK_ALWAYS_ON BIT(24) + +#define CRYSTAL_24MHZ 0 +#define CLK_PHASE_0 0 +#define CLK_PHASE_180 2 + +#define CLK_DIV_MASK GENMASK(5, 0) +#define CLK_SRC_MASK GENMASK(7, 6) +#define CLK_CORE_PHASE_MASK GENMASK(9, 8) +#define CLK_TX_PHASE_MASK GENMASK(11, 10) +#define CLK_RX_PHASE_MASK GENMASK(13, 12) + +#define CLK_V2_TX_DELAY_MASK GENMASK(19, 16) +#define CLK_V2_RX_DELAY_MASK GENMASK(23, 20) +#define CLK_V2_ALWAYS_ON BIT(24) + +#define CLK_V3_TX_DELAY_MASK GENMASK(21, 16) +#define CLK_V3_RX_DELAY_MASK GENMASK(27, 22) +#define CLK_V3_ALWAYS_ON BIT(28) #define MESON_SD_EMMC_CFG 0x44 #define CFG_BUS_WIDTH_MASK GENMASK(1, 0) diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index 86c1a7164a..03fb70e717 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -16,6 +16,10 @@ #include #include +#include +#include +#include + static inline void *get_regbase(const struct mmc *mmc) { struct meson_mmc_platdata *pdata = mmc->priv; @@ -51,11 +55,33 @@ static void meson_mmc_config_clock(struct mmc *mmc) } clk_div = DIV_ROUND_UP(clk, mmc->clock); - /* 180 phase core clock */ - meson_mmc_clk |= CLK_CO_PHASE_180; - - /* 180 phase tx clock */ - meson_mmc_clk |= CLK_TX_PHASE_000; + /* Clock divider */ + meson_mmc_clk |= CLK_DIV_MASK; + /* Clock source : Crystal 24MHz */ + meson_mmc_clk |= FIELD_PREP(CLK_SRC_MASK, CRYSTAL_24MHZ); + /* Core clock phase 2:180 */ + meson_mmc_clk |= FIELD_PREP(CLK_CORE_PHASE_MASK, CLK_PHASE_180); + /* TX clock phase 2:180 */ + meson_mmc_clk |= FIELD_PREP(CLK_TX_PHASE_MASK, CLK_PHASE_180); + /* RX clock phase 0:180 */ + meson_mmc_clk |= FIELD_PREP(CLK_RX_PHASE_MASK, CLK_PHASE_0); + +#ifdef CONFIG_MESON_GX + /* TX clock delay line */ + meson_mmc_clk |= CLK_V2_TX_DELAY_MASK; + /* RX clock delay line */ + meson_mmc_clk |= CLK_V2_RX_DELAY_MASK; + /* clk always on */ + meson_mmc_clk |= CLK_V2_ALWAYS_ON; +#endif +#if (defined(CONFIG_MESON_AXG) || defined(CONFIG_MESON_G12A)) + /* TX clock delay line */ + meson_mmc_clk |= CLK_V3_TX_DELAY_MASK; + /* RX clock delay line */ + meson_mmc_clk |= CLK_V3_RX_DELAY_MASK; + /* clk always on */ + meson_mmc_clk |= CLK_V3_ALWAYS_ON; +#endif /* clock settings */ meson_mmc_clk |= clk_src; From patchwork Mon Feb 3 15:13:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 1232881 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=t6nu+EnZ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48BBF24cGhz9sPK for ; Tue, 4 Feb 2020 02:14:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 13EC58191C; Mon, 3 Feb 2020 16:13:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="t6nu+EnZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D9E51819BC; Mon, 3 Feb 2020 16:13:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CAD99819B8 for ; Mon, 3 Feb 2020 16:13:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux.amoon@gmail.com Received: by mail-pf1-x443.google.com with SMTP id s1so7716506pfh.10 for ; Mon, 03 Feb 2020 07:13:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qAKTqMqw+UO/u9cpNO61qHuN1v/CrUpnvcUN/hzj1E0=; b=t6nu+EnZMFj3/amIUMbQTkpHLI3FMKdqFltUNWvZLq/Cj8vmxSi4W5GUEuRJWdSEU1 QSzjTcLwP3Q9MQNJlBgc4v665Vv7P0IvLVXDjMUgI+tIrvtO0Ny0A7Z5sxL+WqTOfOlR rgFAq/SOiHPSqhvL2d2YgxhZckh26w8ai+Sz5U6nSxQitXsoYlz1LMHRSWnGD3vOSeNc mkt0beMauXsEJkoXoro/py46+1rWkKQm5fb13rfTmKEgBBE+1UfA6gDQ1byWhcXWzqDU A9X6GvPVgJjANNte+EXdO+PcYhYkFTw/qecYQVy5KT/6Awl4zNmao7SZL58ymJUhhAAm phRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qAKTqMqw+UO/u9cpNO61qHuN1v/CrUpnvcUN/hzj1E0=; b=ZGoyeD8YEheYanw5u6hqVl28mSZ/SkO8QzkxFs1xV0LeaB/9Z5fEpz5YJE363rFJEw 6hbDJiiXWBPN9z/VbdLgDMhYoVAGAOvY3rJB4QYkU7tL+5OXM2v/y1v9LOczVvWDHb0U uh6w+x2eAbw8v/cCI5bsx94notVb5Jtotg3Db6UuoGWj7kBWhLdThCfe3pnE51LpMfUR Upeux3JSGR9luligkAS+di7o0iQfw+nqt0q/BFuxByUs/OFvxIwklGjAlWxjXvHFhC3+ uRPElsj6rywt0hPFQIaDZw4QNcoxP0NBm+m0nNGD+yFSNFxB/Fj+ejlFXMlMFUJVkP8r oIdQ== X-Gm-Message-State: APjAAAV6TaSzmzsKX3pQYDkCeJRXxVtUfNfP2Ppr71He6kTE7t0kbptw 3mJB1A8BDt0BilSoYd6ENPQ= X-Google-Smtp-Source: APXvYqyhrI2k71MueHyIEq/RyREOqhNjvU47HR8MZWuDMUI2Uxmi2f61LM7wdK6426MU3zsOwcKzdQ== X-Received: by 2002:a62:5183:: with SMTP id f125mr14288248pfb.201.1580742824233; Mon, 03 Feb 2020 07:13:44 -0800 (PST) Received: from localhost.localdomain ([45.112.0.38]) by smtp.gmail.com with ESMTPSA id f43sm21609845pje.23.2020.02.03.07.13.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 07:13:43 -0800 (PST) From: Anand Moon To: Neil Armstrong , Jerome Brunet , Peng Fan , Jaehoon Chung , u-boot-amlogic@groups.io, u-boot@lists.denx.de Subject: [PATCHv5 2/5] mmc: meson-gx: Use proper compatible string as per the dts Date: Mon, 3 Feb 2020 15:13:20 +0000 Message-Id: <20200203151323.4615-3-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203151323.4615-1-linux.amoon@gmail.com> References: <20200203151323.4615-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Use proper compatible string as per the dts so that mmc driver could be tuned properly. SoC family S905, S905X have common clk tuning parameters setting, while AGX and G12 have common clk tuning parameters setting for mmc driver. Suggested-by: Neil Armstrong Signed-off-by: Anand Moon --- New patch in this series. --- --- arch/arm/include/asm/arch-meson/sd_emmc.h | 7 +++ drivers/mmc/meson_gx_mmc.c | 62 +++++++++++++++-------- 2 files changed, 49 insertions(+), 20 deletions(-) diff --git a/arch/arm/include/asm/arch-meson/sd_emmc.h b/arch/arm/include/asm/arch-meson/sd_emmc.h index b7a99947b3..bb48b97ed1 100644 --- a/arch/arm/include/asm/arch-meson/sd_emmc.h +++ b/arch/arm/include/asm/arch-meson/sd_emmc.h @@ -13,6 +13,12 @@ #define SDIO_PORT_B 1 #define SDIO_PORT_C 2 +enum mmc_compatible { + MMC_COMPATIBLE_GXBB, + MMC_COMPATIBLE_GX, + MMC_COMPATIBLE_AXG, +}; + #define SD_EMMC_CLKSRC_24M 24000000 /* 24 MHz */ #define SD_EMMC_CLKSRC_DIV2 1000000000 /* 1 GHz */ @@ -91,6 +97,7 @@ struct meson_mmc_platdata { struct mmc_config cfg; struct mmc mmc; + int compat; void *regbase; void *w_buf; }; diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c index 03fb70e717..bf613e00ca 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -37,7 +37,8 @@ static inline void meson_write(struct mmc *mmc, uint32_t val, int offset) writel(val, get_regbase(mmc) + offset); } -static void meson_mmc_config_clock(struct mmc *mmc) +static void meson_mmc_config_clock(struct mmc *mmc, + struct meson_mmc_platdata *pdata) { uint32_t meson_mmc_clk = 0; unsigned int clk, clk_src, clk_div; @@ -66,22 +67,28 @@ static void meson_mmc_config_clock(struct mmc *mmc) /* RX clock phase 0:180 */ meson_mmc_clk |= FIELD_PREP(CLK_RX_PHASE_MASK, CLK_PHASE_0); -#ifdef CONFIG_MESON_GX - /* TX clock delay line */ - meson_mmc_clk |= CLK_V2_TX_DELAY_MASK; - /* RX clock delay line */ - meson_mmc_clk |= CLK_V2_RX_DELAY_MASK; - /* clk always on */ - meson_mmc_clk |= CLK_V2_ALWAYS_ON; -#endif -#if (defined(CONFIG_MESON_AXG) || defined(CONFIG_MESON_G12A)) - /* TX clock delay line */ - meson_mmc_clk |= CLK_V3_TX_DELAY_MASK; - /* RX clock delay line */ - meson_mmc_clk |= CLK_V3_RX_DELAY_MASK; - /* clk always on */ - meson_mmc_clk |= CLK_V3_ALWAYS_ON; -#endif + switch (pdata->compat) { + case MMC_COMPATIBLE_GXBB: + case MMC_COMPATIBLE_GX: + /* TX clock delay line */ + meson_mmc_clk |= CLK_V2_TX_DELAY_MASK; + /* RX clock delay line */ + meson_mmc_clk |= CLK_V2_RX_DELAY_MASK; + /* clk always on */ + meson_mmc_clk |= CLK_V2_ALWAYS_ON; + break; + case MMC_COMPATIBLE_AXG: + /* TX clock delay line */ + meson_mmc_clk |= CLK_V3_TX_DELAY_MASK; + /* RX clock delay line */ + meson_mmc_clk |= CLK_V3_RX_DELAY_MASK; + /* clk always on */ + meson_mmc_clk |= CLK_V3_ALWAYS_ON; + break; + default: + debug("no compatible supported"); + break; + } /* clock settings */ meson_mmc_clk |= clk_src; @@ -93,9 +100,11 @@ static void meson_mmc_config_clock(struct mmc *mmc) static int meson_dm_mmc_set_ios(struct udevice *dev) { struct mmc *mmc = mmc_get_mmc_dev(dev); + struct meson_mmc_platdata *pdata = + (struct meson_mmc_platdata *)dev_get_driver_data(dev); uint32_t meson_mmc_cfg; - meson_mmc_config_clock(mmc); + meson_mmc_config_clock(mmc, pdata); meson_mmc_cfg = meson_read(mmc, MESON_SD_EMMC_CFG); @@ -332,9 +341,22 @@ int meson_mmc_bind(struct udevice *dev) return mmc_bind(dev, &pdata->mmc, &pdata->cfg); } +static const struct meson_mmc_platdata gxbb_data = { + .compat = MMC_COMPATIBLE_GXBB, +}; + +static const struct meson_mmc_platdata gx_data = { + .compat = MMC_COMPATIBLE_GX, +}; + +static const struct meson_mmc_platdata axg_data = { + .compat = MMC_COMPATIBLE_AXG, +}; + static const struct udevice_id meson_mmc_match[] = { - { .compatible = "amlogic,meson-gx-mmc" }, - { .compatible = "amlogic,meson-axg-mmc" }, + { .compatible = "amlogic,meson-gxbb-mmc", .data = (ulong)&gxbb_data }, + { .compatible = "amlogic,meson-gx-mmc", .data = (ulong)&gx_data }, + { .compatible = "amlogic,meson-axg-mmc", .data = (ulong)&axg_data }, { /* sentinel */ } }; From patchwork Mon Feb 3 15:13:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 1232882 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OWodENBr; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48BBFG73Pnz9sPK for ; Tue, 4 Feb 2020 02:14:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A69FC819BD; Mon, 3 Feb 2020 16:13:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OWodENBr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D0F6819BD; Mon, 3 Feb 2020 16:13:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 339E5819B7 for ; Mon, 3 Feb 2020 16:13:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux.amoon@gmail.com Received: by mail-pg1-x543.google.com with SMTP id z124so7967294pgb.13 for ; Mon, 03 Feb 2020 07:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Z9yEEb71NOK5JqouLXlsp9C4/4W+6tXZOvVJTXOcTow=; b=OWodENBrl/OzgIbG7RP6KSPWab/mE4ctUYnsGzogW4v+rg81tZ4NtVzvsJFRdvDgR0 iY6t5pHZEMA0AHTEewyvcBfjUvmeseW336v/1kYnlIB8uQ1YOAkyaXsXQ0cIXl1zTOIr 3nRmKqZRlu0tuUSJb6Ck9q1hFHThO5NbkEL42dbSfNwEzqLvQvHqaBgHQKFRIIMB94IW y32bjlYLiu2x3SC2fAUibitS2VJ/JgDT9/rcKcmBraiY1qQ8IjXTFxQdnXz+5Yk3cBEA nwjGIis9lWXbLM+auuO3ESQQTic6Iy333zoEol53WfKe7mX9mWF41youmuoBoTrYXliV h7dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z9yEEb71NOK5JqouLXlsp9C4/4W+6tXZOvVJTXOcTow=; b=nH1iszA+rmT34uIUlWbI99QrbaMYrrafVbj87CApFvI2aReMr3aLlrXcs3KaNzPMya cVZQfXdGBFStYeb7+ba9B5/t6ZgAQ6dveG3kh8FZA9T0bnYySDLlwPXmClGEA1Av1RYd cfhp+lSdSvwvbo79Ji1rNc8jYOmchopxjOz3cLEGESActM2dpVlf65A+xl/7GhQ1rqIF /3f1bElboXqRVDtALaqJPTOQHTh7E6TzdR78n2UKz5pYs3L2eEBjBo7+jeqb+G/Z32tL G2GTjhy5eqv5WtMZMSCvadANL/sQakNweFOGt50dPnEVfxF4uJLAqXonr9WDk8RsUeV+ EpGQ== X-Gm-Message-State: APjAAAVDDxEYjoeSAz0aOn2repQLGad7hfk88rrpaU6yyl1PJcXg7gxl MoDwbnxK3fO65uJ9fiY5pi0rTe1c X-Google-Smtp-Source: APXvYqzGmaPO0Z8U4/QBihPLzR0YuUu/1fFbdu14qrICQY4NI1VuOoasR0xw5Fmwq4dNyilDNNYHew== X-Received: by 2002:a62:382:: with SMTP id 124mr26052988pfd.11.1580742826747; Mon, 03 Feb 2020 07:13:46 -0800 (PST) Received: from localhost.localdomain ([45.112.0.38]) by smtp.gmail.com with ESMTPSA id f43sm21609845pje.23.2020.02.03.07.13.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 07:13:46 -0800 (PST) From: Anand Moon To: Neil Armstrong , Jerome Brunet , Peng Fan , Jaehoon Chung , u-boot-amlogic@groups.io, u-boot@lists.denx.de Subject: [PATCHv5 3/5] arm: dts: gx: Move common nodes to the -u-boot.dtsi Date: Mon, 3 Feb 2020 15:13:21 +0000 Message-Id: <20200203151323.4615-4-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203151323.4615-1-linux.amoon@gmail.com> References: <20200203151323.4615-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Move u-boot specific common nodes in the dts files to meson-gx-u-boot.dtsi. This allows us to keep the basic dts[i] files up-to-date with the ones in kernel, but at the same time allowing the u-boot to add its own properties to the existing nodes. Also add missing mmc alias to dts nodes to avoid below debug warning. mmc_bind: alias ret=-2, devnum=-1 mmc_bind: alias ret=-2, devnum=-1 Signed-off-by: Anand Moon --- New patch in this series --- arch/arm/dts/meson-gx-u-boot.dtsi | 15 +++++++++++++++ arch/arm/dts/meson-gxbb-nanopi-k2.dts | 9 --------- arch/arm/dts/meson-gxbb-odroidc2.dts | 9 --------- arch/arm/dts/meson-gxbb-p20x.dtsi | 9 --------- arch/arm/dts/meson-gxl-s805x-libretech-ac.dts | 10 ---------- arch/arm/dts/meson-gxl-s905x-khadas-vim.dts | 5 ----- arch/arm/dts/meson-gxl-s905x-libretech-cc.dts | 9 --------- arch/arm/dts/meson-gxl-s905x-p212.dtsi | 10 ---------- arch/arm/dts/meson-gxm-khadas-vim2.dts | 10 ---------- 9 files changed, 15 insertions(+), 71 deletions(-) diff --git a/arch/arm/dts/meson-gx-u-boot.dtsi b/arch/arm/dts/meson-gx-u-boot.dtsi index b84e5edba4..13be3a7b8f 100644 --- a/arch/arm/dts/meson-gx-u-boot.dtsi +++ b/arch/arm/dts/meson-gx-u-boot.dtsi @@ -8,6 +8,21 @@ soc { u-boot,dm-pre-reloc; }; + + aliases { + serial0 = &uart_AO; + serial1 = &uart_A; + serial2 = &uart_AO_B; + ethernet0 = ðmac; + spi0 = &spifc; + mmc0 = &sd_emmc_a; + mmc1 = &sd_emmc_b; + mmc2 = &sd_emmc_c; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; }; &vpu { diff --git a/arch/arm/dts/meson-gxbb-nanopi-k2.dts b/arch/arm/dts/meson-gxbb-nanopi-k2.dts index cbe99bd4e0..11690d6c46 100644 --- a/arch/arm/dts/meson-gxbb-nanopi-k2.dts +++ b/arch/arm/dts/meson-gxbb-nanopi-k2.dts @@ -11,15 +11,6 @@ / { compatible = "friendlyarm,nanopi-k2", "amlogic,meson-gxbb"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; diff --git a/arch/arm/dts/meson-gxbb-odroidc2.dts b/arch/arm/dts/meson-gxbb-odroidc2.dts index 54954b314a..f8cd76a2ef 100644 --- a/arch/arm/dts/meson-gxbb-odroidc2.dts +++ b/arch/arm/dts/meson-gxbb-odroidc2.dts @@ -14,15 +14,6 @@ compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb"; model = "Hardkernel ODROID-C2"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; diff --git a/arch/arm/dts/meson-gxbb-p20x.dtsi b/arch/arm/dts/meson-gxbb-p20x.dtsi index 0be0f2a5d2..c9822e50f9 100644 --- a/arch/arm/dts/meson-gxbb-p20x.dtsi +++ b/arch/arm/dts/meson-gxbb-p20x.dtsi @@ -8,15 +8,6 @@ #include "meson-gxbb.dtsi" / { - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x40000000>; diff --git a/arch/arm/dts/meson-gxl-s805x-libretech-ac.dts b/arch/arm/dts/meson-gxl-s805x-libretech-ac.dts index 82b1c48511..4f9072a83e 100644 --- a/arch/arm/dts/meson-gxl-s805x-libretech-ac.dts +++ b/arch/arm/dts/meson-gxl-s805x-libretech-ac.dts @@ -16,16 +16,6 @@ "amlogic,meson-gxl"; model = "Libre Computer Board AML-S805X-AC"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - spi0 = &spifc; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - cvbs-connector { /* * The pads are present but no connector is soldered on diff --git a/arch/arm/dts/meson-gxl-s905x-khadas-vim.dts b/arch/arm/dts/meson-gxl-s905x-khadas-vim.dts index ceb34afe42..072e4575d2 100644 --- a/arch/arm/dts/meson-gxl-s905x-khadas-vim.dts +++ b/arch/arm/dts/meson-gxl-s905x-khadas-vim.dts @@ -26,11 +26,6 @@ }; }; - aliases { - serial2 = &uart_AO_B; - ethernet0 = ðmac; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; diff --git a/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts b/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts index a23252efc6..8d3965ab42 100644 --- a/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts +++ b/arch/arm/dts/meson-gxl-s905x-libretech-cc.dts @@ -15,15 +15,6 @@ compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl"; model = "Libre Computer Board AML-S905X-CC"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - cvbs-connector { compatible = "composite-video-connector"; diff --git a/arch/arm/dts/meson-gxl-s905x-p212.dtsi b/arch/arm/dts/meson-gxl-s905x-p212.dtsi index a1b31013ab..70f437fc3a 100644 --- a/arch/arm/dts/meson-gxl-s905x-p212.dtsi +++ b/arch/arm/dts/meson-gxl-s905x-p212.dtsi @@ -13,16 +13,6 @@ #include "meson-gxl-s905x.dtsi" / { - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; diff --git a/arch/arm/dts/meson-gxm-khadas-vim2.dts b/arch/arm/dts/meson-gxm-khadas-vim2.dts index 782e9edac8..4e68e289d3 100644 --- a/arch/arm/dts/meson-gxm-khadas-vim2.dts +++ b/arch/arm/dts/meson-gxm-khadas-vim2.dts @@ -16,16 +16,6 @@ compatible = "khadas,vim2", "amlogic,s912", "amlogic,meson-gxm"; model = "Khadas VIM2"; - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_AO_B; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; From patchwork Mon Feb 3 15:13:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 1232883 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=b3UJIxg1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48BBFW4ldDz9sRh for ; Tue, 4 Feb 2020 02:14:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6E507819CB; Mon, 3 Feb 2020 16:13:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="b3UJIxg1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4BA7F819CC; Mon, 3 Feb 2020 16:13:54 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 519AB819BB for ; Mon, 3 Feb 2020 16:13:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux.amoon@gmail.com Received: by mail-pj1-x1042.google.com with SMTP id 12so6550682pjb.5 for ; Mon, 03 Feb 2020 07:13:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=huudZzwu3Yl/gDTN6kJsoLrBVTNjt0FX0UnzIBynbL0=; b=b3UJIxg1nvUCOVU4paiGsJu58tzRWDkIT0MWirs7u8RQMhqTMwlGkMzH5Q4QhmV8tR 01WrJz/iYbDlPL2MnM/70FSV1BRZeRbsElJHz+M4Ggm/YKKJ1l9+vjO7FD95TcJ5t43c 6dmZhQLK9AD99fIazwEbX9ISeIvFYX8NhL/FWX8XmZ/v4DT3p6sC66BVm8xk9lCHhkta HFstY6Mw/pSGSjcPxLaDzfs/D1PBfRDZJ50qOWZ0wLqNNJZk9ZVks070fRfqG3/hr90m UDJNvSaw25gMB1GQnU9ZVHVWECAABal2e+2p2qNf5kxflzKnNrZa/p/ds2DDHo8HbySh BD4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=huudZzwu3Yl/gDTN6kJsoLrBVTNjt0FX0UnzIBynbL0=; b=bjpfwojUzX4CdeY1EIV481n9rbxQs2A10dIgVKjpxg9LIBh6AoDVLVcDvbpLezG6yo ED9UpN92LcY2uiaAy4ze5o2Qys8noM7p9gjFI/39BuRmZu7uY2i4TwkKWzpYB3qBWREQ 0d9FE4d7VOcGX2Hb9UM0PqZbawAGDKAvELwWi3f9zOFukbiFvS2UDBFEpZTGWRo0TAGv AqIhIBfD4eVL4in57ZrOyilIzdvKWEN5lA6gUzcvFqBO/tzhnSneFwDvhDW/iESE4RQT bX/cNJfB1hQxnMK30NGYFhf4iQc1X7jgGCiQot4NMhc5DgrCjrIgPVhv3e/TUvXKeL6C rZXA== X-Gm-Message-State: APjAAAUHS+WD1uPXwJlV0vJQ/lbp4T9MCub32ESLHMm7JVJgPX4BbN95 b8Nolf9QxeyFqIFjrean8fI= X-Google-Smtp-Source: APXvYqxndy7TgCDzp9ckaXRnrUpCd2LD8ly55tsp2T6+u1LJ/Hw/F5kjy/wrMnAHt02mLUPnfJE2iw== X-Received: by 2002:a17:902:fe90:: with SMTP id x16mr22190750plm.31.1580742829850; Mon, 03 Feb 2020 07:13:49 -0800 (PST) Received: from localhost.localdomain ([45.112.0.38]) by smtp.gmail.com with ESMTPSA id f43sm21609845pje.23.2020.02.03.07.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 07:13:48 -0800 (PST) From: Anand Moon To: Neil Armstrong , Jerome Brunet , Peng Fan , Jaehoon Chung , u-boot-amlogic@groups.io, u-boot@lists.denx.de Subject: [PATCHv5 4/5] arm: dts: g12: Move common nodes to the -u-boot.dtsi Date: Mon, 3 Feb 2020 15:13:22 +0000 Message-Id: <20200203151323.4615-5-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203151323.4615-1-linux.amoon@gmail.com> References: <20200203151323.4615-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Move u-boot specific common nodes in the dts files to meson-g12-common-u-boot.dtsi. This allows us to keep the basic dts[i] files up-to-date with the ones in kernel, but at the same time allowing the u-boot to add its own properties to the existing nodes. Also add missing mmc alias to dts nodes to avoid below debug warning. mmc_bind: alias ret=-2, devnum=-1 mmc_bind: alias ret=-2, devnum=-1 Signed-off-by: Anand Moon --- New patch in this series --- arch/arm/dts/meson-g12-common-u-boot.dtsi | 12 ++++++++++++ arch/arm/dts/meson-g12a-sei510.dts | 9 --------- arch/arm/dts/meson-g12a-u200.dts | 9 --------- arch/arm/dts/meson-g12b-odroid-n2.dts | 9 --------- arch/arm/dts/meson-khadas-vim3.dtsi | 9 --------- arch/arm/dts/meson-sm1-sei610.dts | 9 --------- 6 files changed, 12 insertions(+), 45 deletions(-) diff --git a/arch/arm/dts/meson-g12-common-u-boot.dtsi b/arch/arm/dts/meson-g12-common-u-boot.dtsi index 38fd3d3feb..347b8ded22 100644 --- a/arch/arm/dts/meson-g12-common-u-boot.dtsi +++ b/arch/arm/dts/meson-g12-common-u-boot.dtsi @@ -8,6 +8,18 @@ soc { u-boot,dm-pre-reloc; }; + + aliases { + serial0 = &uart_AO; + ethernet0 = ðmac; + mmc0 = &sd_emmc_a; + mmc1 = &sd_emmc_b; + mmc2 = &sd_emmc_c; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; }; &canvas { diff --git a/arch/arm/dts/meson-g12a-sei510.dts b/arch/arm/dts/meson-g12a-sei510.dts index c7a8736885..c6a48ebbe5 100644 --- a/arch/arm/dts/meson-g12a-sei510.dts +++ b/arch/arm/dts/meson-g12a-sei510.dts @@ -28,11 +28,6 @@ }; }; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - mono_dac: audio-codec-0 { compatible = "maxim,max98357a"; #sound-dai-cells = <0>; @@ -49,10 +44,6 @@ sound-name-prefix = "MIC"; }; - chosen { - stdout-path = "serial0:115200n8"; - }; - cvbs-connector { compatible = "composite-video-connector"; diff --git a/arch/arm/dts/meson-g12a-u200.dts b/arch/arm/dts/meson-g12a-u200.dts index 8551fbd4a4..8be7b6985b 100644 --- a/arch/arm/dts/meson-g12a-u200.dts +++ b/arch/arm/dts/meson-g12a-u200.dts @@ -13,15 +13,6 @@ compatible = "amlogic,u200", "amlogic,g12a"; model = "Amlogic Meson G12A U200 Development Board"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - cvbs-connector { compatible = "composite-video-connector"; diff --git a/arch/arm/dts/meson-g12b-odroid-n2.dts b/arch/arm/dts/meson-g12b-odroid-n2.dts index 42f1540575..a37f66a5e0 100644 --- a/arch/arm/dts/meson-g12b-odroid-n2.dts +++ b/arch/arm/dts/meson-g12b-odroid-n2.dts @@ -15,15 +15,6 @@ compatible = "hardkernel,odroid-n2", "amlogic,g12b"; model = "Hardkernel ODROID-N2"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x40000000>; diff --git a/arch/arm/dts/meson-khadas-vim3.dtsi b/arch/arm/dts/meson-khadas-vim3.dtsi index 8647da7d66..c6b0ce9a88 100644 --- a/arch/arm/dts/meson-khadas-vim3.dtsi +++ b/arch/arm/dts/meson-khadas-vim3.dtsi @@ -11,15 +11,6 @@ / { model = "Khadas VIM3"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; diff --git a/arch/arm/dts/meson-sm1-sei610.dts b/arch/arm/dts/meson-sm1-sei610.dts index 3435aaa4e8..4372708811 100644 --- a/arch/arm/dts/meson-sm1-sei610.dts +++ b/arch/arm/dts/meson-sm1-sei610.dts @@ -14,15 +14,6 @@ compatible = "seirobotics,sei610", "amlogic,sm1"; model = "SEI Robotics SEI610"; - aliases { - serial0 = &uart_AO; - ethernet0 = ðmac; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - emmc_pwrseq: emmc-pwrseq { compatible = "mmc-pwrseq-emmc"; reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; From patchwork Mon Feb 3 15:13:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 1232884 X-Patchwork-Delegate: narmstrong@baylibre.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fZHg7w8F; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48BBFm2x3Hz9sPK for ; Tue, 4 Feb 2020 02:14:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 400CA819D1; Mon, 3 Feb 2020 16:13:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fZHg7w8F"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 91B43819D2; Mon, 3 Feb 2020 16:13:56 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CF996819BF for ; Mon, 3 Feb 2020 16:13:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=linux.amoon@gmail.com Received: by mail-pj1-x1043.google.com with SMTP id gv17so6563902pjb.1 for ; Mon, 03 Feb 2020 07:13:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TsoQgyAvC2ZuEc7HBxOV+gcWnhjiA8D0hmQfC2JXCDc=; b=fZHg7w8F5HCzTqYIeRsE1hUvdW5VGVAdXdUY0pS2SaYziE0uhmNPLBDed9H/KgFI8Y bZMuBAnK8xtS1ndsyWitSKo5FnibfR92rdmPch3UBxYM+p4Gh5prsNFacMA0GRI0ovjQ C7TMtViwFhOct6S4m6JEPb9qeGvQRDdrIgKo0JgXAVMikrQxZbwlgVfSBoAQ5G2Q0+Eg gv2g1zccOBxMgHKiBzQMjmVeJcwYpI+gbWKrr7KKKT1wfs99kNB+AFhYjDodLHGT4pys 7CuKBvuI6wX0snl2iXovw3KPHE5MUR2c16yrHILWqQ3atfvviPDQtwO8GL219ExALvP8 XwDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TsoQgyAvC2ZuEc7HBxOV+gcWnhjiA8D0hmQfC2JXCDc=; b=VjFdcruosk2u/cmY3a21bHrUbKlmZbNTqbCVuHdmUUxlfPs2BBUzfo2/6RDDSuvN4b iY7B8tfp5atr6/wIbrv3rzB0uRwxE+19LC/Qu/zyd9tZ2EfI6sJNHRY2k6hL6lyIPaLH nGbmWow260KrHJAIkQMYgBr0RAo4liAFDPyCLWdsqkV6W1Dd8Mq8KC2hwJFWt2qFR+cC Q5GY1hQ4zTt+xx6JjNYtUmpYQlRKzNtHD06FfYgn5blXqXoyFKfIzNTbLlGa1vNFkukt ImjEGBCdZg64TEHjSo6Z2ewzbbMOiYBkwgUZ43rs7CwE3jeXSrwk48wxd0ER6TCwUzTS t2qA== X-Gm-Message-State: APjAAAU2hIZzbuFRUCJ04MMJGiAYN4fGhwmY1mvxZVFzw6yP9XaLJQe6 n2xZHkEOTV8gXa94kZIKo5o= X-Google-Smtp-Source: APXvYqyRe7O4lO2gCClf8lXlLi/aPtRyGNXUen1QylGVNtF/89eNhTYm239Z/8R/F3HdfnZNU1mUgQ== X-Received: by 2002:a17:902:76c5:: with SMTP id j5mr17700339plt.172.1580742832414; Mon, 03 Feb 2020 07:13:52 -0800 (PST) Received: from localhost.localdomain ([45.112.0.38]) by smtp.gmail.com with ESMTPSA id f43sm21609845pje.23.2020.02.03.07.13.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2020 07:13:52 -0800 (PST) From: Anand Moon To: Neil Armstrong , Jerome Brunet , Peng Fan , Jaehoon Chung , u-boot-amlogic@groups.io, u-boot@lists.denx.de Subject: [PATCHv5 5/5] arm: dts: s400: Move common nodes to the -u-boot.dtsi Date: Mon, 3 Feb 2020 15:13:23 +0000 Message-Id: <20200203151323.4615-6-linux.amoon@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203151323.4615-1-linux.amoon@gmail.com> References: <20200203151323.4615-1-linux.amoon@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 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" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Move u-boot specific common nodes in the dts files to meson-axg-s400-u-boot.dtsi. This allows us to keep the basic dts[i] files up-to-date with the ones in kernel, but at the same time allowing the u-boot to add its own properties to the existing nodes. Also add missing mmc alias to dts nodes to avoid below debug warning. mmc_bind: alias ret=-2, devnum=-1 mmc_bind: alias ret=-2, devnum=-1 Signed-off-by: Anand Moon --- New patch is the series --- arch/arm/dts/meson-axg-s400-u-boot.dtsi | 16 ++++++++++++++++ arch/arm/dts/meson-axg-s400.dts | 9 --------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/arch/arm/dts/meson-axg-s400-u-boot.dtsi b/arch/arm/dts/meson-axg-s400-u-boot.dtsi index c46eb3f38d..74241e9fcd 100644 --- a/arch/arm/dts/meson-axg-s400-u-boot.dtsi +++ b/arch/arm/dts/meson-axg-s400-u-boot.dtsi @@ -2,6 +2,22 @@ /* * Copyright (c) 2017 Amlogic, Inc. All rights reserved. */ +/ { + soc { + u-boot,dm-pre-reloc; + }; + + aliases { + serial0 = &uart_AO; + serial1 = &uart_A; + mmc1 = &sd_emmc_b; + mmc2 = &sd_emmc_c; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; /* wifi module */ &sd_emmc_b { diff --git a/arch/arm/dts/meson-axg-s400.dts b/arch/arm/dts/meson-axg-s400.dts index 18778ada7b..feb84255ad 100644 --- a/arch/arm/dts/meson-axg-s400.dts +++ b/arch/arm/dts/meson-axg-s400.dts @@ -55,11 +55,6 @@ }; }; - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - }; - linein: audio-codec@0 { #sound-dai-cells = <0>; compatible = "everest,es7241"; @@ -100,10 +95,6 @@ reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; }; - chosen { - stdout-path = "serial0:115200n8"; - }; - memory@0 { device_type = "memory"; reg = <0x0 0x0 0x0 0x40000000>;