From: Icenowy Zheng Date: Sat, 3 Jun 2017 09:10:23 +0000 (+0800) Subject: sunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM controller X-Git-Tag: v2017.07-rc2~3^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72cc987002539b23b0c97321cc2ccfc1b05f48de;p=platform%2Fkernel%2Fu-boot.git sunxi: add LPDDR3 DRAM type support for DesignWare-like DRAM controller 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 Reviewed-by: Jagan Teki Tested-by: Jagan Teki --- diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index ca64173..2761915 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -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 diff --git a/arch/arm/mach-sunxi/dram_sunxi_dw.c b/arch/arm/mach-sunxi/dram_sunxi_dw.c index 20c3055..78b4ffb 100644 --- a/arch/arm/mach-sunxi/dram_sunxi_dw.c +++ b/arch/arm/mach-sunxi/dram_sunxi_dw.c @@ -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