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 16785C433EF for ; Thu, 17 Mar 2022 17:03:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DF77983CEF; Thu, 17 Mar 2022 18:03:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="IjrFiuLc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7B14483CE9; Thu, 17 Mar 2022 18:03:52 +0100 (CET) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 6AD89831AA for ; Thu, 17 Mar 2022 18:03:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=d-gerlach@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 22HH3k7E091166; Thu, 17 Mar 2022 12:03:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1647536626; bh=9Hk/D4+rJMkpfAwkwijf/SOslpcb1t2AAECMXP6BJVE=; h=From:To:CC:Subject:Date; b=IjrFiuLcemL81oSEFOEDQzyAM+Ef6iWqkli6k03FW7AHGShby0huX0zOmsx94O1l/ lSTIp+n/hlT5pRsqa1h9xncacYgCL8/7wv5y7KUsGfTSNmVuCjnOJ4BUpBkalKYdUS Q6m3q1hItFIfk+kksQSKw23M7UgPiNxXDbO00W9A= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 22HH3krC077702 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 17 Mar 2022 12:03:46 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 17 Mar 2022 12:03:46 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Thu, 17 Mar 2022 12:03:46 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 22HH3kBT025839; Thu, 17 Mar 2022 12:03:46 -0500 From: Dave Gerlach To: Tom Rini CC: , Praneeth Bajjuri , Dave Gerlach , Georgi Vlaev Subject: [PATCH 0/8] ram: k3-ddrss: Enable DDRSS ECC for full DDR Space Date: Thu, 17 Mar 2022 12:03:38 -0500 Message-ID: <20220317170346.31162-1-d-gerlach@ti.com> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.5 at phobos.denx.de X-Virus-Status: Clean Hi, This series adds support for single bit ECC in the TI DDRSS bridge inline ECC and adds required support code for AM64x EVM to enable it for the full DDR space. This ECC module checks reads and writes to and from DDR once enabled without additional action required. ECC is stored together with the data so because of this, 1/9th of the total SDRAM space is used for ECC storage and the rest 8/9th is available for system use. From system point of view this means that available SDRAM will be reduced from the end by 1/9, but otherwise SDRAM is accessed and used the same. This series adds updates to the k3-ddrss driver for configuration of the ECC, and also board and arch code to automatically resize the available DDR if ECC is enabled through DT fixup. In order to avoid duplicating information and keeping this series generic this series moves to use the "memory" dt node for the main source of DDR amount and base address instead of hard coding it which has been done for all K3 previously. All TI K3 devices that use the k3-ddrss driver have this same inline ECC, so taking this step to make this more generic will allow this to be extended more easily. By default this series does NOT actually enable ECC for the any platform due to the multi second boot time increase that comes from the ECC priming that is done as part of ECC init, but it can be enabled by adding the 'ti,ecc-enable` property to the memorycontroller node in k3-am642-r5-evm DT. Regards, Dave Dave Gerlach (8): arm: dts: k3-am642-r5-evm: Mark memory with u-boot,dm-spl board: ti: am64x: Use fdt functions for ram and bank init dt-bindings: memory-controller: Add information about ECC bindings ram: k3-ddrss: Rename ddrss_ss_regs to ddrss_ctl_regs ram: k3-ddrss: Introduce ECC Functionality for full memory space board: ti: am64x: Account for DDR size fixups if ECC is enabled arm: dts: k3-am64-ddr: Add ss_cfg reg entry configs: am64x_evm_r5: Add CONFIG_NR_DRAM_BANKS as done in a53 defconfig arch/arm/dts/k3-am64-ddr.dtsi | 5 +- arch/arm/dts/k3-am642-r5-evm.dts | 1 + board/ti/am64x/evm.c | 74 ++++++++-- configs/am64x_evm_r5_defconfig | 1 + .../memory-controller/k3-j721e-ddrss.txt | 8 + drivers/ram/k3-ddrss/k3-ddrss.c | 138 +++++++++++++++++- include/k3-ddrss.h | 16 ++ 7 files changed, 230 insertions(+), 13 deletions(-) create mode 100644 include/k3-ddrss.h -- 2.35.0