mb/google/brya/var/orisa: Update Type C DisplayPort HPD Configuration
[coreboot2.git] / src / mainboard / google / brya / variants / taeko4es / memory.c
blobfdf06b1f58f0da77ab654638a5bb922fbf69a38a
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <baseboard/gpio.h>
4 #include <baseboard/variants.h>
5 #include <gpio.h>
7 static const struct mb_cfg baseboard_memcfg = {
8 .type = MEM_TYPE_LP4X,
10 .rcomp = {
11 /* Baseboard uses only 100ohm Rcomp resistors */
12 .resistor = 100,
14 /* Baseboard Rcomp target values */
15 .targets = {40, 30, 30, 30, 30},
18 /* DQ byte map */
19 .lpx_dq_map = {
20 .ddr0 = {
21 .dq0 = { 9, 11, 8, 10, 12, 14, 13, 15, },
22 .dq1 = { 4, 7, 6, 5, 2, 3, 0, 1, },
24 .ddr1 = {
25 .dq0 = { 15, 12, 14, 13, 9, 10, 11, 8, },
26 .dq1 = { 0, 1, 3, 2, 7, 5, 4, 6, },
28 .ddr2 = {
29 .dq0 = { 2, 3, 1, 0, 6, 7, 5, 4, },
30 .dq1 = { 15, 9, 14, 8, 11, 10, 13, 12, },
32 .ddr3 = {
33 .dq0 = { 3, 1, 2, 0, 4, 6, 7, 5, },
34 .dq1 = { 13, 15, 14, 12, 11, 9, 8, 10, },
36 .ddr4 = {
37 .dq0 = { 13, 12, 14, 15, 9, 8, 10, 11, },
38 .dq1 = { 4, 7, 5, 6, 1, 2, 0, 3, },
40 .ddr5 = {
41 .dq0 = { 5, 0, 6, 4, 3, 1, 7, 2, },
42 .dq1 = { 11, 9, 10, 8, 15, 12, 14, 13, },
44 .ddr6 = {
45 .dq0 = { 15, 12, 14, 13, 10, 9, 11, 8, },
46 .dq1 = { 0, 1, 2, 3, 5, 6, 4, 7, },
48 .ddr7 = {
49 .dq0 = { 0, 3, 1, 2, 4, 5, 6, 7, },
50 .dq1 = { 11, 8, 13, 14, 9, 12, 15, 10, },
54 /* DQS CPU<>DRAM map */
55 .lpx_dqs_map = {
56 .ddr0 = { .dqs0 = 0, .dqs1 = 1 },
57 .ddr1 = { .dqs0 = 0, .dqs1 = 1 },
58 .ddr2 = { .dqs0 = 0, .dqs1 = 1 },
59 .ddr3 = { .dqs0 = 0, .dqs1 = 1 },
60 .ddr4 = { .dqs0 = 0, .dqs1 = 1 },
61 .ddr5 = { .dqs0 = 0, .dqs1 = 1 },
62 .ddr6 = { .dqs0 = 0, .dqs1 = 1 },
63 .ddr7 = { .dqs0 = 0, .dqs1 = 1 },
66 .LpDdrDqDqsReTraining = 1,
68 .ect = 1, /* Enable Early Command Training */
71 const struct mb_cfg *variant_memory_params(void)
73 return &baseboard_memcfg;
76 int variant_memory_sku(void)
79 * Memory configuration board straps
80 * GPIO_MEM_CONFIG_0 GPP_E11
81 * GPIO_MEM_CONFIG_1 GPP_E2
82 * GPIO_MEM_CONFIG_2 GPP_E1
83 * GPIO_MEM_CONFIG_3 GPP_E12
85 gpio_t spd_gpios[] = {
86 GPP_E11,
87 GPP_E2,
88 GPP_E1,
89 GPP_E12,
92 return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
95 bool variant_is_half_populated(void)
97 /* GPIO_MEM_CH_SEL GPP_E13 */
98 return gpio_get(GPP_E13);