]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM controller
authorIcenowy Zheng <icenowy@aosc.xyz>
Sat, 3 Jun 2017 09:10:23 +0000 (17:10 +0800)
committerJagan Teki <jagan@amarulasolutions.com>
Thu, 8 Jun 2017 17:07:55 +0000 (22:37 +0530)
Some A64 boards (SoPine and Pinebook production batch) use LPDDR3 DRAM
chips.

Add support for LPDDR3 DRAM in the DesignWare-like DRAM controller code.

Real LPDDR3 chips' support is not added yet in this commit.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
arch/arm/mach-sunxi/Kconfig
arch/arm/mach-sunxi/dram_sunxi_dw.c

index ca6417388afe950591281abf1017eac5d28779c2..2761915638439773c04b1875cf4a9cc80daa93b0 100644 (file)
@@ -226,6 +226,9 @@ config SUNXI_DRAM_DDR3
 config SUNXI_DRAM_DDR2
        bool
 
+config SUNXI_DRAM_LPDDR3
+       bool
+
 choice
        prompt "DRAM Type and Timing"
        default SUNXI_DRAM_DDR3_1333 if !MACH_SUN8I_V3S
index 20c3055b7a5bf6d790fcbd235b44b325e822c5d6..78b4ffb9c34b02c55a7ea9926fa41c7753e6dc69 100644 (file)
@@ -342,6 +342,8 @@ static void mctl_set_cr(uint16_t socid, struct dram_para *para)
               MCTL_CR_DDR3 | MCTL_CR_2T |
 #elif defined CONFIG_SUNXI_DRAM_DDR2
               MCTL_CR_DDR2 | MCTL_CR_2T |
+#elif defined CONFIG_SUNXI_DRAM_LPDDR3
+              MCTL_CR_LPDDR3 | MCTL_CR_1T |
 #else
 #error Unsupported DRAM type!
 #endif