Skip to content

Commit

Permalink
Fby3.5 hd support bom3 sensor (#468)
Browse files Browse the repository at this point in the history
Summary:
- Support VR sensor MP2856GUT
- Add the sensor config table of 3rd source sensor, replace sensor talbe to it if board revision is SYS_BOARD_EVT_BOM3.

Dependency: #467

Pull Request resolved: #468

Test Plan:
- Build Code: Pass

Known issue:
- Pout reading for MP2856GUT is larger than expected, still checking with FAE.

Log:
Third source boar
```
root@bmc-oob:~# sensor-util slot1
...
HSC Temp                     (0xE) :   47.12 C     | (ok)
CPU0 VR Temp                 (0xF) :   49.00 C     | (ok)
SOC VR Temp                  (0x10) :   51.00 C     | (ok)
CPU1 VR Temp                 (0x11) :   34.00 C     | (ok)
PVDDIO VR Temp               (0x12) :   34.00 C     | (ok)
PVDD11 VR Temp               (0x13) :   31.00 C     | (ok)
P12V_STBY Vol                (0x14) :   12.00 Volts | (ok)
PVDD18_S5 Vol                (0x15) :    1.81 Volts | (ok)
P3V3_STBY Vol                (0x16) :    3.30 Volts | (ok)
PVDD11_S3 Vol                (0x17) :    1.10 Volts | (ok)
P3V_BAT Vol                  (0x18) :    3.08 Volts | (ok)
PVDD33 (8abd13595b91e80483a23f1f1a3af919a502a536)_S5 Vol                (0x19) :    3.31 Volts | (ok)
P5V_STBY Vol                 (0x1A) :    4.99 Volts | (ok)
P12V_MEM_1 Vol               (0x1B) :   12.05 Volts | (ok)
P12V_MEM_0 Vol               (0x1C) :   12.03 Volts | (ok)
P1V2_STBY Vol                (0x1D) :    1.20 Volts | (ok)
P3V3_M2 Vol                  (0x1E) :    3.31 Volts | (ok)
P1V8_STBY Vol                (0x1F) :    1.81 Volts | (ok)
HSC Input Vol                (0x20) :   12.05 Volts | (ok)
CPU0 VR Vol                  (0x21) :    0.92 Volts | (ok)
SOC VR Vol                   (0x22) :    1.19 Volts | (ok)
CPU1 VR Vol                  (0x23) :    0.93 Volts | (ok)
PVDDIO VR Vol                (0x24) :    1.10 Volts | (ok)
PVDD11 VR Vol                (0x25) :    1.10 Volts | (ok)
HSC Output Cur               (0x26) :   12.75 Amps  | (ok)
CPU0 VR Cur                  (0x27) :   12.75 Amps  | (ok)
SOC VR Cur                   (0x28) :   59.75 Amps  | (ok)
CPU1 VR Cur                  (0x29) :   16.75 Amps  | (ok)
PVDDIO VR Cur                (0x2A) :   31.75 Amps  | (ok)
PVDD11 VR Cur                (0x2B) :    3.25 Amps  | (ok)
HSC Input Pwr                (0x2C) :  155.15 Watts | (ok)
CPU0 VR Pwr                  (0x2D) :   96.00 Watts | (ok)
SOC VR Pwr                   (0x2E) :  568.00 Watts | (ucr)
CPU1 VR Pwr                  (0x2F) :  120.00 Watts | (ok)
PVDDIO VR Pwr                (0x30) :  280.00 Watts | (ucr)
PVDD11 VR Pwr                (0x31) :   32.00 Watts | (ok)
...
```

Reviewed By: garnermic

Differential Revision: D38518270

Pulled By: GoldenBug

fbshipit-source-id: 15483ab462188061fca94e564f422fccd734fd6d
  • Loading branch information
Yi-Shum authored and facebook-github-bot committed Aug 12, 2022
1 parent 156611f commit 47ee82d
Show file tree
Hide file tree
Showing 9 changed files with 238 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/dev/apml_mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void dimm_temp_write(apml_msg *msg)
cfg->cache_status = SENSOR_UNSPECIFIED_ERROR;
return;
}

if (temp < *TS0_temp) {
temp = *TS0_temp;
}
Expand Down
77 changes: 77 additions & 0 deletions common/dev/mp2856gut.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#include <stdio.h>
#include <string.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "util_pmbus.h"

#define MFR_VR_CONFIG2_VOUT_MODE_BIT BIT(11)
#define MFR_VR_CONFIG2 0x5E

