Skip to content

sb: rb: Add multiple functions and modified settings - #2751

Open
khoung76642 wants to merge 109 commits into
facebook:mainfrom
khoung76642:sb-rb_20263001_upcode
Open

sb: rb: Add multiple functions and modified settings#2751
khoung76642 wants to merge 109 commits into
facebook:mainfrom
khoung76642:sb-rb_20263001_upcode

Conversation

@khoung76642

Copy link
Copy Markdown
Contributor

Summary:

  • modified polling ASIC HAMSA version every 5s to set GPIO I3C_RAINBOW_ALERT_N logic from check all to HAMSA boot0 only
  • Fix polling ASIC HAMSA version every 5s to set GPIO I3C_RAINBOW_ALERT_N pin logic
  • Fix clk status event send to bmc
  • Move EVB thread to UBC thread
  • Add TID will same as EID and Add unkown type of ADC
  • remove unuse LOG_DBG message
  • modified when get asic version fail will set all version data to 0
  • modified ucr, lcr by vr team
  • modified vout get all restore to previous way
  • add plat_ubc_otw_otp_init for UBC OTW/OTP init
  • modify iris_smbus temp sensor ucr
  • add iris_smbus temp sensor polling and remove vr vin
  • add svs function and modified some settings
  • modify power capping default setting(jira-1555)
  • modify some issue and add read vout offset when power on
  • add vout set/get will follow svs_flag to set/get same as i2c target 0x88 0x89
  • add shell cmd to read medha0/1 vout offset value
  • fix shell voltage set rail name error
  • fix ioe set bootstrap table issue
  • Common: MP2971: add delta_mv boundary checks
  • Common: MP2971: validate OVP1 threshold against vout max
  • Common: TMP75/TMP432: fix signed conversion for TMP75/TMP432 two-byte thresholds
  • add read svs_core_voltage from shell cmd: "rb_asic svs_core_voltage_get"
  • Add 312.5Mhz APLL lock status can get from shell cmd
  • Add svs function in i2c target
  • Add more vr_status in blackbox error_data
  • Modify shell command board_id judgment
  • add perm param on svs_apply_offset
  • extend buffer size of fru BoardInfo structure to fix fru data print issue
  • add UBC rsm3514e driver and platform code setting
  • add voltage set/perm function in normal mode and update MPS normal mode table
  • fix vr_vout_user_settings_struc define issue
  • fix init perm Vout setting
  • modify voltage can set in normal mode
  • modify set voltage command perm
  • modify get/set and perm voltage command in normal mode
  • Common: MP2971: fix MFR_RESO_SET setting issue
  • modified set otp/otw by read back register for check
  • fix correct typo: HEDHA -> MEDHA, OWLW/OWLW -> OWL_W/OWL_E
  • limit i2c target 0x80~0x88 setting range
  • modified malloc size
  • add max_sensor command
  • fix fru Board Product print issue
  • modify iris_smbus sensor UCR: 88 -> 90
  • add voffset_mmc command
  • Common: MP29816a: fix ovp2 and uvp issue
  • add MPS ovp/uvp get/set shell command and enable WDT
  • modify MPS and RNS ovp uvp value
  • Common: MP29816a: fix mp29816a_get_vout_command
  • modify blackbox VR SMBALRT: show SMBALRT rails name and STATUS_WORD
  • Common: Disable most of all IPMI cmd
  • Removed the vr_hot_switch command, and added new vr_hot_mask get/set and rb_asic thermal_threshold get/set commands
  • jira-1427
  • Common: pldm_firmware_update: adds an #ifndef guard to the UPDATE_REQUEST_DATA_MAX_RETRY_COUNT definition and overrode PLDM_FW_UPDATE_TIMEOUT_MS
  • modify power capping default setting
  • jira-1555
  • add asic_type=qcp3 decision
  • jira-1737
  • add tmp432, emc1413 local sensor
  • jira-1702
  • add adc sensor polling
  • jira-1738
  • modify VR rail shell command list
  • jira-1768
  • modify rb_asic thermal_threshold set error
  • implement new medha0/1 current formula
  • Add power good status: U677, U678, U682
  • extend thread size (thermal and i2c_target)
  • modify emc1413 local sensor
  • add temp alert blackbox and sent to BMC
  • modify temp sensor UCR and alwer threshold
  • modify power capping default setting(jira-1555)
  • remove voltage set default command
  • add vr rails OT WARNING blackbox and bmc event
  • fix ot_warning function VR_HOT setting way and modified 2nd src emc1413 address
  • remove VR_HOT trigger from MMC even if ASIC triggers MEDHA0/1_MFIO24, HAMSA_MFIO22
  • fix smbalert blackbox log error data will get wrong(vr_fault_get_error_data must input senser number not rail id)
  • Common: add pldm_event_types: PLDM_CPER_EVENT
  • MMC send the CPER format to BMC in Fatal_Error 122 (0X7a)
  • modify blackbox VR SMBALRT and Power FAULT
  • show all vr_status
  • add UBC1, UBC2 event log
  • modified Power Capping default value
  • Level 2 threshold = change from 596W to 606W
  • Level 3 time_window = change from 500ms to 1000ms
  • Level 3 threshold = change from 347W to 360W
  • set MPS medha0/1 OPV2 to no avtion in all mode
  • update MPS UVP value
  • set limitation of ovp setting range in normal mode(voltage ovp set), it shold follow the OVP1 <=940mv
  • remove unused define
  • VR_HOT restore will check asic temp and otw together
  • otw set VR_HOT will check VR_HOT setting mask
  • modified sensor UCR, LCR, UNCR
  • organize trigger_vr_hot and trigger_vr_hot
  • add RNS vr will have otw blackbox log and will send event log to bmc
  • add medha0/1 otw log
  • modified when otw is recover and status had been clear log status will be deasserted
  • disable unused i3c driver
    -remove adc invalid log in post_adc_sensor_read

Test Plan:
Build code: Pass

Kevin Huang and others added 30 commits August 3, 2026 17:17
Summary:
- Add function to let TID is same as EID
- Add ADS7066 detection and set type to UNKNOWN if neither AD4058 nor ADS7066 is detected.
- Add 100MHz, 312.5MHz, 100MHz buf0/1/2 clk lock event to BMC

Test Plan:
- Build code: Pass
Summary:
- Move EVB thread to UBC thread

Test Plan:
- Build code: Pass
Summary:
- Modify it will not keep sending clk event to BMC
- Add clk status read value will include in event message.

Test Plan:
- Build code: Pass
…OW_ALERT_N pin logic

Summary:
- modified I3C_RAINBOW_ALERT_N this pin config from push-pull to open-drain
- modified when start will keep High until read HAMSA boot version then will set to Low

Test Plan:
- Build code: Pass
Summary:
- Version commit for sb-rb-20262101

Test Plan:
- Build code: Pass
…RAINBOW_ALERT_N logic from check all to HAMSA boot0 only
Summary:
- Version commit for sb-rb-20262101

Test Plan:
- Build code: Pass
Summary:
- Modify shell command board_id judgment

Test Plan:
- Build code: Pass
Summary:
- Add more vr_status in blackbox error_data

Test Plan:
- Build code: Pass
Summary:
- svs flag will set/get vout command with offset(0:disable) or without offset(1:enable)
- add shell command for set/get SVS_FLAG
- add raa228249_get_vout_offset function

Test Plan:
- Build code: Pass
Summary:
-  add 312.5Mhz APLL lock status can get from shell cmd: "clock_status get all"

Test Plan:
- Build code: Pass
Summary:
-  add read svs_core_voltage from shell cmd: "rb_asic svs_core_voltage_get"

Test Plan:
- Build code: Pass
… thresholds

Summary:
- Fix TMP75 and TMP432 two-byte threshold get/set conversion
- Decode threshold registers as signed 1/16°C raw values
- Fix incorrect low-byte signed extension and negative threshold handling

Test Plan:
- Build code: Pass
- Set and get positive threshold values: Pass
- Set and get negative threshold values: Pass
Summary:
- change polling rate to match item (7) MEDHA0/1_VDD = 2ms, VDDQC = 10ms, OWL_E/W_VDD/HAMSA=100ms
- change the following default time windows
	- MEDHA0/1 LV1 = 100us
	- MEDHA0/1 LV2 = 100ms
	- MEDHA0/1 LV3 = 1000ms
- change the following default thresholds
	- MEDHA0/1 LV1 = 1200A
	- MEDHA0/1 LV2 = 1523W
	- MEDHA0/1 LV3 = 1025W

Test Plan:
- Build code: Pass
Summary:
- add "voltage svs_apply_offset" cli cmd and default is set to 1 (enabled).
	- voltage svs_apply_offset get
	- voltage svs_apply_offset set <1:enable / 0:disable>
- add new command "voltage svs_asic_voltage" and default value is 1 (apply).
	- voltage svs_asic_voltage get
	- voltage svs_asic_voltage set <1:apply / 0:block>
- modified when DC off, I3C_RAINBOW_ALERT_R_N will set to 1
- change fw update EID data from mctp to eeprom
- change clock status CLK_GEN_100M_U86 from check LOSEVENT to check apll_lock_sts
- add clock status 312.5MHz APLL lock status
- modified pldm "get status" will not show in the log

Test Plan:
- Build code: Pass
Summary:
- add "iris_smbus" temp sensor.
- sensor polling add "iris_smbus"
- sensor polling remove "VR vin"

Test Plan:
- Build code: Pass
Summary:
 - Add plat_ubc_otw_otp_init() to initialize UBC OTW/OTP related settings on EVT2 boards.
 - For supported UBC modules (DELTA/LUXSHARE), iterate UBC temp sensors and program:
   - reg 0x10 to remove protection
   - reg 0x51 (OTW/OWL)
   - reg 0x4F (OTP/OFL)
   - Skip initialization on non-EVT2 board revisions and unsupported UBC modules.

Test Plan:
 - Build Code: Pass
 - Function check: Pass
Summary:
- Version commit for sb-rb-20262301

Test Plan:
- Build code: Pass
need fix bug and modified vr request
This reverts commit 6685569.
Kevin Huang and others added 20 commits August 3, 2026 19:32
Summary:
- remove the ot_warning value in table will clear when vr polling flag has been set to 0

Test Plan:
- Build code: Pass
Summary:
-  add power good status: U677, U678, U682

Test Plan:
- Build code: Pass
…rc emc1413 address

Summary:
- modified 2nd src emc1413 address(fix address impact)
- fix ot_warning function VR_HOT setting way(every error only set VR_HOT to 1 once so user can clear VR_HOT latch bit)

Test Plan:
Build code: Pass
Summary:
- Version commit for sb-rb-20262901

Test Plan:
Build code: Pass
Summary:
- add RNS vr will have otw blackbox log and will send event log to bmc
- add medha0/1 otw log
- modified when otw is recover and status had been clear log status will be deasserted

Test Plan:
- Build code: Pass
Summary:
- organize trigger_vr_hot and trigger_vr_hot

Test Plan:
- Build code: Pass
Summary:
- modified sensor UCR, LCR, UNCR
- jira-1702

Test Plan:
- Build code: Pass
Summary:
- VR_HOT restore will check asic temp and otw together
- otw set VR_HOT will check VR_HOT setting mask

Test Plan:
Build code: Pass
Summary:
- set MPS medha0/1 OPV2 to no avtion in all mode
- update MPS UVP value
- set limitation of ovp setting range in normal mode(voltage ovp set), it shold follow the OVP1 <=940mv
- remove unused define

Test Plan:
Build code: Pass
Summary:
- Level 2 threshold = change from 596W to 606W
- Level 3 time_window = change from 500ms to 1000ms
- Level 3 threshold = change from 347W to 360W

Test Plan:
Build code: Pass
Summary:
- add UBC1, UBC2 event log

Test Plan:
Build code: Pass
Summary:
- modify blackbox VR SMBALRT and Power FAULT
- show all vr_status

Test Plan:
- Build code: Pass
Summary:
- Common: add pldm_event_types: PLDM_CPER_EVENT
- MMC send the CPER format to BMC in Fatal_Error 122 (0X7a)
- jira-1040

Test Plan:
Build code: Pass
…rror data issue

Summary:
- remove VR_HOT trigger from MMC even if ASIC triggers MEDHA0/1_MFIO24, HAMSA_MFIO22
- fix smbalert blackbox log error data will get wrong(vr_fault_get_error_data must input senser number not rail id)

Test Plan:
Build code: Pass
Summary:
- Version commit for sb-rb-20263001

Test Plan:
Build code: Pass
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 3, 2026
@meta-codesync

meta-codesync Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D114592683. (Because this pull request was imported automatically, there will not be any future comments.)

@khoung76642

Copy link
Copy Markdown
Contributor Author

common/service/ipmi/ipmi.c:131:12:Variable 'hdr' can be declared as pointer to const
common/service/ipmi/oem_1s_handler.c:1576:12:Variable 'addr' can be declared as pointer to const
common/service/ipmi/oem_1s_handler.c:2134:11:Variable 'table_ptr' can be declared as pointer to const
common/service/pldm/pldm_firmware_update.c:1782:4:The buffer 'data' may not be null-terminated after the call to strncpy().
common/service/pldm/pldm_firmware_update.c:690:19:Variable 'extra_data' can be declared as pointer to const
common/service/pldm/pldm_firmware_update.c:1281:37:Variable 'req_p' can be declared as pointer to const
common/service/pldm/pldm_firmware_update.c:1447:11:Variable 'resp_end' can be declared as pointer to const
common/service/ipmi/oem_1s_handler.c:128:7:Condition '!pal_extend_msg_out_interface_handler(msg)' is always false
common/service/pldm/pldm_firmware_update.c:1104:19:Condition 'check_result!=PLDM_SUCCESS' is always false

Some of the errors in these common code .cpp files are expected because the common code defines weak functions by default. These weak function implementations may result in cpp check error reports.

@khoung76642 khoung76642 changed the title Sb rb 20263001 upcode sb: rb: Add multiple functions and modified settings Aug 4, 2026
@waffle2k

waffle2k commented Aug 6, 2026

Copy link
Copy Markdown

please take a look at the cpp check linter

Errors Found:
common/service/ipmi/ipmi.c:131:12:Variable 'hdr' can be declared as pointer to const
common/service/ipmi/oem_1s_handler.c:1576:12:Variable 'addr' can be declared as pointer to const
common/service/ipmi/oem_1s_handler.c:2134:11:Variable 'table_ptr' can be declared as pointer to const
common/service/pldm/pldm_firmware_update.c:1782:4:The buffer 'data' may not be null-terminated after the call to strncpy().
common/service/pldm/pldm_firmware_update.c:690:19:Variable 'extra_data' can be declared as pointer to const
common/service/pldm/pldm_firmware_update.c:1281:37:Variable 'req_p' can be declared as pointer to const
common/service/pldm/pldm_firmware_update.c:1447:11:Variable 'resp_end' can be declared as pointer to const
common/service/ipmi/oem_1s_handler.c:128:7:Condition '!pal_extend_msg_out_interface_handler(msg)' is always false
common/service/pldm/pldm_firmware_update.c:1104:19:Condition 'check_result!=PLDM_SUCCESS' is always false

@facebook-github-tools

Copy link
Copy Markdown

@khoung76642 has updated the pull request. You must reimport the pull request before landing.

@khoung76642
khoung76642 force-pushed the sb-rb_20263001_upcode branch from 6b8c479 to f4080f1 Compare August 13, 2026 06:24
@facebook-github-tools

Copy link
Copy Markdown

@khoung76642 has updated the pull request. You must reimport the pull request before landing.

@khoung76642

Copy link
Copy Markdown
Contributor Author

Hi @waffle2k,
We fixed the other cpp check fail except these 2 errors
common/service/ipmi/oem_1s_handler.c:128:7:Condition '!pal_extend_msg_out_interface_handler(msg)' is always false
common/service/pldm/pldm_firmware_update.c:1104:19:Condition 'check_result!=PLDM_SUCCESS' is always false

After we checked, these 2 aren't bugs, they're an intentional weak-function/platform-override pattern that cppcheck can't reason about across link-time overrides.

Please help us to merge in main branch after checking, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants