diff options
-rw-r--r-- | board/asurada/board.c | 31 | ||||
-rw-r--r-- | board/asurada/board.h | 19 | ||||
-rw-r--r-- | board/asurada/build.mk | 2 | ||||
-rw-r--r-- | board/asurada/gpio.inc | 4 |
4 files changed, 6 insertions, 50 deletions
diff --git a/board/asurada/board.c b/board/asurada/board.c index 5aeaafbeea..595dcf4330 100644 --- a/board/asurada/board.c +++ b/board/asurada/board.c @@ -149,9 +149,6 @@ static void board_init(void) /* Enable motion sensor interrupt */ gpio_enable_interrupt(GPIO_BASE_IMU_INT_L); gpio_enable_interrupt(GPIO_LID_ACCEL_INT_L); - - /* Enable it5205h sbu ovp interrupt */ - gpio_enable_interrupt(GPIO_USB_C0_MUX_INT_L); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); @@ -171,38 +168,14 @@ DECLARE_HOOK(HOOK_INIT, board_tcpc_init, HOOK_PRIO_INIT_I2C + 1); /* ADC channels. Must be in the exactly same order as in enum adc_channel. */ const struct adc_t adc_channels[] = { /* Convert to mV (3000mV/1024). */ - {"TEMP_SENSOR_SUBPMIC", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, - CHIP_ADC_CH0}, + {"VBUS", ADC_MAX_MVOLT * 10, ADC_READ_MAX + 1, 0, CHIP_ADC_CH0}, {"BOARD_ID_0", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, CHIP_ADC_CH1}, {"BOARD_ID_1", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, CHIP_ADC_CH2}, - {"TEMP_SENSOR_AMB", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, CHIP_ADC_CH3}, - {"TEMP_SENSOR_CHARGER", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, - CHIP_ADC_CH5}, + {"CHARGER_AMON_R", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, CHIP_ADC_CH3}, {"CHARGER_PMON", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, CHIP_ADC_CH6}, - {"TEMP_SENSOR_AP", ADC_MAX_MVOLT, ADC_READ_MAX + 1, 0, CHIP_ADC_CH7}, }; BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); -const struct temp_sensor_t temp_sensors[] = { - [TEMP_SENSOR_SUBPMIC] = {.name = "SubPMIC", - .type = TEMP_SENSOR_TYPE_BOARD, - .read = get_temp_3v3_51k1_47k_4050b, - .idx = ADC_TEMP_SENSOR_SUBPMIC}, - [TEMP_SENSOR_AMB] = {.name = "Ambient", - .type = TEMP_SENSOR_TYPE_BOARD, - .read = get_temp_3v3_51k1_47k_4050b, - .idx = ADC_TEMP_SENSOR_AMB}, - [TEMP_SENSOR_CHARGER] = {.name = "Charger", - .type = TEMP_SENSOR_TYPE_BOARD, - .read = get_temp_3v3_51k1_47k_4050b, - .idx = ADC_TEMP_SENSOR_CHARGER}, - [TEMP_SENSOR_AP] = {.name = "AP", - .type = TEMP_SENSOR_TYPE_CPU, - .read = get_temp_3v3_51k1_47k_4050b, - .idx = ADC_TEMP_SENSOR_AP}, -}; -BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); - /* BC12 */ const struct mt6360_config_t mt6360_config = { .i2c_port = 0, diff --git a/board/asurada/board.h b/board/asurada/board.h index 09c1da2d23..af2149f929 100644 --- a/board/asurada/board.h +++ b/board/asurada/board.h @@ -122,7 +122,6 @@ #define CONFIG_USB_PD_TCPM_TCPCI #define CONFIG_USB_PD_TRY_SRC #define CONFIG_USB_PD_VBUS_DETECT_PPC -#define CONFIG_USB_PD_VBUS_MEASURE_CHARGER #define CONFIG_USB_PID 0x5566 /* TODO: update PID */ #define CONFIG_USB_POWER_DELIVERY @@ -170,10 +169,6 @@ #define CONFIG_MAG_BMI_BMM150 #define CONFIG_MAG_CALIBRATE -#define CONFIG_STEINHART_HART_3V3_51K1_47K_4050B -#define CONFIG_TEMP_SENSOR -#define CONFIG_THERMISTOR - #define ALS_COUNT 1 #define CONFIG_ALS_TCS3400 #define CONFIG_ALS_TCS3400_INT_EVENT \ @@ -239,13 +234,11 @@ enum pwm_channel { }; enum adc_channel { - ADC_TEMP_SENSOR_SUBPMIC, /* ADC 0 */ + ADC_VBUS, /* ADC 0 */ ADC_BOARD_ID_0, /* ADC 1 */ ADC_BOARD_ID_1, /* ADC 2 */ - ADC_TEMP_SENSOR_AMB, /* ADC 3 */ - ADC_TEMP_SENSOR_CHARGER, /* ADC 5 */ + ADC_CHARGER_AMON_R, /* ADC 3 */ ADC_CHARGER_PMON, /* ADC 6 */ - ADC_TEMP_SENSOR_AP, /* ADC 7 */ /* Number of ADC channels */ ADC_CH_COUNT, @@ -276,14 +269,6 @@ enum sensor_id { SENSOR_COUNT, }; -enum temp_sensor_id { - TEMP_SENSOR_SUBPMIC, - TEMP_SENSOR_AMB, - TEMP_SENSOR_CHARGER, - TEMP_SENSOR_AP, - TEMP_SENSOR_COUNT -}; - void board_reset_pd_mcu(void); int board_get_version(void); diff --git a/board/asurada/build.mk b/board/asurada/build.mk index 8c069e29bc..33f069093d 100644 --- a/board/asurada/build.mk +++ b/board/asurada/build.mk @@ -10,4 +10,4 @@ CHIP:=it83xx CHIP_FAMILY:=it8xxx2 CHIP_VARIANT:=it81202ax_1024 -board-y=battery.o board.o board_id.o it5205_sbu.o led.o usb_pd_policy.o +board-y=battery.o board.o board_id.o led.o usb_pd_policy.o diff --git a/board/asurada/gpio.inc b/board/asurada/gpio.inc index fe9b30347a..31f345db50 100644 --- a/board/asurada/gpio.inc +++ b/board/asurada/gpio.inc @@ -60,8 +60,6 @@ GPIO_INT(WP, PIN(I, 4), GPIO_INT_BOTH, GPIO_INT(SPI0_CS, PIN(M, 5), GPIO_INT_FALLING, spi_event) /* SPI slave Chip Select -- AP_SPI_EC_CS_L */ GPIO_INT(X_EC_GPIO2, PIN(B, 2), GPIO_ODR_HIGH, x_ec_interrupt) -GPIO_INT(USB_C0_MUX_INT_L, PIN(M, 3), GPIO_INT_FALLING | GPIO_PULL_UP, - it5205h_sbu_interrupt) /* Power Sequencing Signals */ GPIO(EC_PMIC_EN_ODL, PIN(D, 0), GPIO_ODR_HIGH | GPIO_SEL_1P8V) @@ -123,7 +121,7 @@ ALTERNATE(PIN_MASK(B, 0x03), 1, MODULE_UART, 0) /* EC to Servo */ ALTERNATE(PIN_MASK(A, 0x07), 1, MODULE_PWM, 0) /* PWM 0~2 */ /* ADC */ -ALTERNATE(PIN_MASK(I, 0xEF), 0, MODULE_ADC, 0) /* ADC 0,1,2,3,5,6,7 */ +ALTERNATE(PIN_MASK(I, 0x4F), 0, MODULE_ADC, 0) /* ADC 0,1,2,3,6 */ /* SPI */ ALTERNATE(PIN_MASK(M, 0x33), 0, MODULE_SPI, 0) /* SPI */ |