uint8_t mp2856gut_read(uint8_t sensor_num, int *reading)
{
if (reading == NULL || (sensor_num > SENSOR_NUM_MAX)) {
return SENSOR_UNSPECIFIED_ERROR;
}

uint8_t retry = 5;
sensor_val *sval = (sensor_val *)reading;
I2C_MSG msg;
memset(sval, 0, sizeof(sensor_val));
sensor_cfg *cfg = &sensor_config[sensor_config_index_map[sensor_num]];

msg.bus = cfg->port;
msg.target_addr = cfg->target_addr;
msg.tx_len = 1;
msg.rx_len = 2;
msg.data[0] = cfg->offset;

if (i2c_master_read(&msg, retry)) {
return SENSOR_FAIL_TO_ACCESS;
}

float val;
if (cfg->offset == PMBUS_READ_VOUT) {
val = (msg.data[1] << 8) | msg.data[0];

msg.bus = cfg->port;
msg.target_addr = cfg->target_addr;
msg.tx_len = 1;
msg.rx_len = 2;
msg.data[0] = MFR_VR_CONFIG2;

if (i2c_master_read(&msg, retry)) {
return SENSOR_FAIL_TO_ACCESS;
}

uint16_t mfg_vr_config2_data = (msg.data[1] << 8) | msg.data[0];
bool vout_mode = mfg_vr_config2_data && MFR_VR_CONFIG2_VOUT_MODE_BIT;

if (vout_mode) {
val *= 0.00390625;
} else {
val *= 0.005;
}
} else if (cfg->offset == PMBUS_READ_IOUT || cfg->offset == PMBUS_READ_POUT) {
uint16_t read_value = (msg.data[1] << 8) | msg.data[0];
val = slinear11_to_float(read_value);
} else if (cfg->offset == PMBUS_READ_TEMPERATURE_1) {
val = msg.data[0];
} else {
return SENSOR_FAIL_TO_ACCESS;
}
sval->integer = val;
sval->fraction = (val - sval->integer) * 1000;

return SENSOR_READ_SUCCESS;
}

uint8_t mp2856gut_init(uint8_t sensor_num)
{
if (sensor_num > SENSOR_NUM_MAX) {
return SENSOR_INIT_UNSPECIFIED_ERROR;
}

sensor_config[sensor_config_index_map[sensor_num]].read = mp2856gut_read;
return SENSOR_INIT_SUCCESS;
}
2 changes: 2 additions & 0 deletions common/service/sensor/sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ SENSOR_DRIVE_INIT_DECLARE(apml_mailbox);
#endif
SENSOR_DRIVE_INIT_DECLARE(xdpe19283b);
SENSOR_DRIVE_INIT_DECLARE(g788p81u);
SENSOR_DRIVE_INIT_DECLARE(mp2856gut);

struct sensor_drive_api {
enum SENSOR_DEV dev;
Expand Down Expand Up @@ -108,6 +109,7 @@ struct sensor_drive_api {
#endif
SENSOR_DRIVE_TYPE_INIT_MAP(xdpe19283b),
SENSOR_DRIVE_TYPE_INIT_MAP(g788p81u),
SENSOR_DRIVE_TYPE_INIT_MAP(mp2856gut),
};

static void init_sensor_num(void)
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 @@ -95,6 +95,7 @@ enum SENSOR_DEV {
sensor_dev_apml_mailbox = 0x19,
sensor_dev_xdpe19283b = 0x1A,
sensor_dev_g788p81u = 0x1B,
sensor_dev_mp2856gut = 0x1C,
sensor_dev_max
};

Expand Down
1 change: 1 addition & 0 deletions common/shell/shell_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const char *const sensor_type_name[] = {
sensor_name_to_num(nct7718w) sensor_name_to_num(ltc4286)
sensor_name_to_num(amd_tsi) sensor_name_to_num(apml_mailbox)
sensor_name_to_num(xdpe19283b) sensor_name_to_num(g788p81u)
sensor_name_to_num(mp2856gut)
};

const char *const sensor_status_name[] = {
Expand Down
48 changes: 47 additions & 1 deletion meta-facebook/yv35-hd/src/platform/plat_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#define I2C_DATA_SIZE 5
#define NUMBER_OF_ADC_CHANNEL 16
#define AST1030_ADC_BASE_ADDR 0x7e6e9000
#define ILIM_ADJUST_DEFAULT 0b001
#define ILIM_ADJUST_2OU_EXP 0b011

static uint8_t system_class = SYS_CLASS_1;
static uint8_t board_revision = 0x3F;
Expand Down Expand Up @@ -275,7 +277,7 @@ void init_platform_config()
break;
}
}
if ((cnt == ARRAY_SIZE(_1ou_card_mapping_table))) {
if (cnt == ARRAY_SIZE(_1ou_card_mapping_table)) {
printf("Unknown the 1OU card type, the voltage of ADC channel-6 is %fV\n",
voltage);
} else if (_1ou_status.card_type == TYPE_1OU_RAINBOW_FALLS) {
Expand Down Expand Up @@ -337,5 +339,49 @@ void init_platform_config()
}
}

