mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
ARM: rockchip: rk3188 add DDR init
This commit is contained in:
52
arch/arm/mach-rockchip/ddr.h
Normal file
52
arch/arm/mach-rockchip/ddr.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2011-2014 ROCKCHIP, Inc.
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MACH_ROCKCHIP_DDR_H
|
||||
#define __MACH_ROCKCHIP_DDR_H
|
||||
|
||||
#define DDR3_800D (0) // 5-5-5
|
||||
#define DDR3_800E (1) // 6-6-6
|
||||
#define DDR3_1066E (2) // 6-6-6
|
||||
#define DDR3_1066F (3) // 7-7-7
|
||||
#define DDR3_1066G (4) // 8-8-8
|
||||
#define DDR3_1333F (5) // 7-7-7
|
||||
#define DDR3_1333G (6) // 8-8-8
|
||||
#define DDR3_1333H (7) // 9-9-9
|
||||
#define DDR3_1333J (8) // 10-10-10
|
||||
#define DDR3_1600G (9) // 8-8-8
|
||||
#define DDR3_1600H (10) // 9-9-9
|
||||
#define DDR3_1600J (11) // 10-10-10
|
||||
#define DDR3_1600K (12) // 11-11-11
|
||||
#define DDR3_1866J (13) // 10-10-10
|
||||
#define DDR3_1866K (14) // 11-11-11
|
||||
#define DDR3_1866L (15) // 12-12-12
|
||||
#define DDR3_1866M (16) // 13-13-13
|
||||
#define DDR3_2133K (17) // 11-11-11
|
||||
#define DDR3_2133L (18) // 12-12-12
|
||||
#define DDR3_2133M (19) // 13-13-13
|
||||
#define DDR3_2133N (20) // 14-14-14
|
||||
#define DDR3_DEFAULT (21)
|
||||
#define DDR_DDR2 (22)
|
||||
#define DDR_LPDDR (23)
|
||||
#define DDR_LPDDR2 (24)
|
||||
|
||||
struct ddr_freq_t {
|
||||
unsigned long screen_ft_us;
|
||||
unsigned long long t0;
|
||||
unsigned long long t1;
|
||||
unsigned long t2;
|
||||
};
|
||||
|
||||
#endif
|
||||
298
arch/arm/mach-rockchip/ddr_reg_resume.inc
Executable file
298
arch/arm/mach-rockchip/ddr_reg_resume.inc
Executable file
@@ -0,0 +1,298 @@
|
||||
0xea00008e ,
|
||||
0xe3a03000 ,
|
||||
0xe92d4010 ,
|
||||
0xe1530002 ,
|
||||
0x37914103 ,
|
||||
0x37804103 ,
|
||||
0x32833001 ,
|
||||
0x3afffffa ,
|
||||
0xe8bd8010 ,
|
||||
0xe59f1470 ,
|
||||
0xe5910004 ,
|
||||
0xe3802010 ,
|
||||
0xe3a00000 ,
|
||||
0xe38222f1 ,
|
||||
0xe5812004 ,
|
||||
0xe2800001 ,
|
||||
0xe350000a ,
|
||||
0x23a00007 ,
|
||||
0x3afffffb ,
|
||||
0xe591200c ,
|
||||
0xe1d02002 ,
|
||||
0x1afffffc ,
|
||||
0xe12fff1e ,
|
||||
0xe3500003 ,
|
||||
0xe59f0434 ,
|
||||
0xe5901004 ,
|
||||
0x3811207 ,
|
||||
0x3811061 ,
|
||||
0x13811207 ,
|
||||
0x13811041 ,
|
||||
0xe5801004 ,
|
||||
0xe3a01000 ,
|
||||
0xe2811001 ,
|
||||
0xe351000a ,
|
||||
0x23a01009 ,
|
||||
0x3afffffb ,
|
||||
0xe590200c ,
|
||||
0xe1d12002 ,
|
||||
0x1afffffc ,
|
||||
0xe12fff1e ,
|
||||
0xe59f23f4 ,
|
||||
0xe3a03001 ,
|
||||
0xe92d4010 ,
|
||||
0xe3a04004 ,
|
||||
0xe2420802 ,
|
||||
0xe5901008 ,
|
||||
0xe2011007 ,
|
||||
0xe3510001 ,
|
||||
0x8bd8010 ,
|
||||
0xe3510000 ,
|
||||
0x13510003 ,
|
||||
0xa000009 ,
|
||||
0xe3510005 ,
|
||||
0x5804004 ,
|
||||
0x1afffff5 ,
|
||||
0xe5901008 ,
|
||||
0xe2011007 ,
|
||||
0xe3510003 ,
|
||||
0x1afffffb ,
|
||||
0xe592100c ,
|
||||
0xe3110002 ,
|
||||
0xafffffc ,
|
||||
0xe5803004 ,
|
||||
0xe5901008 ,
|
||||
0xe2011007 ,
|
||||
0xe3510001 ,
|
||||
0x1afffffb ,
|
||||
0xeaffffe8 ,
|
||||
0xe59f2384 ,
|
||||
0xe3a03002 ,
|
||||
0xe92d4030 ,
|
||||
0xe3a05004 ,
|
||||
0xe3a04001 ,
|
||||
0xe2420802 ,
|
||||
0xe5901008 ,
|
||||
0xe2011007 ,
|
||||
0xe3510003 ,
|
||||
0x8bd8030 ,
|
||||
0xe3510000 ,
|
||||
0x5804004 ,
|
||||
0xa00000c ,
|
||||
0xe3510001 ,
|
||||
0xa00000e ,
|
||||
0xe3510005 ,
|
||||
0x5805004 ,
|
||||
0x1afffff3 ,
|
||||
0xe5901008 ,
|
||||
0xe2011007 ,
|
||||
0xe3510003 ,
|
||||
0x1afffffb ,
|
||||
0xe592100c ,
|
||||
0xe3110002 ,
|
||||
0xafffffc ,
|
||||
0xeaffffeb ,
|
||||
0xe5901008 ,
|
||||
0xe2011007 ,
|
||||
0xe3510001 ,
|
||||
0x1afffffb ,
|
||||
0xe5803004 ,
|
||||
0xe5901008 ,
|
||||
0xe2011007 ,
|
||||
0xe3510003 ,
|
||||
0x1afffffb ,
|
||||
0xeaffffe1 ,
|
||||
0xe59f02f4 ,
|
||||
0xe5901014 ,
|
||||
0xe3c11101 ,
|
||||
0xe5801014 ,
|
||||
0xe59011cc ,
|
||||
0xe3c11101 ,
|
||||
0xe58011cc ,
|
||||
0xe590120c ,
|
||||
0xe3c11101 ,
|
||||
0xe580120c ,
|
||||
0xe590124c ,
|
||||
0xe3c11101 ,
|
||||
0xe580124c ,
|
||||
0xe590128c ,
|
||||
0xe3c11101 ,
|
||||
0xe580128c ,
|
||||
0xe3a01000 ,
|
||||
0xe2811001 ,
|
||||
0xe3510ffa ,
|
||||
0x3afffffc ,
|
||||
0xe5901014 ,
|
||||
0xe3811101 ,
|
||||
0xe5801014 ,
|
||||
0xe59011cc ,
|
||||
0xe3811101 ,
|
||||
0xe58011cc ,
|
||||
0xe590120c ,
|
||||
0xe3811101 ,
|
||||
0xe580120c ,
|
||||
0xe590124c ,
|
||||
0xe3811101 ,
|
||||
0xe580124c ,
|
||||
0xe590128c ,
|
||||
0xe3811101 ,
|
||||
0xe580128c ,
|
||||
0xe3a00000 ,
|
||||
0xe2800001 ,
|
||||
0xe3500ffa ,
|
||||
0x3afffffc ,
|
||||
0xe12fff1e ,
|
||||
0xe92d40f0 ,
|
||||
0xe1a04000 ,
|
||||
0xe59f624c ,
|
||||
0xe5901104 ,
|
||||
0xe5900124 ,
|
||||
0xe5861010 ,
|
||||
0xe5941108 ,
|
||||
0xe5861014 ,
|
||||
0xe5941158 ,
|
||||
0xe58611cc ,
|
||||
0xe5941168 ,
|
||||
0xe586120c ,
|
||||
0xe5941178 ,
|
||||
0xe586124c ,
|
||||
0xe5941188 ,
|
||||
0xe586128c ,
|
||||
0xe2007007 ,
|
||||
0xe59410fc ,
|
||||
0xe5861004 ,
|
||||
0xebffffc3 ,
|
||||
0xe59f0208 ,
|
||||
0xe3a02022 ,
|
||||
0xe2841014 ,
|
||||
0xebffff58 ,
|
||||
0xe5940000 ,
|
||||
0xe2465802 ,
|
||||
0xe5850000 ,
|
||||
0xe5940004 ,
|
||||
0xe5850050 ,
|
||||
0xe5940008 ,
|
||||
0xe585007c ,
|
||||
0xe594000c ,
|
||||
0xe5850080 ,
|
||||
0xe594009c ,
|
||||
0xe5850240 ,
|
||||
0xe59400a0 ,
|
||||
0xe5850244 ,
|
||||
0xe59400a4 ,
|
||||
0xe5850248 ,
|
||||
0xe59400a8 ,
|
||||
0xe585024c ,
|
||||
0xe59400ac ,
|
||||
0xe5850250 ,
|
||||
0xe59400b0 ,
|
||||
0xe5850254 ,
|
||||
0xe59400b4 ,
|
||||
0xe5850260 ,
|
||||
0xe59400b8 ,
|
||||
0xe5850264 ,
|
||||
0xe59400bc ,
|
||||
0xe5850270 ,
|
||||
0xe59400c0 ,
|
||||
0xe5850274 ,
|
||||
0xe59400c4 ,
|
||||
0xe5850278 ,
|
||||
0xe59400c8 ,
|
||||
0xe585027c ,
|
||||
0xe59400cc ,
|
||||
0xe5850280 ,
|
||||
0xe59400d0 ,
|
||||
0xe5850284 ,
|
||||
0xe59400d4 ,
|
||||
0xe5850288 ,
|
||||
0xe59400d8 ,
|
||||
0xe5850290 ,
|
||||
0xe59400dc ,
|
||||
0xe5850294 ,
|
||||
0xe59400e0 ,
|
||||
0xe5850298 ,
|
||||
0xe59400e4 ,
|
||||
0xe58502c4 ,
|
||||
0xe59400e8 ,
|
||||
0xe58502c8 ,
|
||||
0xe59400ec ,
|
||||
0xe58502d0 ,
|
||||
0xe59400f0 ,
|
||||
0xe58502d4 ,
|
||||
0xe59400f4 ,
|
||||
0xe58502d8 ,
|
||||
0xe59400f8 ,
|
||||
0xe58502f0 ,
|
||||
0xe3a02007 ,
|
||||
0xe2841f4a ,
|
||||
0xe2860034 ,
|
||||
0xebffff1b ,
|
||||
0xe5940100 ,
|
||||
0xe5860008 ,
|
||||
0xe594010c ,
|
||||
0xe5860018 ,
|
||||
0xe5940110 ,
|
||||
0xe586001c ,
|
||||
0xe5940114 ,
|
||||
0xe5860020 ,
|
||||
0xe5940118 ,
|
||||
0xe5860024 ,
|
||||
0xe594011c ,
|
||||
0xe5860028 ,
|
||||
0xe5940120 ,
|
||||
0xe586002c ,
|
||||
0xe5940124 ,
|
||||
0xe5860030 ,
|
||||
0xe5940144 ,
|
||||
0xe5860050 ,
|
||||
0xe5940148 ,
|
||||
0xe5860054 ,
|
||||
0xe5940154 ,
|
||||
0xe58601c0 ,
|
||||
0xe5940164 ,
|
||||
0xe5860200 ,
|
||||
0xe5940174 ,
|
||||
0xe5860240 ,
|
||||
0xe5941184 ,
|
||||
0xe59f009c ,
|
||||
0xe5861280 ,
|
||||
0xe5941194 ,
|
||||
0xe5801008 ,
|
||||
0xe594119c ,
|
||||
0xe5801010 ,
|
||||
0xe59411a0 ,
|
||||
0xe5801014 ,
|
||||
0xebfffeff ,
|
||||
0xe3a00001 ,
|
||||
0xe5850044 ,
|
||||
0xe5950048 ,
|
||||
0xe3100001 ,
|
||||
0xafffffc ,
|
||||
0xe594014c ,
|
||||
0xe5860180 ,
|
||||
0xe5940150 ,
|
||||
0xe5860190 ,
|
||||
0xe1a00007 ,
|
||||
0xebffff02 ,
|
||||
0xebffff12 ,
|
||||
0xe594015c ,
|
||||
0xe58601d0 ,
|
||||
0xe5940160 ,
|
||||
0xe58601d4 ,
|
||||
0xe594016c ,
|
||||
0xe5860210 ,
|
||||
0xe5940170 ,
|
||||
0xe5860214 ,
|
||||
0xe594017c ,
|
||||
0xe5860250 ,
|
||||
0xe5940180 ,
|
||||
0xe5860254 ,
|
||||
0xe594018c ,
|
||||
0xe5860290 ,
|
||||
0xe5940190 ,
|
||||
0xe5860294 ,
|
||||
0xe8bd40f0 ,
|
||||
0xeaffff1c ,
|
||||
0x20040000 ,
|
||||
0x200200c0 ,
|
||||
0x10128000 ,
|
||||
3918
arch/arm/mach-rockchip/ddr_rk30.c
Normal file
3918
arch/arm/mach-rockchip/ddr_rk30.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -147,3 +147,18 @@ static int __init rk3188_pie_init(void)
|
||||
return 0;
|
||||
}
|
||||
arch_initcall(rk3188_pie_init);
|
||||
|
||||
#define CONFIG_ARCH_RK3188
|
||||
#define RK30_DDR_PCTL_BASE RK_DDR_VIRT
|
||||
#define RK30_DDR_PUBL_BASE (RK_DDR_VIRT + RK3188_DDR_PCTL_SIZE)
|
||||
#define rk_pll_flag() 0 /* FIXME */
|
||||
#define sram_printascii(s) do {} while (0) /* FIXME */
|
||||
#include "ddr_rk30.c"
|
||||
|
||||
static int rk3188_ddr_init(void)
|
||||
{
|
||||
if (cpu_is_rk3188())
|
||||
ddr_init(DDR3_DEFAULT, 300);
|
||||
return 0;
|
||||
}
|
||||
arch_initcall_sync(rk3188_ddr_init);
|
||||
|
||||
Reference in New Issue
Block a user