Skip to content

Commit f6f5f6c

Browse files
authored
Merge pull request #460 from FrameworkComputer/hx30_DVT2_PECI_GPIO
[modify] change PECI from ESPI to Legacy
2 parents 46d4341 + cdfea00 commit f6f5f6c

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

board/hx30/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ const struct temp_sensor_t temp_sensors[] = {
998998
[TEMP_SENSOR_PECI] = {
999999
.name = "PECI",
10001000
.type = TEMP_SENSOR_TYPE_CPU,
1001-
.read = peci_over_espi_temp_sensor_get_val,
1001+
.read = peci_temp_sensor_get_val,
10021002
.idx = 0,
10031003
},
10041004
#endif /* CONFIG_PECI */

board/hx30/peci_customization.c

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,18 @@ int peci_Wr_Pkg_Config(uint8_t index, uint16_t parameter, uint32_t data, int wle
7474
for (clen = 4; clen < wlen - 1; clen++)
7575
out[clen] = ((data >> ((clen - 4) * 8)) & 0xFF);
7676

77-
if (board_get_version() >= BOARD_VERSION_7)
77+
/* if (board_get_version() >= BOARD_VERSION_7)
7878
espi_oob_peci_transaction(&peci);
7979
else {
80-
/* DVT1 is HW PECI pin */
81-
rv = peci_transaction(&peci);
82-
if (rv)
83-
return rv;
84-
}
80+
DVT1 is HW PECI pin
81+
*/
82+
rv = peci_transaction(&peci);
83+
if (rv)
84+
return rv;
85+
/*}*/
8586
return EC_SUCCESS;
8687
}
87-
88+
/*
8889
static int peci_over_espi_get_cpu_temp(int *cpu_temp)
8990
{
9091
int rv;
@@ -111,21 +112,21 @@ static int peci_over_espi_get_cpu_temp(int *cpu_temp)
111112
return rv;
112113
113114
114-
/* Get relative raw data of temperature. */
115+
Get relative raw data of temperature.
115116
*cpu_temp = (r_buf[1] << 8) | r_buf[0];
116117
117-
/* Convert relative raw data to degrees C. */
118+
Convert relative raw data to degrees C.
118119
*cpu_temp = ((*cpu_temp ^ 0xFFFF) + 1) >> 6;
119120
120121
if (*cpu_temp >= CONFIG_PECI_TJMAX)
121122
return EC_ERROR_INVAL;
122123
123-
/* temperature in K */
124+
temperature in K
124125
*cpu_temp = CONFIG_PECI_TJMAX - *cpu_temp + 273;
125126
126127
return EC_SUCCESS;
127128
}
128-
129+
*/
129130
int check_system_power(void)
130131
{
131132
uint8_t host_power_state = *host_get_customer_memmap(EC_EMEMAP_ER1_POWER_STATE);
@@ -264,6 +265,7 @@ int peci_over_espi_temp_sensor_get_val(int idx, int *temp_ptr)
264265
return EC_SUCCESS;
265266
}
266267

268+
/*
267269
void read_peci_over_espi_gettemp(void)
268270
{
269271
int rv;
@@ -286,3 +288,4 @@ void read_peci_over_espi_gettemp(void)
286288
}
287289
}
288290
DECLARE_HOOK(HOOK_SECOND, read_peci_over_espi_gettemp, HOOK_PRIO_DEFAULT);
291+
*/

0 commit comments

Comments
 (0)