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>,
Philippe Simons <simons.philippe@gmail.com>,
linux-sunxi@lists.linux.dev,
Mikhail Kalashnikov <iuncuim@gmail.com>,
Cody Eksal <masterr3c0rd@epochal.quest>
Subject: Re: [PATCH v3 1/2] sunxi: H616: dram: fix LPDDR3 TPR6 parsing
Date: Tue, 28 Apr 2026 11:41:50 +0200 [thread overview]
Message-ID: <afCA3l0VxAYfsYut@collins> (raw)
In-Reply-To: <20260427135819.2577234-2-andre.przywara@arm.com>
[-- Attachment #1: Type: text/plain, Size: 1689 bytes --]
Hi Andre,
Le Mon 27 Apr 26, 15:58, Andre Przywara a écrit :
> From: Jernej Skrabec <jernej.skrabec@gmail.com>
>
> Allwinner's DRAM initialisation code defines a parameter named TPR6,
> presumably containing some "Vref" parameter, but containing values for
> *all* DRAM types. The runtime code selects one byte based on the DRAM
> type used.
> This selection code was wrong for LPDDR3, the value is encoded in
> bits [23:16], not [15:8]. Fix that in the code, which also aligns it
> with the very similar code for the A133 and A523.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Reported-by: Philippe Simons <simons.philippe@gmail.com>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Paul Kocialkowski <paulk@sys-base.io>
Thanks!
> ---
> arch/arm/mach-sunxi/dram_sun50i_h616.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c
> index 3345c9b8e82..42a0550e015 100644
> --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c
> +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c
> @@ -975,7 +975,7 @@ static bool mctl_phy_init(const struct dram_para *para,
> val = para->tpr6 & 0xff;
> break;
> case SUNXI_DRAM_TYPE_LPDDR3:
> - val = para->tpr6 >> 8 & 0xff;
> + val = para->tpr6 >> 16 & 0xff;
> break;
> case SUNXI_DRAM_TYPE_LPDDR4:
> val = para->tpr6 >> 24 & 0xff;
> --
> 2.43.0
>
--
Paul Kocialkowski,
Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/
Expert in multimedia, graphics and embedded hardware support with Linux.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-04-28 10:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 13:58 [PATCH v3 0/2] sunxi: H616: DRAM: Fix TPR6 parameter parsing Andre Przywara
2026-04-27 13:58 ` [PATCH v3 1/2] sunxi: H616: dram: fix LPDDR3 TPR6 parsing Andre Przywara
2026-04-28 9:41 ` Paul Kocialkowski [this message]
2026-04-27 13:58 ` [PATCH v3 2/2] sunxi: H616: dram: drop default TPR6 Kconfig value Andre Przywara
2026-04-27 18:42 ` Jernej Škrabec
2026-04-28 9:49 ` Paul Kocialkowski
2026-04-28 17:39 ` Paul Kocialkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afCA3l0VxAYfsYut@collins \
--to=paulk@sys-base.io \
--cc=andre.przywara@arm.com \
--cc=iuncuim@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=masterr3c0rd@epochal.quest \
--cc=simons.philippe@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox