From: Chris Morgan <macroalpha82@gmail.com>
To: 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: [PATCH 1/9] sunxi: H616: dram: DDR3: adjust settings
Date: Thu, 1 Aug 2024 17:55:11 -0500 [thread overview]
Message-ID: <20240801225519.336667-2-macroalpha82@gmail.com> (raw)
In-Reply-To: <20240801225519.336667-1-macroalpha82@gmail.com>
From: Jernej Skrabec <jernej.skrabec@gmail.com>
Adjust H616 DDR3 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_timings/h616_ddr3_1333.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c b/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c
index 3faf8d5bd9..26b7eac342 100644
--- a/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c
+++ b/arch/arm/mach-sunxi/dram_timings/h616_ddr3_1333.c
@@ -24,8 +24,8 @@ void mctl_set_timing_params(const struct dram_para *para)
u8 trrd = max(ns_to_t(6), 4); /* JEDEC: max(6 ns, 4nCK) */
u8 trcd = ns_to_t(15); /* JEDEC: 13.5 ns */
u8 trc = ns_to_t(53); /* JEDEC: 49.5 ns */
- u8 txp = max(ns_to_t(6), 3); /* JEDEC: max(6 ns, 3nCK) */
u8 trtp = max(ns_to_t(8), 2); /* JEDEC: max(7.5 ns, 4nCK) */
+ u8 txp = trtp; /* JEDEC: max(6 ns, 3nCK) */
u8 trp = ns_to_t(15); /* JEDEC: >= 13.75 ns */
u8 tras = ns_to_t(38); /* JEDEC >= 36 ns, <= 9*trefi */
u16 trefi = ns_to_t(7800) / 32; /* JEDEC: 7.8us@Tcase <= 85C */
@@ -64,6 +64,9 @@ void mctl_set_timing_params(const struct dram_para *para)
twr2rd = trtp + 2 + tcwl;
trd2wr = tcl + 3 - tcwl;
+ if (trtp + trp < tcl + 2)
+ trtp = tcl + 2 - trp;
+
/* set DRAM timing */
writel((twtp << 24) | (tfaw << 16) | (trasmax << 8) | tras,
&mctl_ctl->dramtmg[0]);
--
2.34.1
next prev parent reply other threads:[~2024-08-01 22:57 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 ` Chris Morgan [this message]
2024-09-04 23:38 ` [PATCH 1/9] sunxi: H616: dram: DDR3: adjust settings Andre Przywara
2024-08-01 22:55 ` [PATCH 2/9] sunxi: H616: dram: LPDDR3: " Chris Morgan
2024-08-03 13:17 ` Mikhail Kalashnikov
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=20240801225519.336667-2-macroalpha82@gmail.com \
--to=macroalpha82@gmail.com \
--cc=andre.przywara@arm.com \
--cc=hdegoede@redhat.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@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