diff options
Diffstat (limited to 'board/bugzzy/board.h')
-rw-r--r-- | board/bugzzy/board.h | 89 |
1 files changed, 43 insertions, 46 deletions
diff --git a/board/bugzzy/board.h b/board/bugzzy/board.h index 722375b34b..707314d02a 100644 --- a/board/bugzzy/board.h +++ b/board/bugzzy/board.h @@ -1,4 +1,4 @@ -/* Copyright 2021 The Chromium OS Authors. All rights reserved. +/* Copyright 2021 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -32,12 +32,15 @@ /* Charger */ #define CONFIG_CHARGER_RAA489000 +#define PD_MAX_VOLTAGE_MV 20000 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 #define CONFIG_CHARGER_SENSE_RESISTOR 10 -#define CONFIG_OCPC_DEF_RBATT_MOHMS 22 /* R_DS(on) 11.6mOhm + 10mOhm sns rstr */ +#define CONFIG_OCPC_DEF_RBATT_MOHMS \ + 22 /* R_DS(on) 11.6mOhm + 10mOhm sns rstr \ + */ #define CONFIG_OCPC #define CONFIG_CHARGE_RAMP_HW -#undef CONFIG_CHARGER_SINGLE_CHIP +#undef CONFIG_CHARGER_SINGLE_CHIP #undef CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE #define CONFIG_USB_PD_TCPC_LPM_EXIT_DEBOUNCE (100 * MSEC) #define CONFIG_BATTERY_CHECK_CHARGE_TEMP_LIMITS @@ -60,9 +63,8 @@ #define GPIO_BAT_LED_GREEN_L GPIO_LED_G_ODL #define GPIO_PWR_LED_BLUE_L GPIO_LED_B_ODL - /* PWM */ -#define NPCX7_PWM1_SEL 0 /* GPIO C2 is not used as PWM1. */ +#define NPCX7_PWM1_SEL 0 /* GPIO C2 is not used as PWM1. */ /* Thermistors */ #define CONFIG_TEMP_SENSOR @@ -97,23 +99,23 @@ #undef PD_POWER_SUPPLY_TURN_OFF_DELAY #undef CONFIG_USBC_VCONN_SWAP_DELAY_US /* 20% margin added for these timings */ -#define PD_POWER_SUPPLY_TURN_ON_DELAY 13080 /* us */ -#define PD_POWER_SUPPLY_TURN_OFF_DELAY 16080 /* us */ +#define PD_POWER_SUPPLY_TURN_ON_DELAY 13080 /* us */ +#define PD_POWER_SUPPLY_TURN_OFF_DELAY 16080 /* us */ #undef CONFIG_USBC_VCONN_SWAP_DELAY_US -#define CONFIG_USBC_VCONN_SWAP_DELAY_US 787 /* us */ +#define CONFIG_USBC_VCONN_SWAP_DELAY_US 787 /* us */ /* I2C configuration */ -#define I2C_PORT_EEPROM NPCX_I2C_PORT7_0 -#define I2C_PORT_BATTERY NPCX_I2C_PORT5_0 -#define I2C_PORT_SENSOR NPCX_I2C_PORT0_0 -#define I2C_PORT_USB_C0 NPCX_I2C_PORT1_0 +#define I2C_PORT_EEPROM NPCX_I2C_PORT7_0 +#define I2C_PORT_BATTERY NPCX_I2C_PORT5_0 +#define I2C_PORT_SENSOR NPCX_I2C_PORT0_0 +#define I2C_PORT_USB_C0 NPCX_I2C_PORT1_0 #define I2C_PORT_SUB_USB_C1 NPCX_I2C_PORT2_0 -#define I2C_PORT_USB_MUX I2C_PORT_USB_C0 -#define I2C_PORT_LCD NPCX_I2C_PORT3_0 +#define I2C_PORT_USB_MUX I2C_PORT_USB_C0 +#define I2C_PORT_LCD NPCX_I2C_PORT3_0 /* TODO(b:147440290): Need to handle multiple charger ICs */ -#define I2C_PORT_CHARGER I2C_PORT_USB_C0 +#define I2C_PORT_CHARGER I2C_PORT_USB_C0 -#define I2C_PORT_ACCEL I2C_PORT_SENSOR +#define I2C_PORT_ACCEL I2C_PORT_SENSOR #define I2C_ADDR_EEPROM_FLAGS 0x50 /* 7b address */ #define I2C_ADDR_ISL98607_FLAGS 0x29 @@ -121,30 +123,30 @@ /* ISL98607 registers and value */ /* Enable VP / VN / VBST */ -#define ISL98607_REG_ENABLE 0x05 -#define ISL98607_VP_VN_VBST_EN 0x07 -#define ISL97607_VP_VN_VBST_DIS 0x00 +#define ISL98607_REG_ENABLE 0x05 +#define ISL98607_VP_VN_VBST_EN 0x07 +#define ISL97607_VP_VN_VBST_DIS 0x00 /* VBST Voltage Adjustment */ -#define ISL98607_REG_VBST_OUT 0x06 -#define ISL98607_VBST_OUT_5P65 0x0a +#define ISL98607_REG_VBST_OUT 0x06 +#define ISL98607_VBST_OUT_5P65 0x0a /* VN Voltage Adjustment */ -#define ISL98607_REG_VN_OUT 0x08 -#define ISL98607_VN_OUT_5P5 0x0a +#define ISL98607_REG_VN_OUT 0x08 +#define ISL98607_VN_OUT_5P5 0x0a /* VP Voltage Adjustment */ -#define ISL98607_REG_VP_OUT 0x09 -#define ISL98607_VP_OUT_5P5 0x0a +#define ISL98607_REG_VP_OUT 0x09 +#define ISL98607_VP_OUT_5P5 0x0a /* MP3372 registers and value */ /* ISET & CHEN */ -#define MP3372_REG_ISET_CHEN 0x00 -#define MP3372_ISET_21P8_CHEN_ALL 0x70ff -#define MP3372_ISET_19P4_CHEN_ALL 0x63ff -#define MP3372_ISET_18P0_CHEN_ALL 0x5cff -#define MP3372_ISET_15P8_CHEN_ALL 0x50ff -#define MP3372_ISET_15P3_CHEN_ALL 0x4eff +#define MP3372_REG_ISET_CHEN 0x00 +#define MP3372_ISET_21P8_CHEN_ALL 0x70ff +#define MP3372_ISET_19P4_CHEN_ALL 0x63ff +#define MP3372_ISET_18P0_CHEN_ALL 0x5cff +#define MP3372_ISET_15P8_CHEN_ALL 0x50ff +#define MP3372_ISET_15P3_CHEN_ALL 0x4eff /* * I2C pin names for baseboard * @@ -158,18 +160,18 @@ #define CONFIG_CMD_ACCELS #define CONFIG_CMD_ACCEL_INFO -#define CONFIG_ACCELGYRO_BMI160 /* Base accel */ +#define CONFIG_ACCELGYRO_BMI160 /* Base accel */ /* Lid operates in forced mode, base in interrupt mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK BIT(LID_ACCEL) #define CONFIG_ACCEL_FIFO -#define CONFIG_ACCEL_FIFO_SIZE 256 /* Must be a power of 2 */ +#define CONFIG_ACCEL_FIFO_SIZE 256 /* Must be a power of 2 */ #define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO_SIZE / 3) #define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) -#define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */ +#define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */ #define CONFIG_ACCEL_LSM6DSM_INT_EVENT \ TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) @@ -204,21 +206,16 @@ enum temp_sensor_id { }; enum adc_channel { - ADC_TEMP_SENSOR_1, /* ADC0 */ - ADC_TEMP_SENSOR_2, /* ADC1 */ - ADC_TEMP_SENSOR_3, /* ADC5 */ - ADC_TEMP_SENSOR_4, /* ADC6 */ - ADC_SUB_ANALOG, /* ADC2 */ - ADC_VSNS_PP3300_A, /* ADC9 */ + ADC_TEMP_SENSOR_1, /* ADC0 */ + ADC_TEMP_SENSOR_2, /* ADC1 */ + ADC_TEMP_SENSOR_3, /* ADC5 */ + ADC_TEMP_SENSOR_4, /* ADC6 */ + ADC_SUB_ANALOG, /* ADC2 */ + ADC_VSNS_PP3300_A, /* ADC9 */ ADC_CH_COUNT }; -enum sensor_id { - LID_ACCEL, - BASE_ACCEL, - BASE_GYRO, - SENSOR_COUNT -}; +enum sensor_id { LID_ACCEL, BASE_ACCEL, BASE_GYRO, SENSOR_COUNT }; /* List of possible batteries */ enum battery_type { |