Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0e7b164
sb: rb: remove some pins that are not strap
HungYi-Li Dec 8, 2025
925f842
sb: rb: fix clear clock status behavior
YoungLi123 Dec 8, 2025
c43cfbb
sb: rb: add 4v2 and 0v75 vr fault error event type
Dec 9, 2025
db4ebb6
sb: rb: add tray location info in test info shell cmd
Dec 9, 2025
426b5ed
sb: rb: add i2c target 0x94 reg
YoungLi123 Dec 9, 2025
81c6f26
sb:rb: ioexp: add U200053 IO expander init and refactor U200070 init
S-J-Tang Dec 10, 2025
3f2fbbc
sb: rb: add shell cmd get_mb_pwr_en
YoungLi123 Dec 10, 2025
7cc7eac
sb:rb: add adc init vr vol buf
HungYi-Li Dec 10, 2025
5488fd8
sb: rb: modify ASIC temp_threshold default value
Dec 10, 2025
2c67f04
sb:rb: add ASIC reset-to-IO-expander sync mechanism
S-J-Tang Dec 10, 2025
9546919
sb:rb: init U200053/U200070 IO expanders in IRIS power-on ISR
S-J-Tang Dec 10, 2025
5a3da28
sb: rb: Version commit for sb-rb-20255001
S-J-Tang Dec 10, 2025
4a31218
sb: rb: fix GPIO pin MEDHA1_SW_EN
YoungLi123 Dec 11, 2025
1a585a8
sb: rb: enable sensor polling when 1-step
YoungLi123 Dec 11, 2025
80a69e3
sb: rb: fix GPIO name LV1 PWR CAP
YoungLi123 Dec 11, 2025
c0453b1
sb: rb: add CHIPMODE T17CISB-862
YoungLi123 Dec 11, 2025
777a732
add temp event tmp
Dec 11, 2025
5fceaa9
add asic bspi mux sell cmd
Dec 12, 2025
cebc79a
sb: rb: modify ASIC temp_threshold default value to zero
Dec 12, 2025
7ef1e5e
modify tmp432 open status and event
HungYi-Li Dec 12, 2025
e2de2e6
sb: rb: modify the data of asic thermtrip log
HungYi-Li Dec 12, 2025
51ebb22
sb: rb: fix set value to table with IO
YoungLi123 Dec 12, 2025
83def86
sb: rb: Version commit for sb-rb-20255004
Dec 12, 2025
bb12d7b
sb:rb: extend platform info shell output
S-J-Tang Dec 15, 2025
3d6ecd0
sb: rb: fix shell_plat_reboot command to avoid error when reboot
Dec 15, 2025
8d59364
sb:rb: Fix U200051 IO default output value
S-J-Tang Dec 16, 2025
78f7b48
sb: rb: modify event log format
HungYi-Li Dec 16, 2025
be74230
sb: rb: add shell command "asic_mfio_debug"
Dec 17, 2025
78a000f
sb: rb: add thermtrip event when init
HungYi-Li Dec 17, 2025
55f6c94
sb: rb: restrict asic_mfio_debug shell to EVB only
S-J-Tang Dec 18, 2025
4a9d2a5
sb: rb: fix blackbox clear issue
HungYi-Li Dec 18, 2025
cf3a342
sb: rb: Version commit for sb-rb-20255101
S-J-Tang Dec 19, 2025
067a729
sb: rb: disable unused function
YoungLi123 Dec 23, 2025
56bcffa
sb: rb: disable polling before update reset
YoungLi123 Dec 23, 2025
e318647
sb: rb: add adc_test get_good_status
YoungLi123 Dec 23, 2025
5889b9d
sb: rb: remove blank in shell_plat_asic_mfio_debug .c
Dec 24, 2025
4d61832
sb: rb: fix CHIPMODE test strap pin
YoungLi123 Dec 24, 2025
aad054e
sb: rb: add i2c_switch_control shell
S-J-Tang Dec 26, 2025
910a4e8
add get asic boot0, boot1 version and show temp array data in cli
Dec 26, 2025
e5fd151
fix vr power fault duplicate entries in blackbox
Dec 26, 2025
12fda30
sb: rb: Version commit for sb-rb-20255201
Dec 26, 2025
3f5cf0b
sb: rb: add vr test mode
HungYi-Li Dec 29, 2025
1dc13fc
sb: rb: add update boot0 version reading from asic
Dec 30, 2025
735aa17
sb: rb: fix platform extension info string for VR_MODULE_RNS
S-J-Tang Dec 29, 2025
aab894f
sb: rb: add asic mfio 12 13 14 in "asic_mfio_debug"
Dec 30, 2025
ffa2b0e
sb: rb: i2c_target: add FRU board/product info register support
S-J-Tang Dec 30, 2025
96e4642
sb: rb: add power capping function
YoungLi123 Dec 31, 2025
ccad7f7
sb: rb: update RNS vr test mode fenction and settings
Jan 2, 2026
b0f4db5
sb: rb: Version commit for sb-rb-20255301
Jan 2, 2026
0b4f8a5
fix clang format
Jan 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions common/dev/include/mp29816a.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ bool mp29816a_get_vout_max(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
bool mp29816a_get_vout_min(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
bool mp29816a_set_vout_max(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
bool mp29816a_set_vout_min(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
bool mp29816a_get_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t *value);
bool mp29816a_set_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t value);
bool mp29816a_fwupdate(uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size);
bool mp29816a_get_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
bool mp29816a_set_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
Expand Down
2 changes: 2 additions & 0 deletions common/dev/include/raa228249.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ int raa228249_get_remaining_wr(uint8_t bus, uint8_t addr, uint8_t *remain);
bool raa228249_fwupdate(uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size);
bool raa228249_get_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
bool raa228249_set_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt);
bool raa228249_get_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t *value);
bool raa228249_set_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t value);
bool raa228249_get_vr_status(sensor_cfg *cfg, uint8_t rail, uint8_t vr_status_rail,
uint16_t *vr_status);
bool raa228249_clear_vr_status(sensor_cfg *cfg, uint8_t rail);
Expand Down
1 change: 1 addition & 0 deletions common/dev/include/tmp431.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "sensor.h"

