Angel Pons | 2712398 | 2020-04-05 13:22:30 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Nick Vaccaro | 1799994 | 2018-04-23 17:13:52 -0700 | [diff] [blame] | 2 | |
| 3 | #include <baseboard/variants.h> |
| 4 | |
| 5 | /* DQ byte map */ |
| 6 | static const u8 dq_map[][12] = { |
| 7 | { 0x0F, 0xF0, 0x00, 0xF0, 0x0F, 0xF0, |
| 8 | 0x0F, 0x00, 0xFF, 0x00, 0xFF, 0x00 }, |
| 9 | { 0x33, 0xCC, 0x00, 0xCC, 0x33, 0xCC, |
| 10 | 0x33, 0x00, 0xFF, 0x00, 0xFF, 0x00 } |
| 11 | }; |
| 12 | |
| 13 | /* DQS CPU<>DRAM map */ |
| 14 | static const u8 dqs_map[][8] = { |
| 15 | { 0, 1, 3, 2, 4, 5, 6, 7 }, |
| 16 | { 3, 2, 6, 7, 0, 1, 4, 5 }, |
| 17 | }; |
| 18 | |
| 19 | /* Rcomp resistor */ |
| 20 | static const u16 rcomp_resistor[] = { 200, 81, 162 }; |
| 21 | |
| 22 | /* Rcomp target */ |
Nick Vaccaro | 46f3fa82 | 2018-10-30 12:00:10 -0700 | [diff] [blame] | 23 | static const u16 rcomp_target[] = { 100, 30, 40, 23, 40 }; |
Nick Vaccaro | 1799994 | 2018-04-23 17:13:52 -0700 | [diff] [blame] | 24 | |
| 25 | void variant_memory_params(struct memory_params *p) |
| 26 | { |
| 27 | p->type = MEMORY_LPDDR3; |
| 28 | p->dq_map = dq_map; |
| 29 | p->dq_map_size = sizeof(dq_map); |
| 30 | p->dqs_map = dqs_map; |
| 31 | p->dqs_map_size = sizeof(dqs_map); |
| 32 | p->rcomp_resistor = rcomp_resistor; |
| 33 | p->rcomp_resistor_size = sizeof(rcomp_resistor); |
| 34 | p->rcomp_target = rcomp_target; |
| 35 | p->rcomp_target_size = sizeof(rcomp_target); |
| 36 | } |