summaryrefslogtreecommitdiffstats
path: root/src/vendorcode/amd/opensil/genoa_poc/mpio/chip.h
blob: 64a8b3e010b3e9b3856f173a511c15560ea0439d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* SPDX-License-Identifier: GPL-2.0-only */

#include <stdint.h>

/*
 * GENOA MPIO mapping
 * P0 -> [0-15]
 * G0 -> [16-31]
 * P1 -> [32-47]
 * G1 -> [48-63]
 * P2 -> [64-79]
 * G2 -> [80-95]
 * P3 -> [96-111]
 * G3 -> [112-127]
 * P4 -> [128-131]
 * P5 -> [132-136]
 */

enum mpio_type {
	PCIE,
	SATA,
};

/* Sync with PCIE_HOTPLUG_TYPE */
enum mpio_hotplug {
	HotplugDisabled,                             ///< Hotplug disable
	Basic,                                       ///< Basic Hotplug
	ServerExpress,                               ///< Server Hotplug Express Module
	Enhanced,                                    ///< Enhanced
	Inboard,                                     ///< Inboard
	ServerEntSSD,                                ///< Server Hotplug Enterprise SSD
	UBM,                                         ///< UBM Backplane
	OCP,                                         ///< OCP NIC 3.0
};

enum pcie_link_speed {
	MaxSupported,
	Gen1,
	Gen2,
	Gen3,
	Gen4,
	Gen5,
};

/* Sync with PCIE_ASPM_TYPE */
enum pcie_aspm {
	aspm_disabled,
	L0s,
	L1,
	L0sL1,
};

struct vendorcode_amd_opensil_genoa_poc_mpio_config {
	enum mpio_type type;
	uint8_t start_lane;
	uint8_t end_lane;
	uint8_t gpio_group;
	enum mpio_hotplug hotplug;
	enum pcie_link_speed speed;
	enum pcie_aspm aspm;
	uint8_t aspm_l1_1 : 1;
	uint8_t aspm_l1_2 : 1;
	uint8_t clock_pm : 1;
	uint8_t bmc : 1;
};