Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
huang lin | 2de748f | 2015-11-17 14:20:28 +0800 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2015 Rockchip Electronics Co., Ltd |
huang lin | 2de748f | 2015-11-17 14:20:28 +0800 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <dm.h> |
| 8 | #include <asm/io.h> |
Kever Yang | 9fbe17c | 2019-03-28 11:01:23 +0800 | [diff] [blame] | 9 | #include <asm/arch-rockchip/uart.h> |
| 10 | #include <asm/arch-rockchip/sdram_rk3036.h> |
huang lin | 2de748f | 2015-11-17 14:20:28 +0800 | [diff] [blame] | 11 | |
huang lin | 2de748f | 2015-11-17 14:20:28 +0800 | [diff] [blame] | 12 | void get_ddr_config(struct rk3036_ddr_config *config) |
| 13 | { |
| 14 | /* K4B4G1646Q config */ |
| 15 | config->ddr_type = 3; |
| 16 | config->rank = 2; |
| 17 | config->cs0_row = 15; |
| 18 | config->cs1_row = 15; |
| 19 | |
| 20 | /* 8bank */ |
| 21 | config->bank = 3; |
| 22 | config->col = 10; |
| 23 | |
| 24 | /* 16bit bw */ |
| 25 | config->bw = 1; |
| 26 | } |