crossgcc: Upgrade CMake from 3.29.3 to 3.30.2
[coreboot.git] / src / vendorcode / siemens / hwilib / hwilib.h
blob2a4f4cd610ade9d5ccf9c7d9064d34a88d058eb7
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef SIEMENS_HWI_LIB_H_
4 #define SIEMENS_HWI_LIB_H_
6 #include <types.h>
8 /* Declare all supported fields which can be get with hwilib. */
9 typedef enum {
10 HIB_VerID = 0,
11 SIB_VerID,
12 EIB_VerID,
13 XIB_VerID,
14 HIB_HwRev,
15 SIB_HwRev,
16 HWID,
17 UniqueNum,
18 Mac1,
19 Mac2,
20 Mac3,
21 Mac4,
22 Mac1Aux,
23 Mac2Aux,
24 Mac3Aux,
25 Mac4Aux,
26 SPD,
27 FF_FreezeDis,
28 FF_FanReq,
29 NvramVirtTimeDsaveReset,
30 BiosFlags,
31 MacMapping1,
32 MacMapping2,
33 MacMapping3,
34 MacMapping4,
35 RTCType,
36 BL_Brightness,
37 PF_PwmFreq,
38 PF_Color_Depth,
39 PF_DisplType,
40 PF_DisplCon,
41 Edid,
42 VddRef,
43 T_Warn,
44 T_Crit,
45 FANSamplingTime,
46 FANSetPoint,
47 FANKp,
48 FANKi,
49 FANKd,
50 FANHystVal,
51 FANHystThreshold,
52 FANHystCtrl,
53 FANMaxSpeed,
54 FANStartSpeed,
55 FANSensorDelay,
56 FANSensorNum,
57 FANSensorSelect,
58 FANSensorCfg0,
59 FANSensorCfg1,
60 FANSensorCfg2,
61 FANSensorCfg3,
62 FANSensorCfg4,
63 FANSensorCfg5,
64 FANSensorCfg6,
65 FANSensorCfg7,
66 XMac1,
67 XMac2,
68 XMac3,
69 XMac4,
70 XMac5,
71 XMac6,
72 XMac7,
73 XMac8,
74 XMac9,
75 XMac10,
76 XMac1Aux,
77 XMac2Aux,
78 XMac3Aux,
79 XMac4Aux,
80 XMac5Aux,
81 XMac6Aux,
82 XMac7Aux,
83 XMac8Aux,
84 XMac9Aux,
85 XMac10Aux,
86 XMac1Mapping,
87 XMac2Mapping,
88 XMac3Mapping,
89 XMac4Mapping,
90 XMac5Mapping,
91 XMac6Mapping,
92 XMac7Mapping,
93 XMac8Mapping,
94 XMac9Mapping,
95 XMac10Mapping,
96 netKind1,
97 netKind2,
98 netKind3,
99 netKind4,
100 netKind5,
101 netKind6,
102 netKind7,
103 netKind8,
104 netKind9,
105 netKind10,
106 LegacyDelay
107 } hwinfo_field_t;
109 /* Define used values in supported fields */
110 #define PF_COLOR_DEPTH_6BIT 0x00
111 #define PF_COLOR_DEPTH_8BIT 0x01
112 #define PF_COLOR_DEPTH_10BIT 0x02
113 #define PF_DISPLCON_LVDS_SINGLE 0x00
114 #define PF_DISPLCON_LVDS_DUAL 0x05
115 #define FF_FREEZE_DISABLE 0x01
116 #define FF_FAN_NEEDED 0x01
118 /* Use this function to find all supported blocks in cbfs. It must be called
119 * once with a valid cbfs file name before hwilib_get_field() can be used.
121 enum cb_err hwilib_find_blocks(const char *hwi_filename);
123 /* Use this function to get fields out of supported info blocks
124 * This function returns the number of copied bytes or 0 on error.
126 size_t hwilib_get_field(hwinfo_field_t field, uint8_t *dst, size_t dstsize);
128 #endif /* SIEMENS_HWI_LIB_H_ */