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 F07A4EB64DA for ; Tue, 18 Jul 2023 13:36:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1C9D0866E1; Tue, 18 Jul 2023 15:36:16 +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="B46+KTv5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D817F8670C; Tue, 18 Jul 2023 15:36:13 +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 CB6438668B for ; Tue, 18 Jul 2023 15:36:10 +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=1689687370; x=1692279370; 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=Uw/cBLIpocXiXy2JivWHLAQddP3p6SaMlkXESuMTP3E=; b=B46+KTv53ZkPqmP19ogxmJG4qudRnY/mzSEqrQ3yPJd8MzsIQnbHNfdTjti8hv9S yfNIinUWI4bmtST/tULpfRHVfVOQuhVF60jL+El/ygNXpmV4nFot8HwtGEdEO8Lj 7g3pqs+9LwjP8Z+5rRWPVZ1N2nEDFhvaEry7GmKYZR8=; X-AuditID: ac14000a-923ff70000007ecb-e5-64b6954ae7f2 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 57.FB.32459.A4596B46; Tue, 18 Jul 2023 15:36:10 +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:28 +0200 From: Teresa Remmet To: Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" CC: , , Yannic Moog , Daniel Schultz , Wadim Egorov Subject: [PATCH 0/6] PHYTEC SoM detection for phyCORE-i.MX8MP Date: Tue, 18 Jul 2023 15:35:49 +0200 Message-ID: <20230718133555.6627-1-t.remmet@phytec.de> X-Mailer: git-send-email 2.34.1 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+NgFtrHLMWRmVeSWpSXmKPExsWyRpKBR9dr6rYUg6ZGAYuHV/0t2k/5WLzd 28luMeXxenaL7nfqDqwe82adYPHYOesuu8fZOzsYPfq7W1g9Nr7bwRTAGsVlk5Kak1mWWqRv l8CV0XXhFWPBEYGKnl//WRoYN/F2MXJwSAiYSPw6b9zFyMUhJLCESaJzxWdGCOcZo8SSpjvM XYycHGwCGhJPV5xmArFFBMokHvZ+AoszCyxmlFj92xLEFhawlXg6cx8jiM0ioCpx+/hvFhCb V8BM4vm6RewgtoSAvMT+g2eZIeKCEidnPmGBmCMv0bx1NtRMCYmDL16A2UJA8V2XTjLC9E47 95oZwg6V2PplO9MERoFZSEbNQjJqFpJRCxiZVzEK5WYmZ6cWZWbrFWRUlqQm66WkbmIEhbEI A9cOxr45HocYmTgYDzFKcDArifB+X7UpRYg3JbGyKrUoP76oNCe1+BCjNAeLkjjv/R6mRCGB 9MSS1OzU1ILUIpgsEwenVAPjSuYNtoU1no3+5ef8Oif6aczknxJsyzDBz1/a0Ort7bsM/xec vFTzP6i2NOjUUoOu9rMi07vVOi0fni35uW/iDa26f2aLZu2JsLvIKNzEw1tS7rjj88Ttzt2O /Fvs7tkw3qyaa2ETnidcFaGRvIQnYEVx3dW/YW+WcCWpvHzVMG/X1x9NH8SVWIozEg21mIuK EwFvT7NdUQIAAA== 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 This series adds support for EEPROM SoM detection used by different PHYTEC SoMs. The EEPROM data consist of 32 bytes containing information like PCB revision, RAM size and other SoM specific configuration. For SoMs of the i.MX8M family the data is written to two areas of the used i2c EEPROM. We initally add the detection support for phyCORE-i.MX8MP. Due to layout constraints phyCORE-i.MX8MP SoMs with PCB revision 2 and older can only make use of a lower RAM frequency. This changes with the use of newer PCB revisions. We make use of the factory flashed EEPROM data to detect the PCB revision and select the fitting RAM settings. Teresa Teresa Remmet (6): board: phytec: Add common PHYTEC SoM detection board: phytec: common: Add imx8m specific EEPROM detection support board: phytec: phycore-imx8mp: Add EEPROM detection initialisation board: phytec: phycore_imx8mp: Update 2GB RAM Timings board: phytec: common: phytec_som_detection: Add helper for PCB revision board: phytec: phycore_imx8mp: Add 4000MTS RAM timings based on PCB rev board/phytec/common/Kconfig | 13 + board/phytec/common/Makefile | 11 + board/phytec/common/imx8m_som_detection.c | 169 ++++++++++++ board/phytec/common/imx8m_som_detection.h | 54 ++++ board/phytec/common/phytec_som_detection.c | 203 ++++++++++++++ board/phytec/common/phytec_som_detection.h | 109 ++++++++ board/phytec/phycore_imx8mp/Kconfig | 1 + board/phytec/phycore_imx8mp/lpddr4_timing.c | 278 ++++++++++---------- board/phytec/phycore_imx8mp/spl.c | 80 ++++++ configs/phycore-imx8mp_defconfig | 1 + 10 files changed, 776 insertions(+), 143 deletions(-) create mode 100644 board/phytec/common/Kconfig create mode 100644 board/phytec/common/Makefile create mode 100644 board/phytec/common/imx8m_som_detection.c create mode 100644 board/phytec/common/imx8m_som_detection.h create mode 100644 board/phytec/common/phytec_som_detection.c create mode 100644 board/phytec/common/phytec_som_detection.h -- 2.34.1