Angel Pons | b6636b0 | 2020-04-05 13:21:41 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Aamir Bohra | 4b85d46 | 2018-12-16 13:10:58 +0530 | [diff] [blame] | 2 | |
| 3 | #include <baseboard/variants.h> |
| 4 | #include <baseboard/gpio.h> |
Aamir Bohra | 4b85d46 | 2018-12-16 13:10:58 +0530 | [diff] [blame] | 5 | #include <soc/cnl_memcfg_init.h> |
Shelley Chen | 2ee720c | 2019-02-11 13:06:10 -0800 | [diff] [blame] | 6 | #include <string.h> |
Aamir Bohra | 4b85d46 | 2018-12-16 13:10:58 +0530 | [diff] [blame] | 7 | |
| 8 | static const struct cnl_mb_cfg baseboard_memcfg = { |
Shelley Chen | c3de620 | 2019-03-12 19:01:18 -0700 | [diff] [blame] | 9 | /* Baseboard uses 121, 81 and 100 rcomp resistors */ |
Philip Chen | 0d4200f | 2019-04-29 10:18:24 -0700 | [diff] [blame] | 10 | .rcomp_resistor = {121, 81, 100}, |
Aamir Bohra | 4b85d46 | 2018-12-16 13:10:58 +0530 | [diff] [blame] | 11 | |
| 12 | /* Baseboard Rcomp target values */ |
Philip Chen | 0d4200f | 2019-04-29 10:18:24 -0700 | [diff] [blame] | 13 | .rcomp_targets = {100, 40, 20, 20, 26}, |
Aamir Bohra | 4b85d46 | 2018-12-16 13:10:58 +0530 | [diff] [blame] | 14 | |
| 15 | /* Set CaVref config to 2 */ |
| 16 | .vref_ca_config = 2, |
| 17 | |
| 18 | /* Enable Early Command Training */ |
| 19 | .ect = 1, |
| 20 | }; |
| 21 | |
Shelley Chen | 2ee720c | 2019-02-11 13:06:10 -0800 | [diff] [blame] | 22 | void __weak variant_memory_params(struct cnl_mb_cfg *bcfg) |
Aamir Bohra | 4b85d46 | 2018-12-16 13:10:58 +0530 | [diff] [blame] | 23 | { |
Shelley Chen | 2ee720c | 2019-02-11 13:06:10 -0800 | [diff] [blame] | 24 | memcpy(bcfg, &baseboard_memcfg, sizeof(baseboard_memcfg)); |
Aamir Bohra | 4b85d46 | 2018-12-16 13:10:58 +0530 | [diff] [blame] | 25 | } |