bool tmp432_get_temp_status(sensor_cfg *cfg, uint8_t *temp_status);
bool tmp432_get_temp_open_status(sensor_cfg *cfg, uint8_t *temp_status);
bool tmp432_clear_temp_status(sensor_cfg *cfg);

enum TMP431_CHANNELS {
Expand Down
69 changes: 69 additions & 0 deletions common/dev/mp29816a.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ LOG_MODULE_REGISTER(mp29816a);

#define MP29816A_VOUT_MAX_REG 0x24
#define MP29816A_VOUT_MIN_REG 0x2B
#define MP29816A_SVI3_IOUT_RPT_REG 0x67

/* --------- PAGE1 ---------- */
#define VR_REG_EXPECTED_USER_CRC 0xED
Expand Down Expand Up @@ -319,6 +320,74 @@ bool mp29816a_set_vout_min(sensor_cfg *cfg, uint8_t rail, uint16_t *millivolt)
return true;
}

bool mp29816a_get_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t *value)
{
CHECK_NULL_ARG_WITH_RETURN(cfg, false);
CHECK_NULL_ARG_WITH_RETURN(value, false);

uint8_t data[2] = { 0 };
uint8_t scale_bit = 0;
if (!mp29816a_i2c_read(cfg->port, cfg->target_addr, MP29816A_SVI3_IOUT_RPT_REG, data,
sizeof(data))) {
return false;
}
scale_bit = data[0] & 0x07;

if (!mp29816a_i2c_read(cfg->port, cfg->target_addr, PMBUS_IOUT_OC_WARN_LIMIT, data,
sizeof(data))) {
return false;
}

// final value: 8 * data * scale_bit
if (scale_bit == 7) {
// 2A for scale_bit
*value = 8 * (data[0] | (data[1] << 8)) * 2;
} else if (scale_bit < 6 && scale_bit > 0) {
// 1/32, 1/16, 1/8 ...
*value = 8 * (data[0] | (data[1] << 8)) / (2 ^ (6 - scale_bit));
} else {
// 1A
*value = 8 * (data[0] | (data[1] << 8));
}

return true;
}

