Skip to content

minerva-ag: Support i2c telemetry command and support fru product custom data and modify bootstrap command with setting hex-value #2261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

LisaChang-Quanta
Copy link
Contributor

@LisaChang-Quanta LisaChang-Quanta commented Mar 7, 2025

Summary:

  • Support i2c telemetry command
  • Support reg: 0x00 ~ 0x05
  • Support part of reg: 0x06
  • Add comment on i2c_target_config: rd_data_collect_func
  • Support fru product custom data
  • Support i2c telemetry write command
  • Support reg: 0x08 ~ 0x76
  • modify bootstrap command with setting hex-value
  • modify_telemetry_with_bootstrap_command, reg:0x09
  • modify telemetry offset 0x08 format
  • Support i2c telemetry i2c bridge master write/read command
  • Support reg: 0x40 ~ 0x42
  • Modify bootstrap default value
  • base on cpld version: 0070d010
  • change: SOC_BOOT_SOURCE_0_4, S_OWL_BOOT_SOURCE_0_7, N_OWL_BOOT_SOURCE_0_7
  • Support telemetry control sensor polling command
  • Support reg: 0xF0

Test Plan:

  • Build code: 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 Mar 7, 2025
@facebook-github-bot
Copy link
Contributor

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

ARG_UNUSED(args);

update_sensor_data_0_2_table();

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we aren't updating the other sensors?

Comment on lines 93 to 95
plat_sensor_init_data_0_1 *sensor_init_data_0_1_table[2] = { NULL };
plat_sensor_init_data_0_2 *sensor_init_data_0_2_table[4] = { NULL };
plat_sensor_init_data_0_6 *sensor_init_data_0_6_table[1] = { NULL };
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the rationale for using malloc instead of making this statically assigned?


void init_sensor_data_0_1_table()
{
for (int reg_offset = 0; reg_offset < 2; reg_offset++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

For all of these for loops, that use reg_offset, it's not clear that you are going through all the elements in the corresponding array. Can we create variables/constants to make the relationship clear?

#define DATA_0_1_TABLE_LENGTH 2
plat_sensor_init_data_0_1 *sensor_init_data_0_1_table[DATA_0_1_TABLE_LENGTH] = ...
for (int reg_offset = 0; reg_offset < DATA_0_1_TABLE_LENGTH; reg_offset++) {

{
for (int reg_offset = 0; reg_offset < 2; reg_offset++) {
// Calculate num_idx
int num_idx = (PLAT_SENSOR_NUM_MAX - 1) - (248 * reg_offset);
Copy link
Contributor

Choose a reason for hiding this comment

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

What is 248 and can we make a variable/constant for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I use #define on it.

void init_sensor_data_0_2_table()
{
for (int reg_offset = 0; reg_offset < 4; reg_offset++) {
int num_idx = (PLAT_SENSOR_NUM_MAX - 1) - (50 * reg_offset);
Copy link
Contributor

Choose a reason for hiding this comment

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

similar question on the 50 here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I use #define on it.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from f463798 to 065f5fe Compare March 18, 2025 06:05
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 76eac5f to 19b97ad Compare March 18, 2025 06:46
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 19b97ad to 941775f Compare March 24, 2025 14:12
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta changed the title minerva-ag: Support i2c telemetry command minerva-ag: Support i2c telemetry command and support fru product custom data and modify bootstrap command with setting hex-value Mar 24, 2025
@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 941775f to 38df263 Compare March 31, 2025 06:59
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 38df263 to 46128dc Compare March 31, 2025 08:41
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 46128dc to 1652cff Compare April 1, 2025 11:59
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from c5d8282 to 2e97c0a Compare April 10, 2025 05:33
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 2e97c0a to b0e8906 Compare April 10, 2025 05:37
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from b0e8906 to 78044a9 Compare April 11, 2025 01:44
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 78044a9 to 6fe2a0d Compare April 16, 2025 02:40
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

Copy link

@Prabha-Veerubhotla Prabha-Veerubhotla left a comment

Choose a reason for hiding this comment

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

@LisaChang-Quanta please fix failing checks and rebase

@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 6fe2a0d to 902cb7a Compare April 22, 2025 01:29
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

Copy link

@Prabha-Veerubhotla Prabha-Veerubhotla left a comment

Choose a reason for hiding this comment

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

@LisaChang-Quanta one of the checks are still failing. Please fix.

Summary:
- Support i2c telemetry command
- Support reg: 0x00 ~ 0x05
- Support part of reg: 0x06
- Add comment on i2c_target_config: rd_data_collect_func

Test Plan:
- Build code: PASS
…ommand

Summary:
- Support fru product custom data
- Support i2c telemetry write command
- Support reg: 0x08 ~ 0x76

Test Plan:
- Build code: PASS
Summary:
- Support i2c telemetry i2c bridge master write/read command
- Support reg: 0x40 ~ 0x42

Test Plan:
- Build code: PASS
Summary:
- Modify bootstrap default value
- base on cpld version: 0070d010
- change: SOC_BOOT_SOURCE_0_4, S_OWL_BOOT_SOURCE_0_7, N_OWL_BOOT_SOURCE_0_7

Test Plan:
- Build code: PASS
Summary:
- Support telemetry control sensor polling command
- Support reg: 0xF0

Test Plan:
- Build code: PASS
@LisaChang-Quanta LisaChang-Quanta force-pushed the minerva-ag/support_i2c_telemetry_command branch from 5234cab to 073435d Compare April 28, 2025 01:28
@facebook-github-bot
Copy link
Contributor

@LisaChang-Quanta has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 63af749.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants