Skip to content

Commit 2157dfc

Browse files
S-J-Tangmeta-codesync[bot]
authored andcommitted
sb: sitv3: commit for platform version 2026.02.01 release (#2656)
Summary: * [Feature] - Update VR sensor information to align with new VR firmware behavior. - Add polling-disable guard to skip PCIe switch access checks when sensor polling is turned off. - Enable and configure additional platform GPIOs for system control and strap settings. - Refine ADC access sequence to improve correctness and access flow. Pull Request resolved: #2656 Reviewed By: jamesatha Differential Revision: D90847416 fbshipit-source-id: c6d0f3980a013df19ca942afc874ff131b6c8ba2
1 parent a40b9d9 commit 2157dfc

File tree

4 files changed

+30
-25
lines changed

4 files changed

+30
-25
lines changed

meta-facebook/sb-si/src/platform/plat_gpio.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GPIO_CFG plat_gpio_cfg[] = {
3838
// GPIO 0 group
3939
{ CHIP_GPIO, 0, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
4040
{ CHIP_GPIO, 1, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
41-
{ CHIP_GPIO, 2, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
41+
{ CHIP_GPIO, 2, ENABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
4242
{ CHIP_GPIO, 3, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
4343
{ CHIP_GPIO, 4, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
4444
{ CHIP_GPIO, 5, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_EDGE_BOTH,
@@ -48,7 +48,7 @@ GPIO_CFG plat_gpio_cfg[] = {
4848
{ CHIP_GPIO, 7, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_EDGE_BOTH,
4949
NULL },
5050
// GPIO 1 group
51-
{ CHIP_GPIO, 8, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
51+
{ CHIP_GPIO, 8, ENABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
5252
{ CHIP_GPIO, 9, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
5353
{ CHIP_GPIO, 10, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
5454
NULL },
@@ -77,7 +77,7 @@ GPIO_CFG plat_gpio_cfg[] = {
7777
NULL },
7878
{ CHIP_GPIO, 22, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
7979
NULL },
80-
{ CHIP_GPIO, 23, DISABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_EDGE_BOTH,
80+
{ CHIP_GPIO, 23, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_EDGE_BOTH,
8181
NULL },
8282
// GPIO 3 group
8383
{ CHIP_GPIO, 24, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
@@ -128,7 +128,7 @@ GPIO_CFG plat_gpio_cfg[] = {
128128
NULL },
129129
{ CHIP_GPIO, 46, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
130130
NULL },
131-
{ CHIP_GPIO, 47, DISABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_EDGE_BOTH,
131+
{ CHIP_GPIO, 47, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_EDGE_BOTH,
132132
NULL },
133133
// GPIO 6 group
134134
{ CHIP_GPIO, 48, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
@@ -156,9 +156,9 @@ GPIO_CFG plat_gpio_cfg[] = {
156156
NULL },
157157
{ CHIP_GPIO, 59, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
158158
NULL },
159-
{ CHIP_GPIO, 60, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
159+
{ CHIP_GPIO, 60, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
160160
NULL },
161-
{ CHIP_GPIO, 61, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
161+
{ CHIP_GPIO, 61, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
162162
NULL },
163163
{ CHIP_GPIO, 62, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
164164
NULL },
@@ -216,8 +216,7 @@ GPIO_CFG plat_gpio_cfg[] = {
216216
{ CHIP_GPIO, 87, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
217217
NULL },
218218
// GPIO B group
219-
{ CHIP_GPIO, 88, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
220-
NULL },
219+
{ CHIP_GPIO, 88, ENABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
221220
{ CHIP_GPIO, 89, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,
222221
NULL },
223222
{ CHIP_GPIO, 90, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE,

meta-facebook/sb-si/src/platform/plat_gpio.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ void gpio_int_default();
2929
#define name_gpio0 \
3030
gpio_name_to_num(SPI_MUX_SEL) \
3131
gpio_name_to_num(SPI_PEX_LV_OE) \
32-
gpio_name_to_num(Reserve_GPIO02) \
32+
gpio_name_to_num(RST_PWR_ON_PLD_N) \
3333
gpio_name_to_num(Reserve_GPIO03) \
3434
gpio_name_to_num(Reserve_GPIO04) \
3535
gpio_name_to_num(Reserve_GPIO05) \
3636
gpio_name_to_num(Reserve_GPIO06) \
3737
gpio_name_to_num(Reserve_GPIO07)
3838
#define name_gpio1 \
39-
gpio_name_to_num(Reserve_GPIO10) \
39+
gpio_name_to_num(RSVD_GPIO_2_R) \
4040
gpio_name_to_num(Reserve_GPIO11) \
4141
gpio_name_to_num(Reserve_GPIO12) \
4242
gpio_name_to_num(Reserve_GPIO13) \
@@ -52,7 +52,7 @@ void gpio_int_default();
5252
gpio_name_to_num(Reserve_GPIO24) \
5353
gpio_name_to_num(Reserve_GPIO25) \
5454
gpio_name_to_num(Reserve_GPIO26) \
55-
gpio_name_to_num(Reserve_GPIO27)
55+
gpio_name_to_num(RSVD_GPIO_3_R)
5656
#define name_gpio3 \
5757
gpio_name_to_num(Reserve_GPIO30) \
5858
gpio_name_to_num(Reserve_GPIO31) \
@@ -79,7 +79,7 @@ void gpio_int_default();
7979
gpio_name_to_num(Reserve_GPIO54) \
8080
gpio_name_to_num(Reserve_GPIO55) \
8181
gpio_name_to_num(Reserve_GPIO56) \
82-
gpio_name_to_num(Reserve_GPIO57)
82+
gpio_name_to_num(RSVD_GPIO_4_R)
8383
#define name_gpio6 \
8484
gpio_name_to_num(Reserve_GPIO60) \
8585
gpio_name_to_num(Reserve_GPIO61) \
@@ -94,8 +94,8 @@ void gpio_int_default();
9494
gpio_name_to_num(Reserve_GPIO71) \
9595
gpio_name_to_num(Reserve_GPIO72) \
9696
gpio_name_to_num(Reserve_GPIO73) \
97-
gpio_name_to_num(Reserve_GPIO74) \
98-
gpio_name_to_num(Reserve_GPIO75) \
97+
gpio_name_to_num(STRAP_DSW_EN) \
98+
gpio_name_to_num(STRAP_JEN_N) \
9999
gpio_name_to_num(Reserve_GPIO76) \
100100
gpio_name_to_num(Reserve_GPIO77)
101101
#define name_gpio8 \
@@ -126,7 +126,7 @@ void gpio_int_default();
126126
gpio_name_to_num(Reserve_GPIOA6) \
127127
gpio_name_to_num(Reserve_GPIOA7)
128128
#define name_gpioB \
129-
gpio_name_to_num(Reserve_GPIOB0) \
129+
gpio_name_to_num(RSVD_GPIO_1_R) \
130130
gpio_name_to_num(Reserve_GPIOB1) \
131131
gpio_name_to_num(Reserve_GPIOB2) \
132132
gpio_name_to_num(Reserve_GPIOB3) \

meta-facebook/sb-si/src/platform/plat_pldm_sensor.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ typedef struct plat_sensor_tmp_extend_info {
5151
uint16_t offset;
5252
} plat_sensor_tmp_extend_info;
5353

54+
// clang-format off
55+
5456
plat_sensor_vr_extend_info plat_sensor_vr_extend_table[] = {
5557
{ SENSOR_NUM_VR_ASIC_P0V895_PEX_TEMP_C, VR_ASIC_P0V895_PEX_MP2971_ADDR },
5658
{ SENSOR_NUM_VR_ASIC_P0V895_PEX_VOLT_V, VR_ASIC_P0V895_PEX_MP2971_ADDR },
@@ -414,8 +416,8 @@ pldm_sensor_info plat_pldm_sensor_vr_table[] = {
414416
0x00000000, //uint32_t normal_min;
415417
0x00000000, //uint32_t warning_high;
416418
0x00000000, //uint32_t warning_low;
417-
920, //uint32_t critical_high;
418-
877, //uint32_t critical_low;
419+
958, //uint32_t critical_high;
420+
833, //uint32_t critical_low;
419421
0x00000000, //uint32_t fatal_high;
420422
0x00000000, //uint32_t fatal_low;
421423
},
@@ -486,7 +488,7 @@ pldm_sensor_info plat_pldm_sensor_vr_table[] = {
486488
0x00000000, //uint32_t normal_min;
487489
0x00000000, //uint32_t warning_high;
488490
0x00000000, //uint32_t warning_low;
489-
96800, //uint32_t critical_high;
491+
10350, //uint32_t critical_high;
490492
0x00000000, //uint32_t critical_low;
491493
0x00000000, //uint32_t fatal_high;
492494
0x00000000, //uint32_t fatal_low;
@@ -630,7 +632,7 @@ pldm_sensor_info plat_pldm_sensor_vr_table[] = {
630632
0x00000000, //uint32_t normal_min;
631633
0x00000000, //uint32_t warning_high;
632634
0x00000000, //uint32_t warning_low;
633-
100000, //uint32_t critical_high;
635+
99150, //uint32_t critical_high;
634636
0x00000000, //uint32_t critical_low;
635637
0x00000000, //uint32_t fatal_high;
636638
0x00000000, //uint32_t fatal_low;
@@ -2338,6 +2340,8 @@ PDR_entity_auxiliary_names plat_pdr_entity_aux_names_table[] = { {
23382340
.nameLanguageTag = "en",
23392341
} };
23402342

2343+
// clang-format on
2344+
23412345
uint32_t plat_get_pdr_size(uint8_t pdr_type)
23422346
{
23432347
int total_size = 0, i = 0;
@@ -2594,8 +2598,8 @@ bool get_plat_sensor_vr_polling_enable_flag()
25942598

25952599
bool is_adc_access(uint8_t sensor_num)
25962600
{
2597-
if (!is_pcie_switch_access(PEX90144_CFG_ID) || !get_plat_sensor_adc_polling_enable_flag() ||
2598-
!get_plat_sensor_polling_enable_flag()) {
2601+
if (!get_plat_sensor_adc_polling_enable_flag() || !get_plat_sensor_polling_enable_flag() ||
2602+
!is_pcie_switch_access(PEX90144_CFG_ID)) {
25992603
LOG_DBG("Polling disabled: ADC polling enable flag=%d, general polling enable flag=%d",
26002604
get_plat_sensor_adc_polling_enable_flag(),
26012605
get_plat_sensor_polling_enable_flag());
@@ -2634,6 +2638,9 @@ bool is_temp_access(uint8_t cfg_idx)
26342638

26352639
bool is_pcie_switch_access(uint8_t cfg_idx)
26362640
{
2641+
if (!get_plat_sensor_polling_enable_flag() || !get_plat_sensor_temp_polling_enable_flag())
2642+
return false;
2643+
26372644
I2C_MSG msg = { 0 };
26382645
uint8_t retry = 3;
26392646
uint8_t bus = plat_pldm_sensor_temp_table[cfg_idx].pldm_sensor_cfg.port;
@@ -2651,8 +2658,7 @@ bool is_pcie_switch_access(uint8_t cfg_idx)
26512658

26522659
LOG_DBG("PEX90144 is present at bus %d addr 0x%X", msg.bus, msg.target_addr);
26532660

2654-
return (get_plat_sensor_temp_polling_enable_flag() &&
2655-
get_plat_sensor_polling_enable_flag());
2661+
return true;
26562662
}
26572663

26582664
bool is_vr_access(uint8_t sensor_num)

meta-facebook/sb-si/src/platform/plat_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#define AUXILIARY_FW_REVISION 0x00000000
3737

3838
#define BIC_FW_YEAR_MSB 0x20
39-
#define BIC_FW_YEAR_LSB 0x25
40-
#define BIC_FW_WEEK 0x41
39+
#define BIC_FW_YEAR_LSB 0x26
40+
#define BIC_FW_WEEK 0x02
4141
#define BIC_FW_VER 0x01
4242
#define BIC_FW_platform_0 0x73 // char: s
4343
#define BIC_FW_platform_1 0x69 // char: i

0 commit comments

Comments
 (0)