1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <soc/platform_descriptors.h>
6 #include <amdblocks/cpu.h>
8 static const fsp_dxio_descriptor majolica_dxio_descriptors
[] = {
10 .engine_type
= PCIE_ENGINE
,
12 .start_logical_lane
= 16,
13 .end_logical_lane
= 23,
16 .turn_off_unused_lanes
= true,
18 .port_params
= {PP_PSPP_AC
, 0x133, PP_PSPP_DC
, 0x122}
21 .engine_type
= PCIE_ENGINE
,
23 .start_logical_lane
= 0,
24 .end_logical_lane
= 1,
27 .turn_off_unused_lanes
= true,
29 .gpio_group_id
= GPIO_40
,
30 .port_params
= {PP_PSPP_AC
, 0x133, PP_PSPP_DC
, 0x122}
33 .engine_type
= PCIE_ENGINE
,
35 .start_logical_lane
= 4,
36 .end_logical_lane
= 4,
39 .turn_off_unused_lanes
= true,
40 .clk_req
= CLK_REQ4_GFX
,
41 .port_params
= {PP_PSPP_AC
, 0x133, PP_PSPP_DC
, 0x122}
44 .engine_type
= PCIE_ENGINE
,
46 .start_logical_lane
= 5,
47 .end_logical_lane
= 5,
50 .turn_off_unused_lanes
= true,
52 .port_params
= {PP_PSPP_AC
, 0x133, PP_PSPP_DC
, 0x122}
55 .engine_type
= PCIE_ENGINE
,
57 .start_logical_lane
= 6,
58 .end_logical_lane
= 6,
61 .turn_off_unused_lanes
= true,
63 .port_params
= {PP_PSPP_AC
, 0x133, PP_PSPP_DC
, 0x122}
66 .engine_type
= PCIE_ENGINE
,
68 .start_logical_lane
= 7,
69 .end_logical_lane
= 7,
72 .turn_off_unused_lanes
= true,
74 .port_params
= {PP_PSPP_AC
, 0x133, PP_PSPP_DC
, 0x122}
77 .engine_type
= PCIE_ENGINE
,
79 .start_logical_lane
= 8,
80 .end_logical_lane
= 11,
83 .turn_off_unused_lanes
= true,
85 .port_params
= {PP_PSPP_AC
, 0x133, PP_PSPP_DC
, 0x122}
88 .engine_type
= SATA_ENGINE
,
90 .start_logical_lane
= 2,
91 .end_logical_lane
= 3,
92 .channel_type
= SATA_CHANNEL_LONG
,
96 static fsp_ddi_descriptor majolica_ddi_descriptors
[] = {
98 .connector_type
= DDI_DP
,
99 .aux_index
= DDI_AUX1
,
100 .hdp_index
= DDI_HDP1
103 .connector_type
= DDI_HDMI
,
104 .aux_index
= DDI_AUX2
,
105 .hdp_index
= DDI_HDP2
108 .connector_type
= DDI_UNUSED_TYPE
,
109 .aux_index
= DDI_AUX3
,
110 .hdp_index
= DDI_HDP3
,
112 { /* DDI3 - DP (type C) */
113 .connector_type
= DDI_DP
,
114 .aux_index
= DDI_AUX3
,
115 .hdp_index
= DDI_HDP3
,
117 { /* DDI4 - DP (type C) */
118 .connector_type
= DDI_DP
,
119 .aux_index
= DDI_AUX4
,
120 .hdp_index
= DDI_HDP4
,
124 void mainboard_get_dxio_ddi_descriptors(
125 const fsp_dxio_descriptor
**dxio_descs
, size_t *dxio_num
,
126 const fsp_ddi_descriptor
**ddi_descs
, size_t *ddi_num
)
128 if ((get_cpu_count() == 4 && get_threads_per_core() == 2) || get_cpu_count() == 2)
129 majolica_ddi_descriptors
[1].connector_type
= DDI_UNUSED_TYPE
;
131 *dxio_descs
= majolica_dxio_descriptors
;
132 *dxio_num
= ARRAY_SIZE(majolica_dxio_descriptors
);
133 *ddi_descs
= majolica_ddi_descriptors
;
134 *ddi_num
= ARRAY_SIZE(majolica_ddi_descriptors
);