public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dylan Hung <dylan_hung@aspeedtech.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] ram: add ddr4 dual x8 configuration
Date: Mon, 7 Sep 2020 16:25:07 +0800	[thread overview]
Message-ID: <20200907082507.22290-3-dylan_hung@aspeedtech.com> (raw)
In-Reply-To: <20200907082507.22290-1-dylan_hung@aspeedtech.com>

the aspeed ddr sdram controller needs to know if the memory chip mounted on
the board is dual x8 die or not. Or it may get the wrong size of the
memory space.

Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
---
 drivers/ram/Kconfig                |  1 +
 drivers/ram/aspeed/Kconfig         | 10 ++++++++++
 drivers/ram/aspeed/sdram_ast2500.c |  2 +-
 3 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 drivers/ram/aspeed/Kconfig

diff --git a/drivers/ram/Kconfig b/drivers/ram/Kconfig
index 7e6e981897..d277237288 100644
--- a/drivers/ram/Kconfig
+++ b/drivers/ram/Kconfig
@@ -76,3 +76,4 @@ config IMXRT_SDRAM
 source "drivers/ram/rockchip/Kconfig"
 source "drivers/ram/sifive/Kconfig"
 source "drivers/ram/stm32mp1/Kconfig"
+source "drivers/ram/aspeed/Kconfig"
diff --git a/drivers/ram/aspeed/Kconfig b/drivers/ram/aspeed/Kconfig
new file mode 100644
index 0000000000..020c913188
--- /dev/null
+++ b/drivers/ram/aspeed/Kconfig
@@ -0,0 +1,10 @@
+if RAM || SPL_RAM
+config ASPEED_DDR4_DUALX8
+	bool "Enable Dual X8 DDR4 die"
+	depends on DM && OF_CONTROL && ARCH_ASPEED
+	default n
+	help
+		Say Y if dual X8 DDR4 die is used on the board.  The aspeed ddr sdram
+		controller needs to know if the memory chip mounted on the board is dual
+		 x8 die or not.  Or it may get the wrong size of the memory space.
+endif
diff --git a/drivers/ram/aspeed/sdram_ast2500.c b/drivers/ram/aspeed/sdram_ast2500.c
index a3adaa8a99..8bfbf562c3 100644
--- a/drivers/ram/aspeed/sdram_ast2500.c
+++ b/drivers/ram/aspeed/sdram_ast2500.c
@@ -247,7 +247,7 @@ static int ast2500_sdrammc_init_ddr4(struct dram_info *info)
 	    | SDRAM_PCR_RESETN_DIS
 	    | SDRAM_PCR_RGAP_CTRL_EN | SDRAM_PCR_ODT_EN | SDRAM_PCR_ODT_EXT_EN;
 	const u32 conf = (SDRAM_CONF_CAP_1024M << SDRAM_CONF_CAP_SHIFT)
-#ifdef CONFIG_DUALX8_RAM
+#ifdef CONFIG_ASPEED_DDR4_DUALX8
 	    | SDRAM_CONF_DUALX8
 #endif
 	    | SDRAM_CONF_SCRAMBLE | SDRAM_CONF_SCRAMBLE_PAT2 | SDRAM_CONF_DDR4;
-- 
2.17.1

  parent reply	other threads:[~2020-09-07  8:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07  8:25 [PATCH 0/2] Refactor ASPEED AST2500 DDR SDRAM driver structure Dylan Hung
2020-09-07  8:25 ` [PATCH 1/2] ram: move aspeed ram driver into drivers/ directory Dylan Hung
2020-09-21  2:42   ` Ryan Chen
2020-10-09 13:00   ` Tom Rini
2020-09-07  8:25 ` Dylan Hung [this message]
2020-09-21  2:42   ` [PATCH 2/2] ram: add ddr4 dual x8 configuration Ryan Chen
2020-10-09 13:00   ` Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2020-09-07  5:23 [PATCH 0/2] Refactor ASPEED AST2500 DDR SDRAM driver structure Dylan Hung
2020-09-07  5:23 ` [PATCH 2/2] ram: add ddr4 dual x8 configuration Dylan Hung

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=20200907082507.22290-3-dylan_hung@aspeedtech.com \
    --to=dylan_hung@aspeedtech.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