xref: /aosp_15_r20/external/coreboot/src/mainboard/intel/beechnutcity_crb/config/iio.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <soc/iio.h>
4 
5 static const struct iio_pe_config iio_config_table[] = {
6 	/*
7 	 * CB_IIO_BIFURCATE_x8x2x2x2x2 is first set to indicate how the IIO is bifurcated
8 	 * then port settings are listed accordingly. The minimal port elements are x2.
9 	 * If an x8 port is enabled, the neighboring 3 x2 port elements needs to be
10 	 * disabled.
11 	 */
12 	{_IIO_PE_CFG_STRUCT(0x0, PE0, CB_IIO_BIFURCATE_x8x2x2x2x2, PE_TYPE_PCIE) {
13 		/* _IIO_PORT_CFG_STRUCT_BASIC(sltpls, sltplv, psn) */
14 		_IIO_PORT_CFG_STRUCT_BASIC_X8(0x0, 0x4B, 0x1),
15 		_IIO_PORT_CFG_STRUCT_DISABLED,
16 		_IIO_PORT_CFG_STRUCT_DISABLED,
17 		_IIO_PORT_CFG_STRUCT_DISABLED,
18 		_IIO_PORT_CFG_STRUCT_BASIC_X2(0x0, 0x4B, 0x2),
19 		_IIO_PORT_CFG_STRUCT_BASIC_X2(0x0, 0x4B, 0x3),
20 		_IIO_PORT_CFG_STRUCT_BASIC_X2(0x0, 0x4B, 0x4),
21 		_IIO_PORT_CFG_STRUCT_BASIC_X2(0x0, 0x4B, 0x5),
22 	}},
23 };
24 
get_iio_config_table(int * size)25 const struct iio_pe_config *get_iio_config_table(int *size)
26 {
27 	*size = ARRAY_SIZE(iio_config_table);
28 	return iio_config_table;
29 }
30