[{"id":3683337,"web_url":"http://patchwork.ozlabs.org/comment/3683337/","msgid":"<afCA3l0VxAYfsYut@collins>","list_archive_url":null,"date":"2026-04-28T09:41:50","subject":"Re: [PATCH v3 1/2] sunxi: H616: dram: fix LPDDR3 TPR6 parsing","submitter":{"id":88999,"url":"http://patchwork.ozlabs.org/api/people/88999/","name":"Paul Kocialkowski","email":"paulk@sys-base.io"},"content":"Hi Andre,\n\nLe Mon 27 Apr 26, 15:58, Andre Przywara a écrit :\n> From: Jernej Skrabec <jernej.skrabec@gmail.com>\n> \n> Allwinner's DRAM initialisation code defines a parameter named TPR6,\n> presumably containing some \"Vref\" parameter, but containing values for\n> *all* DRAM types. The runtime code selects one byte based on the DRAM\n> type used.\n> This selection code was wrong for LPDDR3, the value is encoded in\n> bits [23:16], not [15:8]. Fix that in the code, which also aligns it\n> with the very similar code for the A133 and A523.\n> \n> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>\n> Reported-by: Philippe Simons <simons.philippe@gmail.com>\n> Reviewed-by: Andre Przywara <andre.przywara@arm.com>\n\nReviewed-by: Paul Kocialkowski <paulk@sys-base.io>\n\nThanks!\n\n> ---\n>  arch/arm/mach-sunxi/dram_sun50i_h616.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c\n> index 3345c9b8e82..42a0550e015 100644\n> --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c\n> +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c\n> @@ -975,7 +975,7 @@ static bool mctl_phy_init(const struct dram_para *para,\n>  \t\tval = para->tpr6 & 0xff;\n>  \t\tbreak;\n>  \tcase SUNXI_DRAM_TYPE_LPDDR3:\n> -\t\tval = para->tpr6 >> 8 & 0xff;\n> +\t\tval = para->tpr6 >> 16 & 0xff;\n>  \t\tbreak;\n>  \tcase SUNXI_DRAM_TYPE_LPDDR4:\n>  \t\tval = para->tpr6 >> 24 & 0xff;\n> -- \n> 2.43.0\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=sys-base.io","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=sys-base.io","phobos.denx.de;\n spf=pass smtp.mailfrom=paulk@sys-base.io"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4bdV68Zqz1yHX\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 20:04:46 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 260188469E;\n\tTue, 28 Apr 2026 12:04:44 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 895C484658; Tue, 28 Apr 2026 12:04:42 +0200 (CEST)","from leonov.paulk.fr (leonov.paulk.fr [185.233.101.22])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 0E1278468B\n for <u-boot@lists.denx.de>; Tue, 28 Apr 2026 12:04:40 +0200 (CEST)","from laika.paulk.fr (12.234.24.109.rev.sfr.net [109.24.234.12])\n by leonov.paulk.fr (Postfix) with ESMTPS id 0E1651F8005A\n for <u-boot@lists.denx.de>; Tue, 28 Apr 2026 10:04:25 +0000 (UTC)","by laika.paulk.fr (Postfix, from userid 65534)\n id CF265B4046D; Tue, 28 Apr 2026 09:41:54 +0000 (UTC)","from collins (unknown [192.168.1.1])\n by laika.paulk.fr (Postfix) with ESMTPSA id 25C1CB4046A;\n Tue, 28 Apr 2026 09:41:53 +0000 (UTC)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-1.9 required=5.0 tests=BAYES_00,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","Date":"Tue, 28 Apr 2026 11:41:50 +0200","From":"Paul Kocialkowski <paulk@sys-base.io>","To":"Andre Przywara <andre.przywara@arm.com>","Cc":"u-boot@lists.denx.de, Jernej Skrabec <jernej.skrabec@gmail.com>,\n Philippe Simons <simons.philippe@gmail.com>, linux-sunxi@lists.linux.dev,\n Mikhail Kalashnikov <iuncuim@gmail.com>,\n Cody Eksal <masterr3c0rd@epochal.quest>","Subject":"Re: [PATCH v3 1/2] sunxi: H616: dram: fix LPDDR3 TPR6 parsing","Message-ID":"<afCA3l0VxAYfsYut@collins>","References":"<20260427135819.2577234-1-andre.przywara@arm.com>\n <20260427135819.2577234-2-andre.przywara@arm.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha512;\n protocol=\"application/pgp-signature\"; boundary=\"1duiVBc+9tOnM3O+\"","Content-Disposition":"inline","In-Reply-To":"<20260427135819.2577234-2-andre.przywara@arm.com>","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]