bool mp29816a_set_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t value)
{
CHECK_NULL_ARG_WITH_RETURN(cfg, false);

uint8_t data[2] = { 0 };
uint8_t scale_bit = 0;
if (!mp29816a_i2c_read(cfg->port, cfg->target_addr, MP29816A_SVI3_IOUT_RPT_REG, data,
sizeof(data))) {
return false;
}
scale_bit = data[0] & 0x07;

// final value: (data / scale_bit) / 8
if (scale_bit == 7) {
// 2A for scale_bit
value = (value / 2) / 8;
} else if (scale_bit < 6 && scale_bit > 0) {
// 1/32, 1/16, 1/8 ...
value = (value * (2 ^ (6 - scale_bit))) / 8;
} else {
// 1A
value = value / 8;
}

data[0] = value & 0xFF;
data[1] = value >> 8;

if (!mp29816a_i2c_write(cfg->port, cfg->target_addr, PMBUS_IOUT_OC_WARN_LIMIT, data,
sizeof(data))) {
return false;
}

return true;
}

static uint8_t mp29816a_do_update(struct cfg_data *cfg_data_list, uint32_t cfg_cnt, uint8_t bus,
uint8_t addr)
{
Expand Down
34 changes: 34 additions & 0 deletions common/dev/raa228249.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,40 @@ bool raa228249_set_vout_command(sensor_cfg *cfg, uint8_t rail, uint16_t *millivo
return true;
}

bool raa228249_get_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t *value)
{
CHECK_NULL_ARG_WITH_RETURN(cfg, false);
CHECK_NULL_ARG_WITH_RETURN(value, false);

uint8_t data[2] = { 0 };
if (!raa228249_i2c_read(cfg->port, cfg->target_addr, PMBUS_IOUT_OC_WARN_LIMIT, data,
sizeof(data))) {
return false;
}

// 1 unit = 0.1A
*value = (data[0] | (data[1] << 8)) * 0.1;
return true;
}

bool raa228249_set_iout_oc_warn_limit(sensor_cfg *cfg, uint16_t value)
{
CHECK_NULL_ARG_WITH_RETURN(cfg, false);

/* input value unit: 1A */
uint8_t data[2] = { 0 };
uint16_t cal_value = value * 10;
data[0] = cal_value & 0xFF;
data[1] = cal_value >> 8;

if (!raa228249_i2c_write(cfg->port, cfg->target_addr, PMBUS_IOUT_OC_WARN_LIMIT, data,
sizeof(data))) {
return false;
}

return true;
}

bool raa228249_get_vr_status(sensor_cfg *cfg, uint8_t rail, uint8_t vr_status_rail,
uint16_t *vr_status)
{
Expand Down
22 changes: 22 additions & 0 deletions common/dev/tmp431.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,28 @@ bool tmp432_get_temp_status(sensor_cfg *cfg, uint8_t *temp_status)
return true;
}

bool tmp432_get_temp_open_status(sensor_cfg *cfg, uint8_t *temp_status)
{
CHECK_NULL_ARG_WITH_RETURN(cfg, false);

I2C_MSG i2c_msg = { 0 };
uint8_t retry = 5;
i2c_msg.bus = cfg->port;
i2c_msg.target_addr = cfg->target_addr;
i2c_msg.tx_len = 1;
i2c_msg.rx_len = 1;
i2c_msg.data[0] = TMP432_OPEN_STATUS_REG;

if (i2c_master_read(&i2c_msg, retry)) {
LOG_ERR("TMP[0x%x] get open status reg[0x%d] failed.", cfg->num,
TMP432_OPEN_STATUS_REG);
return false;
}
*temp_status = i2c_msg.data[0];

return true;
}

