From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 27 Sep 2024 16:08:43 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1suBeE-003Qje-1i for lore@lore.pengutronix.de; Fri, 27 Sep 2024 16:08:43 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1suBeE-0002Ht-8G for lore@pengutronix.de; Fri, 27 Sep 2024 16:08:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Subject:From:Cc:To:MIME-Version:Date:Message-ID:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=bs9tSo6nEDnXvLGAkSMc2cA+t1MC6cpKQnCMug+bX/M=; b=3AhD636/lhBkGpK7WgAsoi1HA2 BWo2QCAnGK8OuWxN3eFbsSQPgf+zSGOYCsatQxA8JdQNLb/L9DcuOxxOnxJcRIKDaKvZ5MdvJh2Yc BBxOPtk5uCKc7LJT4dMMsL6qYbD4GeOZ/8p9vQGT8wFqsgY3DXMOa4hY9XHGQuY8PNrE9Lbnk755K aGtnT0OxUyHM81nHstJXWs6EnHpInZtGyjQnSqx0X0f2kU8jxHRDBdKmRV70WUKjN+KPMaZM2rpUk 1if4WNqZzf9AyBYjAb9EZHCa4xFAjZWN8lPwe1l4o5Bp2d7HeW2gB5IyLoplltjoUJHol7vA/e18L QeE6i44Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suBdg-0000000BQ4j-2UZb; Fri, 27 Sep 2024 14:08:08 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suBdd-0000000BQ4D-343t for barebox@lists.infradead.org; Fri, 27 Sep 2024 14:08:07 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1suBda-0001kq-FE; Fri, 27 Sep 2024 16:08:02 +0200 Message-ID: <8074530f-720b-4aea-934b-c0643c356617@pengutronix.de> Date: Fri, 27 Sep 2024 16:08:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US, de-DE To: "Peng Fan (OSS)" Cc: U-Boot Mailing List , "barebox@lists.infradead.org" , uboot-imx@nxp.com, Steffen Trumtrar From: Ahmad Fatoum Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240927_070805_804391_E716DEBF X-CRM114-Status: GOOD ( 10.66 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-4.0 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: i.MX8/9: question about unused DDR PHY trained CSR board array X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) Hello Peng, Looking at the DDR setup code for i.MX8M and i.MX9 that you had contributed, I am wondering about struct dram_cfg_param::ddrphy_trained_csr and the global ddrphy_trained_csr array. struct dram_cfg_param::ddrphy_trained_csr is presumably generated by the i.MX DDR tool and it seems populated by all the i.MX8M/9 boards in U-Boot. This struct member is wholly unused though and instead a global ddrphy_trained_csr is used. What I wonder about is whether it's possible for the DDR tool to generate a different ddrphy_trained_csr than the default: 1) If yes, we should drop the global ddrphy_trained_csr and actually use the board-specific array 2) If not, we should drop the board-specific array and perhaps ask for the DDR tool to be changed I initially assumed 1) and because all boards supported by barebox had a board-specific ddrphy_trained_csr that's identical to the global ddrphy_trained_csr, I dropped the unused array[1][2]. I now have the DDR settings for an i.MX9 LPDDR4 board in front of me that has different contents for struct dram_cfg_param::ddrphy_trained_csr than the default. I will inquire how that came about, but in parallel I wanted to ask you if this is supposed to happen and to alert you to this issue. The way things are, this is either a bug or a missed space saving opportunity for U-Boot. [1]: https://lore.barebox.org/barebox/20231205083604.1497018-1-a.fatoum@pengutronix.de/ [2]: https://lore.barebox.org/barebox/20240313154217.2747582-1-a.fatoum@pengutronix.de/ Thanks, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |