Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AA20EB64DC for ; Tue, 18 Jul 2023 13:36:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 40A0A86702; Tue, 18 Jul 2023 15:36:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=phytec.de header.i=@phytec.de header.b="LLGyc0Vy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7A439866DC; Tue, 18 Jul 2023 15:36:18 +0200 (CEST) Received: from mickerik.phytec.de (mickerik.phytec.de [91.26.50.163]) (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 89E01866F8 for ; Tue, 18 Jul 2023 15:36:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=phytec.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=T.Remmet@phytec.de DKIM-Signature: v=1; a=rsa-sha256; d=phytec.de; s=a4; c=relaxed/simple; q=dns/txt; i=@phytec.de; t=1689687371; x=1692279371; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=V//o9ytwzF79D9Hf0yZ7uLlYv5ip5cSX9ZtxAijYxsk=; b=LLGyc0Vy4bRkK3jfHg3aaG91Mewb3zuvJCjmDWLpZtAFgQ0rvAE/9lp4jEeo3/Rn SaLRx4T+bmTSZRAxE4bW9DVQtg4nvpBe0f3l87rhrpu3UXpoj5sH3xAe/v9mAIpM h+wNxWj0rt6wa3IWpM0N2D3ydoO5VslIueDU9IGUi+E=; X-AuditID: ac14000a-917fe70000007ecb-e9-64b6954bac2b Received: from berlix.phytec.de (Unknown_Domain [172.25.0.12]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mickerik.phytec.de (PHYTEC Mail Gateway) with SMTP id 98.FB.32459.B4596B46; Tue, 18 Jul 2023 15:36:11 +0200 (CEST) Received: from llp-tremmet2.fritz.box (172.25.0.11) by Berlix.phytec.de (172.25.0.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Tue, 18 Jul 2023 15:36:29 +0200 From: Teresa Remmet To: Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" CC: , , Yannic Moog , Daniel Schultz , Wadim Egorov Subject: [PATCH 3/6] board: phytec: phycore-imx8mp: Add EEPROM detection initialisation Date: Tue, 18 Jul 2023 15:35:52 +0200 Message-ID: <20230718133555.6627-4-t.remmet@phytec.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230718133555.6627-1-t.remmet@phytec.de> References: <20230718133555.6627-1-t.remmet@phytec.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.25.0.11] X-ClientProxiedBy: Berlix.phytec.de (172.25.0.12) To Berlix.phytec.de (172.25.0.12) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsWyRpKBR9d76rYUg02TZSweXvW3aD/lY/F2 bye7xZTH69ktut+pO7B6zJt1gsVj56y77B5n7+xg9OjvbmH12PhuB1MAaxSXTUpqTmZZapG+ XQJXxvs/W9gKvgpUNPSfZm5g3MPXxcjJISFgIrH53gLGLkYuDiGBJUwSd1/NhXKeMUocWXGf BaSKTUBD4umK00wgtohAmcTD3k/MIDazwGJGidW/LUFsYYFwiaaD78HqWQRUJV6c/cIOYvMK mEl8u/eYFWKbvMT+g2fBejkFzCXafhxlA7GFgGouL2yHqheUODnzCQvEfHmJ5q2zoXZJSBx8 8YIZol5eYtelk4wwM6ede80MYYdKbP2ynWkCo9AsJKNmIRk1C8moBYzMqxiFcjOTs1OLMrP1 CjIqS1KT9VJSNzGCAl+EgWsHY98cj0OMTByMhxglOJiVRHi/r9qUIsSbklhZlVqUH19UmpNa fIhRmoNFSZz3fg9TopBAemJJanZqakFqEUyWiYNTqoFxhnOVyvPg5rlxn1jk7Zo4Htxoi6+K 3nrlR+VT1bCmnSfXe0424Z8b+NuixzG/kVeai+FQ5o6yHR+UPdXi7mpdjmx77SHB+VMs7KyK hM43lXcSZy6YfFjzPkDph7yZXp/O9OaIT5a768/eOj+zJqfSc40dM+P8Gc2v7uuw2yh6z/ma 1FX9xlyJpTgj0VCLuag4EQBbXUL4agIAAA== X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean Add EEPROM detection initialisation for phyCORE-i.MX8MM and print SoM information during boot when successful. Signed-off-by: Teresa Remmet --- board/phytec/phycore_imx8mp/Kconfig | 1 + board/phytec/phycore_imx8mp/spl.c | 19 +++++++++++++++++++ configs/phycore-imx8mp_defconfig | 1 + 3 files changed, 21 insertions(+) diff --git a/board/phytec/phycore_imx8mp/Kconfig b/board/phytec/phycore_imx8mp/Kconfig index c053a46fc9d1..f846d10bad9e 100644 --- a/board/phytec/phycore_imx8mp/Kconfig +++ b/board/phytec/phycore_imx8mp/Kconfig @@ -12,4 +12,5 @@ config SYS_CONFIG_NAME config IMX_CONFIG default "board/phytec/phycore_imx8mp/imximage-8mp-sd.cfg" +source "board/phytec/common/Kconfig" endif diff --git a/board/phytec/phycore_imx8mp/spl.c b/board/phytec/phycore_imx8mp/spl.c index faed6fc3b76d..e084fe081987 100644 --- a/board/phytec/phycore_imx8mp/spl.c +++ b/board/phytec/phycore_imx8mp/spl.c @@ -21,8 +21,13 @@ #include #include +#include "../common/imx8m_som_detection.h" + DECLARE_GLOBAL_DATA_PTR; +#define EEPROM_ADDR 0x51 +#define EEPROM_ADDR_FALLBACK 0x59 + int spl_board_boot_device(enum boot_device boot_dev_spl) { return BOOT_DEVICE_BOOTROM; @@ -30,6 +35,20 @@ int spl_board_boot_device(enum boot_device boot_dev_spl) void spl_dram_init(void) { + int ret; + + ret = phytec_eeprom_data_setup_fallback(NULL, 0, EEPROM_ADDR, + EEPROM_ADDR_FALLBACK); + if (ret) + goto out; + + ret = phytec_imx8m_detect(NULL); + if (ret) + goto out; + + phytec_print_som_info(NULL); + +out: ddr_init(&dram_timing); } diff --git a/configs/phycore-imx8mp_defconfig b/configs/phycore-imx8mp_defconfig index 7bf404be860b..7937e15e6422 100644 --- a/configs/phycore-imx8mp_defconfig +++ b/configs/phycore-imx8mp_defconfig @@ -12,6 +12,7 @@ CONFIG_DM_GPIO=y CONFIG_DEFAULT_DEVICE_TREE="imx8mp-phyboard-pollux-rdk" CONFIG_SPL_TEXT_BASE=0x920000 CONFIG_TARGET_PHYCORE_IMX8MP=y +CONFIG_PHYTEC_SOM_DETECTION=y CONFIG_SYS_PROMPT="u-boot=> " CONFIG_SYS_MONITOR_LEN=524288 CONFIG_SPL_MMC=y -- 2.34.1