coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
memory.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <baseboard/variants.h>
4 #include <commonlib/helpers.h>
5 #include <soc/meminit.h>
6 
8  /* CH0_DQA[0:31] SoC pins -> U22 LPDDR4 module pins */
9  .phys[LP4_PHYS_CH0A] = {
10  /* DQA[0:7] pins of LPDDR4 module. */
11  .dqs[LP4_DQS0] = { 0, 1, 5, 3, 4, 7, 6, 2 },
12  /* DQA[8:15] pins of LPDDR4 module. */
13  .dqs[LP4_DQS1] = { 11, 15, 14, 9, 8, 12, 13, 10 },
14  /* DQB[0:7] pins of LPDDR4 module with offset of 16. */
15  .dqs[LP4_DQS2] = { 16, 22, 23, 21, 19, 17, 18, 20 },
16  /* DQB[7:15] pins of LPDDR4 module with offset of 16. */
17  .dqs[LP4_DQS3] = { 30, 26, 31, 25, 24, 27, 28, 29 },
18  },
19  .phys[LP4_PHYS_CH0B] = {
20  /* DQA[0:7] pins of LPDDR4 module. */
21  .dqs[LP4_DQS0] = { 7, 3, 2, 1, 4, 0, 6, 5 },
22  /* DQA[8:15] pins of LPDDR4 module. */
23  .dqs[LP4_DQS1] = { 14, 8, 9, 15, 10, 13, 12, 11 },
24  /* DQB[0:7] pins of LPDDR4 module with offset of 16. */
25  .dqs[LP4_DQS2] = { 23, 21, 20, 16, 19, 17, 18, 22 },
26  /* DQB[7:15] pins of LPDDR4 module with offset of 16. */
27  .dqs[LP4_DQS3] = { 24, 25, 26, 28, 29, 31, 30, 27 },
28  },
29  .phys[LP4_PHYS_CH1A] = {
30  /* DQA[0:7] pins of LPDDR4 module. */
31  .dqs[LP4_DQS0] = { 6, 3, 1, 7, 4, 2, 5, 0 },
32  /* DQA[8:15] pins of LPDDR4 module. */
33  .dqs[LP4_DQS1] = { 14, 15, 12, 13, 11, 8, 10, 9 },
34  /* DQB[0:7] pins of LPDDR4 module with offset of 16. */
35  .dqs[LP4_DQS2] = { 16, 22, 17, 18, 20, 21, 23, 19 },
36  /* DQB[7:15] pins of LPDDR4 module with offset of 16. */
37  .dqs[LP4_DQS3] = { 31, 28, 26, 25, 29, 24, 27, 30 },
38  },
39  .phys[LP4_PHYS_CH1B] = {
40  /* DQA[0:7] pins of LPDDR4 module. */
41  .dqs[LP4_DQS0] = { 3, 5, 7, 4, 1, 0, 6, 2 },
42  /* DQA[8:15] pins of LPDDR4 module. */
43  .dqs[LP4_DQS1] = { 14, 13, 10, 11, 15, 9, 8, 12 },
44  /* DQB[0:7] pins of LPDDR4 module with offset of 16. */
45  .dqs[LP4_DQS2] = { 23, 18, 19, 22, 16, 17, 21, 20 },
46  /* DQB[7:15] pins of LPDDR4 module with offset of 16. */
47  .dqs[LP4_DQS3] = { 24, 31, 30, 29, 26, 27, 25, 28 },
48  },
49 };
50 
52 {
53  return &mc_apl4_lpddr4_swizzle;
54 }
@ LP4_PHYS_CH0B
Definition: meminit.h:19
@ LP4_PHYS_CH0A
Definition: meminit.h:18
@ LP4_PHYS_CH1A
Definition: meminit.h:20
@ LP4_PHYS_CH1B
Definition: meminit.h:21
@ LP4_DQS3
Definition: meminit.h:40
@ LP4_DQS1
Definition: meminit.h:38
@ LP4_DQS0
Definition: meminit.h:37
@ LP4_DQS2
Definition: meminit.h:39
const struct lpddr4_swizzle_cfg *__weak variant_lpddr4_swizzle_config(void)
Definition: memory.c:51
const struct lpddr4_swizzle_cfg mc_apl4_lpddr4_swizzle
Definition: memory.c:7
uint8_t dqs[LP4_NUM_BYTE_LANES][DQ_BITS_PER_DQS]
Definition: meminit.h:78
struct lpddr4_chan_swizzle_cfg phys[LP4_NUM_PHYS_CHANNELS]
Definition: meminit.h:82