Skip to content

sb: el: initial Santa Barbara Electra support#2703

Open
S-J-Tang wants to merge 79 commits intofacebook:mainfrom
S-J-Tang:sb-el_20261401_release
Open

sb: el: initial Santa Barbara Electra support#2703
S-J-Tang wants to merge 79 commits intofacebook:mainfrom
S-J-Tang:sb-el_20261401_release

Conversation

@S-J-Tang
Copy link
Copy Markdown
Contributor

Summary

This PR adds the initial Santa Barbara Electra platform support, including platform bring-up, sensor support, CPLD integration, power control, shell utilities, and related fixes/enhancements accumulated across the early release packages.

Included scope

  • Initial Electra bring-up
  • Sensor and thermal support
  • CPLD and bootstrap integration
  • Power / VR / ADC related support
  • Shell and debug commands
  • Protection and follow-up fixes

Test Plan

  • Build code: Pass
  • Function check: Pass

S-J-Tang and others added 30 commits April 10, 2026 15:31
Summary:
 - Add initial Electra platform code under meta-facebook/sb-el/
 - Enable VR/temperature sensor polling and common ADS7066/ad4058 support
 - Configure GPIO/I2C settings for bring-up
 - Enable MCTP over I2C and PLDM firmware update support (BIC/VR)
 - Version: 2026.06.01
Test Plan:
 - Build code: Pass
 - I2C MCTP communicate with BMC: Pass
 - PLDM firmware update (BIC FW update): Pass
 - Check BIC version: Pass
Summary:
- Add shell command "voltage_range" to print VR UCR LCR
- Remove LOG from adc and close adc polling
Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Add subcommand "read_info" to read sensor info via sensor id.
- Add subcommand "cpld write" to write value to cpld reg.
- Add subcommand "info" to read board info from shell.
Test Plan:
- Build code: Pass
- Function test: Pass
…n DC on

Summary:
- Add ISR_GPIO_RST_IRIS_PWR_ON_PLD_R1_N to clear clock status during DC on
- Add shell_clock to check clock status
- Add plat_ioexp for future integration in ISR_GPIO_RST_IRIS_PWR_ON_PLD_R1_N
Test Plan:
- Build code: Pass
Summary:
 - modify plat_sensor_polling_enable_flag "false" to "true"
Test Plan:
 - Build code: Pass
Summary:
- Add CPLD bootstrap address support for 0x0A–0x17 (exclude 0x12)
- Add bootstrap table initialization:
  - bootstrap_default_settings_init()
  - bootstrap_user_settings_init()
- Add shell command to view/configure bootstrap settings
Test Plan:
- Build code: Pass
- Shell command check: Pass
Summary:
- Update SPI mux shell command to also drive CPLD reset bits via CPLD_OFFSET_ASIC_RESET (0x00)
Test Plan:
- Build code: Pass
Summary:
- Update bootstrap_mapping_register addresses in bootstrap_table[] to match latest CPLD map
- Remove unused straps
Test Plan:
- Build code: Pass
Summary:
- Add shell_plat_asic_mfio_debug.c to get/set ASIC MFIO via CPLD offset 0x17
Test Plan:
- Build code: Pass
Summary:
- Enable cmd_arke_power_off/cmd_arke_power_cycle
- Enable cmd_arke_steps_on/cmd_arke_disable_steps_on
- Add ISR helpers: set_pwr_steps_on_flag() / get_pwr_steps_on_flag()
- Support CPLD offsets for VR enable, PWRGD reading, CLK enable, and ASIC reset status
  - VR_AND_CLK_EN(0x3E), VR_1_EN(0x3F), VR_2_EN(0x40), VR_3_EN(0x41), VR_4_EN(0x42)
  - VR_AND_CLK_EN_PIN_CTRL(0xA1), VR_CLK_ENABLE_PIN_CTRL_REG(0xA1), CPLD_ASIC_RESET_STATUS_REG(0xA2)
  - VR_PWRGD_PIN_READING_1~6 (0x07~0x0C)
  - VR_1STEP_FUNC_EN_REG(0xA9)
Test Plan:
- Build code: Pass
Summary:
- Add shell_get_mb_pwr_en.c with cmd_get_mb_pwr_en to get MB PWR EN status
- Support CPLD offset 0x05 for MB PWR EN reading
Test Plan:
- Build code: Pass
Summary:
- Add pcie_perst_control shell to get/set/override HAMSA PCIe PERST via CPLD offset 0xA3
Test Plan:
- Build code: Pass
Summary:
- Add jtag_mux shell command to get/set ASIC JTAG MUX selection via CPLD (ASIC_JTAG_MUX_SEL)
- Support targets: NUWA_0/NUWA_1/OWL_E/OWL_W/HAMSA
Test Plan:
- Build code: Pass
Summary:
- Add i2c_switch_control shell to get/set HAMSA/NUWA0/NUWA1 I2C switch GPIOs
- Disable VR polling before enabling switches and restore it after disabling
Test Plan:
- Build code: Pass
Summary:
- Add asic_bspi shell to get/set ASIC BSPI CRM mux GPIOs (EVB only)
- Block mux switching when DC is off (check RST_ARKE_PWR_ON_PLD_R1_N)
Test Plan:
- Build code: Pass
Summary:
- Version commit for 2026.09.01
Test Plan:
- Build code: Pass
Summary:
- add function to monitor VR fault by polling CPLD registers
- add function to poll PDB1 PWR from BMC via CPLD
Test Plan:
- Build code: Pass
Summary:
- Add CPLD_UNEXPECTED_VAL_TRIGGER_CAUSE event to blackbox mechanism.
- Clear this specific error state in err_code_caches after DC ON.
- Update vr_error_fault_table, vr_error_callback_info_table, and VR_ERR_LOG_DEVICE_INDEX_E for event mapping.
- Add get_multi_vr_status() to handle VR_HOT events via VR_SMBUS_ALERT_EVENT_LOG_REG.
- Modify blackbox shell command to support CPLD_UNEXPECTED_VAL_TRIGGER_CAUSE.
Test Plan:
- Build code: Pass
Summary:
- Add plat_power_capping_init() and ioexp_init() to init flow
- Introduce plat_power_capping.c with power capping config/getter/setter APIs, OC warn sync, and CPLD time-window helpers
- Add Electra ADC polling (adc_electra_polling_handler / update_adc_info) and NUWA ADC index enums
- Extend plat_adc.c with Electra ADC helpers (vref getters, raw-to-current conversion, NUWA instant power, UCR status, buffers access, and init entry)
- Add power capping shell commands: shell_plat_power_capping_control.c and shell_plat_power_capping.c

Test Plan:
- Build code: Pass
Summary:
 - Add EVB_SENSOR_THREAD
 - Add EVB sensor support
 - Add following sensors:
   - SENSOR_NUM_P3V3_OSFP_TEMP_C
   - SENSOR_NUM_P3V3_OSFP_VOLT_V
   - SENSOR_NUM_P3V3_OSFP_CURR_A
   - SENSOR_NUM_P3V3_OSFP_PWR_W
   - Add tca6424a IO expander support for EVB only
 - Add below initialization in pal_post_init():
   - quick_sensor_poll_init()
   - init_U200052_IO()
   - init_U200053_IO()
   - init_U200070_IO()

Test Plan:
 - Build code: Pass
in blackbox
Summary:
- Add function to write DC_ON_TRIGGER_CAUSE(dc on) event in blackbox.
- Add function to write POWER_ON_SEQUENCE_TRIGGER_CAUSE(pwr sequence
  fault) event in black
- Add function to sent POWER_ON_SEQUENCE_TRIGGER_CAUSE sel event to BMC
- Modify blackbox shell command to support POWER_ON_SEQUENCE_TRIGGER_CAUSE.
Test Plan:
- Build code: Pass
Summary:
- Add function to add AC_ON_TRIGGER_CAUSE event in blackbox
Test Plan:
- Build code: Pass
Summary:
- Add PWM_1 and PWM_6
- Add ast_pwm_set() for PWM duty cycle control
- Enable EVB P3V3 OSFP VR sensor in arke_power.c
- Enable EVB support in arke_power.c

Test Plan:
- Build code: Pass
Summary:
- Add a thread to poll thermal sensor status.
- Implement thermal error logging mechanism for TEMPERATURE_TRIGGER_CAUSE events.
- Add `temp_status` shell command to get and clear thermal status.
- Update `blackbox` command to support TEMPERATURE_TRIGGER_CAUSE event output
Test Plan:
- Build code: Pass
Summary:
 - add mutex in vr_pre_read_args[]
 - update VR_MAX_NUM -> 14

Test plan:
 - Build code: Pass
Summary:
- Add TCAL6408R I2C helpers (read/write/write_bit) and init sequence for EVB
- Route EVB NUWA MFIO6/8/10 strap control to TCAL6408R instead of TCA6424A
- Update EVB bootstrap table entries/mapping to include TCAL6408R-backed straps

Test Plan:
- Build code: Pass
Summary:
- Implement mechanism to log CPLD register values related to ASIC thermal status to blackbox.
- Implement mechanism to log ASIC error events in blackbox and send SEL to BMC.
- Update `blackbox` command to support printing `ASIC_THERMTRIP_TRIGGER_CAUSE` and `ASIC_ERROR_TRIGGER_CAUSE` events.
Test Plan:
- Build code: Pass
Summary:
- Move init_U200051_IO() from plat_pldm_sensor.c to plat_ioexp.c for centralized IO expander init
- Comment out init_pwm_dev() to prevent FW crash during initialization

Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Change PWM output channel from PWM1 to PWM2.
- Update PWM configuration to match the actual hardware wiring as defined in the schematic.
- Zephyr patches will be provided in a follow-up commit.
Test Plan:
Build code: Pass
Summary:
- Add `vqps` shell to get/set VQPS status/enable bits
- Read/write VQPS status via CPLD
- Support EVB-only VQPS E/W enables via TCA6424A port2 and P1V8_OWL_EW_VQPS_EN via U200070

Test Plan:
- Build code: Pass
S-J-Tang and others added 28 commits April 10, 2026 15:31
Summary:
- Enable bootstrap setting output in `perm_config get`
- Read and display bootstrap-related permanent config

Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Add FLEX and CYNTEX UBC vendor definitions
- Add FLEX and CYNTEX VR vendor type mappings
- Update board information display for new UBC vendor types

Test Plan:
- Build code: Pass
Summary:
- Add `smbus` shell command support
- Support SMBus block write operation
- Support SMBus block read operation
- Support repeated read operation for SMBus devices
- Add dynamic I2C bus name completion for shell commands

Test Plan:
- Build code: Pass
- Verify `smbus block_write` works as expected
- Verify `smbus block_read` works as expected
- Verify `smbus repeat_read` works as expected
Summary:
- Add UBC sensor type selection in `change_sensor_cfg()`
- Update UBC sensor type for MPS, FLEX, and LUXSHARE modules
- Keep original UBC sensor address unchanged

Test Plan:
- Build code: Pass
Summary:
- Add shell command to read all VR voltage command values
- Support `voltage get all`
- Check platform power state before reading voltage

Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Add `bmc_sensor` shell command
- Support reading `P52V_ASIC_SENSE_PWR` from CPLD power info registers
- Combine MSB and LSB power data and print the sensor value

Test Plan:
- Build code: Pass
Summary:
- Add `delay_pcie_perst` shell command
- Support setting PCIe PERST delay for HAMSA PCIe ports
- Support restoring PCIe PERST delay to default
- Support reading all current PCIe PERST delay settings
- Support saving PCIe PERST delay setting to EEPROM with `perm`

Test Plan:
- Build code: Pass
- Verify `delay_pcie_perst set <HAMSA_PCIE[X]_PERST_B_PLD_N> <N|default>` works as expected
- Verify `delay_pcie_perst get all` works as expected
- Verify permanent setting with `perm` works as expected
Summary:
- Update threshold get/set functions to support EMC1413.
- Update shell command to get status from EMC1413.
Test Plan:
- Build code: Pass
- Shell cmd test: Pass
Summary:
- Implement `delay_asic_rst` and `delay_module_pg` shell commands to configure timing delays.
- Add perm support to initialize and save user delay settings.
Test Plan:
- Build code: Pass
- Shell test: Pass
Summary:
- Block firmware version requests during an FW update.
- Add update state checker to stop sensor access during FW update.
Test Plan:
- Build code: Pass
Summary:
- Updating the variable/comment from rainbow to electra.
- Fix temperature_sensoor_num to temperature_sensor_num.
Test Plan:
- Build code: Pass
Summary:
- Replace generic poll interval update API in quick VR thread
- Use `plat_pldm_sensor_set_quick_vr_poll_interval()` instead

Test Plan:
- Build code: Pass
Summary:
- Version commit for 2026.12.01.
Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Update clang-format formatting
- Remove duplicated `emc1413_get_temp_open_status()` in `emc1413.c`
- Fix redefinition build error

Test Plan:
- Build code: Pass
Summary:
- Fix UBC module condition checks in shell display
- Correct vendor name output for FLEX, LUXSHARE, and CYNTEX

Test Plan:
- Build code: Pass
Summary:
- Add rail boundary check before accessing vr_rail_table
- Prevent potential out-of-bounds access reported by cppcheck

Test Plan:
- Build code: Pass
- Run cppcheck: Pass
Summary:
- Mark emc1413 cache status array as const
- Fix cppcheck-reported warnings in plat_hook

Test plan:
- Build code: Pass
Summary:
- Skip UBC type change when module is DELTA
- DELTA is the default UBC type, no action required

Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Fix VR vendor type parsing to align with CPLD setting
- Mask `vr_vendor_module` to valid bits only
- Handle CPLD value `0x08` as RNS VR module

Test Plan:
- Build code: Pass
Summary:
- Add `ENABLE_LX6301` define to enable sensor initialization
- Update RNS VR sensor addresses for LX6301 configuration
- Modify the following RNS VR addresses:
  - `ASIC_P0V9_OWL_E_TRVDD_RNS_ADDR`
  - `ASIC_P0V75_OWL_E_TRVDD_RNS_ADDR`
  - `ASIC_P0V75_OWL_W_VDD_RNS_ADDR`
  - `ASIC_P0V75_MAX_S_VDD_RNS_ADDR`

Test Plan:
- Build code: Pass
Summary:
- Implement `clock_control` shell commands to enable/disable clock for
  ASIC.
Test Plan:
- Build code: Pass
Summary:
- Add shell command to read average power of UBC VR rails
- Support `average_power get <rail>` and `average_power get all`
- Add rail name auto-completion in shell

Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Rename all VR sensor names from `P1V05_VDDQC` to `P1V05_VDDC`
- Align VR sensor naming with updated rail definition

Test Plan:
- Build code: Pass
- Verify VR sensor names are updated correctly
Summary:
- Add firmware update support for HAMSA, HAMSA_BOOT1, NUWA0, and NUWA1
- Add shell command to get ASIC boot0 and boot1 version
- Add shell command to force read ASIC firmware version and CRC from flash
- Update temporary boot0 version cache after reading version from ASIC

Test Plan:
- Build code: Pass
- Verify `get_fw_version asic` works as expected
- Verify `get_fw_version force_read_asic` works as expected
- Verify HAMSA, HAMSA_BOOT1, NUWA0, and NUWA1 FW update flow works as expected
Summary:
  - Version commit for 2026.13.01.

Test Plan:
  - Build code: Pass
  - Function check: Pass
Summary:
- Add shell command to control manual strap setting
- Support enable, disable, and get operations

Test Plan:
- Build code: Pass
- Function check: Pass
Summary:
- Enable UBC sensor polling

Test Plan:
- Build code: Pass
Summary:
 - Version commit for 2026.14.01.

Test Plan:
 - Build code: Pass
 - Function check: 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 Apr 10, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync bot commented Apr 10, 2026

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D100288279. (Because this pull request was imported automatically, there will not be any future comments.)

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.

1 participant