Skip to content

sb: sitv3: Initial Bring-Up for SantaBarbara SITV3 Platform#2433

Closed
S-J-Tang wants to merge 4 commits into
facebook:mainfrom
S-J-Tang:main
Closed

sb: sitv3: Initial Bring-Up for SantaBarbara SITV3 Platform#2433
S-J-Tang wants to merge 4 commits into
facebook:mainfrom
S-J-Tang:main

Conversation

@S-J-Tang

@S-J-Tang S-J-Tang commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces the initial code bring-up for the SantaBarbara SITV3 platform.

Included are 3 commits:

  1. Initial SITV3 platform code
    Commit: a741bad
    Summary:

    • Add initial project directory under meta-facebook/sb-rb/
    • Support for VR and temperature sensor polling
    • Include common driver support (ADS7830)
      Test Plan:
    • Build code: Pass
  2. Enable MCTP communication with BMC via I3C
    Commit: 00d5dd9
    Summary:

    • Configure I3C overlay and GPIO/I2C settings
    • Implement platform I3C-to-BMC communication
      Test Plan:
    • Build code: Pass
    • Communicate with BMC correctly
  3. Enable PLDM firmware update support
    Commit: f85168b
    Summary:

    • Support BIC/VR firmware updates via PLDM
    • Add hotjoin request on reboot
    • Version: 2025.26.01
      Test Plan:
    • Build code: Pass
    • The BIC FW update function works normally
    • Check BIC version: Pass
@facebook-github-bot facebook-github-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 Jul 3, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

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

@S-J-Tang S-J-Tang changed the title Initial Bring-Up for SantaBarbara SITV3 Platform Jul 3, 2025
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@S-J-Tang has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@S-J-Tang has updated the pull request. You must reimport the pull request before landing.

adamHSU and others added 3 commits July 3, 2025 15:43
Summary:
- Initialize SantaBrabara SITV3 BIC
- Add project code in meta-facebook/sb-rb/
- Add sensor polling function for vr and temp sensor
- Add ads7830 to common code

Test Plan:
- Build code: Pass
Summary:
- Add platform function to communicate with BMC through I3C
- Modify overlay for I3C
- Modify sitv3 gpio and i2c config

Test Plan:
- Build code: Pass
- Communicate with BMC correctly
Summary:
- Enable PLDM BIC and VR FW update function
- Add function to request hotjoin while reboot
- Version Commit for 2025.26.01

Test Plan:
- Build code: Pass
- The BIC FW update function works normally
- Check BIC version: Pass
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@S-J-Tang has updated the pull request. You must reimport the pull request before landing.

Comment on lines +165 to +168
// for (uint8_t i = 0; i < ARRAY_SIZE(smbus_port); i++) {
// mctp_port *p = smbus_port + i;
// LOG_DBG("smbus port %d", i);
// LOG_DBG("bus = %x, addr = %x", p->conf.smbus_conf.bus, p->conf.smbus_conf.addr);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this commented out? can we delete it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to a missed deletion. The implementation was already removed in the latest commit — thanks for checking!

Comment on lines +83 to +85
// { SENSOR_NUM_ON_DIE_1_TEMP_C, ON_DIE_1_TEMP_EMC1413_ADDR, EMC1413_REMOTE_TEMPERATRUE_1 },
// { SENSOR_NUM_ON_DIE_2_TEMP_C, ON_DIE_2_TEMP_EMC1413_ADDR, EMC1413_REMOTE_TEMPERATRUE_2 },
// { SENSOR_NUM_ON_DIE_3_TEMP_C, ON_DIE_3_TEMP_EMC1413_ADDR, EMC1413_REMOTE_TEMPERATRUE_1 },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines +2557 to +2558
// uint8_t addr;
// uint16_t offset;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment on lines +148 to +160
// if (argc != 1) {
// shell_warn(shell, "Help: test get_fw_version cpld");
// return;
// }

// uint8_t data[4] = { 0 };
// uint32_t version = 0;
// if (!plat_i2c_read(I2C_BUS5, AEGIS_CPLD_ADDR, 0x44, data, 4)) {
// LOG_ERR("Failed to read cpld version from cpld");
// return;
// }
// version = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
// shell_print(shell, "The cpld version: %08x", version);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this missing an actual implementation?

@S-J-Tang S-J-Tang Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is due to a missed deletion. The implementation was already removed in the latest commit — thanks for checking!

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@S-J-Tang has updated the pull request. You must reimport the pull request before landing.

@jamesatha jamesatha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is at least one more spot of commented out code

#include "plat_sensor_polling_shell.h"
#include "plat_pldm_fw_version_shell.h"

/*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file necessary?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is necessary for managing the platform's shell and for future testing use.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted this file in the latest commit. Thanks!

@jagpalgill

Copy link
Copy Markdown

@S-J-Tang For future, please raise the diffs as individual commits so they are easier to review. Thanks

0x0000, //uint16_t entity_type; //Need to check
0x0002, //uint16_t entity_instance_number;
0x0000, //uint16_t container_id;
0x00, //uint8_t sensor_init; //Need to check

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@S-J-Tang There are lots of "Need to check" comments in the files. What's the plan for these?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the "Need to check" comments in the latest commit. They were originally added as reminders, but they’re no longer needed at this stage. Thanks!

#include "plat_isr.h"
#include "plat_i2c.h"

// #define AEGIS_CPLD_ADDR (0x4C >> 1)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@S-J-Tang Please delete any commented out code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that. I’ve reviewed the code again and removed the unused code.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@S-J-Tang has updated the pull request. You must reimport the pull request before landing.

/*** numeric sensor format ***/
0x0000, // uint16_t PLDM_terminus_handle;
SENSOR_NUM_ADC_P12V_SCALED, // uint16_t sensor_id;
0x0000, // uint16_t entity_type; // Need to check

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@S-J-Tang I still see 73 occurrences of "Need to check" in you patch. Are these needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing it out. I’ve double-checked and fixed them.

Summary:
- Remove unused code to improve maintainability.
- Version Commit for 2025.26.01

Test Plan:
- Build code: Pass
- Check BIC version: Pass
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@S-J-Tang has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request has been merged in cc3e152.

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. Merged

4 participants