/* Set HSC OCP */
uint8_t ilim_adjust = ILIM_ADJUST_DEFAULT;
if (_2ou_status.present) {
if (hsc_module == HSC_MODULE_ADM1278) {
gpio_set(HSC_OCP_GPIO1_R, GPIO_LOW);
gpio_set(HSC_OCP_GPIO2_R, GPIO_LOW);
gpio_set(HSC_OCP_GPIO3_R, GPIO_HIGH);
} else if (hsc_module == HSC_MODULE_LTC4282) {
ilim_adjust = ILIM_ADJUST_2OU_EXP;
} else {
printf("Unsupported HSC module %d\n", hsc_module);
}
} else if ((!_1ou_status.present && !_2ou_status.present) ||
(_1ou_status.present && (_1ou_status.card_type == TYPE_1OU_RAINBOW_FALLS))) {
printf("Default HSC OCP setting\n");
} else {
printf("Unsupported configuration, 1ou card type %d\n", _1ou_status.card_type);
}

if (hsc_module == HSC_MODULE_LTC4282) {
uint8_t ilim_register_data = 0;

tx_len = 1;
rx_len = 1;
memset(data, 0, I2C_DATA_SIZE);
data[0] = LTC4282_ILIM_ADJUST_OFFSET;
i2c_msg = construct_i2c_message(I2C_BUS5, LTC4282_ADDR, tx_len, data, rx_len);
if (!i2c_master_read(&i2c_msg, retry)) {
ilim_register_data = i2c_msg.data[0];
} else {
printf("Failed to read ILIM_ADJUST from LTC4282\n");
}
/* Set OCP by writing ilim_adjust to bits[7:5] */
tx_len = 2;
rx_len = 0;
memset(data, 0, I2C_DATA_SIZE);
data[0] = LTC4282_ILIM_ADJUST_OFFSET;
data[1] = (ilim_register_data & 0x1f) | ((ilim_adjust << 5) & 0xe0);
i2c_msg = construct_i2c_message(I2C_BUS5, LTC4282_ADDR, tx_len, data, rx_len);
if (i2c_master_write(&i2c_msg, retry)) {
printf("Failed to set ILIM_ADJUST to LTC4282\n");
}
}

