diff options
Diffstat (limited to 'baseboard/zork')
-rw-r--r-- | baseboard/zork/baseboard.c | 9 | ||||
-rw-r--r-- | baseboard/zork/baseboard.h | 21 | ||||
-rw-r--r-- | baseboard/zork/cbi_ec_fw_config.c | 2 | ||||
-rw-r--r-- | baseboard/zork/variant_trembyle.c | 2 |
4 files changed, 29 insertions, 5 deletions
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c index dcf16cf7c6..593bcf1168 100644 --- a/baseboard/zork/baseboard.c +++ b/baseboard/zork/baseboard.c @@ -24,8 +24,8 @@ #include "extpower.h" #include "gpio.h" #include "hooks.h" -#include "i2c.h" #include "ioexpander.h" +#include "i2c.h" #include "keyboard_scan.h" #include "lid_switch.h" #include "motion_sense.h" @@ -96,6 +96,13 @@ static void baseboard_chipset_resume(void) } DECLARE_HOOK(HOOK_CHIPSET_RESUME, baseboard_chipset_resume, HOOK_PRIO_DEFAULT); +__overridable void board_set_charge_limit(int port, int supplier, int charge_ma, + int max_ma, int charge_mv) +{ + charge_set_input_current_limit( + MAX(charge_ma, CONFIG_CHARGER_INPUT_CURRENT), charge_mv); +} + /* Keyboard scan setting */ __override struct keyboard_scan_config keyscan_config = { /* diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h index c55ca12c76..2289c1891b 100644 --- a/baseboard/zork/baseboard.h +++ b/baseboard/zork/baseboard.h @@ -76,8 +76,7 @@ #define CONFIG_CHARGER #define CONFIG_CHARGE_MANAGER #define CONFIG_CHARGER_DISCHARGE_ON_AC -#define CONFIG_CHARGER_DEFAULT_CURRENT_LIMIT 512 -#define CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 512 +#define CONFIG_CHARGER_INPUT_CURRENT 512 #define CONFIG_CHARGER_ISL9241 #define CONFIG_CHARGER_SENSE_RESISTOR 10 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 20 @@ -291,6 +290,7 @@ #ifndef __ASSEMBLER__ #include "gpio_signal.h" +#include "math_util.h" #include "registers.h" enum power_signal { @@ -318,6 +318,23 @@ enum sensor_id { SENSOR_COUNT, }; +/* + * Matrix to rotate accelerators into the standard reference frame. The default + * is the identity which is correct for the reference design. Variations of + * Zork may need to change it for manufacturability. + * For the lid: + * +x to the right + * +y up + * +z out of the page + * + * The principle axes of the body are aligned with the lid when the lid is in + * the 180 degree position (open, flat). + * + * Boards within the Zork family may need to modify this definition at + * board_init() time. + */ +extern mat33_fp_t zork_base_standard_ref; + extern const struct thermistor_info thermistor_info; /* Sensors without hardware FIFO are in forced mode */ diff --git a/baseboard/zork/cbi_ec_fw_config.c b/baseboard/zork/cbi_ec_fw_config.c index 555aeab9d7..4482a5cf40 100644 --- a/baseboard/zork/cbi_ec_fw_config.c +++ b/baseboard/zork/cbi_ec_fw_config.c @@ -3,8 +3,8 @@ * found in the LICENSE file. */ -#include "cbi_ec_fw_config.h" #include "common.h" +#include "cbi_ec_fw_config.h" #include "cros_board_info.h" /**************************************************************************** diff --git a/baseboard/zork/variant_trembyle.c b/baseboard/zork/variant_trembyle.c index 4542ea562c..9c29e057cc 100644 --- a/baseboard/zork/variant_trembyle.c +++ b/baseboard/zork/variant_trembyle.c @@ -499,7 +499,7 @@ struct usb_mux usbc1_ps8802 = { const struct usb_mux usbc1_ps8818 = { .usb_port = USBC_PORT_C1, .i2c_port = I2C_PORT_TCPC1, - .i2c_addr_flags = PS8818_I2C_ADDR0_FLAGS, + .i2c_addr_flags = PS8818_I2C_ADDR_FLAGS, .driver = &ps8818_usb_retimer_driver, .board_set = &board_ps8818_mux_set, }; |