bool tmp432_clear_temp_status(sensor_cfg *cfg)
{
CHECK_NULL_ARG_WITH_RETURN(cfg, false);
Expand Down
3 changes: 2 additions & 1 deletion common/service/pldm/pldm_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ enum pldm_sensor_operational_state {
PLDM_SENSOR_FAILED,
PLDM_SENSOR_INITIALIZING,
PLDM_SENSOR_SHUTTINGDOWN,
PLDM_SENSOR_INTEST
PLDM_SENSOR_INTEST,
PLDM_SENSOR_OPEN_CIRCUIT,
};

enum pldm_effecter_operational_state {
Expand Down
2 changes: 2 additions & 0 deletions common/service/pldm/pldm_oem.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ enum iris_event_source {
IRIS_OWL_W_TRVDD0P75,
IRIS_HAMSA_AVDD_PCIE,
IRIS_HAMSA_VDDHRXTX_PCIE,
IRIS_4V2,
IRIS_P0V75_AVDD_HCSL,
// VR Power Fault 2
IRIS_MEDHA1_VDD,
IRIS_MEDHA0_VDD,
Expand Down
5 changes: 4 additions & 1 deletion common/service/sensor/pldm_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}

int pldm_sensor_count = plat_pldm_sensor_get_sensor_count(thread_id);
if ((sensor_pdr_index < 0) || (sensor_pdr_index >= pldm_sensor_count)) {

Check failure on line 125 in common/service/sensor/pldm_sensor.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Condition 'sensor_pdr_index>=pldm_sensor_count' is always true Raw Output: common/service/sensor/pldm_sensor.c:125:50:Condition 'sensor_pdr_index>=pldm_sensor_count' is always true
LOG_ERR("Invalid sensor_pdr_index: %d for thread_id: %d. Max allowed: %d",
sensor_pdr_index, thread_id, pldm_sensor_count);
return -1;
Expand Down Expand Up @@ -303,7 +303,10 @@
if (pldm_sensor_cfg->post_sensor_read_hook) {
if (!pldm_sensor_cfg->post_sensor_read_hook(
pldm_sensor_cfg, pldm_sensor_cfg->post_sensor_read_args, &reading)) {
pldm_sensor_cfg->cache_status = PLDM_SENSOR_FAILED;
if (pldm_sensor_cfg->cache_status == SENSOR_OPEN_CIRCUIT)
pldm_sensor_cfg->cache_status = PLDM_SENSOR_OPEN_CIRCUIT;
else
pldm_sensor_cfg->cache_status = PLDM_SENSOR_FAILED;
*update_time_ms = k_uptime_get_32();
*update_time = (*update_time_ms / 1000);
LOG_DBG("Failed to pose read sensor_num 0x%x of thread %d", sensor_num,
Expand Down Expand Up @@ -419,14 +422,14 @@
uint32_t poll_interval_ms = PLDM_SENSOR_POLL_TIME_DEFAULT_MS;

pldm_sensor_count = plat_pldm_sensor_get_sensor_count(thread_id);
if (pldm_sensor_count <= 0) {

Check failure on line 425 in common/service/sensor/pldm_sensor.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Condition 'pldm_sensor_count<=0' is always true Raw Output: common/service/sensor/pldm_sensor.c:425:24:Condition 'pldm_sensor_count<=0' is always true
LOG_ERR("Failed to get PLDM sensor count(%d) of thread%d", pldm_sensor_count,
thread_id);
return;
}

pldm_sensor_list[thread_id] = plat_pldm_sensor_load(thread_id);
if (pldm_sensor_list[thread_id] == NULL) {

Check failure on line 432 in common/service/sensor/pldm_sensor.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Condition 'pldm_sensor_list[thread_id]==NULL' is always true Raw Output: common/service/sensor/pldm_sensor.c:432:34:Condition 'pldm_sensor_list[thread_id]==NULL' is always true
LOG_ERR("Failed to load PLDM sensor list of thread%d, ret%d", thread_id, ret);
return;
}
Expand Down Expand Up @@ -489,13 +492,13 @@
size_t stack_size = plat_get_pldm_sensor_stack_size(i);

#ifdef ENABLE_PLATFORM_PROVIDES_PLDM_SENSOR_STACKS
if (stack == NULL || stack_size == 0) {

Check failure on line 495 in common/service/sensor/pldm_sensor.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Condition 'stack==NULL' is always true Raw Output: common/service/sensor/pldm_sensor.c:495:13:Condition 'stack==NULL' is always true
LOG_WRN("Invalid stack for thread %d, skipping", i);
continue;
}
#else
stack = pldm_sensor_poll_stacks[i];

Check failure on line 500 in common/service/sensor/pldm_sensor.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Redundant initialization for 'stack'. The initialized value is overwritten before it is read. Raw Output: common/service/sensor/pldm_sensor.c:500:9:Redundant initialization for 'stack'. The initialized value is overwritten before it is read.
stack_size = K_THREAD_STACK_SIZEOF(pldm_sensor_poll_stacks[i]);

Check failure on line 501 in common/service/sensor/pldm_sensor.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Redundant initialization for 'stack_size'. The initialized value is overwritten before it is read. Raw Output: common/service/sensor/pldm_sensor.c:501:14:Redundant initialization for 'stack_size'. The initialized value is overwritten before it is read.
#endif

LOG_INF("Creating thread %d (%s) with stack size %zu", i,
Expand Down
1 change: 1 addition & 0 deletions common/service/sensor/sensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ enum {
SENSOR_PEC_ERROR,
SENSOR_PARAMETER_NOT_VALID,
SENSOR_UNAVAILABLE,
SENSOR_OPEN_CIRCUIT,
};

enum { SENSOR_INIT_SUCCESS, SENSOR_INIT_UNSPECIFIED_ERROR };
Expand Down
3 changes: 3 additions & 0 deletions common/shell/commands/sensor_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
"sensor_not_present",
"pec_error",
"parameter_not_valid",
"unavailable",
"open_circuit",
};

#ifdef ENABLE_PLDM_SENSOR
Expand All @@ -71,6 +73,7 @@
"sensor_initializing",
"sensor_shuttingdown",
"sensor_intest",
"sensor_open_circuit",
};
#endif
// clang-format on
Expand Down Expand Up @@ -361,7 +364,7 @@
}

#ifdef ENABLE_PLDM_SENSOR
char *keyword = NULL;

Check failure on line 367 in common/shell/commands/sensor_shell.c

View workflow job for this annotation

GitHub Actions / Aggregate-Lint-Output

[] reported by reviewdog 🐶 Variable 'keyword' can be declared as pointer to const Raw Output: common/shell/commands/sensor_shell.c:367:8:Variable 'keyword' can be declared as pointer to const
if (argc == 2)
keyword = argv[1];

Expand Down
11 changes: 6 additions & 5 deletions meta-facebook/sb-rb/boards/npcm400f_evb.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ CONFIG_PECI_NPCM4XX=n
CONFIG_SPI_NPCM4XX_SPIM=y
CONFIG_SPI_NPCM4XX_FIU=y
CONFIG_SPIP_NPCM4XX=y
CONFIG_ESPI_NPCM4XX=y
CONFIG_IPMI_KCS_NPCM4XX=y
CONFIG_ESPI_NPCM4XX=n
CONFIG_IPMI_KCS_NPCM4XX=n
CONFIG_I2C_NPCM4XX=y
CONFIG_I3C_NPCM4XX=y
CONFIG_ADC_NPCM4XX=y
CONFIG_USB_DC_NPCM4XX=y
CONFIG_JTAG_NPCM4XX=y
CONFIG_ADC_NPCM4XX=n
CONFIG_USB_DC_NPCM4XX=n
CONFIG_JTAG_NPCM4XX=n

# I3C More actions
CONFIG_I3C=y
CONFIG_I3C_SLAVE=y
CONFIG_I3C_SLAVE_MQUEUE=y
CONFIG_I3C_SHELL=n

# PWM Driver
CONFIG_PWM=y
Expand Down
2 changes: 1 addition & 1 deletion meta-facebook/sb-rb/boards/npcm400f_evb.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
};

&adc0 {
status = "okay";
status = "disabled";
};

&uart0 {
Expand Down
8 changes: 4 additions & 4 deletions meta-facebook/sb-rb/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ CONFIG_I2C=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_GPIO_SHELL=y
CONFIG_I2C_SLAVE=y
CONFIG_I2C_EEPROM_SLAVE=y
CONFIG_I2C_IPMB_SLAVE=y
CONFIG_ADC=y
CONFIG_I2C_EEPROM_SLAVE=n
CONFIG_I2C_IPMB_SLAVE=n
CONFIG_ADC=n
CONFIG_FLASH=y
CONFIG_FLASH_SHELL=y
CONFIG_SENSOR=y
CONFIG_HWINFO=y
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=153840
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=143360
CONFIG_REBOOT=y
CONFIG_POSIX_CLOCK=y
CONFIG_STACK_SENTINEL=y
Expand Down
Loading
Loading