SAFE_FREE(data);
}
3 changes: 2 additions & 1 deletion meta-facebook/yv35-hd/src/platform/plat_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ GPIO_CFG plat_gpio_cfg[] = {
{ CHIP_GPIO, 5, DISABLE, DISABLE, GPIO_INPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 6, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE,
NULL },
{ CHIP_GPIO, 7, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_LOW, PUSH_PULL, GPIO_INT_DISABLE, NULL },
{ CHIP_GPIO, 7, ENABLE, DISABLE, GPIO_OUTPUT, GPIO_HIGH, PUSH_PULL, GPIO_INT_DISABLE,
NULL },

/** Group B: 08-15 **/
{ CHIP_GPIO, 8, ENABLE, DISABLE, GPIO_INPUT, GPIO_HIGH, OPEN_DRAIN, GPIO_INT_DISABLE,
Expand Down
101 changes: 101 additions & 0 deletions meta-facebook/yv35-hd/src/platform/plat_sensor_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,101 @@ sensor_cfg EVT_BOM2_sensor_config_table[] = {
NULL, NULL },
};

sensor_cfg EVT_BOM3_sensor_config_table[] = {
/* HSC temperature sensor */
{ SENSOR_NUM_TEMP_HSC, sensor_dev_g788p81u, I2C_BUS5, TEMP_HSC_ADDR,
G788P81U_REMOTE_TEMP_OFFSET, stby_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, NULL, NULL, NULL, NULL, NULL },

/* VR voltage */
{ SENSOR_NUM_VOL_PVDDCR_CPU0_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_CPU0_ADDR,
PMBUS_READ_VOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },
{ SENSOR_NUM_VOL_PVDDCR_SOC_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_SOC_ADDR,
PMBUS_READ_VOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_VOL_PVDDCR_CPU1_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_CPU1_ADDR,
PMBUS_READ_VOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },
{ SENSOR_NUM_VOL_PVDDIO_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDIO_ADDR,
PMBUS_READ_VOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_VOL_PVDD11_S3_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDD11_S3_ADDR,
PMBUS_READ_VOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },

/* VR current */
{ SENSOR_NUM_CUR_PVDDCR_CPU0_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_CPU0_ADDR,
PMBUS_READ_IOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },
{ SENSOR_NUM_CUR_PVDDCR_SOC_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_SOC_ADDR,
PMBUS_READ_IOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_CUR_PVDDCR_CPU1_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_CPU1_ADDR,
PMBUS_READ_IOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },
{ SENSOR_NUM_CUR_PVDDIO_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDIO_ADDR,
PMBUS_READ_IOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_CUR_PVDD11_S3_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDD11_S3_ADDR,
PMBUS_READ_IOUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },

/* VR temperature */
{ SENSOR_NUM_TEMP_PVDDCR_CPU0_VR, sensor_dev_mp2856gut, I2C_BUS5,
MP2856GUT_PVDDCR_CPU0_ADDR, PMBUS_READ_TEMPERATURE_1, vr_access, 0, 0,
SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT, ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS,
pre_vr_read, &vr_pre_read_args[0], NULL, NULL, NULL },
{ SENSOR_NUM_TEMP_PVDDCR_SOC_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_SOC_ADDR,
PMBUS_READ_TEMPERATURE_1, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_TEMP_PVDDCR_CPU1_VR, sensor_dev_mp2856gut, I2C_BUS5,
MP2856GUT_PVDDCR_CPU1_ADDR, PMBUS_READ_TEMPERATURE_1, vr_access, 0, 0,
SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT, ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS,
pre_vr_read, &vr_pre_read_args[0], NULL, NULL, NULL },
{ SENSOR_NUM_TEMP_PVDDIO_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDIO_ADDR,
PMBUS_READ_TEMPERATURE_1, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_TEMP_PVDD11_S3_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDD11_S3_ADDR,
PMBUS_READ_TEMPERATURE_1, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },

/* VR power */
{ SENSOR_NUM_PWR_PVDDCR_CPU0_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_CPU0_ADDR,
PMBUS_READ_POUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },
{ SENSOR_NUM_PWR_PVDDCR_SOC_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_SOC_ADDR,
PMBUS_READ_POUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_PWR_PVDDCR_CPU1_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDCR_CPU1_ADDR,
PMBUS_READ_POUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },
{ SENSOR_NUM_PWR_PVDDIO_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDDIO_ADDR,
PMBUS_READ_POUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[1], NULL,
NULL, NULL },
{ SENSOR_NUM_PWR_PVDD11_S3_VR, sensor_dev_mp2856gut, I2C_BUS5, MP2856GUT_PVDD11_S3_ADDR,
PMBUS_READ_POUT, vr_access, 0, 0, SAMPLE_COUNT_DEFAULT, POLL_TIME_DEFAULT,
ENABLE_SENSOR_POLLING, 0, SENSOR_INIT_STATUS, pre_vr_read, &vr_pre_read_args[0], NULL,
NULL, NULL },
};

void pal_extend_sensor_config()
{
uint8_t sensor_count = 0;
Expand Down Expand Up @@ -391,6 +486,12 @@ void pal_extend_sensor_config()
add_sensor_config(EVT_BOM2_sensor_config_table[index]);
}
break;
case SYS_BOARD_EVT_BOM3:
sensor_count = ARRAY_SIZE(EVT_BOM3_sensor_config_table);
for (int index = 0; index < sensor_count; index++) {
add_sensor_config(EVT_BOM3_sensor_config_table[index]);
}
break;
default:
break;
}
Expand Down
6 changes: 6 additions & 0 deletions meta-facebook/yv35-hd/src/platform/plat_sensor_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
#define XDPE19283B_PVDDIO_ADDR 0x66
#define XDPE19283B_PVDD11_S3_ADDR 0x68

#define MP2856GUT_PVDDCR_CPU0_ADDR 0x4F
#define MP2856GUT_PVDDCR_SOC_ADDR 0x4F
#define MP2856GUT_PVDDCR_CPU1_ADDR 0x4E
#define MP2856GUT_PVDDIO_ADDR 0x4E
#define MP2856GUT_PVDD11_S3_ADDR 0x4B

#define ADM1278_ADDR (0x80 >> 1)
#define LTC4282_ADDR (0x82 >> 1)
#define TEMP_HSC_ADDR (0x98 >> 1)
Expand Down

0 comments on commit 47ee82d

Please sign in to comment.