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 1456EC636D3 for ; Tue, 7 Feb 2023 17:27:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A453985773; Tue, 7 Feb 2023 18:27:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="HcUxGVPR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28A7585867; Tue, 7 Feb 2023 18:27:14 +0100 (CET) Received: from xvfrqvdb.outbound-mail.sendgrid.net (xvfrqvdb.outbound-mail.sendgrid.net [168.245.72.219]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 89F9785764 for ; Tue, 7 Feb 2023 18:27:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=YLd3PckH6JnKNiLRLPysT3/0CeEIrvA3WV2V9KIysns=; b=HcUxGVPRQ2v/EnIBVX8xd4uEjtSHsh9fHs4CSkzYis7sYQDdnNVjfmVMJ7x0ia7WsuTf SyzNIb7vMp4+freTH/sVdrYlZba55TKynuajuLbS1elaeoJaBZ0oe26umPd8E7QlgiA1yj Me9nwtcmSPzPOP2OF8QiGQWi20At6fKCVnaOYMDQrBz5iAJX9Hkv+OzZAIGQfY4CBlxco8 0y1krqPdA2LqQpUPeaIolcMcAVezceTOAHwumW0oqoReYeY5qauJTqfnvNVzcs5FzTJjQe +Mpm2Sd386366/OZkfmfwqi0S9yCFVOmHybBuilq0IlkZE40lWpsnZJoI43IX9+w== Received: by filterdrecv-69c5db5cf4-gdm76 with SMTP id filterdrecv-69c5db5cf4-gdm76-1-63E289ED-46 2023-02-07 17:27:10.009704441 +0000 UTC m=+7064345.156554989 Received: from bionic.localdomain (unknown) by geopod-ismtpd-4-0 (SG) with ESMTP id QUv76B05Qui4ZLLbiaXydg Tue, 07 Feb 2023 17:27:09.568 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 0/2] Fix sdram size detection on RK3568 and RK3588 Date: Tue, 07 Feb 2023 17:27:10 +0000 (UTC) Message-Id: <20230207172707.4094859-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230116161459.1307591-1-jonas@kwiboo.se> References: <20230116161459.1307591-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h9D8BiA1AxfeZt7AM?= =?us-ascii?Q?hBC4oIafr6l3fRNGHx1VD9A9TOv=2F8wPkqrNHRqz?= =?us-ascii?Q?pZ3CZj9WJELz5XVZ6mT8yVi1Pv8Kr9rr4IQiArF?= =?us-ascii?Q?BHXXSKsT7dPF=2FZgA0ZVKKVV1fA1F=2FNZCC3e=2FdPE?= =?us-ascii?Q?QUl8xGmCaoZrBPsqYTQhG+miS33MeIU29kSW+N?= To: Simon Glass , Philipp Tomsich , Kever Yang Cc: u-boot@lists.denx.de, Eugen Hristev , Jagan Teki , Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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.6 at phobos.denx.de X-Virus-Status: Clean DRAM initialization blobs for rk356x and rk3588 from vendor encode sdram info in a new version 3 format. The new format makes use of more bits in sys_reg3 compared to the version 2 format. RK3588 blob also encode information on sdram channel 3+4 in sys_reg4+5 using the same format. This series adds support for decoding basic information from this new version 3 format. It also adds support for adding a second dram bank with any usable memory beyond the 4GB mark. With these patches my Radxa ROCK 3 Model A 2GB correctly report 2GB of DRAM, instead of 4GB, and my 8GB board can make full use of its memory. My Radxa ROCK 5 Model B 8GB also correctly report and can make full use of its 8GB of DRAM with these patches. Changes in v2: - Change CONFIG_SYS_SDRAM_BASE to CFG_SYS_SDRAM_BASE - Added a note on RK3588 blobs use of sys_reg4+5 to cover letter Jonas Karlman (2): rockchip: sdram: add basic support for sdram reg info version 3 rockchip: sdram: add dram bank with usable memory beyond 4GB arch/arm/include/asm/arch-rockchip/sdram.h | 28 +++++++++++++++------- arch/arm/mach-rockchip/sdram.c | 21 ++++++++++++---- 2 files changed, 35 insertions(+), 14 deletions(-) -- 2.39.1