U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mikhail Kalashnikov <iuncuim@gmail.com>
To: Chris Morgan <macroalpha82@gmail.com>, u-boot@lists.denx.de
Cc: sjg@chromium.org, jernej.skrabec@gmail.com,
	neil.armstrong@linaro.org, hdegoede@redhat.com,
	andre.przywara@arm.com, jagan@amarulasolutions.com,
	trini@konsulko.com, ryan@testtoast.com,
	Chris Morgan <macromorgan@hotmail.com>
Subject: Re: [PATCH 2/9] sunxi: H616: dram: LPDDR3: adjust settings
Date: Sat, 3 Aug 2024 16:17:26 +0300	[thread overview]
Message-ID: <4c003cab-c8b8-484d-924d-084e71fe666e@gmail.com> (raw)
In-Reply-To: <20240801225519.336667-3-macroalpha82@gmail.com>

On 02.08.2024 01:55, Chris Morgan wrote:
> From: Jernej Skrabec <jernej.skrabec@gmail.com>
>
> Adjust H616 LPDDR3 DRAM settings to be in line with vendor driver.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
> Tested-by: Chris Morgan <macromorgan@hotmail.com>
> ---
>   arch/arm/mach-sunxi/dram_sun50i_h616.c         | 2 +-
>   arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-sunxi/dram_sun50i_h616.c b/arch/arm/mach-sunxi/dram_sun50i_h616.c
> index 37c139e0ee..a20264d8b4 100644
> --- a/arch/arm/mach-sunxi/dram_sun50i_h616.c
> +++ b/arch/arm/mach-sunxi/dram_sun50i_h616.c
> @@ -945,7 +945,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;

This is the correct change to match the factory tpr6 parameters.

I think, we also need to change the default value in 
arch/arm/mach-sunxi/Kconfig:

from: config DRAM_SUN50I_H616_TPR6
hex "H616 DRAM TPR6 parameter"
default 0x3300c080
to
default 0x33c00080

>   		break;
>   	case SUNXI_DRAM_TYPE_LPDDR4:
>   		val = para->tpr6 >> 24 & 0xff;
> diff --git a/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c b/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c
> index ce2ffa7a02..82b86084a6 100644
> --- a/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c
> +++ b/arch/arm/mach-sunxi/dram_timings/h616_lpddr3.c
> @@ -24,8 +24,8 @@ void mctl_set_timing_params(const struct dram_para *para)
>   	u8 trrd		= max(ns_to_t(6), 4);
>   	u8 trcd		= ns_to_t(24);
>   	u8 trc		= ns_to_t(70);
> -	u8 txp		= max(ns_to_t(8), 3);
>   	u8 trtp		= max(ns_to_t(8), 2);
> +	u8 txp		= trtp;

I think Jernejchanged this value using RE. I checked the 047fb104 
register (dramtmg[1])

on my t98-h2b-lp3 tvbox, it has not changed and is the same as the 
factory value.

=> md.l 0x47fb100
047fb100: 10141811 0004041c 04070d0d 0050500c .............PP.


  reply	other threads:[~2024-08-03 18:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01 22:55 [PATCH 0/9] Add Anbernic RG35XX-2024 Chris Morgan
2024-08-01 22:55 ` [PATCH 1/9] sunxi: H616: dram: DDR3: adjust settings Chris Morgan
2024-09-04 23:38   ` Andre Przywara
2024-08-01 22:55 ` [PATCH 2/9] sunxi: H616: dram: LPDDR3: " Chris Morgan
2024-08-03 13:17   ` Mikhail Kalashnikov [this message]
2024-09-04 23:07     ` Andre Przywara
2024-08-01 22:55 ` [PATCH 3/9] sunxi: H616: dram: LPDDR4: " Chris Morgan
2024-08-03 12:29   ` Mikhail Kalashnikov
2024-08-14 21:06     ` Chris Morgan
2024-08-15 22:03       ` Chris Morgan
2024-08-16 16:39         ` Mikhail Kalashnikov
2024-08-01 22:55 ` [PATCH 4/9] sunxi: H616: DRAM: Add alternative pin mapping Chris Morgan
2024-08-01 22:55 ` [PATCH 5/9] sunxi: H616: DRAM: Adjust configuration procedure Chris Morgan
2024-08-01 22:55 ` [PATCH 6/9] sunxi: H616: DRAM: Adjust size scan procedure Chris Morgan
2024-08-01 22:55 ` [PATCH 7/9] sunxi: H616: dram: Update mbus priorities Chris Morgan
2024-08-01 22:55 ` [PATCH 8/9] sunxi: dts: arm/arm64: update sun50i-h616.dtsi from Linux-v6.11-rc1 Chris Morgan
2024-08-01 22:55 ` [PATCH 9/9] sunxi: Add support for Anbernic RG35XX-2024 Chris Morgan
2024-08-02  6:54   ` Sumit Garg
2024-08-02  9:57     ` Andre Przywara
2024-08-02 10:38       ` Sumit Garg
2024-08-02 15:04         ` Chris Morgan
2024-08-03 13:28   ` Mikhail Kalashnikov

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=4c003cab-c8b8-484d-924d-084e71fe666e@gmail.com \
    --to=iuncuim@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=hdegoede@redhat.com \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=macroalpha82@gmail.com \
    --cc=macromorgan@hotmail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=ryan@testtoast.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.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