From patchwork Tue Jan 14 06:13:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 1222468 X-Patchwork-Delegate: sbabic@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=HoaqyID+; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 47xgCM3yxhz9sP6 for ; Tue, 14 Jan 2020 17:14:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 764D281840; Tue, 14 Jan 2020 07:14:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1578982451; bh=Hdmx+sTmgf7H3ssuVAcKH+ekH0ApjNcesoOxVtX0jFc=; h=From:To:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=HoaqyID+XGT3Hrw0PutNKmPU7uKttTNBY3gHiBKWlIQzyxlw2yCxeix3a42O33M7i 4ciryyGwvB2FH9zw5UPXK88bTjnX0+nAcoextgO4imPEPj1jQdAv6OoKqP+q1QdDmP zujxFeb7El0CEt0wF7TBcbE7vdIsJxzxmSrU4RnUJ67tnb1a/cp5Olz7ci08i/m39+ NqbDO2hwtNUfB+CWyI3e4UZ8bOUwopf+LlSXzVmsEnkzezj4XuZB4sHoqUtK98J3yH InQdIIPotf2gSNn0ggEWSrjA6DiT8ObE1X8iLvJ/O+0/VmtuBWgI2p72cGxwvz22/z XsxAZECCSdG2g== Received: by phobos.denx.de (Postfix, from userid 109) id A40A981843; Tue, 14 Jan 2020 07:14:10 +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=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4AEF881840 for ; Tue, 14 Jan 2020 07:14:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=hs@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 47xgC40r1Wz1qrJS; Tue, 14 Jan 2020 07:14:08 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 47xgC40k9Zz1qql3; Tue, 14 Jan 2020 07:14:08 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ZTGo5Re04hHg; Tue, 14 Jan 2020 07:14:07 +0100 (CET) X-Auth-Info: QMJOuyV22aBY8U+zk7GBgAgs8dcKOj0jnZvKDU4EMt0= Received: from mail-internal.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 14 Jan 2020 07:14:07 +0100 (CET) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail-internal.denx.de (Postfix) with ESMTP id B64971860B0; Tue, 14 Jan 2020 07:13:18 +0100 (CET) Received: by pollux.denx.de (Postfix, from userid 515) id B44E51A0085; Tue, 14 Jan 2020 07:13:18 +0100 (CET) From: Heiko Schocher To: U-Boot Mailing List Subject: [RFC WIP PATCH v1 4/7] wandboard: enable CONFIG_DTB_RESELECT Date: Tue, 14 Jan 2020 07:13:11 +0100 Message-Id: <20200114061314.148491-5-hs@denx.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200114061314.148491-1-hs@denx.de> References: <20200114061314.148491-1-hs@denx.de> 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: , Cc: Fabio Estevam 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 we have to reselect the DTB, as we need to start with DTB for revision D1 boards, as there is a PMIC which is not on other board revisions. If we do not find the PMIC, we are not on D1 revision board. Signed-off-by: Heiko Schocher --- board/wandboard/wandboard.c | 21 +++++++++++++++++++++ configs/wandboard_defconfig | 1 + 2 files changed, 22 insertions(+) diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c index 4cb9bf6f8c2..ae4ad765a83 100644 --- a/board/wandboard/wandboard.c +++ b/board/wandboard/wandboard.c @@ -510,3 +510,24 @@ int board_fit_config_name_match(const char *name) return -EINVAL; } #endif + +#if !defined(CONFIG_SPL_BUILD) +#ifdef CONFIG_DTB_RESELECT +/* + * we have to reselect the DTB, as we need to start + * with DTB for revision D1 boards, as there is + * a PMIC which is not on other board revisions. + * If we do not find the PMIC, we are not on D1 + * revision board. + */ +int embedded_dtb_select(void) +{ + int rescan; + + power_init_board(); + fdtdec_resetup(&rescan); + + return 0; +} +#endif +#endif diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig index d6bde4bf28b..b8ed143ee99 100644 --- a/configs/wandboard_defconfig +++ b/configs/wandboard_defconfig @@ -44,6 +44,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="imx6dl-wandboard-revb1" CONFIG_OF_LIST="imx6q-wandboard-revb1 imx6qp-wandboard-revd1 imx6dl-wandboard-revb1 imx6q-wandboard-revd1 imx6dl-wandboard-revd1" +CONFIG_DTB_RESELECT=y CONFIG_MULTI_DTB_FIT=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y