1*4f2df630SAndroid Build Coastguard Worker /* Copyright 2016 The ChromiumOS Authors 2*4f2df630SAndroid Build Coastguard Worker * Use of this source code is governed by a BSD-style license that can be 3*4f2df630SAndroid Build Coastguard Worker * found in the LICENSE file. 4*4f2df630SAndroid Build Coastguard Worker */ 5*4f2df630SAndroid Build Coastguard Worker 6*4f2df630SAndroid Build Coastguard Worker /* 7*4f2df630SAndroid Build Coastguard Worker * config.h - Top-level configuration Chrome EC 8*4f2df630SAndroid Build Coastguard Worker * 9*4f2df630SAndroid Build Coastguard Worker * All configuration settings (CONFIG_*) are defined in this file or in a 10*4f2df630SAndroid Build Coastguard Worker * sub-configuration file (config_chip.h, board.h, etc.) included by this file. 11*4f2df630SAndroid Build Coastguard Worker * 12*4f2df630SAndroid Build Coastguard Worker * Note that this file is included by assembly (.S) files. Any C-isms such as 13*4f2df630SAndroid Build Coastguard Worker * struct definitions or enums in a sub-configuration file MUST be guarded with 14*4f2df630SAndroid Build Coastguard Worker * #ifndef __ASSEMBLER__ to prevent those C-isms from being evaluated by the 15*4f2df630SAndroid Build Coastguard Worker * assembler. 16*4f2df630SAndroid Build Coastguard Worker */ 17*4f2df630SAndroid Build Coastguard Worker 18*4f2df630SAndroid Build Coastguard Worker #ifndef __CROS_EC_CONFIG_H 19*4f2df630SAndroid Build Coastguard Worker #define __CROS_EC_CONFIG_H 20*4f2df630SAndroid Build Coastguard Worker 21*4f2df630SAndroid Build Coastguard Worker #ifdef INCLUDE_ENV_CONFIG 22*4f2df630SAndroid Build Coastguard Worker /* 23*4f2df630SAndroid Build Coastguard Worker * When building for an EC target, pick up the .h file which allows to 24*4f2df630SAndroid Build Coastguard Worker * keep track of changing make variables. 25*4f2df630SAndroid Build Coastguard Worker */ 26*4f2df630SAndroid Build Coastguard Worker #include "env_config.h" 27*4f2df630SAndroid Build Coastguard Worker #endif 28*4f2df630SAndroid Build Coastguard Worker 29*4f2df630SAndroid Build Coastguard Worker /* 30*4f2df630SAndroid Build Coastguard Worker * All config options are listed alphabetically and described here. 31*4f2df630SAndroid Build Coastguard Worker * 32*4f2df630SAndroid Build Coastguard Worker * If you add a new config option somewhere in the code, you must add a 33*4f2df630SAndroid Build Coastguard Worker * default value here and describe what it does. 34*4f2df630SAndroid Build Coastguard Worker * 35*4f2df630SAndroid Build Coastguard Worker * To get a list current list, run this command: 36*4f2df630SAndroid Build Coastguard Worker * git grep " CONFIG_" | grep -o "CONFIG_[A-Za-z0-9_]\+" | sort | uniq 37*4f2df630SAndroid Build Coastguard Worker * 38*4f2df630SAndroid Build Coastguard Worker * Some options are #defined here to enable them by default. Chips or boards 39*4f2df630SAndroid Build Coastguard Worker * may override this by #undef'ing them in config_chip.h or board.h, 40*4f2df630SAndroid Build Coastguard Worker * respectively. 41*4f2df630SAndroid Build Coastguard Worker * 42*4f2df630SAndroid Build Coastguard Worker * TODO(crosbug.com/p/23758): Describe all of these. Also describe the 43*4f2df630SAndroid Build Coastguard Worker * HAS_TASK_* macro and how/when it should be used vs. a config define. And 44*4f2df630SAndroid Build Coastguard Worker * BOARD_*, CHIP_*, and CHIP_FAMILY_*. 45*4f2df630SAndroid Build Coastguard Worker */ 46*4f2df630SAndroid Build Coastguard Worker 47*4f2df630SAndroid Build Coastguard Worker /* Add support for sensor FIFO */ 48*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCEL_FIFO 49*4f2df630SAndroid Build Coastguard Worker 50*4f2df630SAndroid Build Coastguard Worker /* Define the size of the global fifo, must be a power of 2. */ 51*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCEL_FIFO_SIZE 52*4f2df630SAndroid Build Coastguard Worker 53*4f2df630SAndroid Build Coastguard Worker /* The amount of free entries that trigger an interrupt to the AP. */ 54*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCEL_FIFO_THRES 55*4f2df630SAndroid Build Coastguard Worker 56*4f2df630SAndroid Build Coastguard Worker /* 57*4f2df630SAndroid Build Coastguard Worker * Sensors in this mask are in forced mode: they needed to be polled 58*4f2df630SAndroid Build Coastguard Worker * at their data rate frequency. 59*4f2df630SAndroid Build Coastguard Worker */ 60*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCEL_FORCE_MODE_MASK 61*4f2df630SAndroid Build Coastguard Worker 62*4f2df630SAndroid Build Coastguard Worker /* Enable accelerometer interrupts. */ 63*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCEL_INTERRUPTS 64*4f2df630SAndroid Build Coastguard Worker 65*4f2df630SAndroid Build Coastguard Worker /* 66*4f2df630SAndroid Build Coastguard Worker * Support "spoof" mode for sensors. This allows sensors to have their values 67*4f2df630SAndroid Build Coastguard Worker * spoofed to any arbitrary value. This is useful for testing. 68*4f2df630SAndroid Build Coastguard Worker */ 69*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ACCEL_SPOOF_MODE 70*4f2df630SAndroid Build Coastguard Worker 71*4f2df630SAndroid Build Coastguard Worker /* 72*4f2df630SAndroid Build Coastguard Worker * Some chips have a portion of memory which will remain powered even 73*4f2df630SAndroid Build Coastguard Worker * during a reset. This is called Always-On, or AON memory, and 74*4f2df630SAndroid Build Coastguard Worker * typically has a separate firmware to manage the memory. These 75*4f2df630SAndroid Build Coastguard Worker * values can be used to configure the RAM layout for Always-On. 76*4f2df630SAndroid Build Coastguard Worker * 77*4f2df630SAndroid Build Coastguard Worker * See chip/ish/ for an example implementation. 78*4f2df630SAndroid Build Coastguard Worker */ 79*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AON_PERSISTENT_BASE 80*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AON_PERSISTENT_SIZE 81*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AON_RAM_BASE 82*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AON_RAM_SIZE 83*4f2df630SAndroid Build Coastguard Worker 84*4f2df630SAndroid Build Coastguard Worker /* Specify type of Magnetometer attached. */ 85*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MAG_BMM150 86*4f2df630SAndroid Build Coastguard Worker 87*4f2df630SAndroid Build Coastguard Worker /* Presence of a Bosh Sensortec BMM150 magnetometer behind a BMI160. */ 88*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MAG_BMI160_BMM150 89*4f2df630SAndroid Build Coastguard Worker 90*4f2df630SAndroid Build Coastguard Worker /* Presence of a ST LIS2MDL magnetometer behind a BMI160. */ 91*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MAG_BMI160_LIS2MDL 92*4f2df630SAndroid Build Coastguard Worker 93*4f2df630SAndroid Build Coastguard Worker /* Specify barometer attached */ 94*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BARO_BMP280 95*4f2df630SAndroid Build Coastguard Worker 96*4f2df630SAndroid Build Coastguard Worker /* When set, it indicates a secondary sensor is attached behind a BMI160. */ 97*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BMI160_SEC_I2C 98*4f2df630SAndroid Build Coastguard Worker 99*4f2df630SAndroid Build Coastguard Worker /* Support for BMI160 hardware orientation sensor */ 100*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BMI160_ORIENTATION_SENSOR 101*4f2df630SAndroid Build Coastguard Worker 102*4f2df630SAndroid Build Coastguard Worker /* Support for KIONIX KX022 hardware orientation sensor */ 103*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KX022_ORIENTATION_SENSOR 104*4f2df630SAndroid Build Coastguard Worker 105*4f2df630SAndroid Build Coastguard Worker /* Define the i2c address of the sensor behind the main sensor, if present. */ 106*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCELGYRO_SEC_ADDR_FLAGS 107*4f2df630SAndroid Build Coastguard Worker 108*4f2df630SAndroid Build Coastguard Worker /* 109*4f2df630SAndroid Build Coastguard Worker * Define if either CONFIG_BMI160_ORIENTATION_SUPPORT or 110*4f2df630SAndroid Build Coastguard Worker * CONFIG_KX022_ORIENTATION_SUPPORT is set. 111*4f2df630SAndroid Build Coastguard Worker */ 112*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ORIENTATION_SENSOR 113*4f2df630SAndroid Build Coastguard Worker 114*4f2df630SAndroid Build Coastguard Worker /* Support the orientation gesture */ 115*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_ORIENTATION 116*4f2df630SAndroid Build Coastguard Worker 117*4f2df630SAndroid Build Coastguard Worker /* 118*4f2df630SAndroid Build Coastguard Worker * Use the old standard reference frame for accelerometers. The old 119*4f2df630SAndroid Build Coastguard Worker * reference frame is: 120*4f2df630SAndroid Build Coastguard Worker * Z-axis: perpendicular to keyboard, pointing up, such that if the device 121*4f2df630SAndroid Build Coastguard Worker * is sitting flat on a table, the accel reads +G. 122*4f2df630SAndroid Build Coastguard Worker * X-axis: in the plane of the keyboard, pointing from the front lip to the 123*4f2df630SAndroid Build Coastguard Worker * hinge, such that if the device is oriented with the front lip touching 124*4f2df630SAndroid Build Coastguard Worker * the table and the hinge directly above, the accel reads +G. 125*4f2df630SAndroid Build Coastguard Worker * Y-axis: in the plane of the keyboard, pointing to the right, such that 126*4f2df630SAndroid Build Coastguard Worker * if the device is on it's left side, the accel reads +G. 127*4f2df630SAndroid Build Coastguard Worker * 128*4f2df630SAndroid Build Coastguard Worker * Also, in the old reference frame, the lid accel matches the base accel 129*4f2df630SAndroid Build Coastguard Worker * readings when lid is closed. 130*4f2df630SAndroid Build Coastguard Worker */ 131*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCEL_STD_REF_FRAME_OLD 132*4f2df630SAndroid Build Coastguard Worker 133*4f2df630SAndroid Build Coastguard Worker /* Set when INT2 is an ouptut */ 134*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT 135*4f2df630SAndroid Build Coastguard Worker 136*4f2df630SAndroid Build Coastguard Worker /* Specify type of Gyrometers attached. */ 137*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GYRO_L3GD20H 138*4f2df630SAndroid Build Coastguard Worker 139*4f2df630SAndroid Build Coastguard Worker /* 140*4f2df630SAndroid Build Coastguard Worker * If this is defined, motion_sense sends sensor events to the AP in the format 141*4f2df630SAndroid Build Coastguard Worker * +-----------+ 142*4f2df630SAndroid Build Coastguard Worker * | Timestamp | 143*4f2df630SAndroid Build Coastguard Worker * | Payload | 144*4f2df630SAndroid Build Coastguard Worker * | Timestamp | 145*4f2df630SAndroid Build Coastguard Worker * | Payload | 146*4f2df630SAndroid Build Coastguard Worker * | ... | 147*4f2df630SAndroid Build Coastguard Worker * +-----------+ 148*4f2df630SAndroid Build Coastguard Worker * 149*4f2df630SAndroid Build Coastguard Worker * If this is not defined, the events will be sent in the format 150*4f2df630SAndroid Build Coastguard Worker * +-----------+ 151*4f2df630SAndroid Build Coastguard Worker * | Payload | 152*4f2df630SAndroid Build Coastguard Worker * | Payload | 153*4f2df630SAndroid Build Coastguard Worker * | Payload | 154*4f2df630SAndroid Build Coastguard Worker * | ... | 155*4f2df630SAndroid Build Coastguard Worker * | Timestamp | 156*4f2df630SAndroid Build Coastguard Worker * +-----------+ 157*4f2df630SAndroid Build Coastguard Worker * 158*4f2df630SAndroid Build Coastguard Worker * The former format enables improved filtering of sensor event timestamps on 159*4f2df630SAndroid Build Coastguard Worker * the AP, but comes with stricter jitter requirements. 160*4f2df630SAndroid Build Coastguard Worker */ 161*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SENSOR_TIGHT_TIMESTAMPS 162*4f2df630SAndroid Build Coastguard Worker 163*4f2df630SAndroid Build Coastguard Worker /* Sync event driver */ 164*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SYNC 165*4f2df630SAndroid Build Coastguard Worker 166*4f2df630SAndroid Build Coastguard Worker /* 167*4f2df630SAndroid Build Coastguard Worker * How many sync events to buffer before motion_sense gets a chance to run. 168*4f2df630SAndroid Build Coastguard Worker * This is similar to sensor side fifos. 169*4f2df630SAndroid Build Coastguard Worker * Note: for vsync, anything above 2 is probably plenty. 170*4f2df630SAndroid Build Coastguard Worker */ 171*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SYNC_QUEUE_SIZE 8 172*4f2df630SAndroid Build Coastguard Worker 173*4f2df630SAndroid Build Coastguard Worker /* Simulate command for sync */ 174*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SYNC_COMMAND 175*4f2df630SAndroid Build Coastguard Worker 176*4f2df630SAndroid Build Coastguard Worker /* 177*4f2df630SAndroid Build Coastguard Worker * Define the event to raise when the sync event happens. 178*4f2df630SAndroid Build Coastguard Worker * Must be within TASK_EVENT_MOTION_INTERRUPT_MASK. 179*4f2df630SAndroid Build Coastguard Worker */ 180*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SYNC_INT_EVENT 181*4f2df630SAndroid Build Coastguard Worker 182*4f2df630SAndroid Build Coastguard Worker /* Compile chip support for analog-to-digital convertor */ 183*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ADC 184*4f2df630SAndroid Build Coastguard Worker 185*4f2df630SAndroid Build Coastguard Worker /* 186*4f2df630SAndroid Build Coastguard Worker * ADC sample time selection. The value is chip-dependent. 187*4f2df630SAndroid Build Coastguard Worker * TODO: Replace this with CONFIG_ADC_PROFILE entries. 188*4f2df630SAndroid Build Coastguard Worker */ 189*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ADC_SAMPLE_TIME 190*4f2df630SAndroid Build Coastguard Worker 191*4f2df630SAndroid Build Coastguard Worker /* Include the ADC analog watchdog feature in the ADC code */ 192*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ADC_WATCHDOG 193*4f2df630SAndroid Build Coastguard Worker 194*4f2df630SAndroid Build Coastguard Worker /* 195*4f2df630SAndroid Build Coastguard Worker * Chip-dependent ADC configuration - select one. 196*4f2df630SAndroid Build Coastguard Worker * SINGLE - Sample all inputs once when requested. 197*4f2df630SAndroid Build Coastguard Worker * FAST_CONTINUOUS - Sample all inputs continuously using DMA, with minimal 198*4f2df630SAndroid Build Coastguard Worker * sample time. 199*4f2df630SAndroid Build Coastguard Worker */ 200*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ADC_PROFILE_SINGLE 201*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ADC_PROFILE_FAST_CONTINUOUS 202*4f2df630SAndroid Build Coastguard Worker 203*4f2df630SAndroid Build Coastguard Worker /* Support AES symmetric-key algorithm */ 204*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AES 205*4f2df630SAndroid Build Coastguard Worker 206*4f2df630SAndroid Build Coastguard Worker /* Support AES-GCM */ 207*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AES_GCM 208*4f2df630SAndroid Build Coastguard Worker 209*4f2df630SAndroid Build Coastguard Worker /* 210*4f2df630SAndroid Build Coastguard Worker * Some ALS modules may be connected to the EC. We need the command, and 211*4f2df630SAndroid Build Coastguard Worker * specific drivers for each module. 212*4f2df630SAndroid Build Coastguard Worker */ 213*4f2df630SAndroid Build Coastguard Worker #ifdef HAS_TASK_ALS 214*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ALS 215*4f2df630SAndroid Build Coastguard Worker #else 216*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS 217*4f2df630SAndroid Build Coastguard Worker #endif 218*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_AL3010 219*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_BH1730 220*4f2df630SAndroid Build Coastguard Worker /* 221*4f2df630SAndroid Build Coastguard Worker * If defined, BH1730 uses board specific lux calculation formula parameters. 222*4f2df630SAndroid Build Coastguard Worker * If not defined, BH1730 uses default parameters to calculate lux. 223*4f2df630SAndroid Build Coastguard Worker */ 224*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_BH1730_LUXTH_PARAMS 225*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_ISL29035 226*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_OPT3001 227*4f2df630SAndroid Build Coastguard Worker /* Define the exact model ID present on the board: SI1141 = 41, SI1142 = 42, */ 228*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_SI114X 229*4f2df630SAndroid Build Coastguard Worker /* Check if the device revision is supported */ 230*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_SI114X_CHECK_REVISION 231*4f2df630SAndroid Build Coastguard Worker 232*4f2df630SAndroid Build Coastguard Worker /* Define to include the clear channel driver for the tcs3400 light sensor */ 233*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_TCS3400 234*4f2df630SAndroid Build Coastguard Worker 235*4f2df630SAndroid Build Coastguard Worker /* 236*4f2df630SAndroid Build Coastguard Worker * Define to use atime tables in anti-saturation algos in the tcs3400 driver. 237*4f2df630SAndroid Build Coastguard Worker * Defining this for a board makes the anti-saturation algorithm much more 238*4f2df630SAndroid Build Coastguard Worker * efficient, but requires the board to have it's lens cover scale and k_channel 239*4f2df630SAndroid Build Coastguard Worker * scales to be determined. Define this for a board once it's added its 240*4f2df630SAndroid Build Coastguard Worker * cover_scale and k_channel scale factors. 241*4f2df630SAndroid Build Coastguard Worker */ 242*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TCS_USE_LUX_TABLE 243*4f2df630SAndroid Build Coastguard Worker 244*4f2df630SAndroid Build Coastguard Worker /* 245*4f2df630SAndroid Build Coastguard Worker * Define the event to raise when a sensor interrupt triggers. 246*4f2df630SAndroid Build Coastguard Worker * Must be within TASK_EVENT_MOTION_INTERRUPT_MASK. 247*4f2df630SAndroid Build Coastguard Worker */ 248*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_SI114X_INT_EVENT 249*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_TCS3400_INT_EVENT 250*4f2df630SAndroid Build Coastguard Worker 251*4f2df630SAndroid Build Coastguard Worker /* 252*4f2df630SAndroid Build Coastguard Worker * Enable Si114x to operate in polling mode. This config is used in conjunction 253*4f2df630SAndroid Build Coastguard Worker * with CONFIG_ALS_SI114X_INT_EVENT. When polling is enabled, the read is 254*4f2df630SAndroid Build Coastguard Worker * initiated in the same manner as when interrupts are used, but the event which 255*4f2df630SAndroid Build Coastguard Worker * triggers the irq_handler is generated by deferred call using a fixed delay. 256*4f2df630SAndroid Build Coastguard Worker */ 257*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_SI114X_POLLING 258*4f2df630SAndroid Build Coastguard Worker 259*4f2df630SAndroid Build Coastguard Worker /* 260*4f2df630SAndroid Build Coastguard Worker * Enable tcs3400 to operate without interrupt pin. This config is used in 261*4f2df630SAndroid Build Coastguard Worker * conjunction with CONFIG_ALS_TCS3400_INT_EVENT. When this option is enabled, 262*4f2df630SAndroid Build Coastguard Worker * the read is initiated in the same manner as when interrupts are used, but the 263*4f2df630SAndroid Build Coastguard Worker * event which triggers the irq_handler is generated by deferred call. 264*4f2df630SAndroid Build Coastguard Worker */ 265*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_TCS3400_EMULATED_IRQ_EVENT 266*4f2df630SAndroid Build Coastguard Worker 267*4f2df630SAndroid Build Coastguard Worker /* Define which ALS sensor is used for dimming the lightbar when dark */ 268*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ALS_LIGHTBAR_DIMMING 269*4f2df630SAndroid Build Coastguard Worker 270*4f2df630SAndroid Build Coastguard Worker /* Link against third_party/cryptoc. */ 271*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LIBCRYPTOC 272*4f2df630SAndroid Build Coastguard Worker 273*4f2df630SAndroid Build Coastguard Worker /* Support AP hang detection host command and state machine */ 274*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AP_HANG_DETECT 275*4f2df630SAndroid Build Coastguard Worker 276*4f2df630SAndroid Build Coastguard Worker /* Support AP Warm reset Interrupt. */ 277*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AP_WARM_RESET_INTERRUPT 278*4f2df630SAndroid Build Coastguard Worker 279*4f2df630SAndroid Build Coastguard Worker /* Support audio codec. */ 280*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC 281*4f2df630SAndroid Build Coastguard Worker /* Audio codec caps. */ 282*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_CAP_WOV_AUDIO_SHM 283*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_CAP_WOV_LANG_SHM 284*4f2df630SAndroid Build Coastguard Worker /* Support audio codec on DMIC. */ 285*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_DMIC 286*4f2df630SAndroid Build Coastguard Worker /* Support audio codec software gain on DMIC. */ 287*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_DMIC_SOFTWARE_GAIN 288*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_DMIC_MAX_SOFTWARE_GAIN 289*4f2df630SAndroid Build Coastguard Worker /* Support audio codec on I2S RX. */ 290*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_I2S_RX 291*4f2df630SAndroid Build Coastguard Worker /* Support audio codec on WoV. */ 292*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_WOV 293*4f2df630SAndroid Build Coastguard Worker /* Audio codec buffers. */ 294*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_WOV_AUDIO_BUF_LEN 295*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_WOV_AUDIO_BUF_TYPE 296*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_WOV_LANG_BUF_LEN 297*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AUDIO_CODEC_WOV_LANG_BUF_TYPE 298*4f2df630SAndroid Build Coastguard Worker 299*4f2df630SAndroid Build Coastguard Worker /* Allow proprietary communication protocols' extensions. */ 300*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EXTENSION_COMMAND 301*4f2df630SAndroid Build Coastguard Worker 302*4f2df630SAndroid Build Coastguard Worker /* 303*4f2df630SAndroid Build Coastguard Worker * Support controlling the display backlight based on the state of the lid 304*4f2df630SAndroid Build Coastguard Worker * switch. The EC will disable the backlight when the lid is closed. 305*4f2df630SAndroid Build Coastguard Worker * 306*4f2df630SAndroid Build Coastguard Worker * The GPIO should be named GPIO_ENABLE_BACKLIGHT if active high, or 307*4f2df630SAndroid Build Coastguard Worker * GPIO_ENABLE_BACKLIGHT_L if active low. See CONFIG_BACKLIGHT_LID_ACTIVE_LOW. 308*4f2df630SAndroid Build Coastguard Worker */ 309*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BACKLIGHT_LID 310*4f2df630SAndroid Build Coastguard Worker 311*4f2df630SAndroid Build Coastguard Worker /* 312*4f2df630SAndroid Build Coastguard Worker * The backlight GPIO pin is active low and named GPIO_BACKLIGHT_ENABLED_L 313*4f2df630SAndroid Build Coastguard Worker */ 314*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BACKLIGHT_LID_ACTIVE_LOW 315*4f2df630SAndroid Build Coastguard Worker 316*4f2df630SAndroid Build Coastguard Worker /* 317*4f2df630SAndroid Build Coastguard Worker * If defined, EC will enable the backlight signal only if this GPIO is 318*4f2df630SAndroid Build Coastguard Worker * asserted AND the lid is open. This supports passing the backlight-enable 319*4f2df630SAndroid Build Coastguard Worker * signal from the AP through EC. 320*4f2df630SAndroid Build Coastguard Worker */ 321*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BACKLIGHT_REQ_GPIO 322*4f2df630SAndroid Build Coastguard Worker 323*4f2df630SAndroid Build Coastguard Worker /* Support base32 text encoding */ 324*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BASE32 325*4f2df630SAndroid Build Coastguard Worker 326*4f2df630SAndroid Build Coastguard Worker /* Support base64 text encoding */ 327*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BASE64 328*4f2df630SAndroid Build Coastguard Worker 329*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 330*4f2df630SAndroid Build Coastguard Worker /* Battery config */ 331*4f2df630SAndroid Build Coastguard Worker 332*4f2df630SAndroid Build Coastguard Worker /* Support a simple battery. */ 333*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY 334*4f2df630SAndroid Build Coastguard Worker 335*4f2df630SAndroid Build Coastguard Worker /* 336*4f2df630SAndroid Build Coastguard Worker * Compile battery-specific code. 337*4f2df630SAndroid Build Coastguard Worker * 338*4f2df630SAndroid Build Coastguard Worker * Note that some boards have their own unique battery constants / functions. 339*4f2df630SAndroid Build Coastguard Worker * In this case, those are provided in board/(boardname)/battery.c, and none of 340*4f2df630SAndroid Build Coastguard Worker * these are defined. 341*4f2df630SAndroid Build Coastguard Worker * Defining one of these will automatically define CONFIG_BATTERY near the end 342*4f2df630SAndroid Build Coastguard Worker * of this file. If you add a new config here, you'll need to update that 343*4f2df630SAndroid Build Coastguard Worker * check. 344*4f2df630SAndroid Build Coastguard Worker */ 345*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_BQ20Z453 346*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_BQ27541 347*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_BQ27621 348*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_BQ4050 349*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_MAX17055 350*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_MM8013 351*4f2df630SAndroid Build Coastguard Worker 352*4f2df630SAndroid Build Coastguard Worker /* 353*4f2df630SAndroid Build Coastguard Worker * MAX17055 support alert on voltage, current, temperature, and state-of-charge. 354*4f2df630SAndroid Build Coastguard Worker */ 355*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_MAX17055_ALERT 356*4f2df630SAndroid Build Coastguard Worker 357*4f2df630SAndroid Build Coastguard Worker /* 358*4f2df630SAndroid Build Coastguard Worker * Enable full model driver of MAX17055. 359*4f2df630SAndroid Build Coastguard Worker * 360*4f2df630SAndroid Build Coastguard Worker * It provides a better soc estimation. ocv_table needs to be supplied. 361*4f2df630SAndroid Build Coastguard Worker */ 362*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_MAX17055_FULL_MODEL 363*4f2df630SAndroid Build Coastguard Worker 364*4f2df630SAndroid Build Coastguard Worker /* Compile mock battery support; used by tests. */ 365*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_MOCK 366*4f2df630SAndroid Build Coastguard Worker 367*4f2df630SAndroid Build Coastguard Worker /* Maximum time to wake a non-responsive battery, in second */ 368*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BATTERY_PRECHARGE_TIMEOUT 30 369*4f2df630SAndroid Build Coastguard Worker 370*4f2df630SAndroid Build Coastguard Worker /* 371*4f2df630SAndroid Build Coastguard Worker * If defined, the charger will check a board specific function for battery hw 372*4f2df630SAndroid Build Coastguard Worker * presence as an additional condition to determine if power on is allowed for 373*4f2df630SAndroid Build Coastguard Worker * factory override, where allowing booting of a bare board with no battery and 374*4f2df630SAndroid Build Coastguard Worker * no power button press is required. 375*4f2df630SAndroid Build Coastguard Worker */ 376*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_HW_PRESENT_CUSTOM 377*4f2df630SAndroid Build Coastguard Worker 378*4f2df630SAndroid Build Coastguard Worker /* 379*4f2df630SAndroid Build Coastguard Worker * If defined, the charger will check for battery presence before attempting 380*4f2df630SAndroid Build Coastguard Worker * to communicate with it. This avoids the 30 second delay when booting 381*4f2df630SAndroid Build Coastguard Worker * without a battery present. Do not use with CONFIG_BATTERY_PRESENT_GPIO. 382*4f2df630SAndroid Build Coastguard Worker * 383*4f2df630SAndroid Build Coastguard Worker * Replace the default battery_is_present() function with a board-specific 384*4f2df630SAndroid Build Coastguard Worker * implementation in board.c 385*4f2df630SAndroid Build Coastguard Worker */ 386*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_PRESENT_CUSTOM 387*4f2df630SAndroid Build Coastguard Worker 388*4f2df630SAndroid Build Coastguard Worker /* 389*4f2df630SAndroid Build Coastguard Worker * If defined, GPIO which is driven low when battery is present. 390*4f2df630SAndroid Build Coastguard Worker * Charger will check for battery presence before attempting to communicate 391*4f2df630SAndroid Build Coastguard Worker * with it. This avoids the 30 second delay when booting without a battery 392*4f2df630SAndroid Build Coastguard Worker * present. Do not use with CONFIG_BATTERY_PRESENT_CUSTOM. 393*4f2df630SAndroid Build Coastguard Worker */ 394*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_PRESENT_GPIO 395*4f2df630SAndroid Build Coastguard Worker 396*4f2df630SAndroid Build Coastguard Worker /* 397*4f2df630SAndroid Build Coastguard Worker * Compile smart battery support 398*4f2df630SAndroid Build Coastguard Worker * 399*4f2df630SAndroid Build Coastguard Worker * For batteries which support this specification: 400*4f2df630SAndroid Build Coastguard Worker * http://sbs-forum.org/specs/sbdat110.pdf) 401*4f2df630SAndroid Build Coastguard Worker */ 402*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_SMART 403*4f2df630SAndroid Build Coastguard Worker 404*4f2df630SAndroid Build Coastguard Worker /* Chemistry of the battery device */ 405*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_DEVICE_CHEMISTRY 406*4f2df630SAndroid Build Coastguard Worker 407*4f2df630SAndroid Build Coastguard Worker /* 408*4f2df630SAndroid Build Coastguard Worker * If defined, the board must supply fuel gauge and battery information for 409*4f2df630SAndroid Build Coastguard Worker * each supported battery. This information is then used for battery cut off 410*4f2df630SAndroid Build Coastguard Worker * and to check the charge/discharge FET status. 411*4f2df630SAndroid Build Coastguard Worker */ 412*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_FUEL_GAUGE 413*4f2df630SAndroid Build Coastguard Worker 414*4f2df630SAndroid Build Coastguard Worker /* 415*4f2df630SAndroid Build Coastguard Worker * Critical battery shutdown timeout (seconds) 416*4f2df630SAndroid Build Coastguard Worker * 417*4f2df630SAndroid Build Coastguard Worker * If the battery is at extremely low charge (and discharging) or extremely 418*4f2df630SAndroid Build Coastguard Worker * high temperature, the EC will notify the AP and start a timer with the 419*4f2df630SAndroid Build Coastguard Worker * timeout defined here. If the critical condition is not corrected before 420*4f2df630SAndroid Build Coastguard Worker * the timeout expires, the EC will shut down the AP (if the AP is not already 421*4f2df630SAndroid Build Coastguard Worker * off) and then optionally hibernate or cut off battery. 422*4f2df630SAndroid Build Coastguard Worker */ 423*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BATTERY_CRITICAL_SHUTDOWN_TIMEOUT 30 424*4f2df630SAndroid Build Coastguard Worker 425*4f2df630SAndroid Build Coastguard Worker /* Perform a battery cut-off when we reach the battery critical level */ 426*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF 427*4f2df630SAndroid Build Coastguard Worker 428*4f2df630SAndroid Build Coastguard Worker /* If the battery is too hot or too cold, stop charging */ 429*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_CHECK_CHARGE_TEMP_LIMITS 430*4f2df630SAndroid Build Coastguard Worker 431*4f2df630SAndroid Build Coastguard Worker /* 432*4f2df630SAndroid Build Coastguard Worker * Support battery cut-off as host command and console command. 433*4f2df630SAndroid Build Coastguard Worker * 434*4f2df630SAndroid Build Coastguard Worker * Once defined, you have to implement a board_cut_off_battery() function 435*4f2df630SAndroid Build Coastguard Worker * in board/???/battery.c file. 436*4f2df630SAndroid Build Coastguard Worker */ 437*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_CUT_OFF 438*4f2df630SAndroid Build Coastguard Worker 439*4f2df630SAndroid Build Coastguard Worker /* 440*4f2df630SAndroid Build Coastguard Worker * The default delay is 1 second. Define this if a board prefers 441*4f2df630SAndroid Build Coastguard Worker * different delay. 442*4f2df630SAndroid Build Coastguard Worker */ 443*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_CUTOFF_DELAY_US 444*4f2df630SAndroid Build Coastguard Worker 445*4f2df630SAndroid Build Coastguard Worker /* 446*4f2df630SAndroid Build Coastguard Worker * The board-specific battery.c implements get and set functions to read and 447*4f2df630SAndroid Build Coastguard Worker * write arbirary vendor-specific parameters stored in the battery. 448*4f2df630SAndroid Build Coastguard Worker * See include/battery.h for prototypes. 449*4f2df630SAndroid Build Coastguard Worker */ 450*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_VENDOR_PARAM 451*4f2df630SAndroid Build Coastguard Worker 452*4f2df630SAndroid Build Coastguard Worker /* 453*4f2df630SAndroid Build Coastguard Worker * TODO(crosbug.com/p/29467): allows charging of a dead battery that 454*4f2df630SAndroid Build Coastguard Worker * requests nil for current and voltage. Remove this workaround when 455*4f2df630SAndroid Build Coastguard Worker * possible. 456*4f2df630SAndroid Build Coastguard Worker */ 457*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD 458*4f2df630SAndroid Build Coastguard Worker 459*4f2df630SAndroid Build Coastguard Worker /* 460*4f2df630SAndroid Build Coastguard Worker * Check for battery in disconnect state (similar to cut-off state). If this 461*4f2df630SAndroid Build Coastguard Worker * battery is found to be in disconnect state, take it out of this state by 462*4f2df630SAndroid Build Coastguard Worker * force-applying a charge current. This option requires 463*4f2df630SAndroid Build Coastguard Worker * battery_get_disconnect_state() to be defined. 464*4f2df630SAndroid Build Coastguard Worker */ 465*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_REVIVE_DISCONNECT 466*4f2df630SAndroid Build Coastguard Worker 467*4f2df630SAndroid Build Coastguard Worker /* 468*4f2df630SAndroid Build Coastguard Worker * Specify the battery percentage at which the host is told it is full. 469*4f2df630SAndroid Build Coastguard Worker * If this value is not specified the default is 97% set in battery.h. 470*4f2df630SAndroid Build Coastguard Worker */ 471*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_LEVEL_NEAR_FULL 472*4f2df630SAndroid Build Coastguard Worker 473*4f2df630SAndroid Build Coastguard Worker /* 474*4f2df630SAndroid Build Coastguard Worker * Use an alternative method to store battery information: Instead of writing 475*4f2df630SAndroid Build Coastguard Worker * directly to host memory mapped region, this keeps the battery information in 476*4f2df630SAndroid Build Coastguard Worker * ec_response_battery_static/dynamic_info structures, that can then be fetched 477*4f2df630SAndroid Build Coastguard Worker * using host commands, or via EC_ACPI_MEM_BATTERY_INDEX command, which tells 478*4f2df630SAndroid Build Coastguard Worker * the EC to update the shared memory. 479*4f2df630SAndroid Build Coastguard Worker * 480*4f2df630SAndroid Build Coastguard Worker * This is required on dual-battery systems, and on on hostless bases with a 481*4f2df630SAndroid Build Coastguard Worker * battery. 482*4f2df630SAndroid Build Coastguard Worker */ 483*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_V2 484*4f2df630SAndroid Build Coastguard Worker 485*4f2df630SAndroid Build Coastguard Worker /* 486*4f2df630SAndroid Build Coastguard Worker * Some fuel gauges in battery take some time to return valid battery params 487*4f2df630SAndroid Build Coastguard Worker * when wake form dead battery. 488*4f2df630SAndroid Build Coastguard Worker * It need to do precharge to take valid battery params. 489*4f2df630SAndroid Build Coastguard Worker */ 490*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_DEAD_UNTIL_VALUE 491*4f2df630SAndroid Build Coastguard Worker 492*4f2df630SAndroid Build Coastguard Worker /* 493*4f2df630SAndroid Build Coastguard Worker * Number of batteries, only matters when CONFIG_BATTERY_V2 is used. 494*4f2df630SAndroid Build Coastguard Worker */ 495*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_COUNT 496*4f2df630SAndroid Build Coastguard Worker 497*4f2df630SAndroid Build Coastguard Worker /* 498*4f2df630SAndroid Build Coastguard Worker * Smart battery driver should measure the voltage cell imbalance in the battery 499*4f2df630SAndroid Build Coastguard Worker * pack. This requires a battery driver capable of the measurement. 500*4f2df630SAndroid Build Coastguard Worker */ 501*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_MEASURE_IMBALANCE 502*4f2df630SAndroid Build Coastguard Worker 503*4f2df630SAndroid Build Coastguard Worker /* 504*4f2df630SAndroid Build Coastguard Worker * If remaining capacity is x% of full capacity, remaining capacity is set 505*4f2df630SAndroid Build Coastguard Worker * equal to full capacity. 506*4f2df630SAndroid Build Coastguard Worker * 507*4f2df630SAndroid Build Coastguard Worker * Some batteries don't update full capacity timely or don't update it at all. 508*4f2df630SAndroid Build Coastguard Worker * On such systems, compensation is required to guarantee remaining_capacity 509*4f2df630SAndroid Build Coastguard Worker * will be equal to full_capacity eventually. This used to be done in ACPI. 510*4f2df630SAndroid Build Coastguard Worker */ 511*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BATT_FULL_FACTOR 98 512*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE 4 513*4f2df630SAndroid Build Coastguard Worker 514*4f2df630SAndroid Build Coastguard Worker /* 515*4f2df630SAndroid Build Coastguard Worker * Powerd's full_factor. It has to be 100(%) to get display battery percentage. 516*4f2df630SAndroid Build Coastguard Worker * Otherwise, display percentages will be always zero. 517*4f2df630SAndroid Build Coastguard Worker */ 518*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BATT_HOST_FULL_FACTOR 94 519*4f2df630SAndroid Build Coastguard Worker 520*4f2df630SAndroid Build Coastguard Worker /* 521*4f2df630SAndroid Build Coastguard Worker * Expose some data when it is needed. 522*4f2df630SAndroid Build Coastguard Worker * For example, battery disconnect state 523*4f2df630SAndroid Build Coastguard Worker */ 524*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGE_STATE_DEBUG 525*4f2df630SAndroid Build Coastguard Worker 526*4f2df630SAndroid Build Coastguard Worker /* Include debugging support for the Bluetooth link layer */ 527*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BLUETOOTH_LL_DEBUG 528*4f2df630SAndroid Build Coastguard Worker 529*4f2df630SAndroid Build Coastguard Worker /* Include debugging support for Bluetooth HCI */ 530*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BLUETOOTH_HCI_DEBUG 531*4f2df630SAndroid Build Coastguard Worker 532*4f2df630SAndroid Build Coastguard Worker /* Boot header storage offset. */ 533*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOOT_HEADER_STORAGE_OFF 534*4f2df630SAndroid Build Coastguard Worker 535*4f2df630SAndroid Build Coastguard Worker /* Size of boot header in storage. */ 536*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOOT_HEADER_STORAGE_SIZE 537*4f2df630SAndroid Build Coastguard Worker 538*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 539*4f2df630SAndroid Build Coastguard Worker /* Bootblock config */ 540*4f2df630SAndroid Build Coastguard Worker 541*4f2df630SAndroid Build Coastguard Worker /* Pack AP-FW bootblock in EC image. */ 542*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOOTBLOCK 543*4f2df630SAndroid Build Coastguard Worker 544*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 545*4f2df630SAndroid Build Coastguard Worker 546*4f2df630SAndroid Build Coastguard Worker /* EC has GPIOs to allow board to reset RTC */ 547*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_HAS_RTC_RESET 548*4f2df630SAndroid Build Coastguard Worker 549*4f2df630SAndroid Build Coastguard Worker /* 550*4f2df630SAndroid Build Coastguard Worker * Call board_before_rsmrst(state) before passing RSMRST# to the AP. 551*4f2df630SAndroid Build Coastguard Worker * This is for board workarounds that are required after rails are up 552*4f2df630SAndroid Build Coastguard Worker * but before the AP is out of reset. 553*4f2df630SAndroid Build Coastguard Worker */ 554*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_HAS_BEFORE_RSMRST 555*4f2df630SAndroid Build Coastguard Worker 556*4f2df630SAndroid Build Coastguard Worker /* 557*4f2df630SAndroid Build Coastguard Worker * Call board_config_post_gpio_init() after GPIOs are initialized. See 558*4f2df630SAndroid Build Coastguard Worker * include/board_config.h for more information. 559*4f2df630SAndroid Build Coastguard Worker */ 560*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_POST_GPIO_INIT 561*4f2df630SAndroid Build Coastguard Worker 562*4f2df630SAndroid Build Coastguard Worker /* 563*4f2df630SAndroid Build Coastguard Worker * Call board_config_pre_init() before any inits are called. See 564*4f2df630SAndroid Build Coastguard Worker * include/board_config.h for more information. 565*4f2df630SAndroid Build Coastguard Worker */ 566*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_PRE_INIT 567*4f2df630SAndroid Build Coastguard Worker 568*4f2df630SAndroid Build Coastguard Worker /* EC has GPIOs attached to board version stuffing resistors */ 569*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_VERSION 570*4f2df630SAndroid Build Coastguard Worker /* The decoding of the GPIOs defining board version is defined in board code */ 571*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_SPECIFIC_VERSION 572*4f2df630SAndroid Build Coastguard Worker 573*4f2df630SAndroid Build Coastguard Worker /* 574*4f2df630SAndroid Build Coastguard Worker * The board is unable to distinguish EC reset from power-on so it should treat 575*4f2df630SAndroid Build Coastguard Worker * all resets as triggered by RESET_PIN even if it is a POWER_ON reset. 576*4f2df630SAndroid Build Coastguard Worker */ 577*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_FORCE_RESET_PIN 578*4f2df630SAndroid Build Coastguard Worker 579*4f2df630SAndroid Build Coastguard Worker /* Permanent LM4 boot configuration */ 580*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOOTCFG_VALUE 581*4f2df630SAndroid Build Coastguard Worker 582*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 583*4f2df630SAndroid Build Coastguard Worker /* Modify the default behavior to make system bringup easier. */ 584*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BRINGUP 585*4f2df630SAndroid Build Coastguard Worker 586*4f2df630SAndroid Build Coastguard Worker /* 587*4f2df630SAndroid Build Coastguard Worker * Enable debug prints / asserts that may helpful for debugging board bring-up, 588*4f2df630SAndroid Build Coastguard Worker * but probably shouldn't be enabled for production for performance reasons. 589*4f2df630SAndroid Build Coastguard Worker */ 590*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEBUG_BRINGUP 591*4f2df630SAndroid Build Coastguard Worker 592*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 593*4f2df630SAndroid Build Coastguard Worker 594*4f2df630SAndroid Build Coastguard Worker /* 595*4f2df630SAndroid Build Coastguard Worker * Support for entering recovery mode using the volume buttons or a dedicated 596*4f2df630SAndroid Build Coastguard Worker * recovery button. Note that these are *buttons* and not keys in the keyboard 597*4f2df630SAndroid Build Coastguard Worker * matrix. 598*4f2df630SAndroid Build Coastguard Worker */ 599*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BUTTON_TRIGGERED_RECOVERY 600*4f2df630SAndroid Build Coastguard Worker 601*4f2df630SAndroid Build Coastguard Worker /* 602*4f2df630SAndroid Build Coastguard Worker * Compile detachable base support 603*4f2df630SAndroid Build Coastguard Worker * 604*4f2df630SAndroid Build Coastguard Worker * Enabled on all boards that have a detachable base. 605*4f2df630SAndroid Build Coastguard Worker */ 606*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DETACHABLE_BASE 607*4f2df630SAndroid Build Coastguard Worker 608*4f2df630SAndroid Build Coastguard Worker /* 609*4f2df630SAndroid Build Coastguard Worker * Indicates there is a dedicated recovery button. Note, that if there are 610*4f2df630SAndroid Build Coastguard Worker * volume buttons, a dedicated recovery button is not needed. This is intended 611*4f2df630SAndroid Build Coastguard Worker * because if a board has volume buttons, they can do everything a dedicated 612*4f2df630SAndroid Build Coastguard Worker * recovery button can do. 613*4f2df630SAndroid Build Coastguard Worker */ 614*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEDICATED_RECOVERY_BUTTON 615*4f2df630SAndroid Build Coastguard Worker 616*4f2df630SAndroid Build Coastguard Worker /* 617*4f2df630SAndroid Build Coastguard Worker * The board has volume up and volume down buttons. Note, these are *buttons* 618*4f2df630SAndroid Build Coastguard Worker * and not keys in the keyboard matrix. 619*4f2df630SAndroid Build Coastguard Worker */ 620*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_VOLUME_BUTTONS 621*4f2df630SAndroid Build Coastguard Worker 622*4f2df630SAndroid Build Coastguard Worker /* Support V1 CCD configuration */ 623*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CASE_CLOSED_DEBUG_V1 624*4f2df630SAndroid Build Coastguard Worker /* Allow unsafe debugging functionality in V1 configuration */ 625*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CASE_CLOSED_DEBUG_V1_UNSAFE 626*4f2df630SAndroid Build Coastguard Worker /* Enable ITE EC programming by CCD using the INA i2c interface. */ 627*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CCD_ITE_PROGRAMMING 628*4f2df630SAndroid Build Coastguard Worker /* Loosen Open restrictions for prePVT devices */ 629*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CCD_OPEN_PREPVT 630*4f2df630SAndroid Build Coastguard Worker 631*4f2df630SAndroid Build Coastguard Worker /* 632*4f2df630SAndroid Build Coastguard Worker * Capsense chip has buttons, too. 633*4f2df630SAndroid Build Coastguard Worker */ 634*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CAPSENSE 635*4f2df630SAndroid Build Coastguard Worker 636*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 637*4f2df630SAndroid Build Coastguard Worker /* Support CEC */ 638*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CEC 639*4f2df630SAndroid Build Coastguard Worker 640*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 641*4f2df630SAndroid Build Coastguard Worker 642*4f2df630SAndroid Build Coastguard Worker /* Compile charge manager */ 643*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGE_MANAGER 644*4f2df630SAndroid Build Coastguard Worker 645*4f2df630SAndroid Build Coastguard Worker /* 646*4f2df630SAndroid Build Coastguard Worker * Number of charge ports excluding type-c ports 647*4f2df630SAndroid Build Coastguard Worker * 648*4f2df630SAndroid Build Coastguard Worker * If defined, the board must define a macro DEDICATED_CHARGE_PORT indicates 649*4f2df630SAndroid Build Coastguard Worker * the dedicated port number. 650*4f2df630SAndroid Build Coastguard Worker * 651*4f2df630SAndroid Build Coastguard Worker * See include/charge_manager.h for more details about dedicated port. 652*4f2df630SAndroid Build Coastguard Worker */ 653*4f2df630SAndroid Build Coastguard Worker #define CONFIG_DEDICATED_CHARGE_PORT_COUNT 0 654*4f2df630SAndroid Build Coastguard Worker 655*4f2df630SAndroid Build Coastguard Worker /* Allow charge manager to default to charging from dual-role partners */ 656*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGE_MANAGER_DRP_CHARGING 657*4f2df630SAndroid Build Coastguard Worker 658*4f2df630SAndroid Build Coastguard Worker /* Handle the external power limit host command in charge manager */ 659*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGE_MANAGER_EXTERNAL_POWER_LIMIT 660*4f2df630SAndroid Build Coastguard Worker 661*4f2df630SAndroid Build Coastguard Worker /* Initially enter safe mode, with relaxed port / current selection rules */ 662*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHARGE_MANAGER_SAFE_MODE 663*4f2df630SAndroid Build Coastguard Worker 664*4f2df630SAndroid Build Coastguard Worker /* Leave safe mode when battery pct meets or exceeds this value */ 665*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHARGE_MANAGER_BAT_PCT_SAFE_MODE_EXIT 2 666*4f2df630SAndroid Build Coastguard Worker 667*4f2df630SAndroid Build Coastguard Worker /* The hardware has some input current ramping/back-off mechanism */ 668*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGE_RAMP_HW 669*4f2df630SAndroid Build Coastguard Worker 670*4f2df630SAndroid Build Coastguard Worker /* Compile input current ramping support using software control */ 671*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGE_RAMP_SW 672*4f2df630SAndroid Build Coastguard Worker 673*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 674*4f2df630SAndroid Build Coastguard Worker /* Charger config */ 675*4f2df630SAndroid Build Coastguard Worker 676*4f2df630SAndroid Build Coastguard Worker /* Compile common charge state code. */ 677*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER 678*4f2df630SAndroid Build Coastguard Worker 679*4f2df630SAndroid Build Coastguard Worker /* Compile charger-specific code for these chargers (pick at most one) */ 680*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BD9995X 681*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ24707A 682*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ24715 683*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ24725 684*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ24735 685*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ24738 686*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ24770 687*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ24773 688*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ25703 689*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ25710 690*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ25890 691*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ25892 692*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ25895 693*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_ISL9237 694*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_ISL9238 695*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_ISL9241 696*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MT6370 697*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_RT9466 698*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_RT9467 699*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_SY21612 700*4f2df630SAndroid Build Coastguard Worker 701*4f2df630SAndroid Build Coastguard Worker /* 702*4f2df630SAndroid Build Coastguard Worker * Enable the CHG_EN at initialization to turn-on the BGATE which allows voltage 703*4f2df630SAndroid Build Coastguard Worker * to be applied to the battery PACK & wakes the battery if it is in shipmode. 704*4f2df630SAndroid Build Coastguard Worker */ 705*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BD9995X_CHGEN 706*4f2df630SAndroid Build Coastguard Worker 707*4f2df630SAndroid Build Coastguard Worker /* 708*4f2df630SAndroid Build Coastguard Worker * BD9995X Power Save Mode 709*4f2df630SAndroid Build Coastguard Worker * 710*4f2df630SAndroid Build Coastguard Worker * Which power save mode should the charger enter when VBUS is removed. Check 711*4f2df630SAndroid Build Coastguard Worker * driver/bd9995x.h for the power save settings. By default, no power save mode 712*4f2df630SAndroid Build Coastguard Worker * is enabled. 713*4f2df630SAndroid Build Coastguard Worker */ 714*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BD9995X_POWER_SAVE_MODE 715*4f2df630SAndroid Build Coastguard Worker 716*4f2df630SAndroid Build Coastguard Worker /* 717*4f2df630SAndroid Build Coastguard Worker * If the battery temperature sense pin is connected to charger, 718*4f2df630SAndroid Build Coastguard Worker * get the battery temperature from the charger. 719*4f2df630SAndroid Build Coastguard Worker */ 720*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BATTERY_TSENSE 721*4f2df630SAndroid Build Coastguard Worker 722*4f2df630SAndroid Build Coastguard Worker /* 723*4f2df630SAndroid Build Coastguard Worker * BQ2589x IR Compensation settings. 724*4f2df630SAndroid Build Coastguard Worker * Should be the combination of BQ2589X_IR_TREG_xxxC, BQ2589X_IR_VCLAMP_yyyMV 725*4f2df630SAndroid Build Coastguard Worker * and BQ2589X_IR_BAT_COMP_zzzMOHM. 726*4f2df630SAndroid Build Coastguard Worker */ 727*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ2589X_IR_COMP 728*4f2df630SAndroid Build Coastguard Worker /* 729*4f2df630SAndroid Build Coastguard Worker * BQ2589x 5V boost current limit and voltage. 730*4f2df630SAndroid Build Coastguard Worker * Should be the combination of BQ2589X_BOOSTV_MV(voltage) and 731*4f2df630SAndroid Build Coastguard Worker * BQ2589X_BOOST_LIM_xxxMA. 732*4f2df630SAndroid Build Coastguard Worker */ 733*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ2589X_BOOST 734*4f2df630SAndroid Build Coastguard Worker 735*4f2df630SAndroid Build Coastguard Worker /* 736*4f2df630SAndroid Build Coastguard Worker * Board specific charging current limit, in mA. If defined, the charge state 737*4f2df630SAndroid Build Coastguard Worker * machine will not allow the battery to request more current than this. 738*4f2df630SAndroid Build Coastguard Worker */ 739*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_CURRENT_LIMIT 740*4f2df630SAndroid Build Coastguard Worker 741*4f2df630SAndroid Build Coastguard Worker /* 742*4f2df630SAndroid Build Coastguard Worker * MT6370 backlight control settings. 743*4f2df630SAndroid Build Coastguard Worker * If defined, Panel backlight power is controlled by MT6370. 744*4f2df630SAndroid Build Coastguard Worker */ 745*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MT6370_BACKLIGHT 746*4f2df630SAndroid Build Coastguard Worker 747*4f2df630SAndroid Build Coastguard Worker /* 748*4f2df630SAndroid Build Coastguard Worker * MT6370 BC1.2 USB-PHY control. 749*4f2df630SAndroid Build Coastguard Worker * If defined, USB-PHY connection is controlled by GPIO_BC12_DET_EN. 750*4f2df630SAndroid Build Coastguard Worker * Assert GPIO_BC12_DET_EN to detect BC1.2 device, and deassert 751*4f2df630SAndroid Build Coastguard Worker * GPIO_BC12_DET_EN to mux USB-PHY back. 752*4f2df630SAndroid Build Coastguard Worker */ 753*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MT6370_BC12_GPIO 754*4f2df630SAndroid Build Coastguard Worker 755*4f2df630SAndroid Build Coastguard Worker /* 756*4f2df630SAndroid Build Coastguard Worker * Enable/disable system power monitor PSYS function: this enables output 757*4f2df630SAndroid Build Coastguard Worker * from charger chip to SoC. 758*4f2df630SAndroid Build Coastguard Worker */ 759*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_PSYS 760*4f2df630SAndroid Build Coastguard Worker 761*4f2df630SAndroid Build Coastguard Worker /* 762*4f2df630SAndroid Build Coastguard Worker * Enable reading PSYS (system power) value, either via "psys" console command, 763*4f2df630SAndroid Build Coastguard Worker * or via charger_get_system_power function. 764*4f2df630SAndroid Build Coastguard Worker */ 765*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_PSYS_READ 766*4f2df630SAndroid Build Coastguard Worker 767*4f2df630SAndroid Build Coastguard Worker /* 768*4f2df630SAndroid Build Coastguard Worker * Board specific charging current termination limit, in mA. If defined and 769*4f2df630SAndroid Build Coastguard Worker * charger supports setting termination current it should be set during charger 770*4f2df630SAndroid Build Coastguard Worker * init. 771*4f2df630SAndroid Build Coastguard Worker * 772*4f2df630SAndroid Build Coastguard Worker * TODO(tbroch): Only valid for bq2589x currently. Configure defaults for other 773*4f2df630SAndroid Build Coastguard Worker * charger ICs that support termination currents. 774*4f2df630SAndroid Build Coastguard Worker */ 775*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_TERM_CURRENT_LIMIT 776*4f2df630SAndroid Build Coastguard Worker 777*4f2df630SAndroid Build Coastguard Worker /* 778*4f2df630SAndroid Build Coastguard Worker * Board supports discharge mode. In this mode, the battery will discharge 779*4f2df630SAndroid Build Coastguard Worker * even if AC is present. Used for testing. 780*4f2df630SAndroid Build Coastguard Worker */ 781*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_DISCHARGE_ON_AC 782*4f2df630SAndroid Build Coastguard Worker 783*4f2df630SAndroid Build Coastguard Worker /* Board has a custom discharge mode. */ 784*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_DISCHARGE_ON_AC_CUSTOM 785*4f2df630SAndroid Build Coastguard Worker 786*4f2df630SAndroid Build Coastguard Worker /* 787*4f2df630SAndroid Build Coastguard Worker * Board specific flag used to disable external ILIM pin used to determine input 788*4f2df630SAndroid Build Coastguard Worker * current limit. When defined, the input current limit is decided only by 789*4f2df630SAndroid Build Coastguard Worker * the software register value. 790*4f2df630SAndroid Build Coastguard Worker */ 791*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_ILIM_PIN_DISABLED 792*4f2df630SAndroid Build Coastguard Worker 793*4f2df630SAndroid Build Coastguard Worker /* 794*4f2df630SAndroid Build Coastguard Worker * Default input current for the board, in mA. Many boards also use this as the 795*4f2df630SAndroid Build Coastguard Worker * least maximum input current during transients. 796*4f2df630SAndroid Build Coastguard Worker * 797*4f2df630SAndroid Build Coastguard Worker * This value should depend on external power adapter, designed charging 798*4f2df630SAndroid Build Coastguard Worker * voltage, and the maximum power of the running system. For type-C chargers, 799*4f2df630SAndroid Build Coastguard Worker * this should be set to 512 mA in order to not brown-out low-current USB 800*4f2df630SAndroid Build Coastguard Worker * charge ports in accordance with USB-PD r3.0 Sec. 7.3 801*4f2df630SAndroid Build Coastguard Worker */ 802*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_INPUT_CURRENT 803*4f2df630SAndroid Build Coastguard Worker 804*4f2df630SAndroid Build Coastguard Worker /* 805*4f2df630SAndroid Build Coastguard Worker * This config option is used to enable IDCHG trigger for prochot. This macro 806*4f2df630SAndroid Build Coastguard Worker * should be set to the desired current limit to draw from the battery before 807*4f2df630SAndroid Build Coastguard Worker * triggering prochot. Note that is has a 512 mA granularity. The function that 808*4f2df630SAndroid Build Coastguard Worker * sets the limit will mask of the lower 10 bits. For this check to be active 809*4f2df630SAndroid Build Coastguard Worker * the bq25710 must be in performance mode and this config option is also used 810*4f2df630SAndroid Build Coastguard Worker * to keep the bq25710 in performance mode when the AP is in S0. 811*4f2df630SAndroid Build Coastguard Worker */ 812*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_BQ25710_IDCHG_LIMIT_MA 813*4f2df630SAndroid Build Coastguard Worker 814*4f2df630SAndroid Build Coastguard Worker /* 815*4f2df630SAndroid Build Coastguard Worker * Board specific maximum input current limit, in mA. 816*4f2df630SAndroid Build Coastguard Worker */ 817*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MAX_INPUT_CURRENT 818*4f2df630SAndroid Build Coastguard Worker 819*4f2df630SAndroid Build Coastguard Worker /* 820*4f2df630SAndroid Build Coastguard Worker * Leave charger VBAT configured to battery-requested voltage under all 821*4f2df630SAndroid Build Coastguard Worker * conditions, even when AC is not present. This may be necessary to work 822*4f2df630SAndroid Build Coastguard Worker * around quirks of certain charger chips, such as the BD9995X. 823*4f2df630SAndroid Build Coastguard Worker */ 824*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MAINTAIN_VBAT 825*4f2df630SAndroid Build Coastguard Worker 826*4f2df630SAndroid Build Coastguard Worker /* 827*4f2df630SAndroid Build Coastguard Worker * Power thresholds for AP boot 828*4f2df630SAndroid Build Coastguard Worker * 829*4f2df630SAndroid Build Coastguard Worker * If one of the following conditions is met, EC boots AP: 830*4f2df630SAndroid Build Coastguard Worker * 831*4f2df630SAndroid Build Coastguard Worker * 1. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 832*4f2df630SAndroid Build Coastguard Worker * 2. AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 833*4f2df630SAndroid Build Coastguard Worker * 3. Battery charge >= CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC 834*4f2df630SAndroid Build Coastguard Worker * and 835*4f2df630SAndroid Build Coastguard Worker * AC power >= CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT 836*4f2df630SAndroid Build Coastguard Worker * 837*4f2df630SAndroid Build Coastguard Worker * Note that CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT/_CHG_MW are thresholds 838*4f2df630SAndroid Build Coastguard Worker * for the OS boot used by Depthcharge. The OS has higher power requirement 839*4f2df630SAndroid Build Coastguard Worker * but PD power is also available. 840*4f2df630SAndroid Build Coastguard Worker * 841*4f2df630SAndroid Build Coastguard Worker * WARNING: Locked RO firmware does not negotiate power greater than 15W via 842*4f2df630SAndroid Build Coastguard Worker * analog signaling. If the AP requires greater than 15W to boot, then see 843*4f2df630SAndroid Build Coastguard Worker * CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW. 844*4f2df630SAndroid Build Coastguard Worker */ 845*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 846*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC 847*4f2df630SAndroid Build Coastguard Worker /* Default: 15000 */ 848*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 849*4f2df630SAndroid Build Coastguard Worker /* Default: Disabled */ 850*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON_WITH_BATT 851*4f2df630SAndroid Build Coastguard Worker 852*4f2df630SAndroid Build Coastguard Worker /* Minimum battery percentage for power on with an imbalanced pack */ 853*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON 854*4f2df630SAndroid Build Coastguard Worker 855*4f2df630SAndroid Build Coastguard Worker /* 856*4f2df630SAndroid Build Coastguard Worker * Maximum battery cell imbalance to accept before considering the pack to be 857*4f2df630SAndroid Build Coastguard Worker * imbalanced, in millivolts. 858*4f2df630SAndroid Build Coastguard Worker */ 859*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BATTERY_MAX_IMBALANCE_MV 860*4f2df630SAndroid Build Coastguard Worker 861*4f2df630SAndroid Build Coastguard Worker /* Set this option when using a Narrow VDC (NVDC) charger, such as ISL9237/8. */ 862*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_NARROW_VDC 863*4f2df630SAndroid Build Coastguard Worker 864*4f2df630SAndroid Build Coastguard Worker /* 865*4f2df630SAndroid Build Coastguard Worker * Low energy thresholds - when battery level is below BAT_PCT and an external 866*4f2df630SAndroid Build Coastguard Worker * charger provides less than CHG_MW of power, inform the AP of the situation 867*4f2df630SAndroid Build Coastguard Worker * through the LIMIT_POWER charge state parameter. Depthcharge will hold off on 868*4f2df630SAndroid Build Coastguard Worker * the boot for up to 3 seconds while waiting for either condition to clear 869*4f2df630SAndroid Build Coastguard Worker * before starting the kernel. This wait happens after sw sync in RW mode, so 870*4f2df630SAndroid Build Coastguard Worker * the firmware may set it high enough that PD negotiation is required to clear 871*4f2df630SAndroid Build Coastguard Worker * it. 872*4f2df630SAndroid Build Coastguard Worker * 873*4f2df630SAndroid Build Coastguard Worker * Default: Disabled. Depthcharge is immediately released to boot the kernel. 874*4f2df630SAndroid Build Coastguard Worker * 875*4f2df630SAndroid Build Coastguard Worker * Setting this value to 15001 will require PD negotiation to be complete prior 876*4f2df630SAndroid Build Coastguard Worker * to releasing depthcharge. During PD negotiation, the charger will be briefly 877*4f2df630SAndroid Build Coastguard Worker * reduced to about 2.5W for a few hundred ms. 878*4f2df630SAndroid Build Coastguard Worker */ 879*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 880*4f2df630SAndroid Build Coastguard Worker /* Default: CHARGER_MIN_BAT_PCT_FOR_POWER_ON */ 881*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 882*4f2df630SAndroid Build Coastguard Worker 883*4f2df630SAndroid Build Coastguard Worker /* 884*4f2df630SAndroid Build Coastguard Worker * Enable charger's OTG functions, i.e. make it possible to supply output power 885*4f2df630SAndroid Build Coastguard Worker * from battery. 886*4f2df630SAndroid Build Coastguard Worker */ 887*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_OTG 888*4f2df630SAndroid Build Coastguard Worker 889*4f2df630SAndroid Build Coastguard Worker /* 890*4f2df630SAndroid Build Coastguard Worker * Charger should call battery_override_params() to limit/correct the voltage 891*4f2df630SAndroid Build Coastguard Worker * and current requested by the battery pack before acting on the request. 892*4f2df630SAndroid Build Coastguard Worker */ 893*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_PROFILE_OVERRIDE 894*4f2df630SAndroid Build Coastguard Worker 895*4f2df630SAndroid Build Coastguard Worker /* 896*4f2df630SAndroid Build Coastguard Worker * Common code for charger profile override. Should be used with 897*4f2df630SAndroid Build Coastguard Worker * CONFIG_CHARGER_PROFILE_OVERRIDE. 898*4f2df630SAndroid Build Coastguard Worker */ 899*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_PROFILE_OVERRIDE_COMMON 900*4f2df630SAndroid Build Coastguard Worker 901*4f2df630SAndroid Build Coastguard Worker /* 902*4f2df630SAndroid Build Coastguard Worker * Battery voltage threshold ranges for charge profile override. 903*4f2df630SAndroid Build Coastguard Worker * Override it in board.h if battery has multiple threshold ranges. 904*4f2df630SAndroid Build Coastguard Worker */ 905*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHARGER_PROFILE_VOLTAGE_RANGES 2 906*4f2df630SAndroid Build Coastguard Worker 907*4f2df630SAndroid Build Coastguard Worker /* Value of the charge sense resistor, in mOhms */ 908*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_SENSE_RESISTOR 909*4f2df630SAndroid Build Coastguard Worker 910*4f2df630SAndroid Build Coastguard Worker /* Value of the input current sense resistor, in mOhms */ 911*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_SENSE_RESISTOR_AC 912*4f2df630SAndroid Build Coastguard Worker 913*4f2df630SAndroid Build Coastguard Worker /* 914*4f2df630SAndroid Build Coastguard Worker * Board has an GPIO pin to enable or disable charging. 915*4f2df630SAndroid Build Coastguard Worker * 916*4f2df630SAndroid Build Coastguard Worker * This GPIO should be named GPIO_CHARGER_EN, if active high. Or 917*4f2df630SAndroid Build Coastguard Worker * GPIO_CHARGER_EN_L if active low. 918*4f2df630SAndroid Build Coastguard Worker */ 919*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_EN_GPIO 920*4f2df630SAndroid Build Coastguard Worker 921*4f2df630SAndroid Build Coastguard Worker /* Charger enable GPIO is active low */ 922*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHARGER_EN_ACTIVE_LOW 923*4f2df630SAndroid Build Coastguard Worker 924*4f2df630SAndroid Build Coastguard Worker /* Enable trickle charging */ 925*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TRICKLE_CHARGING 926*4f2df630SAndroid Build Coastguard Worker 927*4f2df630SAndroid Build Coastguard Worker /* Wireless chargers */ 928*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WIRELESS_CHARGER_P9221_R7 929*4f2df630SAndroid Build Coastguard Worker 930*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 931*4f2df630SAndroid Build Coastguard Worker 932*4f2df630SAndroid Build Coastguard Worker /* 933*4f2df630SAndroid Build Coastguard Worker * Chip needs to do pre-init very early in main(), and provides chip_pre_init() 934*4f2df630SAndroid Build Coastguard Worker * to do so. 935*4f2df630SAndroid Build Coastguard Worker */ 936*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIP_PRE_INIT 937*4f2df630SAndroid Build Coastguard Worker 938*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 939*4f2df630SAndroid Build Coastguard Worker /* Chipset config */ 940*4f2df630SAndroid Build Coastguard Worker 941*4f2df630SAndroid Build Coastguard Worker /* AP chipset support; pick at most one */ 942*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_APOLLOLAKE /* Intel Apollolake (x86) */ 943*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_BRASWELL /* Intel Braswell (x86) */ 944*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_CANNONLAKE /* Intel Cannonlake (x86) */ 945*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_COMETLAKE /* Intel Cometlake (x86) */ 946*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_COMETLAKE_DISCRETE /* Intel Cometlake (x86), \ 947*4f2df630SAndroid Build Coastguard Worker * discrete EC control \ 948*4f2df630SAndroid Build Coastguard Worker */ 949*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_ECDRIVEN /* Placeholder power module */ 950*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_GEMINILAKE /* Intel Geminilake (x86) */ 951*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_ICELAKE /* Intel Icelake (x86) */ 952*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_MT817X /* MediaTek MT817x */ 953*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_MT8183 /* MediaTek MT8183 */ 954*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_RK3288 /* Rockchip rk3288 */ 955*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_RK3399 /* Rockchip rk3399 */ 956*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_SKYLAKE /* Intel Skylake (x86) */ 957*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_SC7180 /* Qualcomm SC7180 */ 958*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_SDM845 /* Qualcomm SDM845 */ 959*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_STONEY /* AMD Stoney (x86)*/ 960*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_TIGERLAKE /* Intel Tigerlake (x86) */ 961*4f2df630SAndroid Build Coastguard Worker 962*4f2df630SAndroid Build Coastguard Worker /* Shared chipset support; automatically gets defined below. */ 963*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_APL_GLK /* Apollolake & Geminilake */ 964*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_ICL_TGL /* Icelake & Tigerlake */ 965*4f2df630SAndroid Build Coastguard Worker 966*4f2df630SAndroid Build Coastguard Worker /* Support chipset throttling */ 967*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_CAN_THROTTLE 968*4f2df630SAndroid Build Coastguard Worker 969*4f2df630SAndroid Build Coastguard Worker /* Enable additional chipset debugging */ 970*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_DEBUG 971*4f2df630SAndroid Build Coastguard Worker 972*4f2df630SAndroid Build Coastguard Worker /* Enable chipset reset hook, requires a deferrable function */ 973*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_RESET_HOOK 974*4f2df630SAndroid Build Coastguard Worker 975*4f2df630SAndroid Build Coastguard Worker /* 976*4f2df630SAndroid Build Coastguard Worker * Enable turning on PP3300_A rail before PP5000_A rail on the Ice Lake 977*4f2df630SAndroid Build Coastguard Worker * and Tiger Lake chipsets. Enable this option if there is leakage from PP5000_A 978*4f2df630SAndroid Build Coastguard Worker * resources into PP3300_A resources. 979*4f2df630SAndroid Build Coastguard Worker */ 980*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_PP3300_RAIL_FIRST 981*4f2df630SAndroid Build Coastguard Worker 982*4f2df630SAndroid Build Coastguard Worker /* 983*4f2df630SAndroid Build Coastguard Worker * Enable if chipset requires delay between power signals going high 984*4f2df630SAndroid Build Coastguard Worker * and deasserting RSMRST to PCH. 985*4f2df630SAndroid Build Coastguard Worker */ 986*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_X86_RSMRST_DELAY 987*4f2df630SAndroid Build Coastguard Worker 988*4f2df630SAndroid Build Coastguard Worker /* Support PMIC reset(using LDO_EN) in chipset */ 989*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_HAS_PLATFORM_PMIC_RESET 990*4f2df630SAndroid Build Coastguard Worker 991*4f2df630SAndroid Build Coastguard Worker /* Board requires chipset pre-init callback */ 992*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_HAS_PRE_INIT_CALLBACK 993*4f2df630SAndroid Build Coastguard Worker 994*4f2df630SAndroid Build Coastguard Worker /* Redefine when we need a different power-on sequence on the same chipset. */ 995*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHIPSET_POWER_SEQ_VERSION 0 996*4f2df630SAndroid Build Coastguard Worker 997*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 998*4f2df630SAndroid Build Coastguard Worker /* 999*4f2df630SAndroid Build Coastguard Worker * Chip config for clock circuitry 1000*4f2df630SAndroid Build Coastguard Worker * define = crystal / undef = oscillator 1001*4f2df630SAndroid Build Coastguard Worker */ 1002*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CLOCK_CRYSTAL 1003*4f2df630SAndroid Build Coastguard Worker 1004*4f2df630SAndroid Build Coastguard Worker /* 1005*4f2df630SAndroid Build Coastguard Worker * Indicate if a clock source is connected to stm32f4's high speed external 1006*4f2df630SAndroid Build Coastguard Worker * clock signal (HSE) specific input 1007*4f2df630SAndroid Build Coastguard Worker */ 1008*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STM32_CLOCK_HSE_HZ 1009*4f2df630SAndroid Build Coastguard Worker 1010*4f2df630SAndroid Build Coastguard Worker /* 1011*4f2df630SAndroid Build Coastguard Worker * Indicate if a clock source is connected to low speed external (LSE) specific 1012*4f2df630SAndroid Build Coastguard Worker * input 1013*4f2df630SAndroid Build Coastguard Worker */ 1014*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STM32_CLOCK_LSE 1015*4f2df630SAndroid Build Coastguard Worker 1016*4f2df630SAndroid Build Coastguard Worker /* 1017*4f2df630SAndroid Build Coastguard Worker * Chip config for clock source 1018*4f2df630SAndroid Build Coastguard Worker * define = external crystal oscillator / undef = internal clock source 1019*4f2df630SAndroid Build Coastguard Worker */ 1020*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CLOCK_SRC_EXTERNAL 1021*4f2df630SAndroid Build Coastguard Worker 1022*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1023*4f2df630SAndroid Build Coastguard Worker /* Support curve25519 public key cryptography */ 1024*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CURVE25519 1025*4f2df630SAndroid Build Coastguard Worker 1026*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1027*4f2df630SAndroid Build Coastguard Worker /* PMIC config */ 1028*4f2df630SAndroid Build Coastguard Worker 1029*4f2df630SAndroid Build Coastguard Worker /* Support firmware long press power-off timer */ 1030*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PMIC_FW_LONG_PRESS_TIMER 1031*4f2df630SAndroid Build Coastguard Worker 1032*4f2df630SAndroid Build Coastguard Worker /* Support PMIC power control */ 1033*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PMIC 1034*4f2df630SAndroid Build Coastguard Worker 1035*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1036*4f2df630SAndroid Build Coastguard Worker /* 1037*4f2df630SAndroid Build Coastguard Worker * Optional console commands 1038*4f2df630SAndroid Build Coastguard Worker * 1039*4f2df630SAndroid Build Coastguard Worker * Defining these options will enable the corresponding command on the EC 1040*4f2df630SAndroid Build Coastguard Worker * console. 1041*4f2df630SAndroid Build Coastguard Worker */ 1042*4f2df630SAndroid Build Coastguard Worker 1043*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ACCELS 1044*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ACCEL_FIFO 1045*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ACCEL_INFO 1046*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_ACCELSPOOF 1047*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_ADC 1048*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ALS 1049*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_APTHROTTLE 1050*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_BATDEBUG 1051*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_BATTFAKE 1052*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_BATT_MFG_ACCESS 1053*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_RETIMER 1054*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_BUTTON 1055*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_CBI 1056*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CCD_DISABLE /* 'ccd disable' subcommand */ 1057*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CHARGEN 1058*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_CHARGER 1059*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CHARGER_ADC_AMON_BMON 1060*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CHARGER_DUMP 1061*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CHARGER_PROFILE_OVERRIDE 1062*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CHARGER_PROFILE_OVERRIDE_TEST 1063*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_CHARGE_SUPPLIER_INFO 1064*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CHGRAMP 1065*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_CLOCKGATES 1066*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_COMXTEST 1067*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_CRASH 1068*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_DEVICE_EVENT 1069*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_DLOG 1070*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_DUMP_NVMEM 1071*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_ECRST 1072*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ECTEMP 1073*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_FASTCHARGE 1074*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_FLASH 1075*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_FLASHINFO 1076*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_FLASH_LOG 1077*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_FLASH_TRISTATE 1078*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_FORCETIME 1079*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_GPIO_EXTENDED 1080*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_GPIOCFG 1081*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_GSV 1082*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_GT7288 1083*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_HASH 1084*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_HCDEBUG 1085*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_HOSTCMD 1086*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2CWEDGE 1087*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2C_PROTECT 1088*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_I2C_SCAN 1089*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2C_STRESS_TEST 1090*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2C_STRESS_TEST_ACCEL 1091*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2C_STRESS_TEST_ALS 1092*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2C_STRESS_TEST_BATTERY 1093*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2C_STRESS_TEST_CHARGER 1094*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_I2C_STRESS_TEST_TCPC 1095*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_I2C_XFER 1096*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_IDLE_STATS 1097*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ILIM 1098*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_INA 1099*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_JUMPTAGS 1100*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_KEYBOARD 1101*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_LEDTEST 1102*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_LID_ANGLE 1103*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_MCDP 1104*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_MD 1105*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_MEM 1106*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_MMAPINFO 1107*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_PD 1108*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_PD_CONTROL 1109*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_PD_DEV_DUMP_INFO 1110*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_PD_FLASH 1111*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_PECI 1112*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_PINMUX 1113*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_PLL 1114*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_PMU 1115*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_POWERINDEBUG 1116*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_POWERLED 1117*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_PWR_AVG 1118*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_POWER_AP 1119*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_PPC_DUMP 1120*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_RAND 1121*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_REGULATOR 1122*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ROLLBACK 1123*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_RTC 1124*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_RTC_ALARM 1125*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_RW 1126*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_SCRATCHPAD 1127*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_SEVEN_SEG_DISPLAY 1128*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_SHMEM 1129*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_SLEEP 1130*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_SLEEPMASK 1131*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_SLEEPMASK_SET 1132*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_SPI_FLASH 1133*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_SPI_NOR 1134*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_SPI_XFER 1135*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_STACKOVERFLOW 1136*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_SYSINFO 1137*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_SYSJUMP 1138*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_SYSLOCK 1139*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_SYSRST 1140*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_TASKREADY 1141*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_TEMP_SENSOR 1142*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_TIMERINFO 1143*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_TYPEC 1144*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_USART_INFO 1145*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_USBMUX 1146*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_USB_PD_CABLE 1147*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_USB_PD_PE 1148*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_WAITMS 1149*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CMD_WP 1150*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_AP_RESET_LOG 1151*4f2df630SAndroid Build Coastguard Worker 1152*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1153*4f2df630SAndroid Build Coastguard Worker 1154*4f2df630SAndroid Build Coastguard Worker /* Provide common core code to output panic information without interrupts. */ 1155*4f2df630SAndroid Build Coastguard Worker #define CONFIG_COMMON_PANIC_OUTPUT 1156*4f2df630SAndroid Build Coastguard Worker 1157*4f2df630SAndroid Build Coastguard Worker /* 1158*4f2df630SAndroid Build Coastguard Worker * Store a panic log and halt the system for a software-related reasons, such as 1159*4f2df630SAndroid Build Coastguard Worker * stack overflow or assertion failure. 1160*4f2df630SAndroid Build Coastguard Worker */ 1161*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SOFTWARE_PANIC 1162*4f2df630SAndroid Build Coastguard Worker 1163*4f2df630SAndroid Build Coastguard Worker /* 1164*4f2df630SAndroid Build Coastguard Worker * Certain platforms(e.g. eve, poppy) cannot retain panic info in data ram since 1165*4f2df630SAndroid Build Coastguard Worker * VCC is powered down on EC reset. On such platforms, panic data needs to be 1166*4f2df630SAndroid Build Coastguard Worker * saved/restored to persistent storage by using chip specific 1167*4f2df630SAndroid Build Coastguard Worker * implementations. This option can be enabled by those platforms that have and 1168*4f2df630SAndroid Build Coastguard Worker * wish to use chip-implemented panic backup/restore functions. 1169*4f2df630SAndroid Build Coastguard Worker */ 1170*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIP_PANIC_BACKUP 1171*4f2df630SAndroid Build Coastguard Worker 1172*4f2df630SAndroid Build Coastguard Worker /* 1173*4f2df630SAndroid Build Coastguard Worker * Provide the default GPIO abstraction layer. 1174*4f2df630SAndroid Build Coastguard Worker * You want this unless you are doing a really tiny firmware. 1175*4f2df630SAndroid Build Coastguard Worker */ 1176*4f2df630SAndroid Build Coastguard Worker #define CONFIG_COMMON_GPIO 1177*4f2df630SAndroid Build Coastguard Worker 1178*4f2df630SAndroid Build Coastguard Worker /* 1179*4f2df630SAndroid Build Coastguard Worker * Provides smaller GPIO names to reduce flash size. Instead of the 'name' 1180*4f2df630SAndroid Build Coastguard Worker * field in GPIO macro it will concat 'port' and 'pin' to reduce flash size. 1181*4f2df630SAndroid Build Coastguard Worker */ 1182*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_COMMON_GPIO_SHORTNAMES 1183*4f2df630SAndroid Build Coastguard Worker 1184*4f2df630SAndroid Build Coastguard Worker /* 1185*4f2df630SAndroid Build Coastguard Worker * Provide common runtime layer code (tasks, hooks ...) 1186*4f2df630SAndroid Build Coastguard Worker * You want this unless you are doing a really tiny firmware. 1187*4f2df630SAndroid Build Coastguard Worker */ 1188*4f2df630SAndroid Build Coastguard Worker #define CONFIG_COMMON_RUNTIME 1189*4f2df630SAndroid Build Coastguard Worker 1190*4f2df630SAndroid Build Coastguard Worker /* Provide common core code to handle the operating system timers. */ 1191*4f2df630SAndroid Build Coastguard Worker #define CONFIG_COMMON_TIMER 1192*4f2df630SAndroid Build Coastguard Worker 1193*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1194*4f2df630SAndroid Build Coastguard Worker 1195*4f2df630SAndroid Build Coastguard Worker /* 1196*4f2df630SAndroid Build Coastguard Worker * Provide additional help on console commands, such as the supported 1197*4f2df630SAndroid Build Coastguard Worker * options/usage. 1198*4f2df630SAndroid Build Coastguard Worker * 1199*4f2df630SAndroid Build Coastguard Worker * Boards may #undef this to reduce image size. 1200*4f2df630SAndroid Build Coastguard Worker */ 1201*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CONSOLE_CMDHELP 1202*4f2df630SAndroid Build Coastguard Worker 1203*4f2df630SAndroid Build Coastguard Worker /* 1204*4f2df630SAndroid Build Coastguard Worker * Add a .flags field to the console commands data structure, to distinguish 1205*4f2df630SAndroid Build Coastguard Worker * some commands from others. The available flags bits are defined in 1206*4f2df630SAndroid Build Coastguard Worker * include/console.h 1207*4f2df630SAndroid Build Coastguard Worker */ 1208*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CONSOLE_COMMAND_FLAGS 1209*4f2df630SAndroid Build Coastguard Worker 1210*4f2df630SAndroid Build Coastguard Worker /* 1211*4f2df630SAndroid Build Coastguard Worker * One use of the .flags field is to make some console commands restricted, so 1212*4f2df630SAndroid Build Coastguard Worker * that they can be disabled or enabled at run time. 1213*4f2df630SAndroid Build Coastguard Worker */ 1214*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RESTRICTED_CONSOLE_COMMANDS 1215*4f2df630SAndroid Build Coastguard Worker 1216*4f2df630SAndroid Build Coastguard Worker /* The default .flags field value is zero, unless overridden with this. */ 1217*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CONSOLE_COMMAND_FLAGS_DEFAULT 1218*4f2df630SAndroid Build Coastguard Worker 1219*4f2df630SAndroid Build Coastguard Worker /* 1220*4f2df630SAndroid Build Coastguard Worker * Enable EC_CMD_CONSOLE_READ V1. One could disable this config to prevent 1221*4f2df630SAndroid Build Coastguard Worker * kernel from creating the `console_log` debugfs entry. 1222*4f2df630SAndroid Build Coastguard Worker */ 1223*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CONSOLE_ENABLE_READ_V1 1224*4f2df630SAndroid Build Coastguard Worker 1225*4f2df630SAndroid Build Coastguard Worker /* 1226*4f2df630SAndroid Build Coastguard Worker * Number of entries in console history buffer. 1227*4f2df630SAndroid Build Coastguard Worker * 1228*4f2df630SAndroid Build Coastguard Worker * Boards may #undef this to reduce memory usage. 1229*4f2df630SAndroid Build Coastguard Worker */ 1230*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CONSOLE_HISTORY 8 1231*4f2df630SAndroid Build Coastguard Worker 1232*4f2df630SAndroid Build Coastguard Worker /* Max length of a single line of input */ 1233*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CONSOLE_INPUT_LINE_SIZE 80 1234*4f2df630SAndroid Build Coastguard Worker 1235*4f2df630SAndroid Build Coastguard Worker /* Enable verbose output to UART console and extra timestamp print precision. */ 1236*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CONSOLE_VERBOSE 1237*4f2df630SAndroid Build Coastguard Worker 1238*4f2df630SAndroid Build Coastguard Worker /* Trigger building the image with all format strings extracted. */ 1239*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EXTRACT_PRINTF_STRINGS 1240*4f2df630SAndroid Build Coastguard Worker 1241*4f2df630SAndroid Build Coastguard Worker /* Include AP RO verification support. */ 1242*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_AP_RO_VERIFICATION 1243*4f2df630SAndroid Build Coastguard Worker 1244*4f2df630SAndroid Build Coastguard Worker /* 1245*4f2df630SAndroid Build Coastguard Worker * Enable EC-CR50 communication (a.k.a. EC-EFS2). This is for CR50 config only. 1246*4f2df630SAndroid Build Coastguard Worker */ 1247*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EC_EFS_SUPPORT 1248*4f2df630SAndroid Build Coastguard Worker 1249*4f2df630SAndroid Build Coastguard Worker /* 1250*4f2df630SAndroid Build Coastguard Worker * Version of EC-EFS: 0 (for 2.0) or 1 (for 2.1). 1251*4f2df630SAndroid Build Coastguard Worker * This is for CR50 config only 1252*4f2df630SAndroid Build Coastguard Worker */ 1253*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EC_EFS2_VERSION 1254*4f2df630SAndroid Build Coastguard Worker 1255*4f2df630SAndroid Build Coastguard Worker /* 1256*4f2df630SAndroid Build Coastguard Worker * Enable the experimental console. 1257*4f2df630SAndroid Build Coastguard Worker * 1258*4f2df630SAndroid Build Coastguard Worker * NOTE: If you enable this experimental console, you will need to run the 1259*4f2df630SAndroid Build Coastguard Worker * EC-3PO interactive console in the util directory! Otherwise, you won't be 1260*4f2df630SAndroid Build Coastguard Worker * able to enter any commands. 1261*4f2df630SAndroid Build Coastguard Worker */ 1262*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EXPERIMENTAL_CONSOLE 1263*4f2df630SAndroid Build Coastguard Worker 1264*4f2df630SAndroid Build Coastguard Worker /* Include CRC-8 utility function */ 1265*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CRC8 1266*4f2df630SAndroid Build Coastguard Worker 1267*4f2df630SAndroid Build Coastguard Worker /* 1268*4f2df630SAndroid Build Coastguard Worker * When enabled, do not build RO image from the same set of files as the RW 1269*4f2df630SAndroid Build Coastguard Worker * image. Instead define a separate set of object files in the respective 1270*4f2df630SAndroid Build Coastguard Worker * build.mk files by adding the objects to the custom-ro_objs-y variable. 1271*4f2df630SAndroid Build Coastguard Worker */ 1272*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CUSTOMIZED_RO 1273*4f2df630SAndroid Build Coastguard Worker 1274*4f2df630SAndroid Build Coastguard Worker /* 1275*4f2df630SAndroid Build Coastguard Worker * When enabled, build in support for software & hardware crypto; 1276*4f2df630SAndroid Build Coastguard Worker * only supported on CR50. 1277*4f2df630SAndroid Build Coastguard Worker * 1278*4f2df630SAndroid Build Coastguard Worker * If this is enabled on the host board, a minimal implementation is included to 1279*4f2df630SAndroid Build Coastguard Worker * allow fuzzing targets to fuzz code that depends on dcrypto. 1280*4f2df630SAndroid Build Coastguard Worker */ 1281*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DCRYPTO 1282*4f2df630SAndroid Build Coastguard Worker /* 1283*4f2df630SAndroid Build Coastguard Worker * Use dcrypto in the board directory instead of chip/g. 1284*4f2df630SAndroid Build Coastguard Worker */ 1285*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DCRYPTO_BOARD 1286*4f2df630SAndroid Build Coastguard Worker /* Build FIPS utils in the module */ 1287*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FIPS_UTIL 1288*4f2df630SAndroid Build Coastguard Worker /* Inject the fips checksum into the image. */ 1289*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FIPS_CHECKSUM 1290*4f2df630SAndroid Build Coastguard Worker /* 1291*4f2df630SAndroid Build Coastguard Worker * This provides struct definitions and function declarations that can be 1292*4f2df630SAndroid Build Coastguard Worker * implemented by unit tests for testing code that depends on dcrypto. 1293*4f2df630SAndroid Build Coastguard Worker * This should not be set at the same time as CONFIG_DCRYPTO. 1294*4f2df630SAndroid Build Coastguard Worker */ 1295*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DCRYPTO_MOCK 1296*4f2df630SAndroid Build Coastguard Worker 1297*4f2df630SAndroid Build Coastguard Worker /* 1298*4f2df630SAndroid Build Coastguard Worker * When enabled, RSA 2048 bit keygen gets a 40% performance boost, 1299*4f2df630SAndroid Build Coastguard Worker * at the cost of 2184 bytes of image size increase. 1300*4f2df630SAndroid Build Coastguard Worker */ 1301*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DCRYPTO_RSA_SPEEDUP 1302*4f2df630SAndroid Build Coastguard Worker 1303*4f2df630SAndroid Build Coastguard Worker /* 1304*4f2df630SAndroid Build Coastguard Worker * When enabled, accelerate sha512/384 using the generic crypto engine; 1305*4f2df630SAndroid Build Coastguard Worker * only supported on CR50. It is about 4x faster, but ~620 bytes larger. 1306*4f2df630SAndroid Build Coastguard Worker */ 1307*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DCRYPTO_SHA512 1308*4f2df630SAndroid Build Coastguard Worker 1309*4f2df630SAndroid Build Coastguard Worker /* 1310*4f2df630SAndroid Build Coastguard Worker * When enabled build support for SHA-384/512, requires CONFIG_DCRYPTO or 1311*4f2df630SAndroid Build Coastguard Worker * CONFIG_DCRYPTO_BOARD. 1312*4f2df630SAndroid Build Coastguard Worker */ 1313*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UPTO_SHA512 1314*4f2df630SAndroid Build Coastguard Worker 1315*4f2df630SAndroid Build Coastguard Worker /** 1316*4f2df630SAndroid Build Coastguard Worker * Make sw version of SHA2-512/384 equal to hw(dcrypto). 1317*4f2df630SAndroid Build Coastguard Worker * Unlike SHA2-256, dcrypto implementation of SHA2-512/384 allows to save 1318*4f2df630SAndroid Build Coastguard Worker * context, so can fully replace software implementation. 1319*4f2df630SAndroid Build Coastguard Worker */ 1320*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHA512_HW_EQ_SW 1321*4f2df630SAndroid Build Coastguard Worker 1322*4f2df630SAndroid Build Coastguard Worker /* 1323*4f2df630SAndroid Build Coastguard Worker * When enabled ignore version et al during fw upgrade for chip/g. 1324*4f2df630SAndroid Build Coastguard Worker */ 1325*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IGNORE_G_UPDATE_CHECKS 1326*4f2df630SAndroid Build Coastguard Worker 1327*4f2df630SAndroid Build Coastguard Worker /* 1328*4f2df630SAndroid Build Coastguard Worker * When enabled hardware alerts statistics provided via VendorCommand extension. 1329*4f2df630SAndroid Build Coastguard Worker */ 1330*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ENABLE_H1_ALERTS 1331*4f2df630SAndroid Build Coastguard Worker 1332*4f2df630SAndroid Build Coastguard Worker /* 1333*4f2df630SAndroid Build Coastguard Worker * Enable console shell command 'alerts' that prints chip alerts statistics. 1334*4f2df630SAndroid Build Coastguard Worker */ 1335*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ENABLE_H1_ALERTS_CONSOLE 1336*4f2df630SAndroid Build Coastguard Worker 1337*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1338*4f2df630SAndroid Build Coastguard Worker /* 1339*4f2df630SAndroid Build Coastguard Worker * Debugging config 1340*4f2df630SAndroid Build Coastguard Worker * 1341*4f2df630SAndroid Build Coastguard Worker * Note that these options are enabled by default, because they're really 1342*4f2df630SAndroid Build Coastguard Worker * handy for debugging systems during bringup and even at factory time. 1343*4f2df630SAndroid Build Coastguard Worker * 1344*4f2df630SAndroid Build Coastguard Worker * A board may undefine any or all of these to reduce image size and RAM usage, 1345*4f2df630SAndroid Build Coastguard Worker * at the cost of debuggability. 1346*4f2df630SAndroid Build Coastguard Worker */ 1347*4f2df630SAndroid Build Coastguard Worker 1348*4f2df630SAndroid Build Coastguard Worker /* 1349*4f2df630SAndroid Build Coastguard Worker * ASSERT() macros are checked at runtime. See CONFIG_DEBUG_ASSERT_REBOOTS 1350*4f2df630SAndroid Build Coastguard Worker * to see what happens if one fails. 1351*4f2df630SAndroid Build Coastguard Worker * 1352*4f2df630SAndroid Build Coastguard Worker * Boards may #undef this to reduce image size. 1353*4f2df630SAndroid Build Coastguard Worker */ 1354*4f2df630SAndroid Build Coastguard Worker #define CONFIG_DEBUG_ASSERT 1355*4f2df630SAndroid Build Coastguard Worker 1356*4f2df630SAndroid Build Coastguard Worker /* 1357*4f2df630SAndroid Build Coastguard Worker * Prints a message and reboots if an ASSERT() macro fails at runtime. When 1358*4f2df630SAndroid Build Coastguard Worker * enabled, an ASSERT() which fails will produce a message of the form: 1359*4f2df630SAndroid Build Coastguard Worker * 1360*4f2df630SAndroid Build Coastguard Worker * ASSERTION FAILURE '<expr>' in function() at file:line 1361*4f2df630SAndroid Build Coastguard Worker * 1362*4f2df630SAndroid Build Coastguard Worker * If this is not defined, failing ASSERT() will trigger a BKPT instruction 1363*4f2df630SAndroid Build Coastguard Worker * instead. 1364*4f2df630SAndroid Build Coastguard Worker * 1365*4f2df630SAndroid Build Coastguard Worker * Ignored if CONFIG_DEBUG_ASSERT is not defined. 1366*4f2df630SAndroid Build Coastguard Worker * 1367*4f2df630SAndroid Build Coastguard Worker * Boards may #undef this to reduce image size. 1368*4f2df630SAndroid Build Coastguard Worker */ 1369*4f2df630SAndroid Build Coastguard Worker #define CONFIG_DEBUG_ASSERT_REBOOTS 1370*4f2df630SAndroid Build Coastguard Worker 1371*4f2df630SAndroid Build Coastguard Worker /* 1372*4f2df630SAndroid Build Coastguard Worker * On assertion failure, prints only the file name and the line number. 1373*4f2df630SAndroid Build Coastguard Worker * 1374*4f2df630SAndroid Build Coastguard Worker * Ignored if CONFIG_DEBUG_ASSERT_REBOOTS is not defined. 1375*4f2df630SAndroid Build Coastguard Worker * 1376*4f2df630SAndroid Build Coastguard Worker * Boards may define this to reduce image size. 1377*4f2df630SAndroid Build Coastguard Worker */ 1378*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEBUG_ASSERT_BRIEF 1379*4f2df630SAndroid Build Coastguard Worker 1380*4f2df630SAndroid Build Coastguard Worker /* 1381*4f2df630SAndroid Build Coastguard Worker * Disable the write buffer used for default memory map accesses. 1382*4f2df630SAndroid Build Coastguard Worker * This turns "Imprecise data bus errors" into "Precise" errors 1383*4f2df630SAndroid Build Coastguard Worker * in exception traces at the cost of some performance. 1384*4f2df630SAndroid Build Coastguard Worker * This may help identify the offending instruction causing an 1385*4f2df630SAndroid Build Coastguard Worker * exception. Supported on cortex-m. 1386*4f2df630SAndroid Build Coastguard Worker */ 1387*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEBUG_DISABLE_WRITE_BUFFER 1388*4f2df630SAndroid Build Coastguard Worker 1389*4f2df630SAndroid Build Coastguard Worker /* 1390*4f2df630SAndroid Build Coastguard Worker * Print additional information when exceptions are triggered, such as the 1391*4f2df630SAndroid Build Coastguard Worker * fault address, here shown as bfar. This shows the reason for the fault 1392*4f2df630SAndroid Build Coastguard Worker * and may help to determine the cause. 1393*4f2df630SAndroid Build Coastguard Worker * 1394*4f2df630SAndroid Build Coastguard Worker * === EXCEPTION: 03 ====== xPSR: 01000000 =========== 1395*4f2df630SAndroid Build Coastguard Worker * r0 :0000000b r1 :00000047 r2 :60000000 r3 :200013dd 1396*4f2df630SAndroid Build Coastguard Worker * r4 :00000000 r5 :080053f4 r6 :200013d0 r7 :00000002 1397*4f2df630SAndroid Build Coastguard Worker * r8 :00000000 r9 :200013de r10:00000000 r11:00000000 1398*4f2df630SAndroid Build Coastguard Worker * r12:00000000 sp :200009a0 lr :08002b85 pc :08003a8a 1399*4f2df630SAndroid Build Coastguard Worker * Precise data bus error, Forced hard fault, Vector catch, bfar = 60000000 1400*4f2df630SAndroid Build Coastguard Worker * mmfs = 00008200, shcsr = 00000000, hfsr = 40000000, dfsr = 00000008 1401*4f2df630SAndroid Build Coastguard Worker * 1402*4f2df630SAndroid Build Coastguard Worker * If this is not defined, only a register dump will be printed. 1403*4f2df630SAndroid Build Coastguard Worker * 1404*4f2df630SAndroid Build Coastguard Worker * Boards may #undef this to reduce image size. 1405*4f2df630SAndroid Build Coastguard Worker */ 1406*4f2df630SAndroid Build Coastguard Worker #define CONFIG_DEBUG_EXCEPTIONS 1407*4f2df630SAndroid Build Coastguard Worker 1408*4f2df630SAndroid Build Coastguard Worker /* 1409*4f2df630SAndroid Build Coastguard Worker * Print orientation when device orientation changes 1410*4f2df630SAndroid Build Coastguard Worker * (requires CONFIG_SENSOR_ORIENTATION) 1411*4f2df630SAndroid Build Coastguard Worker */ 1412*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEBUG_ORIENTATION 1413*4f2df630SAndroid Build Coastguard Worker 1414*4f2df630SAndroid Build Coastguard Worker /* Support Synchronous UART debug printf. */ 1415*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEBUG_PRINTF 1416*4f2df630SAndroid Build Coastguard Worker 1417*4f2df630SAndroid Build Coastguard Worker /* Check for stack overflows on every context switch */ 1418*4f2df630SAndroid Build Coastguard Worker #define CONFIG_DEBUG_STACK_OVERFLOW 1419*4f2df630SAndroid Build Coastguard Worker 1420*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1421*4f2df630SAndroid Build Coastguard Worker 1422*4f2df630SAndroid Build Coastguard Worker /* Support events from devices attached to the EC */ 1423*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEVICE_EVENT 1424*4f2df630SAndroid Build Coastguard Worker 1425*4f2df630SAndroid Build Coastguard Worker /* Monitor the states of other devices */ 1426*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DEVICE_STATE 1427*4f2df630SAndroid Build Coastguard Worker 1428*4f2df630SAndroid Build Coastguard Worker /* Support DMA transfers inside the EC */ 1429*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DMA 1430*4f2df630SAndroid Build Coastguard Worker 1431*4f2df630SAndroid Build Coastguard Worker /* Use the common interrupt handlers for DMA IRQs */ 1432*4f2df630SAndroid Build Coastguard Worker #define CONFIG_DMA_DEFAULT_HANDLERS 1433*4f2df630SAndroid Build Coastguard Worker 1434*4f2df630SAndroid Build Coastguard Worker /* Compile extra debugging and tests for the DMA module */ 1435*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DMA_HELP 1436*4f2df630SAndroid Build Coastguard Worker 1437*4f2df630SAndroid Build Coastguard Worker /* Usually, EC capable of sensor speeds up to 200000 mHz */ 1438*4f2df630SAndroid Build Coastguard Worker #define CONFIG_EC_MAX_SENSOR_FREQ_DEFAULT_MILLIHZ 200000 1439*4f2df630SAndroid Build Coastguard Worker 1440*4f2df630SAndroid Build Coastguard Worker /* Support EC chip internal data EEPROM */ 1441*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EEPROM 1442*4f2df630SAndroid Build Coastguard Worker 1443*4f2df630SAndroid Build Coastguard Worker /* Include code for handling external power */ 1444*4f2df630SAndroid Build Coastguard Worker #define CONFIG_EXTPOWER 1445*4f2df630SAndroid Build Coastguard Worker 1446*4f2df630SAndroid Build Coastguard Worker /* Support detecting external power presence via a GPIO */ 1447*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EXTPOWER_GPIO 1448*4f2df630SAndroid Build Coastguard Worker 1449*4f2df630SAndroid Build Coastguard Worker /* Default debounce time for external power signal */ 1450*4f2df630SAndroid Build Coastguard Worker #define CONFIG_EXTPOWER_DEBOUNCE_MS 30 1451*4f2df630SAndroid Build Coastguard Worker 1452*4f2df630SAndroid Build Coastguard Worker /* Add support for CCD factory mode */ 1453*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FACTORY_MODE 1454*4f2df630SAndroid Build Coastguard Worker 1455*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1456*4f2df630SAndroid Build Coastguard Worker /* Number of cooling fans. Undef if none. */ 1457*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FANS 1458*4f2df630SAndroid Build Coastguard Worker 1459*4f2df630SAndroid Build Coastguard Worker /* Percentage to which all fans are set at initiation */ 1460*4f2df630SAndroid Build Coastguard Worker #define CONFIG_FAN_INIT_SPEED 100 1461*4f2df630SAndroid Build Coastguard Worker 1462*4f2df630SAndroid Build Coastguard Worker /* Support fan control while in low-power idle */ 1463*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FAN_DSLEEP 1464*4f2df630SAndroid Build Coastguard Worker 1465*4f2df630SAndroid Build Coastguard Worker /* 1466*4f2df630SAndroid Build Coastguard Worker * Fans have non-const configuration. 1467*4f2df630SAndroid Build Coastguard Worker */ 1468*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FAN_DYNAMIC 1469*4f2df630SAndroid Build Coastguard Worker 1470*4f2df630SAndroid Build Coastguard Worker /* 1471*4f2df630SAndroid Build Coastguard Worker * Replace the default fan_percent_to_rpm() function with a board-specific 1472*4f2df630SAndroid Build Coastguard Worker * implementation in board.c 1473*4f2df630SAndroid Build Coastguard Worker */ 1474*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FAN_RPM_CUSTOM 1475*4f2df630SAndroid Build Coastguard Worker 1476*4f2df630SAndroid Build Coastguard Worker /* 1477*4f2df630SAndroid Build Coastguard Worker * We normally check and update the fans once per second (HOOK_SECOND). If this 1478*4f2df630SAndroid Build Coastguard Worker * is #defined to a postive integer N, we will only update the fans every N 1479*4f2df630SAndroid Build Coastguard Worker * seconds instead. 1480*4f2df630SAndroid Build Coastguard Worker */ 1481*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FAN_UPDATE_PERIOD 1482*4f2df630SAndroid Build Coastguard Worker 1483*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1484*4f2df630SAndroid Build Coastguard Worker /* Flash configuration */ 1485*4f2df630SAndroid Build Coastguard Worker 1486*4f2df630SAndroid Build Coastguard Worker /* This enables console commands and higher-level features */ 1487*4f2df630SAndroid Build Coastguard Worker #define CONFIG_FLASH 1488*4f2df630SAndroid Build Coastguard Worker /* This enables chip-specific access functions */ 1489*4f2df630SAndroid Build Coastguard Worker #define CONFIG_FLASH_PHYSICAL 1490*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_BANK_SIZE 1491*4f2df630SAndroid Build Coastguard Worker /* Provide event log stored in flash memory. */ 1492*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_LOG 1493*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_LOG_BASE 1494*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_LOG_SPACE 1495*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_ERASED_VALUE32 1496*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_ERASE_SIZE 1497*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_ROW_SIZE 1498*4f2df630SAndroid Build Coastguard Worker /* Allow deferred (async) flash erase */ 1499*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_DEFERRED_ERASE 1500*4f2df630SAndroid Build Coastguard Worker /* Flash must be selected for write/erase operations to succeed. */ 1501*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_SELECT_REQUIRED 1502*4f2df630SAndroid Build Coastguard Worker 1503*4f2df630SAndroid Build Coastguard Worker /* Base address of program memory */ 1504*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PROGRAM_MEMORY_BASE 1505*4f2df630SAndroid Build Coastguard Worker 1506*4f2df630SAndroid Build Coastguard Worker /* 1507*4f2df630SAndroid Build Coastguard Worker * EC code can reside on internal or external storage. Only one of these 1508*4f2df630SAndroid Build Coastguard Worker * CONFIGs should be defined. CONFIG_INTERNAL_STORAGE implies XIP 1509*4f2df630SAndroid Build Coastguard Worker * (eXecute-In-Place) semantics. i.e. code is being fetched directly from 1510*4f2df630SAndroid Build Coastguard Worker * storage media. 1511*4f2df630SAndroid Build Coastguard Worker */ 1512*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EXTERNAL_STORAGE 1513*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_INTERNAL_STORAGE 1514*4f2df630SAndroid Build Coastguard Worker 1515*4f2df630SAndroid Build Coastguard Worker /* 1516*4f2df630SAndroid Build Coastguard Worker * Flash is directly mapped into the EC's address space. If this is not 1517*4f2df630SAndroid Build Coastguard Worker * defined, the flash driver must implement flash_physical_read(). 1518*4f2df630SAndroid Build Coastguard Worker */ 1519*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MAPPED_STORAGE 1520*4f2df630SAndroid Build Coastguard Worker 1521*4f2df630SAndroid Build Coastguard Worker /* 1522*4f2df630SAndroid Build Coastguard Worker * Base address of memory-mapped flash storage, for platforms which define 1523*4f2df630SAndroid Build Coastguard Worker * CONFIG_MAPPED_STORAGE. 1524*4f2df630SAndroid Build Coastguard Worker */ 1525*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MAPPED_STORAGE_BASE 1526*4f2df630SAndroid Build Coastguard Worker 1527*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_PROTECT_NEXT_BOOT 1528*4f2df630SAndroid Build Coastguard Worker 1529*4f2df630SAndroid Build Coastguard Worker /* 1530*4f2df630SAndroid Build Coastguard Worker * Some platforms need to write protect RW independently of all flash. 1531*4f2df630SAndroid Build Coastguard Worker */ 1532*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_PROTECT_RW 1533*4f2df630SAndroid Build Coastguard Worker 1534*4f2df630SAndroid Build Coastguard Worker /* 1535*4f2df630SAndroid Build Coastguard Worker * Store persistent write protect for the flash inside the flash data itself. 1536*4f2df630SAndroid Build Coastguard Worker * This allows ECs with internal flash to emulate something closer to a SPI 1537*4f2df630SAndroid Build Coastguard Worker * flash write protect register. If this is not defined, write protect state 1538*4f2df630SAndroid Build Coastguard Worker * is maintained solely by the physical flash driver. 1539*4f2df630SAndroid Build Coastguard Worker */ 1540*4f2df630SAndroid Build Coastguard Worker #define CONFIG_FLASH_PSTATE 1541*4f2df630SAndroid Build Coastguard Worker 1542*4f2df630SAndroid Build Coastguard Worker /* 1543*4f2df630SAndroid Build Coastguard Worker * Store the pstate data in its own dedicated bank of flash. This allows 1544*4f2df630SAndroid Build Coastguard Worker * disabling the protect-RO-at-boot flag without rewriting the RO firmware, 1545*4f2df630SAndroid Build Coastguard Worker * but costs a bank of flash. 1546*4f2df630SAndroid Build Coastguard Worker * 1547*4f2df630SAndroid Build Coastguard Worker * If this is not defined, the pstate data is stored inside the RO firmware 1548*4f2df630SAndroid Build Coastguard Worker * image itself. This is more space-efficient, but the only way to clear the 1549*4f2df630SAndroid Build Coastguard Worker * flag once it's set is to rewrite the RO firmware (after removing the WP 1550*4f2df630SAndroid Build Coastguard Worker * screw, of course). 1551*4f2df630SAndroid Build Coastguard Worker */ 1552*4f2df630SAndroid Build Coastguard Worker #define CONFIG_FLASH_PSTATE_BANK 1553*4f2df630SAndroid Build Coastguard Worker 1554*4f2df630SAndroid Build Coastguard Worker /* 1555*4f2df630SAndroid Build Coastguard Worker * Lock the PSTATE by default (currently only supported when 1556*4f2df630SAndroid Build Coastguard Worker * CONFIG_FLASH_PSTATE_BANK is not defined). 1557*4f2df630SAndroid Build Coastguard Worker */ 1558*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_PSTATE_LOCKED 1559*4f2df630SAndroid Build Coastguard Worker 1560*4f2df630SAndroid Build Coastguard Worker /* 1561*4f2df630SAndroid Build Coastguard Worker * Enable readout protection. 1562*4f2df630SAndroid Build Coastguard Worker */ 1563*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_READOUT_PROTECTION 1564*4f2df630SAndroid Build Coastguard Worker 1565*4f2df630SAndroid Build Coastguard Worker /* 1566*4f2df630SAndroid Build Coastguard Worker * Use Read-out protection status as PSTATE, i.e. after RDP is enabled, we never 1567*4f2df630SAndroid Build Coastguard Worker * allow RO protection to be disabled. 1568*4f2df630SAndroid Build Coastguard Worker * 1569*4f2df630SAndroid Build Coastguard Worker * This is used when we want to prevent read-back of some critical region (e.g. 1570*4f2df630SAndroid Build Coastguard Worker * rollback), even in DFU/BOOT0 mode. 1571*4f2df630SAndroid Build Coastguard Worker * 1572*4f2df630SAndroid Build Coastguard Worker * Note that this significantly changes the behaviour or flash protection, 1573*4f2df630SAndroid Build Coastguard Worker * as this tie EC_FLASH_PROTECT_RO_AT_BOOT with RDP status: it makes no 1574*4f2df630SAndroid Build Coastguard Worker * sense to be able to unlock RO protection if RDP is enabled, as a custom RO 1575*4f2df630SAndroid Build Coastguard Worker * could allow protected regions readback. 1576*4f2df630SAndroid Build Coastguard Worker * 1577*4f2df630SAndroid Build Coastguard Worker * TODO(crbug.com/888109): Implementation is currently only available on 1578*4f2df630SAndroid Build Coastguard Worker * STM32H7 and STM32F4, and requires more documentation. 1579*4f2df630SAndroid Build Coastguard Worker */ 1580*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE 1581*4f2df630SAndroid Build Coastguard Worker 1582*4f2df630SAndroid Build Coastguard Worker /* 1583*4f2df630SAndroid Build Coastguard Worker * For flash that is segemented in different regions. 1584*4f2df630SAndroid Build Coastguard Worker */ 1585*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_MULTIPLE_REGION 1586*4f2df630SAndroid Build Coastguard Worker /* Number of regions of different size/type */ 1587*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_REGION_TYPE_COUNT 1588*4f2df630SAndroid Build Coastguard Worker 1589*4f2df630SAndroid Build Coastguard Worker /* Total size of writable flash */ 1590*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_SIZE 1591*4f2df630SAndroid Build Coastguard Worker 1592*4f2df630SAndroid Build Coastguard Worker /* Minimum flash write size (in bytes) */ 1593*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_WRITE_SIZE 1594*4f2df630SAndroid Build Coastguard Worker /* Most efficient flash write size (in bytes) */ 1595*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_WRITE_IDEAL_SIZE 1596*4f2df630SAndroid Build Coastguard Worker 1597*4f2df630SAndroid Build Coastguard Worker /* Protected region of storage belonging to EC */ 1598*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EC_PROTECTED_STORAGE_OFF 1599*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EC_PROTECTED_STORAGE_SIZE 1600*4f2df630SAndroid Build Coastguard Worker 1601*4f2df630SAndroid Build Coastguard Worker /* Writable region of storage belonging to EC */ 1602*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EC_WRITABLE_STORAGE_OFF 1603*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EC_WRITABLE_STORAGE_SIZE 1604*4f2df630SAndroid Build Coastguard Worker 1605*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1606*4f2df630SAndroid Build Coastguard Worker /* NvMem Configuration */ 1607*4f2df630SAndroid Build Coastguard Worker /* Enable NV Memory module within flash */ 1608*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM 1609*4f2df630SAndroid Build Coastguard Worker /* Offset to start of NvMem area from base of flash */ 1610*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_OFFSET_A 1611*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_OFFSET_B 1612*4f2df630SAndroid Build Coastguard Worker /* Address of start of Nvmem area */ 1613*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_BASE_A 1614*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_BASE_B 1615*4f2df630SAndroid Build Coastguard Worker 1616*4f2df630SAndroid Build Coastguard Worker /* Flash offsets for the 'new' (as of 1/2019) nvmem storage scheme. */ 1617*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NEW_NVMEM_BASE_A 1618*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NEW_NVMEM_BASE_B 1619*4f2df630SAndroid Build Coastguard Worker 1620*4f2df630SAndroid Build Coastguard Worker /* Size in bytes of NvMem area */ 1621*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_SIZE 1622*4f2df630SAndroid Build Coastguard Worker 1623*4f2df630SAndroid Build Coastguard Worker /* Enable <key,value> variable support (requires CONFIG_FLASH_NVMEM) */ 1624*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_VARS 1625*4f2df630SAndroid Build Coastguard Worker /* 1626*4f2df630SAndroid Build Coastguard Worker * We already have to define nvmem_user_sizes[] to specify the order and size 1627*4f2df630SAndroid Build Coastguard Worker * of the user regions. CONFIG_FLASH_NVMEM_VARS looks for two symbols to 1628*4f2df630SAndroid Build Coastguard Worker * specify the region number and size for the variable region. 1629*4f2df630SAndroid Build Coastguard Worker */ 1630*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_VARS_USER_NUM 1631*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FLASH_NVMEM_VARS_USER_SIZE 1632*4f2df630SAndroid Build Coastguard Worker 1633*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1634*4f2df630SAndroid Build Coastguard Worker 1635*4f2df630SAndroid Build Coastguard Worker /* Include a flashmap in the compiled firmware image */ 1636*4f2df630SAndroid Build Coastguard Worker #define CONFIG_FMAP 1637*4f2df630SAndroid Build Coastguard Worker 1638*4f2df630SAndroid Build Coastguard Worker /* Allow EC serial console input to wake up the EC from STOP mode */ 1639*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FORCE_CONSOLE_RESUME 1640*4f2df630SAndroid Build Coastguard Worker 1641*4f2df630SAndroid Build Coastguard Worker /* Enable support for floating point unit */ 1642*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FPU 1643*4f2df630SAndroid Build Coastguard Worker 1644*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1645*4f2df630SAndroid Build Coastguard Worker /* Firmware region configuration */ 1646*4f2df630SAndroid Build Coastguard Worker 1647*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FW_PSTATE_OFF 1648*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FW_PSTATE_SIZE 1649*4f2df630SAndroid Build Coastguard Worker 1650*4f2df630SAndroid Build Coastguard Worker /* 1651*4f2df630SAndroid Build Coastguard Worker * Read-only / read-write image configuration. 1652*4f2df630SAndroid Build Coastguard Worker * Images may reside on storage (ex. external or internal SPI) at a different 1653*4f2df630SAndroid Build Coastguard Worker * offset than when copied to program memory. Hence, two sets of offsets, 1654*4f2df630SAndroid Build Coastguard Worker * for STORAGE and for MEMORY. 1655*4f2df630SAndroid Build Coastguard Worker */ 1656*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_MEM_OFF 1657*4f2df630SAndroid Build Coastguard Worker /* Offset relative to CONFIG_EC_PROTECTED_STORAGE_OFF */ 1658*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_STORAGE_OFF 1659*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_SIZE 1660*4f2df630SAndroid Build Coastguard Worker 1661*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_MEM_OFF 1662*4f2df630SAndroid Build Coastguard Worker /* Some targets include two RW sections in the image. */ 1663*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_B 1664*4f2df630SAndroid Build Coastguard Worker /* This is the offset of the second RW section into the flash. */ 1665*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_B_MEM_OFF 1666*4f2df630SAndroid Build Coastguard Worker 1667*4f2df630SAndroid Build Coastguard Worker /* Offset relative to CONFIG_EC_WRITABLE_STORAGE_OFF */ 1668*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_STORAGE_OFF 1669*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_SIZE 1670*4f2df630SAndroid Build Coastguard Worker 1671*4f2df630SAndroid Build Coastguard Worker /* 1672*4f2df630SAndroid Build Coastguard Worker * NPCX-specific bootheader geometry. 1673*4f2df630SAndroid Build Coastguard Worker * TODO(crosbug.com/p/23796): Factor these CONFIGs out. 1674*4f2df630SAndroid Build Coastguard Worker */ 1675*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_HDR_MEM_OFF 1676*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_HDR_SIZE 1677*4f2df630SAndroid Build Coastguard Worker 1678*4f2df630SAndroid Build Coastguard Worker /* 1679*4f2df630SAndroid Build Coastguard Worker * Write protect region offset / size. This region normally encompasses the 1680*4f2df630SAndroid Build Coastguard Worker * RO image, but may also contain additional images or data. 1681*4f2df630SAndroid Build Coastguard Worker */ 1682*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WP_STORAGE_OFF 1683*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WP_STORAGE_SIZE 1684*4f2df630SAndroid Build Coastguard Worker 1685*4f2df630SAndroid Build Coastguard Worker /* 1686*4f2df630SAndroid Build Coastguard Worker * Rollback protect region. If CONFIG_ROLLBACK is defined to enable the rollback 1687*4f2df630SAndroid Build Coastguard Worker * protect region, CONFIG_ROLLBACK_OFF and CONFIG_ROLLBACK_SIZE must be defined 1688*4f2df630SAndroid Build Coastguard Worker * too. 1689*4f2df630SAndroid Build Coastguard Worker */ 1690*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ROLLBACK 1691*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ROLLBACK_OFF 1692*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ROLLBACK_SIZE 1693*4f2df630SAndroid Build Coastguard Worker 1694*4f2df630SAndroid Build Coastguard Worker /* If defined, add support for storing some entropy in the rollback region. */ 1695*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ROLLBACK_SECRET_SIZE 1696*4f2df630SAndroid Build Coastguard Worker 1697*4f2df630SAndroid Build Coastguard Worker /* If defined, protect rollback region readback using MPU. */ 1698*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ROLLBACK_MPU_PROTECT 1699*4f2df630SAndroid Build Coastguard Worker 1700*4f2df630SAndroid Build Coastguard Worker /* 1701*4f2df630SAndroid Build Coastguard Worker * If defined, inject some locally generated entropy when secret is updated, 1702*4f2df630SAndroid Build Coastguard Worker * using board_get_entropy function. 1703*4f2df630SAndroid Build Coastguard Worker * Large values may take a long time to generate. 1704*4f2df630SAndroid Build Coastguard Worker * 1705*4f2df630SAndroid Build Coastguard Worker * This is only meant to add a little bit of extra entropy, when the hardware 1706*4f2df630SAndroid Build Coastguard Worker * lacks a random number generator (otherwise, the strong entropy can be 1707*4f2df630SAndroid Build Coastguard Worker * directly added to the secret, using rollback_add_entropy). 1708*4f2df630SAndroid Build Coastguard Worker */ 1709*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ROLLBACK_SECRET_LOCAL_ENTROPY_SIZE 1710*4f2df630SAndroid Build Coastguard Worker 1711*4f2df630SAndroid Build Coastguard Worker /* If defined, we can update rollback information (RW can unset this). */ 1712*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ROLLBACK_UPDATE 1713*4f2df630SAndroid Build Coastguard Worker 1714*4f2df630SAndroid Build Coastguard Worker /* 1715*4f2df630SAndroid Build Coastguard Worker * Current rollback version. Meaningless for RO (but provides the minimum value 1716*4f2df630SAndroid Build Coastguard Worker * that will be written to the rollback protection at flash time). 1717*4f2df630SAndroid Build Coastguard Worker * 1718*4f2df630SAndroid Build Coastguard Worker * For RW, rollback version included in version structure, used by RO to 1719*4f2df630SAndroid Build Coastguard Worker * determine if the RW image is recent enough and can be jumped to. 1720*4f2df630SAndroid Build Coastguard Worker * 1721*4f2df630SAndroid Build Coastguard Worker * Valid values are >= 0, <= INT32_MAX (positive, 32-bit signed integer). 1722*4f2df630SAndroid Build Coastguard Worker */ 1723*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ROLLBACK_VERSION 0 1724*4f2df630SAndroid Build Coastguard Worker 1725*4f2df630SAndroid Build Coastguard Worker /* 1726*4f2df630SAndroid Build Coastguard Worker * Board Image ec.bin contains a RO firmware. If not defined, the image will 1727*4f2df630SAndroid Build Coastguard Worker * only contain the RW firmware. 1728*4f2df630SAndroid Build Coastguard Worker */ 1729*4f2df630SAndroid Build Coastguard Worker #define CONFIG_FW_INCLUDE_RO 1730*4f2df630SAndroid Build Coastguard Worker 1731*4f2df630SAndroid Build Coastguard Worker /* If defined, another image (RW) exists with more features */ 1732*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FW_LIMITED_IMAGE 1733*4f2df630SAndroid Build Coastguard Worker 1734*4f2df630SAndroid Build Coastguard Worker /* 1735*4f2df630SAndroid Build Coastguard Worker * If defined, we can use system_get_fw_reset_vector function to decide 1736*4f2df630SAndroid Build Coastguard Worker * reset vector of RO/RW firmware for sysjump. 1737*4f2df630SAndroid Build Coastguard Worker */ 1738*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FW_RESET_VECTOR 1739*4f2df630SAndroid Build Coastguard Worker 1740*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1741*4f2df630SAndroid Build Coastguard Worker /* Motion sensor based gesture recognition information */ 1742*4f2df630SAndroid Build Coastguard Worker /* These all require HAS_TASK_MOTIONSENSE to work */ 1743*4f2df630SAndroid Build Coastguard Worker 1744*4f2df630SAndroid Build Coastguard Worker /* Do we want to detect gestures? */ 1745*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_DETECTION 1746*4f2df630SAndroid Build Coastguard Worker 1747*4f2df630SAndroid Build Coastguard Worker /* Mask of all sensors used for gesture dectections */ 1748*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_DETECTION_MASK 1749*4f2df630SAndroid Build Coastguard Worker 1750*4f2df630SAndroid Build Coastguard Worker /* some gesture recognition done in software */ 1751*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SW_DETECTION 1752*4f2df630SAndroid Build Coastguard Worker 1753*4f2df630SAndroid Build Coastguard Worker /* enable gesture host interface */ 1754*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_HOST_DETECTION 1755*4f2df630SAndroid Build Coastguard Worker 1756*4f2df630SAndroid Build Coastguard Worker /* Sensor sampling interval for gesture recognition */ 1757*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SAMPLING_INTERVAL_MS 1758*4f2df630SAndroid Build Coastguard Worker 1759*4f2df630SAndroid Build Coastguard Worker /* Which sensor to look for double tap recognition */ 1760*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SENSOR_DOUBLE_TAP 1761*4f2df630SAndroid Build Coastguard Worker 1762*4f2df630SAndroid Build Coastguard Worker /* Use for waking up host */ 1763*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SENSOR_DOUBLE_TAP_FOR_HOST 1764*4f2df630SAndroid Build Coastguard Worker 1765*4f2df630SAndroid Build Coastguard Worker /* 1766*4f2df630SAndroid Build Coastguard Worker * Double tap detection parameters 1767*4f2df630SAndroid Build Coastguard Worker * Double tap works by looking for two isolated Z-axis accelerometer impulses 1768*4f2df630SAndroid Build Coastguard Worker * preceded and followed by relatively calm periods of accelerometer motion. 1769*4f2df630SAndroid Build Coastguard Worker * 1770*4f2df630SAndroid Build Coastguard Worker * Define an outer and inner window. The inner window specifies how 1771*4f2df630SAndroid Build Coastguard Worker * long the tap impulse is expected to last. The outer window specifies the 1772*4f2df630SAndroid Build Coastguard Worker * period before the initial tap impluse and after the final tap impulse for 1773*4f2df630SAndroid Build Coastguard Worker * which to check for relatively calm periods. In between the two impulses 1774*4f2df630SAndroid Build Coastguard Worker * there is a minimum and maximum interstice time allowed. 1775*4f2df630SAndroid Build Coastguard Worker * 1776*4f2df630SAndroid Build Coastguard Worker * Define an acceleration threshold to dectect a tap, in mg. 1777*4f2df630SAndroid Build Coastguard Worker */ 1778*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_TAP_OUTER_WINDOW_T 1779*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_TAP_INNER_WINDOW_T 1780*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_TAP_MIN_INTERSTICE_T 1781*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_TAP_MAX_INTERSTICE_T 1782*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_TAP_THRES_MG 1783*4f2df630SAndroid Build Coastguard Worker 1784*4f2df630SAndroid Build Coastguard Worker /* Which sensor to look for significant motion activity */ 1785*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SIGMO 1786*4f2df630SAndroid Build Coastguard Worker 1787*4f2df630SAndroid Build Coastguard Worker /* 1788*4f2df630SAndroid Build Coastguard Worker * Significant motion parameters 1789*4f2df630SAndroid Build Coastguard Worker * Sigmo state machine looks for movement, waits skip milli-seconds, 1790*4f2df630SAndroid Build Coastguard Worker * and check for movement again with proof milli-seconds. 1791*4f2df630SAndroid Build Coastguard Worker */ 1792*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SIGMO_PROOF_MS 1793*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SIGMO_SKIP_MS 1794*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GESTURE_SIGMO_THRES_MG 1795*4f2df630SAndroid Build Coastguard Worker 1796*4f2df630SAndroid Build Coastguard Worker /* 1797*4f2df630SAndroid Build Coastguard Worker * Delay between power on and configuring GPIOs. 1798*4f2df630SAndroid Build Coastguard Worker * On power-on of some boards, H1 releases the EC from reset but then 1799*4f2df630SAndroid Build Coastguard Worker * quickly asserts and releases the reset a second time. This means the 1800*4f2df630SAndroid Build Coastguard Worker * EC sees 2 resets: (1) power-on reset, (2) reset-pin reset. If we add 1801*4f2df630SAndroid Build Coastguard Worker * a delay between reset (1) and configuring GPIO output levels, then 1802*4f2df630SAndroid Build Coastguard Worker * reset (2) will happen before the end of the delay so we avoid extra 1803*4f2df630SAndroid Build Coastguard Worker * output toggles. 1804*4f2df630SAndroid Build Coastguard Worker * 1805*4f2df630SAndroid Build Coastguard Worker * NOTE: Implemented only for npcx 1806*4f2df630SAndroid Build Coastguard Worker */ 1807*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GPIO_INIT_POWER_ON_DELAY_MS 1808*4f2df630SAndroid Build Coastguard Worker 1809*4f2df630SAndroid Build Coastguard Worker /* Support getting gpio flags. */ 1810*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GPIO_GET_EXTENDED 1811*4f2df630SAndroid Build Coastguard Worker 1812*4f2df630SAndroid Build Coastguard Worker /* Support disabling sleep with GPIO flags. */ 1813*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GPIO_DISABLE_SLEEP 1814*4f2df630SAndroid Build Coastguard Worker 1815*4f2df630SAndroid Build Coastguard Worker /* Do we want to detect the lid angle? */ 1816*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LID_ANGLE 1817*4f2df630SAndroid Build Coastguard Worker 1818*4f2df630SAndroid Build Coastguard Worker /* Which sensor is located on the base? */ 1819*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LID_ANGLE_SENSOR_BASE 1820*4f2df630SAndroid Build Coastguard Worker /* Which sensor is located on the lid? */ 1821*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LID_ANGLE_SENSOR_LID 1822*4f2df630SAndroid Build Coastguard Worker /* 1823*4f2df630SAndroid Build Coastguard Worker * Allows using the lid angle measurement to determine if peripheral devices 1824*4f2df630SAndroid Build Coastguard Worker * should be enabled or disabled, like key scanning, trackpad interrupt. 1825*4f2df630SAndroid Build Coastguard Worker */ 1826*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LID_ANGLE_UPDATE 1827*4f2df630SAndroid Build Coastguard Worker 1828*4f2df630SAndroid Build Coastguard Worker /* 1829*4f2df630SAndroid Build Coastguard Worker * Defer the (re)configuration of motion sensors after the suspend event or 1830*4f2df630SAndroid Build Coastguard Worker * resume event. Sensor power rails may be powered up or down asynchronously 1831*4f2df630SAndroid Build Coastguard Worker * from the EC, so it may be necessary to wait some time period before 1832*4f2df630SAndroid Build Coastguard Worker * reconfiguring after a transition. 1833*4f2df630SAndroid Build Coastguard Worker */ 1834*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MOTION_SENSE_SUSPEND_DELAY_US 0 1835*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MOTION_SENSE_RESUME_DELAY_US 0 1836*4f2df630SAndroid Build Coastguard Worker 1837*4f2df630SAndroid Build Coastguard Worker /* Define motion sensor count in board layer */ 1838*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DYNAMIC_MOTION_SENSOR_COUNT 1839*4f2df630SAndroid Build Coastguard Worker 1840*4f2df630SAndroid Build Coastguard Worker /* Define when LPC memory space needs to be populated. */ 1841*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MOTION_FILL_LPC_SENSE_DATA 1842*4f2df630SAndroid Build Coastguard Worker 1843*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 1844*4f2df630SAndroid Build Coastguard Worker /* Host to RAM (H2RAM) Memory Mapping */ 1845*4f2df630SAndroid Build Coastguard Worker 1846*4f2df630SAndroid Build Coastguard Worker /* H2RAM Base memory address */ 1847*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_H2RAM_BASE 1848*4f2df630SAndroid Build Coastguard Worker 1849*4f2df630SAndroid Build Coastguard Worker /* H2RAM Size */ 1850*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_H2RAM_SIZE 1851*4f2df630SAndroid Build Coastguard Worker 1852*4f2df630SAndroid Build Coastguard Worker /* H2RAM Host LPC I/O base memory address */ 1853*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_H2RAM_HOST_LPC_IO_BASE 1854*4f2df630SAndroid Build Coastguard Worker 1855*4f2df630SAndroid Build Coastguard Worker /* ISH boot start address */ 1856*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_BOOT_START 1857*4f2df630SAndroid Build Coastguard Worker /* 1858*4f2df630SAndroid Build Coastguard Worker * Define the minimal amount of time (in ms) betwen running motion sense task 1859*4f2df630SAndroid Build Coastguard Worker * loop. 1860*4f2df630SAndroid Build Coastguard Worker */ 1861*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MOTION_MIN_SENSE_WAIT_TIME 3 1862*4f2df630SAndroid Build Coastguard Worker 1863*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1864*4f2df630SAndroid Build Coastguard Worker /* 1865*4f2df630SAndroid Build Coastguard Worker * Support the host asking the EC about the status of the most recent host 1866*4f2df630SAndroid Build Coastguard Worker * command. 1867*4f2df630SAndroid Build Coastguard Worker * 1868*4f2df630SAndroid Build Coastguard Worker * When the AP is attached to the EC via a serialized bus such as I2C or SPI, 1869*4f2df630SAndroid Build Coastguard Worker * it needs a way to minimize the length of time an EC command will tie up the 1870*4f2df630SAndroid Build Coastguard Worker * bus (and the kernel driver on the AP). If this config is defined, the EC 1871*4f2df630SAndroid Build Coastguard Worker * may return an in-progress result code for slow commands such as flash 1872*4f2df630SAndroid Build Coastguard Worker * erase/write instead of stalling until the command finishes processing, and 1873*4f2df630SAndroid Build Coastguard Worker * the AP may then inquire the status of the current command and/or the result 1874*4f2df630SAndroid Build Coastguard Worker * of the previous command. 1875*4f2df630SAndroid Build Coastguard Worker */ 1876*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOST_COMMAND_STATUS 1877*4f2df630SAndroid Build Coastguard Worker 1878*4f2df630SAndroid Build Coastguard Worker /* clear bit(s) to mask reporting of an EC_HOST_EVENT_XXX event(s) */ 1879*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOST_EVENT_REPORT_MASK 0xffffffff 1880*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOST_EVENT64_REPORT_MASK 0xffffffffffffffffULL 1881*4f2df630SAndroid Build Coastguard Worker 1882*4f2df630SAndroid Build Coastguard Worker /* Config option to support 64-bit hostevents and wake-masks. */ 1883*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOST_EVENT64 1884*4f2df630SAndroid Build Coastguard Worker 1885*4f2df630SAndroid Build Coastguard Worker /* 1886*4f2df630SAndroid Build Coastguard Worker * The host commands are sorted in the .rodata.hcmds section so use the binary 1887*4f2df630SAndroid Build Coastguard Worker * search algorithm to match a command to its handler 1888*4f2df630SAndroid Build Coastguard Worker */ 1889*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_SECTION_SORTED 1890*4f2df630SAndroid Build Coastguard Worker 1891*4f2df630SAndroid Build Coastguard Worker /* 1892*4f2df630SAndroid Build Coastguard Worker * Host command parameters and response are 32-bit aligned. This generates 1893*4f2df630SAndroid Build Coastguard Worker * much more efficient code on ARM. 1894*4f2df630SAndroid Build Coastguard Worker */ 1895*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_ALIGNED 1896*4f2df630SAndroid Build Coastguard Worker 1897*4f2df630SAndroid Build Coastguard Worker /* 1898*4f2df630SAndroid Build Coastguard Worker * Include host commands to fetch battery information from 1899*4f2df630SAndroid Build Coastguard Worker * ec_response_battery_static/dynamic_info structures, only makes sense when 1900*4f2df630SAndroid Build Coastguard Worker * CONFIG_BATTERY_V2 is enabled. 1901*4f2df630SAndroid Build Coastguard Worker */ 1902*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_BATTERY_V2 1903*4f2df630SAndroid Build Coastguard Worker 1904*4f2df630SAndroid Build Coastguard Worker /* Default hcdebug mode, e.g. HCDEBUG_OFF or HCDEBUG_NORMAL */ 1905*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_DEBUG_MODE HCDEBUG_NORMAL 1906*4f2df630SAndroid Build Coastguard Worker 1907*4f2df630SAndroid Build Coastguard Worker /* If we have host command task, assume we also are using host events. */ 1908*4f2df630SAndroid Build Coastguard Worker #ifdef HAS_TASK_HOSTCMD 1909*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_EVENTS 1910*4f2df630SAndroid Build Coastguard Worker #else 1911*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_EVENTS 1912*4f2df630SAndroid Build Coastguard Worker #endif 1913*4f2df630SAndroid Build Coastguard Worker 1914*4f2df630SAndroid Build Coastguard Worker /* 1915*4f2df630SAndroid Build Coastguard Worker * Board supports host command to get EC SPI flash info. This is typically 1916*4f2df630SAndroid Build Coastguard Worker * only needed if the factory needs to determine which of several possible SPI 1917*4f2df630SAndroid Build Coastguard Worker * flash chips is attached to the EC on a given board. 1918*4f2df630SAndroid Build Coastguard Worker */ 1919*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_FLASH_SPI_INFO 1920*4f2df630SAndroid Build Coastguard Worker 1921*4f2df630SAndroid Build Coastguard Worker /* 1922*4f2df630SAndroid Build Coastguard Worker * Host command rate limiting assures EC will have time to process lower 1923*4f2df630SAndroid Build Coastguard Worker * priority tasks even if the AP is hammering the EC with host commands. 1924*4f2df630SAndroid Build Coastguard Worker * If there is less than CONFIG_HOSTCMD_RATE_LIMITING_MIN_REST between 1925*4f2df630SAndroid Build Coastguard Worker * host commands for CONFIG_HOSTCMD_RATE_LIMITING_PERIOD, then a 1926*4f2df630SAndroid Build Coastguard Worker * recess period of CONFIG_HOSTCMD_RATE_LIMITING_RECESS will be 1927*4f2df630SAndroid Build Coastguard Worker * enforced. 1928*4f2df630SAndroid Build Coastguard Worker */ 1929*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_RATE_LIMITING_PERIOD (500 * MSEC) 1930*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_RATE_LIMITING_MIN_REST (3 * MSEC) 1931*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_RATE_LIMITING_RECESS (20 * MSEC) 1932*4f2df630SAndroid Build Coastguard Worker 1933*4f2df630SAndroid Build Coastguard Worker /* PD MCU supports host commands */ 1934*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_PD 1935*4f2df630SAndroid Build Coastguard Worker 1936*4f2df630SAndroid Build Coastguard Worker /* EC supports EC_CMD_PD_CHIP_INFO */ 1937*4f2df630SAndroid Build Coastguard Worker #define CONFIG_EC_CMD_PD_CHIP_INFO 1938*4f2df630SAndroid Build Coastguard Worker 1939*4f2df630SAndroid Build Coastguard Worker /* 1940*4f2df630SAndroid Build Coastguard Worker * Use if PD MCU controls charging (selecting charging port and input 1941*4f2df630SAndroid Build Coastguard Worker * current limit). 1942*4f2df630SAndroid Build Coastguard Worker */ 1943*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_PD_CHG_CTRL 1944*4f2df630SAndroid Build Coastguard Worker 1945*4f2df630SAndroid Build Coastguard Worker /* Panic when status of PD MCU reflects that it has crashed */ 1946*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_PD_PANIC 1947*4f2df630SAndroid Build Coastguard Worker 1948*4f2df630SAndroid Build Coastguard Worker /* Board supports RTC host commands*/ 1949*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_RTC 1950*4f2df630SAndroid Build Coastguard Worker 1951*4f2df630SAndroid Build Coastguard Worker /* Command to issue AP reset */ 1952*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_AP_RESET 1953*4f2df630SAndroid Build Coastguard Worker 1954*4f2df630SAndroid Build Coastguard Worker /* Flash commands over PD */ 1955*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_FLASHPD 1956*4f2df630SAndroid Build Coastguard Worker 1957*4f2df630SAndroid Build Coastguard Worker /* Set entry in PD MCU's device rw_hash table */ 1958*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_RWHASHPD 1959*4f2df630SAndroid Build Coastguard Worker 1960*4f2df630SAndroid Build Coastguard Worker /* List of host commands whose debug output will be suppressed */ 1961*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SUPPRESSED_HOST_COMMANDS 1962*4f2df630SAndroid Build Coastguard Worker 1963*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1964*4f2df630SAndroid Build Coastguard Worker 1965*4f2df630SAndroid Build Coastguard Worker /* Enable debugging and profiling statistics for hook functions */ 1966*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOOK_DEBUG 1967*4f2df630SAndroid Build Coastguard Worker 1968*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1969*4f2df630SAndroid Build Coastguard Worker /* CRC configuration */ 1970*4f2df630SAndroid Build Coastguard Worker 1971*4f2df630SAndroid Build Coastguard Worker /* Enable the hardware accelerator for CRC computation */ 1972*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HW_CRC 1973*4f2df630SAndroid Build Coastguard Worker 1974*4f2df630SAndroid Build Coastguard Worker /* Enable the software routine for CRC computation */ 1975*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SW_CRC 1976*4f2df630SAndroid Build Coastguard Worker 1977*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 1978*4f2df630SAndroid Build Coastguard Worker 1979*4f2df630SAndroid Build Coastguard Worker /* Enable system hibernate */ 1980*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HIBERNATE 1981*4f2df630SAndroid Build Coastguard Worker 1982*4f2df630SAndroid Build Coastguard Worker /* Default delay after shutting down before hibernating */ 1983*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HIBERNATE_DELAY_SEC 3600 1984*4f2df630SAndroid Build Coastguard Worker 1985*4f2df630SAndroid Build Coastguard Worker /* 1986*4f2df630SAndroid Build Coastguard Worker * Use to define going in to hibernate early if low on battery. 1987*4f2df630SAndroid Build Coastguard Worker * CONFIG_HIBERNATE_BATT_PCT specifies the low battery threshold 1988*4f2df630SAndroid Build Coastguard Worker * for going into hibernate early, and CONFIG_HIBERNATE_BATT_SEC defines 1989*4f2df630SAndroid Build Coastguard Worker * the minimum amount of time to stay in G3 before checking for low 1990*4f2df630SAndroid Build Coastguard Worker * battery hibernate. 1991*4f2df630SAndroid Build Coastguard Worker */ 1992*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HIBERNATE_BATT_PCT 1993*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HIBERNATE_BATT_SEC 1994*4f2df630SAndroid Build Coastguard Worker 1995*4f2df630SAndroid Build Coastguard Worker /* For ECs with multiple wakeup pins, define enabled wakeup pins */ 1996*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HIBERNATE_WAKEUP_PINS 1997*4f2df630SAndroid Build Coastguard Worker 1998*4f2df630SAndroid Build Coastguard Worker /* 1999*4f2df630SAndroid Build Coastguard Worker * If defined, chip hibernation is used. Your board needs to define wake-up 2000*4f2df630SAndroid Build Coastguard Worker * signals. Undefine this to use board hibernation capability. 2001*4f2df630SAndroid Build Coastguard Worker */ 2002*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SUPPORT_CHIP_HIBERNATION 2003*4f2df630SAndroid Build Coastguard Worker 2004*4f2df630SAndroid Build Coastguard Worker /* Use a hardware specific udelay(). */ 2005*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HW_SPECIFIC_UDELAY 2006*4f2df630SAndroid Build Coastguard Worker 2007*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2008*4f2df630SAndroid Build Coastguard Worker /* I2C configuration */ 2009*4f2df630SAndroid Build Coastguard Worker 2010*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C 2011*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_DEBUG 2012*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_DEBUG_PASSTHRU 2013*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_PASSTHROUGH 2014*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_PASSTHRU_RESTRICTED 2015*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_VIRTUAL_BATTERY 2016*4f2df630SAndroid Build Coastguard Worker 2017*4f2df630SAndroid Build Coastguard Worker /* 2018*4f2df630SAndroid Build Coastguard Worker * Define this option if an i2c bus may be unpowered at a certain point during 2019*4f2df630SAndroid Build Coastguard Worker * runtime. An example could be, a sensor bus which is not needed in lower 2020*4f2df630SAndroid Build Coastguard Worker * power states so the power rail for those sensors is completely disabled. 2021*4f2df630SAndroid Build Coastguard Worker * 2022*4f2df630SAndroid Build Coastguard Worker * If defined, your board must provide a board_is_i2c_port_powered() function. 2023*4f2df630SAndroid Build Coastguard Worker */ 2024*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_BUS_MAY_BE_UNPOWERED 2025*4f2df630SAndroid Build Coastguard Worker 2026*4f2df630SAndroid Build Coastguard Worker /* 2027*4f2df630SAndroid Build Coastguard Worker * Conservative I2C reading size per single transaction. For example, register 2028*4f2df630SAndroid Build Coastguard Worker * of stm32f0 and stm32l4 are limited to be 8 bits for this field. 2029*4f2df630SAndroid Build Coastguard Worker */ 2030*4f2df630SAndroid Build Coastguard Worker #define CONFIG_I2C_CHIP_MAX_READ_SIZE 255 2031*4f2df630SAndroid Build Coastguard Worker 2032*4f2df630SAndroid Build Coastguard Worker /* 2033*4f2df630SAndroid Build Coastguard Worker * Enable i2c_xfer() for receiving request larger than 2034*4f2df630SAndroid Build Coastguard Worker * CONFIG_I2C_CHIP_MAX_READ_SIZE. 2035*4f2df630SAndroid Build Coastguard Worker */ 2036*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_XFER_LARGE_READ 2037*4f2df630SAndroid Build Coastguard Worker 2038*4f2df630SAndroid Build Coastguard Worker /* 2039*4f2df630SAndroid Build Coastguard Worker * If defined, makes i2c_xfer callback into board-provided functions before the 2040*4f2df630SAndroid Build Coastguard Worker * start and after the end of every I2C transaction. This can be used by boards 2041*4f2df630SAndroid Build Coastguard Worker * to implement any I2C device specific quirks e.g. requiring minimum bus-free 2042*4f2df630SAndroid Build Coastguard Worker * time between every I2C transaction with a device. 2043*4f2df630SAndroid Build Coastguard Worker */ 2044*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_XFER_BOARD_CALLBACK 2045*4f2df630SAndroid Build Coastguard Worker 2046*4f2df630SAndroid Build Coastguard Worker /* 2047*4f2df630SAndroid Build Coastguard Worker * EC uses an I2C controller interface. 2048*4f2df630SAndroid Build Coastguard Worker * Note: if this is defined, i2c_init() will be called 2049*4f2df630SAndroid Build Coastguard Worker * automatically at board boot. 2050*4f2df630SAndroid Build Coastguard Worker */ 2051*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_CONTROLLER 2052*4f2df630SAndroid Build Coastguard Worker 2053*4f2df630SAndroid Build Coastguard Worker /* EC uses an I2C peripheral interface */ 2054*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_PERIPH 2055*4f2df630SAndroid Build Coastguard Worker 2056*4f2df630SAndroid Build Coastguard Worker /* Defines I2C operation retry count when peripheral nack'd(EC_ERROR_BUSY) */ 2057*4f2df630SAndroid Build Coastguard Worker #define CONFIG_I2C_NACK_RETRY_COUNT 0 2058*4f2df630SAndroid Build Coastguard Worker /* 2059*4f2df630SAndroid Build Coastguard Worker * I2C SCL gating. 2060*4f2df630SAndroid Build Coastguard Worker * 2061*4f2df630SAndroid Build Coastguard Worker * If CONFIG_I2C_SCL_GATE_ADDR/PORT is defined, whenever the defined address 2062*4f2df630SAndroid Build Coastguard Worker * is addressed, CONFIG_I2C_SCL_GATE_GPIO is set to high. When the I2C 2063*4f2df630SAndroid Build Coastguard Worker * transaction is done, the pin is set back to low. 2064*4f2df630SAndroid Build Coastguard Worker */ 2065*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_SCL_GATE_PORT 2066*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_SCL_GATE_ADDR_FLAGS 2067*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_SCL_GATE_GPIO 2068*4f2df630SAndroid Build Coastguard Worker 2069*4f2df630SAndroid Build Coastguard Worker /* 2070*4f2df630SAndroid Build Coastguard Worker * Some chip supports two owned peripheral address. The second peripheral 2071*4f2df630SAndroid Build Coastguard Worker * address is used for other purpose such as board specific i2c commands. This 2072*4f2df630SAndroid Build Coastguard Worker * option can be set if user of the second peripheral address requires larger 2073*4f2df630SAndroid Build Coastguard Worker * host packet buffer size. 2074*4f2df630SAndroid Build Coastguard Worker */ 2075*4f2df630SAndroid Build Coastguard Worker #define CONFIG_I2C_EXTRA_PACKET_SIZE 0 2076*4f2df630SAndroid Build Coastguard Worker 2077*4f2df630SAndroid Build Coastguard Worker /* 2078*4f2df630SAndroid Build Coastguard Worker * I2C multi-port controller. 2079*4f2df630SAndroid Build Coastguard Worker * 2080*4f2df630SAndroid Build Coastguard Worker * If CONFIG_I2C_MULTI_PORT_CONTROLLER is defined, a single on-chip I2C 2081*4f2df630SAndroid Build Coastguard Worker * controller may have multiple I2C ports attached. Therefore, I2c operations 2082*4f2df630SAndroid Build Coastguard Worker * must lock the controller (not just the port) to prevent hardware access 2083*4f2df630SAndroid Build Coastguard Worker * conflicts. 2084*4f2df630SAndroid Build Coastguard Worker */ 2085*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_I2C_MULTI_PORT_CONTROLLER 2086*4f2df630SAndroid Build Coastguard Worker 2087*4f2df630SAndroid Build Coastguard Worker /* 2088*4f2df630SAndroid Build Coastguard Worker * Packet error checking support for SMBus. 2089*4f2df630SAndroid Build Coastguard Worker * 2090*4f2df630SAndroid Build Coastguard Worker * If defined, adds error checking support for i2c_readN, i2c_writeN, 2091*4f2df630SAndroid Build Coastguard Worker * i2c_read_string and i2c_write_block. Where 2092*4f2df630SAndroid Build Coastguard Worker * - write operation appends an error checking byte at end of transfer, and 2093*4f2df630SAndroid Build Coastguard Worker * - read operatoin verifies the correctness of error checking byte from the 2094*4f2df630SAndroid Build Coastguard Worker * peripheral. 2095*4f2df630SAndroid Build Coastguard Worker * Set I2C_FLAG on addr_flags parameter to use this feature. 2096*4f2df630SAndroid Build Coastguard Worker * 2097*4f2df630SAndroid Build Coastguard Worker * This option also enables error checking function on smart batteries. 2098*4f2df630SAndroid Build Coastguard Worker */ 2099*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SMBUS_PEC 2100*4f2df630SAndroid Build Coastguard Worker 2101*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2102*4f2df630SAndroid Build Coastguard Worker /* IPI configuration. Support mt_scp only for now. */ 2103*4f2df630SAndroid Build Coastguard Worker 2104*4f2df630SAndroid Build Coastguard Worker /* EC support Inter-Processor Interrupt. */ 2105*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IPI 2106*4f2df630SAndroid Build Coastguard Worker 2107*4f2df630SAndroid Build Coastguard Worker /* 2108*4f2df630SAndroid Build Coastguard Worker * IPC0/IPI shared object address. This is the starting address of the send 2109*4f2df630SAndroid Build Coastguard Worker * object and the receive object. Each object contains a buffer. 2110*4f2df630SAndroid Build Coastguard Worker */ 2111*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IPC_SHARED_OBJ_ADDR 2112*4f2df630SAndroid Build Coastguard Worker 2113*4f2df630SAndroid Build Coastguard Worker /* "buffer" size of ipc_shared_obj. */ 2114*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IPC_SHARED_OBJ_BUF_SIZE 2115*4f2df630SAndroid Build Coastguard Worker 2116*4f2df630SAndroid Build Coastguard Worker /* EC support rpmsg name service over IPI. */ 2117*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RPMSG_NAME_SERVICE 2118*4f2df630SAndroid Build Coastguard Worker 2119*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2120*4f2df630SAndroid Build Coastguard Worker /* Current/Power monitor */ 2121*4f2df630SAndroid Build Coastguard Worker 2122*4f2df630SAndroid Build Coastguard Worker /* 2123*4f2df630SAndroid Build Coastguard Worker * Compile driver for INA219 or INA231 or INA3221. 2124*4f2df630SAndroid Build Coastguard Worker * Only one of these may be defined (if any). 2125*4f2df630SAndroid Build Coastguard Worker */ 2126*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_INA219 2127*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_INA231 2128*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_INA3221 2129*4f2df630SAndroid Build Coastguard Worker 2130*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2131*4f2df630SAndroid Build Coastguard Worker /* Inductive charging */ 2132*4f2df630SAndroid Build Coastguard Worker 2133*4f2df630SAndroid Build Coastguard Worker /* Enable inductive charging support */ 2134*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_INDUCTIVE_CHARGING 2135*4f2df630SAndroid Build Coastguard Worker 2136*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 2137*4f2df630SAndroid Build Coastguard Worker 2138*4f2df630SAndroid Build Coastguard Worker /* Support IT8801 I/O expander. */ 2139*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IO_EXPANDER_IT8801 2140*4f2df630SAndroid Build Coastguard Worker 2141*4f2df630SAndroid Build Coastguard Worker /* Support Nuvoton NCT38xx I/O expander. */ 2142*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IO_EXPANDER_NCT38XX 2143*4f2df630SAndroid Build Coastguard Worker 2144*4f2df630SAndroid Build Coastguard Worker /* Support NXP PCA9534 I/O expander. */ 2145*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IO_EXPANDER_PCA9534 2146*4f2df630SAndroid Build Coastguard Worker 2147*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2148*4f2df630SAndroid Build Coastguard Worker 2149*4f2df630SAndroid Build Coastguard Worker /* Number of IRQs supported on the EC chip */ 2150*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IRQ_COUNT 2151*4f2df630SAndroid Build Coastguard Worker 2152*4f2df630SAndroid Build Coastguard Worker /* Enable LDN for KBC mouse */ 2153*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IT83XX_ENABLE_MOUSE_DEVICE 2154*4f2df630SAndroid Build Coastguard Worker 2155*4f2df630SAndroid Build Coastguard Worker /* 2156*4f2df630SAndroid Build Coastguard Worker * The IT8320 supports e-flash clock up to 48 MHz (IT8390 maximum is 32 MHz). 2157*4f2df630SAndroid Build Coastguard Worker * Enable it if we want better performance of fetching instruction from e-flash. 2158*4f2df630SAndroid Build Coastguard Worker * 2159*4f2df630SAndroid Build Coastguard Worker * This is valid with PLL frequency equal to 48/96MHz only. 2160*4f2df630SAndroid Build Coastguard Worker */ 2161*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IT83XX_FLASH_CLOCK_48MHZ 2162*4f2df630SAndroid Build Coastguard Worker 2163*4f2df630SAndroid Build Coastguard Worker /* To define it, if I2C channel C and PECI used at the same time. */ 2164*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_IT83XX_SMCLK2_ON_GPC7 2165*4f2df630SAndroid Build Coastguard Worker 2166*4f2df630SAndroid Build Coastguard Worker /* 2167*4f2df630SAndroid Build Coastguard Worker * If this is not defined, the firmware will revert the JTAG selection 2168*4f2df630SAndroid Build Coastguard Worker * triggered by the hardware strap pin. 2169*4f2df630SAndroid Build Coastguard Worker * Un-define this flag by default for all real platforms. see (b/129908668) 2170*4f2df630SAndroid Build Coastguard Worker * If some boards (Ex:EVB) require JTAG function, they can define it in 2171*4f2df630SAndroid Build Coastguard Worker * their board.h 2172*4f2df630SAndroid Build Coastguard Worker */ 2173*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ENABLE_JTAG_SELECTION 2174*4f2df630SAndroid Build Coastguard Worker 2175*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2176*4f2df630SAndroid Build Coastguard Worker /* Keyboard config */ 2177*4f2df630SAndroid Build Coastguard Worker 2178*4f2df630SAndroid Build Coastguard Worker /* 2179*4f2df630SAndroid Build Coastguard Worker * The Silego reset chip sits in between the EC and the physical keyboard on 2180*4f2df630SAndroid Build Coastguard Worker * column 2. To save power in low-power modes, some Silego variants require 2181*4f2df630SAndroid Build Coastguard Worker * the signal to be inverted so that the open-drain output from the EC isn't 2182*4f2df630SAndroid Build Coastguard Worker * costing power due to the pull-up resistor in the Silego. 2183*4f2df630SAndroid Build Coastguard Worker */ 2184*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_COL2_INVERTED 2185*4f2df630SAndroid Build Coastguard Worker 2186*4f2df630SAndroid Build Coastguard Worker /* 2187*4f2df630SAndroid Build Coastguard Worker * Keyboards with the assistant key also move the refresh key matrix to row 3 2188*4f2df630SAndroid Build Coastguard Worker * instead of row 2. This is used by the boot key detection code to determine 2189*4f2df630SAndroid Build Coastguard Worker * if the refresh key is held down at boot. 2190*4f2df630SAndroid Build Coastguard Worker */ 2191*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_REFRESH_ROW3 2192*4f2df630SAndroid Build Coastguard Worker 2193*4f2df630SAndroid Build Coastguard Worker /* 2194*4f2df630SAndroid Build Coastguard Worker * Config KSO to start from a different KSO pin. This is to allow some chips 2195*4f2df630SAndroid Build Coastguard Worker * to use alternate functions on KSO pins. 2196*4f2df630SAndroid Build Coastguard Worker */ 2197*4f2df630SAndroid Build Coastguard Worker #define CONFIG_KEYBOARD_KSO_BASE 0 2198*4f2df630SAndroid Build Coastguard Worker 2199*4f2df630SAndroid Build Coastguard Worker /* 2200*4f2df630SAndroid Build Coastguard Worker * For certain board configurations, KSI2 or KSI3 will be stuck asserted for all 2201*4f2df630SAndroid Build Coastguard Worker * scan columns if the power button is held. We must be aware of this case 2202*4f2df630SAndroid Build Coastguard Worker * in order to correctly handle recovery mode key combinations. 2203*4f2df630SAndroid Build Coastguard Worker */ 2204*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2 2205*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3 2206*4f2df630SAndroid Build Coastguard Worker 2207*4f2df630SAndroid Build Coastguard Worker /* Enable extra debugging output from keyboard modules */ 2208*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_DEBUG 2209*4f2df630SAndroid Build Coastguard Worker 2210*4f2df630SAndroid Build Coastguard Worker /* 2211*4f2df630SAndroid Build Coastguard Worker * Disables the directly connected keyboard pins and drivers on a particular 2212*4f2df630SAndroid Build Coastguard Worker * chip. You might want this enabled if the keyboard is indirectly connected 2213*4f2df630SAndroid Build Coastguard Worker * to the EC, perhaps through an I2C controller. 2214*4f2df630SAndroid Build Coastguard Worker */ 2215*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_NOT_RAW 2216*4f2df630SAndroid Build Coastguard Worker 2217*4f2df630SAndroid Build Coastguard Worker /* The board uses a negative edge-triggered GPIO for keyboard interrupts. */ 2218*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_IRQ_GPIO 2219*4f2df630SAndroid Build Coastguard Worker 2220*4f2df630SAndroid Build Coastguard Worker /* Compile code for 8042 keyboard protocol */ 2221*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_PROTOCOL_8042 2222*4f2df630SAndroid Build Coastguard Worker 2223*4f2df630SAndroid Build Coastguard Worker /* Compile code for MKBP keyboard protocol */ 2224*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_PROTOCOL_MKBP 2225*4f2df630SAndroid Build Coastguard Worker 2226*4f2df630SAndroid Build Coastguard Worker /* Support keyboard factory test scanning */ 2227*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_FACTORY_TEST 2228*4f2df630SAndroid Build Coastguard Worker 2229*4f2df630SAndroid Build Coastguard Worker /* 2230*4f2df630SAndroid Build Coastguard Worker * Keyboard config (struct keyboard_scan_config) is in board.c. If this is 2231*4f2df630SAndroid Build Coastguard Worker * not defined, default values from common/keyboard_scan.c will be used. 2232*4f2df630SAndroid Build Coastguard Worker */ 2233*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_BOARD_CONFIG 2234*4f2df630SAndroid Build Coastguard Worker 2235*4f2df630SAndroid Build Coastguard Worker /* 2236*4f2df630SAndroid Build Coastguard Worker * Support for boot key combinations (e.g. refresh key being held on boot to 2237*4f2df630SAndroid Build Coastguard Worker * trigger recovery). 2238*4f2df630SAndroid Build Coastguard Worker */ 2239*4f2df630SAndroid Build Coastguard Worker #define CONFIG_KEYBOARD_BOOT_KEYS 2240*4f2df630SAndroid Build Coastguard Worker 2241*4f2df630SAndroid Build Coastguard Worker /* Add support for the assistant key. */ 2242*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_ASSISTANT_KEY 2243*4f2df630SAndroid Build Coastguard Worker 2244*4f2df630SAndroid Build Coastguard Worker /* Add support for a switch that indicates if the device is in tablet mode. */ 2245*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_TABLET_MODE_SWITCH 2246*4f2df630SAndroid Build Coastguard Worker 2247*4f2df630SAndroid Build Coastguard Worker /* 2248*4f2df630SAndroid Build Coastguard Worker * Minimum CPU clocks between scans. This ensures that keyboard scanning 2249*4f2df630SAndroid Build Coastguard Worker * doesn't starve the other EC tasks of CPU when running at a decreased system 2250*4f2df630SAndroid Build Coastguard Worker * clock. 2251*4f2df630SAndroid Build Coastguard Worker */ 2252*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_POST_SCAN_CLOCKS 2253*4f2df630SAndroid Build Coastguard Worker 2254*4f2df630SAndroid Build Coastguard Worker /* Print keyboard scan time intervals. */ 2255*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_PRINT_SCAN_TIMES 2256*4f2df630SAndroid Build Coastguard Worker 2257*4f2df630SAndroid Build Coastguard Worker /* 2258*4f2df630SAndroid Build Coastguard Worker * Support for extra runtime key combinations (e.g. alt+volup+h/r for hibernate 2259*4f2df630SAndroid Build Coastguard Worker * and warm reboot, respectively). 2260*4f2df630SAndroid Build Coastguard Worker */ 2261*4f2df630SAndroid Build Coastguard Worker #define CONFIG_KEYBOARD_RUNTIME_KEYS 2262*4f2df630SAndroid Build Coastguard Worker 2263*4f2df630SAndroid Build Coastguard Worker /* 2264*4f2df630SAndroid Build Coastguard Worker * Allow the keyboard scan code set tables to be modified at runtime. 2265*4f2df630SAndroid Build Coastguard Worker */ 2266*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_SCANCODE_MUTABLE 2267*4f2df630SAndroid Build Coastguard Worker 2268*4f2df630SAndroid Build Coastguard Worker /* 2269*4f2df630SAndroid Build Coastguard Worker * Allow board-specific 8042 keyboard callback when a key state is changed. 2270*4f2df630SAndroid Build Coastguard Worker */ 2271*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_SCANCODE_CALLBACK 2272*4f2df630SAndroid Build Coastguard Worker 2273*4f2df630SAndroid Build Coastguard Worker /* 2274*4f2df630SAndroid Build Coastguard Worker * Call board-supplied keyboard_suppress_noise() function when the debounced 2275*4f2df630SAndroid Build Coastguard Worker * keyboard state changes. Some boards use this to send a signal to the audio 2276*4f2df630SAndroid Build Coastguard Worker * codec to suppress typing noise picked up by the microphone. 2277*4f2df630SAndroid Build Coastguard Worker */ 2278*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_SUPPRESS_NOISE 2279*4f2df630SAndroid Build Coastguard Worker 2280*4f2df630SAndroid Build Coastguard Worker /* 2281*4f2df630SAndroid Build Coastguard Worker * Enable keyboard testing functionality. This enables a message which receives 2282*4f2df630SAndroid Build Coastguard Worker * a list of keyscan events from the AP and processes them. This will cause 2283*4f2df630SAndroid Build Coastguard Worker * keypresses to appear on the AP through the same mechanism as a normal 2284*4f2df630SAndroid Build Coastguard Worker * keyboard press. 2285*4f2df630SAndroid Build Coastguard Worker * 2286*4f2df630SAndroid Build Coastguard Worker * This can be used to spoof keyboard events, so is not normally defined, 2287*4f2df630SAndroid Build Coastguard Worker * except during internal testing. 2288*4f2df630SAndroid Build Coastguard Worker */ 2289*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_TEST 2290*4f2df630SAndroid Build Coastguard Worker 2291*4f2df630SAndroid Build Coastguard Worker /* 2292*4f2df630SAndroid Build Coastguard Worker * Enable quasi-bidirectional buffers for KSO pins. It has an open-drain output 2293*4f2df630SAndroid Build Coastguard Worker * and a low-impedance pull-up. The low-impedance pull-up is active when ec 2294*4f2df630SAndroid Build Coastguard Worker * changes the output data buffers from 0 to 1, thereby reducing the 2295*4f2df630SAndroid Build Coastguard Worker * low-to-high transition time. 2296*4f2df630SAndroid Build Coastguard Worker */ 2297*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_KSO_HIGH_DRIVE 2298*4f2df630SAndroid Build Coastguard Worker 2299*4f2df630SAndroid Build Coastguard Worker /* 2300*4f2df630SAndroid Build Coastguard Worker * Add support for keyboards with language ID pins 2301*4f2df630SAndroid Build Coastguard Worker */ 2302*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_LANGUAGE_ID 2303*4f2df630SAndroid Build Coastguard Worker 2304*4f2df630SAndroid Build Coastguard Worker /* 2305*4f2df630SAndroid Build Coastguard Worker * Enable keypad (a palm-sized keyboard section usually placed on the far right) 2306*4f2df630SAndroid Build Coastguard Worker */ 2307*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_KEYPAD 2308*4f2df630SAndroid Build Coastguard Worker 2309*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2310*4f2df630SAndroid Build Coastguard Worker 2311*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2312*4f2df630SAndroid Build Coastguard Worker 2313*4f2df630SAndroid Build Coastguard Worker /* Support common LED interface */ 2314*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_COMMON 2315*4f2df630SAndroid Build Coastguard Worker 2316*4f2df630SAndroid Build Coastguard Worker /* Standard LED behavior according to spec given that we have a red-green 2317*4f2df630SAndroid Build Coastguard Worker * bicolor led for charging and one power led 2318*4f2df630SAndroid Build Coastguard Worker */ 2319*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_POLICY_STD 2320*4f2df630SAndroid Build Coastguard Worker 2321*4f2df630SAndroid Build Coastguard Worker /* 2322*4f2df630SAndroid Build Coastguard Worker * Support common PWM-controlled LEDs that conform to the Chrome OS LED 2323*4f2df630SAndroid Build Coastguard Worker * behaviour specification. 2324*4f2df630SAndroid Build Coastguard Worker */ 2325*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_PWM 2326*4f2df630SAndroid Build Coastguard Worker 2327*4f2df630SAndroid Build Coastguard Worker /* 2328*4f2df630SAndroid Build Coastguard Worker * Here are some recommended color settings by default, but a board can change 2329*4f2df630SAndroid Build Coastguard Worker * the colors to one of "enum ec_led_colors" as they see fit. 2330*4f2df630SAndroid Build Coastguard Worker */ 2331*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM_CHARGE_COLOR EC_LED_COLOR_AMBER 2332*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM_NEAR_FULL_COLOR EC_LED_COLOR_GREEN 2333*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM_CHARGE_ERROR_COLOR EC_LED_COLOR_RED 2334*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM_SOC_ON_COLOR EC_LED_COLOR_GREEN 2335*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM_SOC_SUSPEND_COLOR EC_LED_COLOR_GREEN 2336*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM_LOW_BATT_COLOR EC_LED_COLOR_AMBER 2337*4f2df630SAndroid Build Coastguard Worker 2338*4f2df630SAndroid Build Coastguard Worker /* 2339*4f2df630SAndroid Build Coastguard Worker * By default the PWM LED behaviour is reflected on both LEDs and includes the 2340*4f2df630SAndroid Build Coastguard Worker * chipset state, battery state, as well as the charging state. Enable 2341*4f2df630SAndroid Build Coastguard Worker * this CONFIG_* option to show only the charging state on the LEDs. 2342*4f2df630SAndroid Build Coastguard Worker */ 2343*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_PWM_CHARGE_STATE_ONLY 2344*4f2df630SAndroid Build Coastguard Worker 2345*4f2df630SAndroid Build Coastguard Worker /* 2346*4f2df630SAndroid Build Coastguard Worker * By default the PWM LED behaviour is reflected on both LEDs and includes the 2347*4f2df630SAndroid Build Coastguard Worker * chipset state, battery state, as well as the charging state. Enable 2348*4f2df630SAndroid Build Coastguard Worker * this CONFIG_* option to show only the charging state, and only on the LED of 2349*4f2df630SAndroid Build Coastguard Worker * the active charge port. 2350*4f2df630SAndroid Build Coastguard Worker */ 2351*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY 2352*4f2df630SAndroid Build Coastguard Worker 2353*4f2df630SAndroid Build Coastguard Worker /* 2354*4f2df630SAndroid Build Coastguard Worker * How many PWM LEDs does the system have that will be controlled by the common 2355*4f2df630SAndroid Build Coastguard Worker * PWM LED policy? Currently, this may be at most 2. 2356*4f2df630SAndroid Build Coastguard Worker */ 2357*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_PWM_COUNT 2358*4f2df630SAndroid Build Coastguard Worker 2359*4f2df630SAndroid Build Coastguard Worker /* 2360*4f2df630SAndroid Build Coastguard Worker * Support GPIO-controlled LEDs for common battery/power 2361*4f2df630SAndroid Build Coastguard Worker * states through a board-defined lookup table. 2362*4f2df630SAndroid Build Coastguard Worker */ 2363*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_ONOFF_STATES 2364*4f2df630SAndroid Build Coastguard Worker 2365*4f2df630SAndroid Build Coastguard Worker /* 2366*4f2df630SAndroid Build Coastguard Worker * Set the battery charge percentage for optional STATE_DISCHARGE_S0_BAT_LOW 2367*4f2df630SAndroid Build Coastguard Worker * provided by CONFIG_LED_ONOFF_STATES. 2368*4f2df630SAndroid Build Coastguard Worker */ 2369*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_ONOFF_STATES_BAT_LOW 2370*4f2df630SAndroid Build Coastguard Worker 2371*4f2df630SAndroid Build Coastguard Worker /* 2372*4f2df630SAndroid Build Coastguard Worker * Adds a power LED under the control of the board-defined lookup table. 2373*4f2df630SAndroid Build Coastguard Worker * Must be used with the CONFIG_LED_ONOFF_STATES option. 2374*4f2df630SAndroid Build Coastguard Worker */ 2375*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_POWER_LED 2376*4f2df630SAndroid Build Coastguard Worker 2377*4f2df630SAndroid Build Coastguard Worker /* 2378*4f2df630SAndroid Build Coastguard Worker * LEDs for LED_POLICY STD may be inverted. In this case they are active low 2379*4f2df630SAndroid Build Coastguard Worker * and the GPIO names will be GPIO_LED..._L. 2380*4f2df630SAndroid Build Coastguard Worker */ 2381*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_BAT_ACTIVE_LOW 2382*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_POWER_ACTIVE_LOW 2383*4f2df630SAndroid Build Coastguard Worker 2384*4f2df630SAndroid Build Coastguard Worker /* Support for LED driver chip(s) */ 2385*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_DRIVER_DS2413 /* Maxim DS2413, on one-wire interface */ 2386*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_DRIVER_LM3509 /* LM3509, on I2C interface */ 2387*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_DRIVER_LM3630A /* LM3630A, on I2C interface */ 2388*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_DRIVER_LP5562 /* LP5562, on I2C interface */ 2389*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LED_DRIVER_OZ554 /* O2Micro OZ554, on I2C */ 2390*4f2df630SAndroid Build Coastguard Worker 2391*4f2df630SAndroid Build Coastguard Worker /* Offset in flash where little firmware will live. */ 2392*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LFW_OFFSET 2393*4f2df630SAndroid Build Coastguard Worker 2394*4f2df630SAndroid Build Coastguard Worker /* 2395*4f2df630SAndroid Build Coastguard Worker * Compile lid switch support. 2396*4f2df630SAndroid Build Coastguard Worker * 2397*4f2df630SAndroid Build Coastguard Worker * This is enabled by default because all boards other than reference boards 2398*4f2df630SAndroid Build Coastguard Worker * are for laptops with lid switchs. Reference boards #undef it. 2399*4f2df630SAndroid Build Coastguard Worker */ 2400*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LID_SWITCH 2401*4f2df630SAndroid Build Coastguard Worker 2402*4f2df630SAndroid Build Coastguard Worker /* 2403*4f2df630SAndroid Build Coastguard Worker * GPIOs to use to detect that the lid is opened. 2404*4f2df630SAndroid Build Coastguard Worker * 2405*4f2df630SAndroid Build Coastguard Worker * This is a X-macro composed of a list of LID_OPEN(GPIO_xxx) elements defining 2406*4f2df630SAndroid Build Coastguard Worker * all the GPIOs to check to find whether the lid is currently opened. 2407*4f2df630SAndroid Build Coastguard Worker * If not defined, it is using GPIO_LID_OPEN. 2408*4f2df630SAndroid Build Coastguard Worker */ 2409*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LID_SWITCH_GPIO_LIST 2410*4f2df630SAndroid Build Coastguard Worker 2411*4f2df630SAndroid Build Coastguard Worker /* 2412*4f2df630SAndroid Build Coastguard Worker * Support for turning the lightbar power rails on briefly when the AP is off. 2413*4f2df630SAndroid Build Coastguard Worker * Enabling this requires implementing the board-specific lb_power() function 2414*4f2df630SAndroid Build Coastguard Worker * to do it (see lb_common.h). 2415*4f2df630SAndroid Build Coastguard Worker */ 2416*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LIGHTBAR_POWER_RAILS 2417*4f2df630SAndroid Build Coastguard Worker 2418*4f2df630SAndroid Build Coastguard Worker /* 2419*4f2df630SAndroid Build Coastguard Worker * For tap sequence, show the last segment in dim to give a better idea of 2420*4f2df630SAndroid Build Coastguard Worker * battery percentage. 2421*4f2df630SAndroid Build Coastguard Worker */ 2422*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LIGHTBAR_TAP_DIM_LAST_SEGMENT 2423*4f2df630SAndroid Build Coastguard Worker 2424*4f2df630SAndroid Build Coastguard Worker /* 2425*4f2df630SAndroid Build Coastguard Worker * Adds a console command for testing the long long shift right ABI on Cortex-m4 2426*4f2df630SAndroid Build Coastguard Worker * (Cr50). 2427*4f2df630SAndroid Build Coastguard Worker */ 2428*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LLSR_TEST 2429*4f2df630SAndroid Build Coastguard Worker 2430*4f2df630SAndroid Build Coastguard Worker /* Program memory offset for little firmware loader. */ 2431*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LOADER_MEM_OFF 2432*4f2df630SAndroid Build Coastguard Worker 2433*4f2df630SAndroid Build Coastguard Worker /* Size of little firmware loader. */ 2434*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LOADER_SIZE 2435*4f2df630SAndroid Build Coastguard Worker 2436*4f2df630SAndroid Build Coastguard Worker /* Little firmware loader storage offset. */ 2437*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LOADER_STORAGE_OFF 2438*4f2df630SAndroid Build Coastguard Worker 2439*4f2df630SAndroid Build Coastguard Worker /* 2440*4f2df630SAndroid Build Coastguard Worker * Low power idle options. These are disabled by default and all boards that 2441*4f2df630SAndroid Build Coastguard Worker * want to use low power idle must define it. When using the LFIOSC, the low 2442*4f2df630SAndroid Build Coastguard Worker * frequency clock will be used to conserve even more power when possible. 2443*4f2df630SAndroid Build Coastguard Worker * 2444*4f2df630SAndroid Build Coastguard Worker * GPIOs which need to trigger interrupts in low power idle must specify the 2445*4f2df630SAndroid Build Coastguard Worker * GPIO_INT_DSLEEP flag in gpio_list[]. 2446*4f2df630SAndroid Build Coastguard Worker * 2447*4f2df630SAndroid Build Coastguard Worker * Note that for some processors (e.g. LM4), an active JTAG connection will 2448*4f2df630SAndroid Build Coastguard Worker * prevent the EC from using low-power idle. 2449*4f2df630SAndroid Build Coastguard Worker */ 2450*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LOW_POWER_IDLE 2451*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LOW_POWER_USE_LFIOSC 2452*4f2df630SAndroid Build Coastguard Worker 2453*4f2df630SAndroid Build Coastguard Worker /* 2454*4f2df630SAndroid Build Coastguard Worker * Enable deep sleep during S0 (ignores SLEEP_MASK_AP_RUN). 2455*4f2df630SAndroid Build Coastguard Worker */ 2456*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LOW_POWER_S0 2457*4f2df630SAndroid Build Coastguard Worker 2458*4f2df630SAndroid Build Coastguard Worker /* DMA paging between SRAM and DRAM */ 2459*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DMA_PAGING 2460*4f2df630SAndroid Build Coastguard Worker 2461*4f2df630SAndroid Build Coastguard Worker /* 2462*4f2df630SAndroid Build Coastguard Worker * Enable HID subsystem using HECI on Intel ISH (Integrated Sensor Hub) 2463*4f2df630SAndroid Build Coastguard Worker */ 2464*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HID_HECI 2465*4f2df630SAndroid Build Coastguard Worker 2466*4f2df630SAndroid Build Coastguard Worker /* Support host command interface over HECI */ 2467*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_HECI 2468*4f2df630SAndroid Build Coastguard Worker 2469*4f2df630SAndroid Build Coastguard Worker /* 2470*4f2df630SAndroid Build Coastguard Worker * EC supports x86 host communication with AP. This can either be through LPC 2471*4f2df630SAndroid Build Coastguard Worker * or eSPI. The CONFIG_HOSTCMD_X86 will get automatically defined if either 2472*4f2df630SAndroid Build Coastguard Worker * CONFIG_HOSTCMD_LPC or CONFIG_HOSTCMD_ESPI are defined. LPC and eSPI are 2473*4f2df630SAndroid Build Coastguard Worker * mutually exclusive. 2474*4f2df630SAndroid Build Coastguard Worker */ 2475*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_X86 2476*4f2df630SAndroid Build Coastguard Worker /* Support host command interface over LPC bus. */ 2477*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_LPC 2478*4f2df630SAndroid Build Coastguard Worker /* Support host command interface over eSPI bus. */ 2479*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_ESPI 2480*4f2df630SAndroid Build Coastguard Worker 2481*4f2df630SAndroid Build Coastguard Worker /* 2482*4f2df630SAndroid Build Coastguard Worker * SLP signals (SLP_S3 and SLP_S4) use virtual wires intead of physical pins 2483*4f2df630SAndroid Build Coastguard Worker * with eSPI interface. 2484*4f2df630SAndroid Build Coastguard Worker */ 2485*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_ESPI_VW_SLP_S3 2486*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_ESPI_VW_SLP_S4 2487*4f2df630SAndroid Build Coastguard Worker 2488*4f2df630SAndroid Build Coastguard Worker /* MCHP next two items are EC eSPI peripheral configuration */ 2489*4f2df630SAndroid Build Coastguard Worker /* Maximum clock frequence eSPI EC peripheral advertises 2490*4f2df630SAndroid Build Coastguard Worker * Values in MHz are 20, 25, 33, 50, and 66 2491*4f2df630SAndroid Build Coastguard Worker */ 2492*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_ESPI_EC_MAX_FREQ 2493*4f2df630SAndroid Build Coastguard Worker 2494*4f2df630SAndroid Build Coastguard Worker /* EC eSPI peripheral advertises IO lanes 2495*4f2df630SAndroid Build Coastguard Worker * 0 = Single 2496*4f2df630SAndroid Build Coastguard Worker * 1 = Single and Dual 2497*4f2df630SAndroid Build Coastguard Worker * 2 = Single and Quad 2498*4f2df630SAndroid Build Coastguard Worker * 3 = Single, Dual, and Quad 2499*4f2df630SAndroid Build Coastguard Worker */ 2500*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_ESPI_EC_MODE 2501*4f2df630SAndroid Build Coastguard Worker 2502*4f2df630SAndroid Build Coastguard Worker /* Bit map of eSPI channels EC advertises 2503*4f2df630SAndroid Build Coastguard Worker * bit[0] = 1 Peripheral channel 2504*4f2df630SAndroid Build Coastguard Worker * bit[1] = 1 Virtual Wire channel 2505*4f2df630SAndroid Build Coastguard Worker * bit[2] = 1 OOB channel 2506*4f2df630SAndroid Build Coastguard Worker * bit[3] = 1 Flash channel 2507*4f2df630SAndroid Build Coastguard Worker */ 2508*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_ESPI_EC_CHAN_BITMAP 2509*4f2df630SAndroid Build Coastguard Worker 2510*4f2df630SAndroid Build Coastguard Worker /* Base address of low power RAM. */ 2511*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LPRAM_BASE 2512*4f2df630SAndroid Build Coastguard Worker 2513*4f2df630SAndroid Build Coastguard Worker /* Size of low power RAM. */ 2514*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LPRAM_SIZE 2515*4f2df630SAndroid Build Coastguard Worker 2516*4f2df630SAndroid Build Coastguard Worker /* Use Link-Time Optimizations to try to reduce the firmware code size */ 2517*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_LTO 2518*4f2df630SAndroid Build Coastguard Worker 2519*4f2df630SAndroid Build Coastguard Worker /* Provide rudimentary malloc/free like services for shared memory. */ 2520*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MALLOC 2521*4f2df630SAndroid Build Coastguard Worker 2522*4f2df630SAndroid Build Coastguard Worker /* Need for a math library */ 2523*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MATH_UTIL 2524*4f2df630SAndroid Build Coastguard Worker 2525*4f2df630SAndroid Build Coastguard Worker /* Include code to do online compass calibration */ 2526*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MAG_CALIBRATE 2527*4f2df630SAndroid Build Coastguard Worker 2528*4f2df630SAndroid Build Coastguard Worker /* Microchip EC SRAM start address */ 2529*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MEC_SRAM_BASE_START 2530*4f2df630SAndroid Build Coastguard Worker 2531*4f2df630SAndroid Build Coastguard Worker /* Microchip EC SRAM end address */ 2532*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MEC_SRAM_BASE_END 2533*4f2df630SAndroid Build Coastguard Worker 2534*4f2df630SAndroid Build Coastguard Worker /* Microchip EC SRAM size */ 2535*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MEC_SRAM_SIZE 2536*4f2df630SAndroid Build Coastguard Worker 2537*4f2df630SAndroid Build Coastguard Worker /* 2538*4f2df630SAndroid Build Coastguard Worker * Define Megachips DisplayPort to HDMI protocol converter/level shifter serial 2539*4f2df630SAndroid Build Coastguard Worker * interface. 2540*4f2df630SAndroid Build Coastguard Worker */ 2541*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MCDP28X0 2542*4f2df630SAndroid Build Coastguard Worker 2543*4f2df630SAndroid Build Coastguard Worker /* Define clock input to MFT module. */ 2544*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MFT_INPUT_LFCLK 2545*4f2df630SAndroid Build Coastguard Worker 2546*4f2df630SAndroid Build Coastguard Worker /* Minute-IA watchdog timer vector number. */ 2547*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MIA_WDT_VEC 0xFF 2548*4f2df630SAndroid Build Coastguard Worker 2549*4f2df630SAndroid Build Coastguard Worker /* Support MKBP event */ 2550*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_EVENT 2551*4f2df630SAndroid Build Coastguard Worker 2552*4f2df630SAndroid Build Coastguard Worker /* MKBP events are sent by using host event */ 2553*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_USE_HOST_EVENT 2554*4f2df630SAndroid Build Coastguard Worker 2555*4f2df630SAndroid Build Coastguard Worker /* MKBP events are sent by using GPIO */ 2556*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_USE_GPIO 2557*4f2df630SAndroid Build Coastguard Worker 2558*4f2df630SAndroid Build Coastguard Worker /* 2559*4f2df630SAndroid Build Coastguard Worker * MKBP events are notified by using both a GPIO and a host event. 2560*4f2df630SAndroid Build Coastguard Worker * 2561*4f2df630SAndroid Build Coastguard Worker * You should use this if you are using a GPIO to notify the AP of an MKBP 2562*4f2df630SAndroid Build Coastguard Worker * event, and you need an MKBP event to wake the AP in suspend and the AP cannot 2563*4f2df630SAndroid Build Coastguard Worker * wake from the GPIO. Since you are using both a GPIO and a hostevent for the 2564*4f2df630SAndroid Build Coastguard Worker * notification, make sure that the S0 hostevent mask does NOT include MKBP 2565*4f2df630SAndroid Build Coastguard Worker * events. Otherwise, you will have multiple consumers for a single event. 2566*4f2df630SAndroid Build Coastguard Worker * However, make sure to configure the host event *sleep* mask in coreboot to 2567*4f2df630SAndroid Build Coastguard Worker * include MKBP events. In order to prevent all MKBP events from waking the AP, 2568*4f2df630SAndroid Build Coastguard Worker * use CONFIG_MKBP_EVENT_WAKEUP_MASK to filter the events. 2569*4f2df630SAndroid Build Coastguard Worker */ 2570*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT 2571*4f2df630SAndroid Build Coastguard Worker 2572*4f2df630SAndroid Build Coastguard Worker /* MKBP events are sent by using HECI on an ISH */ 2573*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_USE_HECI 2574*4f2df630SAndroid Build Coastguard Worker 2575*4f2df630SAndroid Build Coastguard Worker /* MKBP events are sent by using custom method */ 2576*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_USE_CUSTOM 2577*4f2df630SAndroid Build Coastguard Worker 2578*4f2df630SAndroid Build Coastguard Worker /* 2579*4f2df630SAndroid Build Coastguard Worker * If using MKBP to send host events, with this option, we can define the host 2580*4f2df630SAndroid Build Coastguard Worker * events that should wake the system in suspend. Some examples are: 2581*4f2df630SAndroid Build Coastguard Worker * 2582*4f2df630SAndroid Build Coastguard Worker * EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) 2583*4f2df630SAndroid Build Coastguard Worker * EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED) 2584*4f2df630SAndroid Build Coastguard Worker * 2585*4f2df630SAndroid Build Coastguard Worker * The only things that should be in this mask are: 2586*4f2df630SAndroid Build Coastguard Worker * EC_HOST_EVENT_MASK(EC_HOST_EVENT_*) 2587*4f2df630SAndroid Build Coastguard Worker */ 2588*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK 2589*4f2df630SAndroid Build Coastguard Worker 2590*4f2df630SAndroid Build Coastguard Worker /* 2591*4f2df630SAndroid Build Coastguard Worker * Define which MKBP events should wakeup the system in suspend. Some examples 2592*4f2df630SAndroid Build Coastguard Worker * are: 2593*4f2df630SAndroid Build Coastguard Worker * 2594*4f2df630SAndroid Build Coastguard Worker * EC_MKBP_EVENT_KEY_MATRIX 2595*4f2df630SAndroid Build Coastguard Worker * EC_MKBP_EVENT_SWITCH 2596*4f2df630SAndroid Build Coastguard Worker * 2597*4f2df630SAndroid Build Coastguard Worker * The only things that should be in this mask are EC_MKBP_EVENT_*. 2598*4f2df630SAndroid Build Coastguard Worker */ 2599*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MKBP_EVENT_WAKEUP_MASK 2600*4f2df630SAndroid Build Coastguard Worker 2601*4f2df630SAndroid Build Coastguard Worker /* Support memory protection unit (MPU) */ 2602*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MPU 2603*4f2df630SAndroid Build Coastguard Worker 2604*4f2df630SAndroid Build Coastguard Worker /* Do not try hold I/O pins at frozen level during deep sleep */ 2605*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_NO_PINHOLD 2606*4f2df630SAndroid Build Coastguard Worker 2607*4f2df630SAndroid Build Coastguard Worker /* Support one-wire interface */ 2608*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ONEWIRE 2609*4f2df630SAndroid Build Coastguard Worker 2610*4f2df630SAndroid Build Coastguard Worker /* Support PECI interface to x86 processor */ 2611*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PECI 2612*4f2df630SAndroid Build Coastguard Worker 2613*4f2df630SAndroid Build Coastguard Worker /* Common code for PECI interface to x86 processor */ 2614*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PECI_COMMON 2615*4f2df630SAndroid Build Coastguard Worker 2616*4f2df630SAndroid Build Coastguard Worker /* 2617*4f2df630SAndroid Build Coastguard Worker * Maximum operating temperature in degrees Celcius used on some x86 2618*4f2df630SAndroid Build Coastguard Worker * processors. CPU chip temperature is reported relative to this value and 2619*4f2df630SAndroid Build Coastguard Worker * is never reported greater than this value. Processor asserts PROCHOT# 2620*4f2df630SAndroid Build Coastguard Worker * and starts throttling frequency and voltage at this temp. Operation may 2621*4f2df630SAndroid Build Coastguard Worker * become unreliable if temperature exceeds this limit. 2622*4f2df630SAndroid Build Coastguard Worker */ 2623*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PECI_TJMAX 2624*4f2df630SAndroid Build Coastguard Worker 2625*4f2df630SAndroid Build Coastguard Worker /* Support physical presence detection (via a physical button) */ 2626*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PHYSICAL_PRESENCE 2627*4f2df630SAndroid Build Coastguard Worker 2628*4f2df630SAndroid Build Coastguard Worker /* Enable (unsafe!) developer debug features for physical presence */ 2629*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PHYSICAL_PRESENCE_DEBUG_UNSAFE 2630*4f2df630SAndroid Build Coastguard Worker 2631*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2632*4f2df630SAndroid Build Coastguard Worker /* PinWeaver config 2633*4f2df630SAndroid Build Coastguard Worker * A feature which exchanges a low entropy secret with rate limits for a high 2634*4f2df630SAndroid Build Coastguard Worker * entropy secret. This enables a set of vendor specific commands for Cr50. 2635*4f2df630SAndroid Build Coastguard Worker */ 2636*4f2df630SAndroid Build Coastguard Worker /* Use Cr50 pinweaver */ 2637*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PINWEAVER 2638*4f2df630SAndroid Build Coastguard Worker /* Use platform/pinweaver */ 2639*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PLATFORM_PINWEAVER 2640*4f2df630SAndroid Build Coastguard Worker 2641*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2642*4f2df630SAndroid Build Coastguard Worker /* PMU config */ 2643*4f2df630SAndroid Build Coastguard Worker 2644*4f2df630SAndroid Build Coastguard Worker /* 2645*4f2df630SAndroid Build Coastguard Worker * Enable hard-resetting the PMU from the EC. The implementation is rather 2646*4f2df630SAndroid Build Coastguard Worker * hacky; it simply shorts out the 3.3V rail to force the PMIC to panic. We 2647*4f2df630SAndroid Build Coastguard Worker * need this unfortunate hack because it's the only way to reset the I2C engine 2648*4f2df630SAndroid Build Coastguard Worker * inside the PMU. 2649*4f2df630SAndroid Build Coastguard Worker */ 2650*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PMU_HARD_RESET 2651*4f2df630SAndroid Build Coastguard Worker 2652*4f2df630SAndroid Build Coastguard Worker /* 2653*4f2df630SAndroid Build Coastguard Worker * Enable this config to make console UART self sufficient (no other 2654*4f2df630SAndroid Build Coastguard Worker * initialization required before uart_init(), no interrupts, uart_tx_char() 2655*4f2df630SAndroid Build Coastguard Worker * does not exit until character finished transmitting). 2656*4f2df630SAndroid Build Coastguard Worker * 2657*4f2df630SAndroid Build Coastguard Worker * This is useful during early hardware bringup, each platform needs to 2658*4f2df630SAndroid Build Coastguard Worker * implement its own code to support this. 2659*4f2df630SAndroid Build Coastguard Worker */ 2660*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POLLING_UART 2661*4f2df630SAndroid Build Coastguard Worker 2662*4f2df630SAndroid Build Coastguard Worker /* Define length of history buffer for port80 messages. */ 2663*4f2df630SAndroid Build Coastguard Worker #define CONFIG_PORT80_HISTORY_LEN 128 2664*4f2df630SAndroid Build Coastguard Worker 2665*4f2df630SAndroid Build Coastguard Worker /* 2666*4f2df630SAndroid Build Coastguard Worker * Enable/Disable printing of port80 messages in interrupt context. By default, 2667*4f2df630SAndroid Build Coastguard Worker * this is disabled. 2668*4f2df630SAndroid Build Coastguard Worker */ 2669*4f2df630SAndroid Build Coastguard Worker #define CONFIG_PORT80_PRINT_IN_INT 0 2670*4f2df630SAndroid Build Coastguard Worker 2671*4f2df630SAndroid Build Coastguard Worker /* MAX695x 7 segment driver */ 2672*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_MAX695X_SEVEN_SEGMENT_DISPLAY 2673*4f2df630SAndroid Build Coastguard Worker 2674*4f2df630SAndroid Build Coastguard Worker /* Config for power states and port80 message to be displayed on 7 -segment */ 2675*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SEVEN_SEG_DISPLAY 2676*4f2df630SAndroid Build Coastguard Worker 2677*4f2df630SAndroid Build Coastguard Worker /* Compile common code to support power button debouncing */ 2678*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_BUTTON 2679*4f2df630SAndroid Build Coastguard Worker 2680*4f2df630SAndroid Build Coastguard Worker /* Force the active state of the power button : 0(default if unset) or 1 */ 2681*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_BUTTON_ACTIVE_STATE 2682*4f2df630SAndroid Build Coastguard Worker 2683*4f2df630SAndroid Build Coastguard Worker /* Allow the power button to send events while the lid is closed */ 2684*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_BUTTON_IGNORE_LID 2685*4f2df630SAndroid Build Coastguard Worker 2686*4f2df630SAndroid Build Coastguard Worker /* Support sending the power button signal to x86 chipsets */ 2687*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_BUTTON_X86 2688*4f2df630SAndroid Build Coastguard Worker 2689*4f2df630SAndroid Build Coastguard Worker /* Set power button state idle at init. Implemented only for npcx. */ 2690*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_BUTTON_INIT_IDLE 2691*4f2df630SAndroid Build Coastguard Worker 2692*4f2df630SAndroid Build Coastguard Worker /* Timeout before power button task gives up starting system */ 2693*4f2df630SAndroid Build Coastguard Worker #define CONFIG_POWER_BUTTON_INIT_TIMEOUT 1 2694*4f2df630SAndroid Build Coastguard Worker 2695*4f2df630SAndroid Build Coastguard Worker /* Compile common code for AP power state machine */ 2696*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_COMMON 2697*4f2df630SAndroid Build Coastguard Worker 2698*4f2df630SAndroid Build Coastguard Worker /* Enable a task-safe way to control the PP5000 rail. */ 2699*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_PP5000_CONTROL 2700*4f2df630SAndroid Build Coastguard Worker 2701*4f2df630SAndroid Build Coastguard Worker /* Support stopping in S5 on shutdown */ 2702*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_SHUTDOWN_PAUSE_IN_S5 2703*4f2df630SAndroid Build Coastguard Worker 2704*4f2df630SAndroid Build Coastguard Worker /* 2705*4f2df630SAndroid Build Coastguard Worker * Detect power signal interrupt storms, defined as more than 2706*4f2df630SAndroid Build Coastguard Worker * CONFIG_POWER_SIGNAL_INTERRUPT_STORM_DETECT_THRESHOLD occurences of a single 2707*4f2df630SAndroid Build Coastguard Worker * power signal interrupt within one second. 2708*4f2df630SAndroid Build Coastguard Worker */ 2709*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_SIGNAL_INTERRUPT_STORM_DETECT_THRESHOLD 2710*4f2df630SAndroid Build Coastguard Worker 2711*4f2df630SAndroid Build Coastguard Worker /* Use part of the EC's data EEPROM to hold persistent storage for the AP. */ 2712*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PSTORE 2713*4f2df630SAndroid Build Coastguard Worker 2714*4f2df630SAndroid Build Coastguard Worker /* Support S0ix */ 2715*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_S0IX 2716*4f2df630SAndroid Build Coastguard Worker 2717*4f2df630SAndroid Build Coastguard Worker /* Support detecting failure to enter S0ix */ 2718*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_S0IX_FAILURE_DETECTION 2719*4f2df630SAndroid Build Coastguard Worker 2720*4f2df630SAndroid Build Coastguard Worker /* 2721*4f2df630SAndroid Build Coastguard Worker * Allow the host to self-report its sleep state, in case there is some delay 2722*4f2df630SAndroid Build Coastguard Worker * between the host beginning to enter the sleep state and power signals 2723*4f2df630SAndroid Build Coastguard Worker * actually reflecting the new state. 2724*4f2df630SAndroid Build Coastguard Worker */ 2725*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_TRACK_HOST_SLEEP_STATE 2726*4f2df630SAndroid Build Coastguard Worker 2727*4f2df630SAndroid Build Coastguard Worker /* 2728*4f2df630SAndroid Build Coastguard Worker * Implement the '%li' printf format as a *32-bit* integer format, 2729*4f2df630SAndroid Build Coastguard Worker * as it might be expected by non-EC code. 2730*4f2df630SAndroid Build Coastguard Worker */ 2731*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PRINTF_LEGACY_LI_FORMAT 2732*4f2df630SAndroid Build Coastguard Worker 2733*4f2df630SAndroid Build Coastguard Worker /* 2734*4f2df630SAndroid Build Coastguard Worker * On x86 systems, define this option if the CPU_PROCHOT signal is active low. 2735*4f2df630SAndroid Build Coastguard Worker */ 2736*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CPU_PROCHOT_ACTIVE_LOW 2737*4f2df630SAndroid Build Coastguard Worker 2738*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2739*4f2df630SAndroid Build Coastguard Worker /* Support PWM control */ 2740*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PWM 2741*4f2df630SAndroid Build Coastguard Worker 2742*4f2df630SAndroid Build Coastguard Worker /* Define clock input to PWM module. */ 2743*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PWM_INPUT_LFCLK 2744*4f2df630SAndroid Build Coastguard Worker 2745*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 2746*4f2df630SAndroid Build Coastguard Worker /* Support PWM output to display backlight */ 2747*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PWM_DISPLIGHT 2748*4f2df630SAndroid Build Coastguard Worker 2749*4f2df630SAndroid Build Coastguard Worker /* 2750*4f2df630SAndroid Build Coastguard Worker * Support keyboard backlight control 2751*4f2df630SAndroid Build Coastguard Worker * 2752*4f2df630SAndroid Build Coastguard Worker * You need to define board_kblight_init unless CONFIG_PWM_KBLIGHT is used. 2753*4f2df630SAndroid Build Coastguard Worker * For example, lm3509 can be registered as a driver in board_kblight_init. 2754*4f2df630SAndroid Build Coastguard Worker */ 2755*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_BACKLIGHT 2756*4f2df630SAndroid Build Coastguard Worker 2757*4f2df630SAndroid Build Coastguard Worker /* 2758*4f2df630SAndroid Build Coastguard Worker * Support PWM output to keyboard backlight 2759*4f2df630SAndroid Build Coastguard Worker * 2760*4f2df630SAndroid Build Coastguard Worker * This implies CONFIG_KEYBOARD_BACKLIGHT. 2761*4f2df630SAndroid Build Coastguard Worker */ 2762*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PWM_KBLIGHT 2763*4f2df630SAndroid Build Coastguard Worker 2764*4f2df630SAndroid Build Coastguard Worker /* Size of each RAM bank in chip, default is CONFIG_RAM_SIZE */ 2765*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RAM_BANK_SIZE 2766*4f2df630SAndroid Build Coastguard Worker 2767*4f2df630SAndroid Build Coastguard Worker /* 2768*4f2df630SAndroid Build Coastguard Worker * Number of RAM banks in chip, default is 2769*4f2df630SAndroid Build Coastguard Worker * CONFIG_RAM_SIZE / CONFIG_RAM_BANK_SIZE 2770*4f2df630SAndroid Build Coastguard Worker */ 2771*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RAM_BANKS 2772*4f2df630SAndroid Build Coastguard Worker 2773*4f2df630SAndroid Build Coastguard Worker /* Base address of RAM for the chip */ 2774*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RAM_BASE 2775*4f2df630SAndroid Build Coastguard Worker 2776*4f2df630SAndroid Build Coastguard Worker /* 2777*4f2df630SAndroid Build Coastguard Worker * CONFIG_DATA_RAM_SIZE and CONFIG_RAM_SIZE indicate size of all data RAM 2778*4f2df630SAndroid Build Coastguard Worker * available on the chip in bytes and size of data RAM available for EC in 2779*4f2df630SAndroid Build Coastguard Worker * bytes, respectively. 2780*4f2df630SAndroid Build Coastguard Worker * Usually, CONFIG_DATA_RAM_SIZE = CONFIG_RAM_SIZE but some chips need to 2781*4f2df630SAndroid Build Coastguard Worker * allocate RAM for the mask ROM. Then CONFIG_DATA_RAM_SIZE > CONFIG_RAM_SIZE. 2782*4f2df630SAndroid Build Coastguard Worker */ 2783*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DATA_RAM_SIZE 2784*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RAM_SIZE 2785*4f2df630SAndroid Build Coastguard Worker 2786*4f2df630SAndroid Build Coastguard Worker /* Enable rbox peripheral */ 2787*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RBOX 2788*4f2df630SAndroid Build Coastguard Worker 2789*4f2df630SAndroid Build Coastguard Worker /* Enable rbox wakeup */ 2790*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RBOX_WAKEUP 2791*4f2df630SAndroid Build Coastguard Worker 2792*4f2df630SAndroid Build Coastguard Worker /* Enable RDD peripheral */ 2793*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RDD 2794*4f2df630SAndroid Build Coastguard Worker 2795*4f2df630SAndroid Build Coastguard Worker /* Support IR357x Link voltage regulator debugging / reprogramming */ 2796*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_REGULATOR_IR357X 2797*4f2df630SAndroid Build Coastguard Worker 2798*4f2df630SAndroid Build Coastguard Worker /* Support RMA auth challenge-response */ 2799*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RMA_AUTH 2800*4f2df630SAndroid Build Coastguard Worker 2801*4f2df630SAndroid Build Coastguard Worker /* 2802*4f2df630SAndroid Build Coastguard Worker * Use the p256 curve for RMA challenge-response calculations (x21559 is used 2803*4f2df630SAndroid Build Coastguard Worker * by default). 2804*4f2df630SAndroid Build Coastguard Worker */ 2805*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RMA_AUTH_USE_P256 2806*4f2df630SAndroid Build Coastguard Worker 2807*4f2df630SAndroid Build Coastguard Worker /* Support verifying 2048-bit RSA signature */ 2808*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RSA 2809*4f2df630SAndroid Build Coastguard Worker 2810*4f2df630SAndroid Build Coastguard Worker /* Define the RSA key size. */ 2811*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RSA_KEY_SIZE 2812*4f2df630SAndroid Build Coastguard Worker 2813*4f2df630SAndroid Build Coastguard Worker /* Use RSA exponent 3 instead of F4 (65537) */ 2814*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RSA_EXPONENT_3 2815*4f2df630SAndroid Build Coastguard Worker 2816*4f2df630SAndroid Build Coastguard Worker /* 2817*4f2df630SAndroid Build Coastguard Worker * Adjust the compiler optimization flags for the RSA code to get a speed-up 2818*4f2df630SAndroid Build Coastguard Worker * at the expense of a small code size delta. 2819*4f2df630SAndroid Build Coastguard Worker */ 2820*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RSA_OPTIMIZED 2821*4f2df630SAndroid Build Coastguard Worker 2822*4f2df630SAndroid Build Coastguard Worker /* 2823*4f2df630SAndroid Build Coastguard Worker * Verify the RW firmware using the RSA signature. 2824*4f2df630SAndroid Build Coastguard Worker * (for accessories without software sync) 2825*4f2df630SAndroid Build Coastguard Worker */ 2826*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RWSIG 2827*4f2df630SAndroid Build Coastguard Worker 2828*4f2df630SAndroid Build Coastguard Worker /* 2829*4f2df630SAndroid Build Coastguard Worker * When RWSIG verification is performed as a task, time to wait from signature 2830*4f2df630SAndroid Build Coastguard Worker * verification to an automatic jump to RW (if AP does not request the wait to 2831*4f2df630SAndroid Build Coastguard Worker * be interrupted). 2832*4f2df630SAndroid Build Coastguard Worker */ 2833*4f2df630SAndroid Build Coastguard Worker #define CONFIG_RWSIG_JUMP_TIMEOUT (1000 * MSEC) 2834*4f2df630SAndroid Build Coastguard Worker 2835*4f2df630SAndroid Build Coastguard Worker /* 2836*4f2df630SAndroid Build Coastguard Worker * Defines what type of futility signature type should be used. 2837*4f2df630SAndroid Build Coastguard Worker * RWSIG should be used for new designs. 2838*4f2df630SAndroid Build Coastguard Worker * Old adapters use the USBPD1 futility signature type. 2839*4f2df630SAndroid Build Coastguard Worker */ 2840*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RWSIG_TYPE_RWSIG 2841*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RWSIG_TYPE_USBPD1 2842*4f2df630SAndroid Build Coastguard Worker 2843*4f2df630SAndroid Build Coastguard Worker /* 2844*4f2df630SAndroid Build Coastguard Worker * By default the pubkey and sig are put at the end of the first and second 2845*4f2df630SAndroid Build Coastguard Worker * half of the total flash, and take up the minimum space possible. You can 2846*4f2df630SAndroid Build Coastguard Worker * override those defaults with these. 2847*4f2df630SAndroid Build Coastguard Worker */ 2848*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_PUBKEY_ADDR 2849*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_PUBKEY_SIZE 2850*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_SIG_ADDR 2851*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_SIG_SIZE 2852*4f2df630SAndroid Build Coastguard Worker 2853*4f2df630SAndroid Build Coastguard Worker /****************************************************************************/ 2854*4f2df630SAndroid Build Coastguard Worker /* Shared objects library. */ 2855*4f2df630SAndroid Build Coastguard Worker 2856*4f2df630SAndroid Build Coastguard Worker /* Support shared objects library between RO and RW. */ 2857*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHAREDLIB 2858*4f2df630SAndroid Build Coastguard Worker 2859*4f2df630SAndroid Build Coastguard Worker /* Size of shared objects library. */ 2860*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHAREDLIB_SIZE 2861*4f2df630SAndroid Build Coastguard Worker 2862*4f2df630SAndroid Build Coastguard Worker /* Program memory offset of shared objects library. */ 2863*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHAREDLIB_MEM_OFF 2864*4f2df630SAndroid Build Coastguard Worker 2865*4f2df630SAndroid Build Coastguard Worker /* Storage offset of sharedobjects library. */ 2866*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHAREDLIB_STORAGE_OFF 2867*4f2df630SAndroid Build Coastguard Worker 2868*4f2df630SAndroid Build Coastguard Worker /* 2869*4f2df630SAndroid Build Coastguard Worker * If defined, the hash module will save its last computed hash when jumping 2870*4f2df630SAndroid Build Coastguard Worker * between EC images. 2871*4f2df630SAndroid Build Coastguard Worker */ 2872*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SAVE_VBOOT_HASH 2873*4f2df630SAndroid Build Coastguard Worker 2874*4f2df630SAndroid Build Coastguard Worker /* Allow the board to use a GPIO for the SCI# signal. */ 2875*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SCI_GPIO 2876*4f2df630SAndroid Build Coastguard Worker 2877*4f2df630SAndroid Build Coastguard Worker /* Support computing SHA-1 hash */ 2878*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHA1 2879*4f2df630SAndroid Build Coastguard Worker 2880*4f2df630SAndroid Build Coastguard Worker /* Support computing of other hash sizes (without the VBOOT code) */ 2881*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHA256 2882*4f2df630SAndroid Build Coastguard Worker 2883*4f2df630SAndroid Build Coastguard Worker /* Unroll some loops in SHA256_transform for better performance. */ 2884*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SHA256_UNROLLED 2885*4f2df630SAndroid Build Coastguard Worker 2886*4f2df630SAndroid Build Coastguard Worker /* Emulate the CLZ (Count Leading Zeros) in software for CPU lacking support */ 2887*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SOFTWARE_CLZ 2888*4f2df630SAndroid Build Coastguard Worker 2889*4f2df630SAndroid Build Coastguard Worker /* Emulate the CLZ (Count Trailing Zeros) in software for CPU lacking support */ 2890*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SOFTWARE_CTZ 2891*4f2df630SAndroid Build Coastguard Worker 2892*4f2df630SAndroid Build Coastguard Worker /* Support smbus interface */ 2893*4f2df630SAndroid Build Coastguard Worker /* 2894*4f2df630SAndroid Build Coastguard Worker * Deprecated in 2895*4f2df630SAndroid Build Coastguard Worker * https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704279 2896*4f2df630SAndroid Build Coastguard Worker * 2897*4f2df630SAndroid Build Coastguard Worker * It hasn't been used in over 2 years 2898*4f2df630SAndroid Build Coastguard Worker * https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/452459/ 2899*4f2df630SAndroid Build Coastguard Worker * and was only used by one board (pyro). 2900*4f2df630SAndroid Build Coastguard Worker * 2901*4f2df630SAndroid Build Coastguard Worker * I2C and SMBus are compatible at the physical layer. The data transfer 2902*4f2df630SAndroid Build Coastguard Worker * paradigm is different. Some of our batteries are using SMbus style 2903*4f2df630SAndroid Build Coastguard Worker * transfers now, they are just using i2cxfer directly to accomplish it. 2904*4f2df630SAndroid Build Coastguard Worker * 2905*4f2df630SAndroid Build Coastguard Worker * I doubt the SMBus code will get revived, but we do have it in revision 2906*4f2df630SAndroid Build Coastguard Worker * history if we ever need it. 2907*4f2df630SAndroid Build Coastguard Worker */ 2908*4f2df630SAndroid Build Coastguard Worker /* #undef CONFIG_SMBUS */ 2909*4f2df630SAndroid Build Coastguard Worker 2910*4f2df630SAndroid Build Coastguard Worker /* Support SPI interfaces */ 2911*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI 2912*4f2df630SAndroid Build Coastguard Worker 2913*4f2df630SAndroid Build Coastguard Worker /* Support deprecated SPI protocol version 2. */ 2914*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_PROTOCOL_V2 2915*4f2df630SAndroid Build Coastguard Worker 2916*4f2df630SAndroid Build Coastguard Worker /* 2917*4f2df630SAndroid Build Coastguard Worker * Support SPI periph interfaces. The first board supporting this is cr50 and 2918*4f2df630SAndroid Build Coastguard Worker * in its parlance SPI_PERIPH is called SPP. This convention might be 2919*4f2df630SAndroid Build Coastguard Worker * reconsidered later, and the use of "SPI" in different config options needs 2920*4f2df630SAndroid Build Coastguard Worker * to be cleaned up. (crbug.com/512613). 2921*4f2df630SAndroid Build Coastguard Worker */ 2922*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPP 2923*4f2df630SAndroid Build Coastguard Worker 2924*4f2df630SAndroid Build Coastguard Worker /* Define the SPI port to use to access SPI accelerometer */ 2925*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_ACCEL_PORT 2926*4f2df630SAndroid Build Coastguard Worker 2927*4f2df630SAndroid Build Coastguard Worker /* Support SPI flash */ 2928*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH 2929*4f2df630SAndroid Build Coastguard Worker 2930*4f2df630SAndroid Build Coastguard Worker /* Support SPI flash protection register translation */ 2931*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_REGS 2932*4f2df630SAndroid Build Coastguard Worker 2933*4f2df630SAndroid Build Coastguard Worker /* Define the SPI port to use to access the flash */ 2934*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_PORT 2935*4f2df630SAndroid Build Coastguard Worker 2936*4f2df630SAndroid Build Coastguard Worker /* Select any of the following SPI flash configs that your board uses. */ 2937*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_GD25LQ40 2938*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_GD25Q41B 2939*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_W25Q128 2940*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_W25Q40 2941*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_W25Q64 2942*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_W25Q80 2943*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_W25X40 2944*4f2df630SAndroid Build Coastguard Worker 2945*4f2df630SAndroid Build Coastguard Worker /* SPI flash part supports SR2 register */ 2946*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FLASH_HAS_SR2 2947*4f2df630SAndroid Build Coastguard Worker 2948*4f2df630SAndroid Build Coastguard Worker /* Define the SPI port to use to access the fingerprint sensor */ 2949*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_FP_PORT 2950*4f2df630SAndroid Build Coastguard Worker 2951*4f2df630SAndroid Build Coastguard Worker /* Support JEDEC SFDP based Serial NOR flash */ 2952*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_NOR 2953*4f2df630SAndroid Build Coastguard Worker 2954*4f2df630SAndroid Build Coastguard Worker /* Enable SPI_NOR debugging providing additional console output while 2955*4f2df630SAndroid Build Coastguard Worker * initializing Serial NOR Flash devices including SFDP discovery. */ 2956*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_NOR_DEBUG 2957*4f2df630SAndroid Build Coastguard Worker 2958*4f2df630SAndroid Build Coastguard Worker /* Maximum Serial NOR flash command size, in Bytes */ 2959*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_NOR_MAX_MESSAGE_SIZE 2960*4f2df630SAndroid Build Coastguard Worker 2961*4f2df630SAndroid Build Coastguard Worker /* Maximum Serial NOR flash read size, in Bytes */ 2962*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_NOR_MAX_READ_SIZE 2963*4f2df630SAndroid Build Coastguard Worker 2964*4f2df630SAndroid Build Coastguard Worker /* Maximum Serial NOR flash write size, in Bytes. Note this must be a power of 2965*4f2df630SAndroid Build Coastguard Worker * two. */ 2966*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_NOR_MAX_WRITE_SIZE 2967*4f2df630SAndroid Build Coastguard Worker 2968*4f2df630SAndroid Build Coastguard Worker /* If defined will enable block (64KiB) erase operations. */ 2969*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_NOR_BLOCK_ERASE 2970*4f2df630SAndroid Build Coastguard Worker 2971*4f2df630SAndroid Build Coastguard Worker /* If defined will read the sector/block to be erased first and only initiate 2972*4f2df630SAndroid Build Coastguard Worker * the erase operation if not already in an erased state. The read operation 2973*4f2df630SAndroid Build Coastguard Worker * (performed in CONFIG_SPI_NOR_MAX_READ_SIZE chunks) is aborted early if a 2974*4f2df630SAndroid Build Coastguard Worker * non "0xff" byte is encountered. 2975*4f2df630SAndroid Build Coastguard Worker * !! Make sure there is enough stack space to host a 2976*4f2df630SAndroid Build Coastguard Worker * !! CONFIG_SPI_NOR_MAX_READ_SIZE sized buffer before enabling. 2977*4f2df630SAndroid Build Coastguard Worker */ 2978*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_NOR_SMART_ERASE 2979*4f2df630SAndroid Build Coastguard Worker 2980*4f2df630SAndroid Build Coastguard Worker /* SPI controller feature */ 2981*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_CONTROLLER 2982*4f2df630SAndroid Build Coastguard Worker 2983*4f2df630SAndroid Build Coastguard Worker /* SPI controller halfduplex/3-wire mode */ 2984*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_HALFDUPLEX 2985*4f2df630SAndroid Build Coastguard Worker 2986*4f2df630SAndroid Build Coastguard Worker /* SPI controller configure gpios on init */ 2987*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_CONTROLLER_CONFIGURE_GPIOS 2988*4f2df630SAndroid Build Coastguard Worker 2989*4f2df630SAndroid Build Coastguard Worker /* 2990*4f2df630SAndroid Build Coastguard Worker * Support SPI controller's without GPIO-specified Chip Selects, instead rely on 2991*4f2df630SAndroid Build Coastguard Worker * the SPI controller port's hardwired CS pin. 2992*4f2df630SAndroid Build Coastguard Worker */ 2993*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_CONTROLLER_NO_CS_GPIOS 2994*4f2df630SAndroid Build Coastguard Worker 2995*4f2df630SAndroid Build Coastguard Worker /* Add support for hashing AP RO */ 2996*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPI_HASH 2997*4f2df630SAndroid Build Coastguard Worker 2998*4f2df630SAndroid Build Coastguard Worker /* Support testing SPI periph interface driver. */ 2999*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SPP_TEST 3000*4f2df630SAndroid Build Coastguard Worker 3001*4f2df630SAndroid Build Coastguard Worker /* Default stack size to use for tasks, in bytes */ 3002*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STACK_SIZE 3003*4f2df630SAndroid Build Coastguard Worker 3004*4f2df630SAndroid Build Coastguard Worker /* Use 32-bit timer for clock source on stm32. */ 3005*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STM_HWTIMER32 3006*4f2df630SAndroid Build Coastguard Worker 3007*4f2df630SAndroid Build Coastguard Worker /* Compile charger detect for STM32 */ 3008*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STM32_CHARGER_DETECT 3009*4f2df630SAndroid Build Coastguard Worker 3010*4f2df630SAndroid Build Coastguard Worker /* Fake hibernate mode */ 3011*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STM32L_FAKE_HIBERNATE 3012*4f2df630SAndroid Build Coastguard Worker 3013*4f2df630SAndroid Build Coastguard Worker /* 3014*4f2df630SAndroid Build Coastguard Worker * Compile common code to handle simple switch inputs such as the recovery 3015*4f2df630SAndroid Build Coastguard Worker * button input from the servo debug interface. 3016*4f2df630SAndroid Build Coastguard Worker */ 3017*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SWITCH 3018*4f2df630SAndroid Build Coastguard Worker 3019*4f2df630SAndroid Build Coastguard Worker /* Support dedicated recovery signal from servo board */ 3020*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SWITCH_DEDICATED_RECOVERY 3021*4f2df630SAndroid Build Coastguard Worker 3022*4f2df630SAndroid Build Coastguard Worker /* 3023*4f2df630SAndroid Build Coastguard Worker * System should remain unlocked even if write protect is enabled. 3024*4f2df630SAndroid Build Coastguard Worker * 3025*4f2df630SAndroid Build Coastguard Worker * NOTE: This should ONLY be defined during bringup, and should never be 3026*4f2df630SAndroid Build Coastguard Worker * defined on a shipping / released platform. 3027*4f2df630SAndroid Build Coastguard Worker * 3028*4f2df630SAndroid Build Coastguard Worker * When defined, CBI allows ectool to reprogram all the fields. Once undefined, 3029*4f2df630SAndroid Build Coastguard Worker * it refuses to change certain fields. (e.g. board version, OEM ID) 3030*4f2df630SAndroid Build Coastguard Worker */ 3031*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SYSTEM_UNLOCKED 3032*4f2df630SAndroid Build Coastguard Worker 3033*4f2df630SAndroid Build Coastguard Worker /* 3034*4f2df630SAndroid Build Coastguard Worker * Device can be a tablet as well as a clamshell. 3035*4f2df630SAndroid Build Coastguard Worker */ 3036*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TABLET_MODE 3037*4f2df630SAndroid Build Coastguard Worker 3038*4f2df630SAndroid Build Coastguard Worker /* 3039*4f2df630SAndroid Build Coastguard Worker * Add a virtual switch to indicate when we are in tablet mode. 3040*4f2df630SAndroid Build Coastguard Worker */ 3041*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TABLET_MODE_SWITCH 3042*4f2df630SAndroid Build Coastguard Worker 3043*4f2df630SAndroid Build Coastguard Worker /* 3044*4f2df630SAndroid Build Coastguard Worker * Config to identify what devices use GMR sensor to detect tablet mode. If a 3045*4f2df630SAndroid Build Coastguard Worker * board selects this config, it also needs to provide GMR_TABLET_MODE_GPIO_L 3046*4f2df630SAndroid Build Coastguard Worker * and direct its interrupt to gmr_tablet_switch_isr. 3047*4f2df630SAndroid Build Coastguard Worker */ 3048*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GMR_TABLET_MODE 3049*4f2df630SAndroid Build Coastguard Worker 3050*4f2df630SAndroid Build Coastguard Worker /* 3051*4f2df630SAndroid Build Coastguard Worker * Board provides board_sensor_at_360 method instead of GMR_TABLET_MODE_GPIO_L 3052*4f2df630SAndroid Build Coastguard Worker * as the means for determining the state of the flipped-360-degree mode. 3053*4f2df630SAndroid Build Coastguard Worker */ 3054*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_GMR_TABLET_MODE_CUSTOM 3055*4f2df630SAndroid Build Coastguard Worker 3056*4f2df630SAndroid Build Coastguard Worker /* 3057*4f2df630SAndroid Build Coastguard Worker * Add a virtual switch to indicate when detachable device has 3058*4f2df630SAndroid Build Coastguard Worker * base attached. 3059*4f2df630SAndroid Build Coastguard Worker */ 3060*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BASE_ATTACHED_SWITCH 3061*4f2df630SAndroid Build Coastguard Worker 3062*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3063*4f2df630SAndroid Build Coastguard Worker /* Task config */ 3064*4f2df630SAndroid Build Coastguard Worker 3065*4f2df630SAndroid Build Coastguard Worker /* 3066*4f2df630SAndroid Build Coastguard Worker * List of enabled tasks in ascending priority order. This is normally 3067*4f2df630SAndroid Build Coastguard Worker * defined in each board's ec.tasklist file. 3068*4f2df630SAndroid Build Coastguard Worker * 3069*4f2df630SAndroid Build Coastguard Worker * For each task, use the macro TASK_ALWAYS(n, r, d, s) for base tasks and 3070*4f2df630SAndroid Build Coastguard Worker * TASK_NOTEST(n, r, d, s) for tasks that can be excluded in test binaries, 3071*4f2df630SAndroid Build Coastguard Worker * where: 3072*4f2df630SAndroid Build Coastguard Worker * 'n' is the name of the task 3073*4f2df630SAndroid Build Coastguard Worker * 'r' is the main routine of the task 3074*4f2df630SAndroid Build Coastguard Worker * 'd' is an opaque parameter passed to the routine at startup 3075*4f2df630SAndroid Build Coastguard Worker * 's' is the stack size in bytes; must be a multiple of 8 3076*4f2df630SAndroid Build Coastguard Worker * 3077*4f2df630SAndroid Build Coastguard Worker * Some cores use TASK_ALWAYS(n, r, d, s, f), where: 3078*4f2df630SAndroid Build Coastguard Worker * 'f' is the bit flags for the platform specific information 3079*4f2df630SAndroid Build Coastguard Worker * - MIA_TASK_FLAG_USE_FPU : bit 0, task uses FPU H/W 3080*4f2df630SAndroid Build Coastguard Worker * 3081*4f2df630SAndroid Build Coastguard Worker * For USB PD tasks, IDs must be in consecutive order and correspond to 3082*4f2df630SAndroid Build Coastguard Worker * the port which they are for. See TASK_ID_TO_PD_PORT() macro. 3083*4f2df630SAndroid Build Coastguard Worker */ 3084*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TASK_LIST 3085*4f2df630SAndroid Build Coastguard Worker 3086*4f2df630SAndroid Build Coastguard Worker /* 3087*4f2df630SAndroid Build Coastguard Worker * List of test tasks. Same format as CONFIG_TASK_LIST, but used to define 3088*4f2df630SAndroid Build Coastguard Worker * additional tasks for a unit test. Normally defined in 3089*4f2df630SAndroid Build Coastguard Worker * test/{testname}.tasklist. 3090*4f2df630SAndroid Build Coastguard Worker */ 3091*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEST_TASK_LIST 3092*4f2df630SAndroid Build Coastguard Worker 3093*4f2df630SAndroid Build Coastguard Worker /* 3094*4f2df630SAndroid Build Coastguard Worker * List of tasks used by CTS 3095*4f2df630SAndroid Build Coastguard Worker * 3096*4f2df630SAndroid Build Coastguard Worker * cts.tasklist contains tasks run only for CTS. These tasks are added to the 3097*4f2df630SAndroid Build Coastguard Worker * tasks registered in ec.tasklist with higher priority. 3098*4f2df630SAndroid Build Coastguard Worker * 3099*4f2df630SAndroid Build Coastguard Worker * If a CTS suite does not define its own cts.tasklist, the common list is used 3100*4f2df630SAndroid Build Coastguard Worker * (i.e. cts/cts.tasklist). 3101*4f2df630SAndroid Build Coastguard Worker */ 3102*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CTS_TASK_LIST 3103*4f2df630SAndroid Build Coastguard Worker 3104*4f2df630SAndroid Build Coastguard Worker /* 3105*4f2df630SAndroid Build Coastguard Worker * Enable task profiling. 3106*4f2df630SAndroid Build Coastguard Worker * 3107*4f2df630SAndroid Build Coastguard Worker * Boards may #undef this to reduce image size and RAM usage. 3108*4f2df630SAndroid Build Coastguard Worker */ 3109*4f2df630SAndroid Build Coastguard Worker #define CONFIG_TASK_PROFILING 3110*4f2df630SAndroid Build Coastguard Worker 3111*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3112*4f2df630SAndroid Build Coastguard Worker /* Mock config */ 3113*4f2df630SAndroid Build Coastguard Worker 3114*4f2df630SAndroid Build Coastguard Worker /* 3115*4f2df630SAndroid Build Coastguard Worker * List of mock implementations to pull into the build. 3116*4f2df630SAndroid Build Coastguard Worker * 3117*4f2df630SAndroid Build Coastguard Worker * This should contain a flat list of MOCK(the-mock-name) elements. 3118*4f2df630SAndroid Build Coastguard Worker * 3119*4f2df630SAndroid Build Coastguard Worker * This is defined in the following two files: 3120*4f2df630SAndroid Build Coastguard Worker * test/{testname}.mocklist 3121*4f2df630SAndroid Build Coastguard Worker * fuzz/{fuzzname}.mocklist 3122*4f2df630SAndroid Build Coastguard Worker */ 3123*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEST_MOCK_LIST 3124*4f2df630SAndroid Build Coastguard Worker 3125*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3126*4f2df630SAndroid Build Coastguard Worker /* Temperature sensor config */ 3127*4f2df630SAndroid Build Coastguard Worker 3128*4f2df630SAndroid Build Coastguard Worker /* Compile common code for temperature sensor support */ 3129*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR 3130*4f2df630SAndroid Build Coastguard Worker 3131*4f2df630SAndroid Build Coastguard Worker /* Support particular temperature sensor chips */ 3132*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_ADT7481 /* ADT 7481 sensor, on I2C bus */ 3133*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_BD99992GW /* BD99992GW PMIC, on I2C bus */ 3134*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_EC_ADC /* Thermistors on EC's own ADC */ 3135*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_G753 /* G753 sensor, on I2C bus */ 3136*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_G781 /* G781 sensor, on I2C bus */ 3137*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_G782 /* G782 sensor, on I2C bus */ 3138*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_SB_TSI /* SB_TSI sensor, on I2C bus */ 3139*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_TMP006 /* TI TMP006 sensor, on I2C bus */ 3140*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_TMP411 /* TI TMP411 sensor, on I2C bus */ 3141*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_TMP432 /* TI TMP432 sensor, on I2C bus */ 3142*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_TMP468 /* TI TMP468 sensor, on I2C bus */ 3143*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_F75303 /* Fintek F75303 sensor, on I2C bus */ 3144*4f2df630SAndroid Build Coastguard Worker 3145*4f2df630SAndroid Build Coastguard Worker /* Compile common code for thermistor support */ 3146*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_THERMISTOR 3147*4f2df630SAndroid Build Coastguard Worker 3148*4f2df630SAndroid Build Coastguard Worker /* Support particular thermistors */ 3149*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_THERMISTOR_NCP15WB /* NCP15WB thermistor */ 3150*4f2df630SAndroid Build Coastguard Worker 3151*4f2df630SAndroid Build Coastguard Worker /* 3152*4f2df630SAndroid Build Coastguard Worker * If defined, image includes lookup tables and helper functions that convert 3153*4f2df630SAndroid Build Coastguard Worker * thermistor ADC readings into degrees K based off of various circuit 3154*4f2df630SAndroid Build Coastguard Worker * configurations. 3155*4f2df630SAndroid Build Coastguard Worker */ 3156*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STEINHART_HART_3V0_22K6_47K_4050B 3157*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STEINHART_HART_3V3_13K7_47K_4050B 3158*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STEINHART_HART_3V3_51K1_47K_4050B 3159*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STEINHART_HART_6V0_51K1_47K_4050B 3160*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STEINHART_HART_3V3_30K9_47K_4050B 3161*4f2df630SAndroid Build Coastguard Worker 3162*4f2df630SAndroid Build Coastguard Worker /* 3163*4f2df630SAndroid Build Coastguard Worker * If defined, active-high GPIO which indicates temperature sensor chips are 3164*4f2df630SAndroid Build Coastguard Worker * powered. If not defined, temperature sensors are assumed to be always 3165*4f2df630SAndroid Build Coastguard Worker * powered. 3166*4f2df630SAndroid Build Coastguard Worker */ 3167*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TEMP_SENSOR_POWER_GPIO 3168*4f2df630SAndroid Build Coastguard Worker 3169*4f2df630SAndroid Build Coastguard Worker /* Compile common code for throttling the CPU based on the temp sensors */ 3170*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_THROTTLE_AP 3171*4f2df630SAndroid Build Coastguard Worker 3172*4f2df630SAndroid Build Coastguard Worker /* 3173*4f2df630SAndroid Build Coastguard Worker * Throttle the CPU when battery discharge current is too high. When 3174*4f2df630SAndroid Build Coastguard Worker * this feature is enabled, BAT_MAX_DISCHG_CURRENT must be defined in board.h. 3175*4f2df630SAndroid Build Coastguard Worker */ 3176*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_THROTTLE_AP_ON_BAT_DISCHG_CURRENT 3177*4f2df630SAndroid Build Coastguard Worker 3178*4f2df630SAndroid Build Coastguard Worker /* 3179*4f2df630SAndroid Build Coastguard Worker * Throttle the CPU when battery voltage drops below a defined threshold 3180*4f2df630SAndroid Build Coastguard Worker * where the board still boots but some components don't function perfectly. 3181*4f2df630SAndroid Build Coastguard Worker * When this feature is enabled, BAT_LOW_VOLTAGE_THRESH must be defined in 3182*4f2df630SAndroid Build Coastguard Worker * board.h. 3183*4f2df630SAndroid Build Coastguard Worker */ 3184*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_THROTTLE_AP_ON_BAT_VOLTAGE 3185*4f2df630SAndroid Build Coastguard Worker 3186*4f2df630SAndroid Build Coastguard Worker /* 3187*4f2df630SAndroid Build Coastguard Worker * If defined, dptf is enabled to manage thermals. 3188*4f2df630SAndroid Build Coastguard Worker * 3189*4f2df630SAndroid Build Coastguard Worker * NOTE: This doesn't mean that thermal control is completely taken care by 3190*4f2df630SAndroid Build Coastguard Worker * DPTF. We have some hybrid solutions where the EC still manages the fans. 3191*4f2df630SAndroid Build Coastguard Worker */ 3192*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DPTF 3193*4f2df630SAndroid Build Coastguard Worker 3194*4f2df630SAndroid Build Coastguard Worker /* 3195*4f2df630SAndroid Build Coastguard Worker * If defined, this indicates to the motion lid driver that the board does not 3196*4f2df630SAndroid Build Coastguard Worker * have any GMR sensor and hence DPTF profile selection is required to be done 3197*4f2df630SAndroid Build Coastguard Worker * based on lid angle. 3198*4f2df630SAndroid Build Coastguard Worker */ 3199*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DPTF_MOTION_LID_NO_GMR_SENSOR 3200*4f2df630SAndroid Build Coastguard Worker 3201*4f2df630SAndroid Build Coastguard Worker /* 3202*4f2df630SAndroid Build Coastguard Worker * If defined, device supports multiple DPTF profiles depending upon device mode 3203*4f2df630SAndroid Build Coastguard Worker * e.g. clamshell v/s 360-degree flipped mode or base detached v/s attached 3204*4f2df630SAndroid Build Coastguard Worker * mode. 3205*4f2df630SAndroid Build Coastguard Worker * 3206*4f2df630SAndroid Build Coastguard Worker * This config can be used by any driver that does lid angle calculation or base 3207*4f2df630SAndroid Build Coastguard Worker * state detection to determine if different profile numbers need to be 3208*4f2df630SAndroid Build Coastguard Worker * indicated to the host. 3209*4f2df630SAndroid Build Coastguard Worker */ 3210*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_DPTF_MULTI_PROFILE 3211*4f2df630SAndroid Build Coastguard Worker 3212*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3213*4f2df630SAndroid Build Coastguard Worker /* Touchpad config */ 3214*4f2df630SAndroid Build Coastguard Worker 3215*4f2df630SAndroid Build Coastguard Worker /* Enable touchpad. (You must pick a driver from the options below.) */ 3216*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD 3217*4f2df630SAndroid Build Coastguard Worker 3218*4f2df630SAndroid Build Coastguard Worker /* Enable Elan driver */ 3219*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD_ELAN 3220*4f2df630SAndroid Build Coastguard Worker 3221*4f2df630SAndroid Build Coastguard Worker /* Enable Goodix GT7288 driver */ 3222*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD_GT7288 3223*4f2df630SAndroid Build Coastguard Worker 3224*4f2df630SAndroid Build Coastguard Worker /* Enable ST driver */ 3225*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD_ST 3226*4f2df630SAndroid Build Coastguard Worker 3227*4f2df630SAndroid Build Coastguard Worker /* Set I2C port and address (7-bit) */ 3228*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD_I2C_PORT 3229*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD_I2C_ADDR_FLAGS 3230*4f2df630SAndroid Build Coastguard Worker 3231*4f2df630SAndroid Build Coastguard Worker /* 3232*4f2df630SAndroid Build Coastguard Worker * Enable touchpad FW update over USB update protocol, and define touchpad 3233*4f2df630SAndroid Build Coastguard Worker * virtual address and size. 3234*4f2df630SAndroid Build Coastguard Worker */ 3235*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD_VIRTUAL_SIZE 3236*4f2df630SAndroid Build Coastguard Worker 3237*4f2df630SAndroid Build Coastguard Worker /* 3238*4f2df630SAndroid Build Coastguard Worker * Include hashes of the touchpad FW in the EC image, passed as TOUCHPAD_FW 3239*4f2df630SAndroid Build Coastguard Worker * parameter to make command. 3240*4f2df630SAndroid Build Coastguard Worker */ 3241*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TOUCHPAD_HASH_FW 3242*4f2df630SAndroid Build Coastguard Worker 3243*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3244*4f2df630SAndroid Build Coastguard Worker /* TPM-like configuration */ 3245*4f2df630SAndroid Build Coastguard Worker 3246*4f2df630SAndroid Build Coastguard Worker /* Speak the TPM SPI Hardware Protocol on the SPI peripheral interface */ 3247*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TPM_SPP 3248*4f2df630SAndroid Build Coastguard Worker /* Speak to the TPM 2.0 hardware protocol on the I2C periph interface */ 3249*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_TPM_I2CP 3250*4f2df630SAndroid Build Coastguard Worker 3251*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3252*4f2df630SAndroid Build Coastguard Worker /* USART stream config */ 3253*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STREAM_USART 3254*4f2df630SAndroid Build Coastguard Worker 3255*4f2df630SAndroid Build Coastguard Worker /* 3256*4f2df630SAndroid Build Coastguard Worker * Each USART stream can be individually enabled and accessible using the 3257*4f2df630SAndroid Build Coastguard Worker * stream interface provided in the usart_config struct. 3258*4f2df630SAndroid Build Coastguard Worker */ 3259*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STREAM_USART1 3260*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STREAM_USART2 3261*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STREAM_USART3 3262*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STREAM_USART4 3263*4f2df630SAndroid Build Coastguard Worker 3264*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3265*4f2df630SAndroid Build Coastguard Worker /* U2F config: second factor authentication */ 3266*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_U2F 3267*4f2df630SAndroid Build Coastguard Worker 3268*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3269*4f2df630SAndroid Build Coastguard Worker /* USB stream config */ 3270*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STREAM_USB 3271*4f2df630SAndroid Build Coastguard Worker 3272*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3273*4f2df630SAndroid Build Coastguard Worker /* UART config */ 3274*4f2df630SAndroid Build Coastguard Worker 3275*4f2df630SAndroid Build Coastguard Worker /* Baud rate for UARTs */ 3276*4f2df630SAndroid Build Coastguard Worker #define CONFIG_UART_BAUD_RATE 115200 3277*4f2df630SAndroid Build Coastguard Worker 3278*4f2df630SAndroid Build Coastguard Worker /* Allow bit banging of a UARTs pins and bypassing the UART block. */ 3279*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_BITBANG 3280*4f2df630SAndroid Build Coastguard Worker 3281*4f2df630SAndroid Build Coastguard Worker /* UART index (number) for EC console */ 3282*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_CONSOLE 3283*4f2df630SAndroid Build Coastguard Worker 3284*4f2df630SAndroid Build Coastguard Worker /* UART index (number) for host UART, if present */ 3285*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_HOST 3286*4f2df630SAndroid Build Coastguard Worker 3287*4f2df630SAndroid Build Coastguard Worker /* Use uart_input_filter() to filter UART input. See prototype in uart.h */ 3288*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_INPUT_FILTER 3289*4f2df630SAndroid Build Coastguard Worker 3290*4f2df630SAndroid Build Coastguard Worker /* 3291*4f2df630SAndroid Build Coastguard Worker * UART receive buffer size in bytes. Must be a power of 2 for macros in 3292*4f2df630SAndroid Build Coastguard Worker * common/uart_buffering.c to work properly. Must be larger than 3293*4f2df630SAndroid Build Coastguard Worker * CONFIG_CONSOLE_INPUT_LINE_SIZE to copy and paste scripts. 3294*4f2df630SAndroid Build Coastguard Worker */ 3295*4f2df630SAndroid Build Coastguard Worker #define CONFIG_UART_RX_BUF_SIZE 128 3296*4f2df630SAndroid Build Coastguard Worker 3297*4f2df630SAndroid Build Coastguard Worker /* Use DMA for UART input */ 3298*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_RX_DMA 3299*4f2df630SAndroid Build Coastguard Worker 3300*4f2df630SAndroid Build Coastguard Worker /* 3301*4f2df630SAndroid Build Coastguard Worker * On some platforms, UART receive DMA can't trigger an interrupt when a single 3302*4f2df630SAndroid Build Coastguard Worker * character is received. Those platforms poll for characters every HOOK_TICK. 3303*4f2df630SAndroid Build Coastguard Worker * When a character is received, make this many additional checks between then 3304*4f2df630SAndroid Build Coastguard Worker * and the next HOOK_TICK, to increase responsiveness of the console to input. 3305*4f2df630SAndroid Build Coastguard Worker */ 3306*4f2df630SAndroid Build Coastguard Worker #define CONFIG_UART_RX_DMA_RECHECKS 5 3307*4f2df630SAndroid Build Coastguard Worker 3308*4f2df630SAndroid Build Coastguard Worker /* 3309*4f2df630SAndroid Build Coastguard Worker * UART transmit buffer size in bytes. Must be a power of 2 for macros in 3310*4f2df630SAndroid Build Coastguard Worker * common/uart_buffering.c to work properly. 3311*4f2df630SAndroid Build Coastguard Worker */ 3312*4f2df630SAndroid Build Coastguard Worker #define CONFIG_UART_TX_BUF_SIZE 512 3313*4f2df630SAndroid Build Coastguard Worker 3314*4f2df630SAndroid Build Coastguard Worker /* Use DMA for UART output */ 3315*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_TX_DMA 3316*4f2df630SAndroid Build Coastguard Worker 3317*4f2df630SAndroid Build Coastguard Worker /* The DMA channel for UART. If not defined, default to UART1. */ 3318*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_TX_DMA_CH 3319*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_RX_DMA_CH 3320*4f2df630SAndroid Build Coastguard Worker 3321*4f2df630SAndroid Build Coastguard Worker /* The DMA peripheral request signal for UART TX. STM32 only. */ 3322*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_TX_DMA_PH 3323*4f2df630SAndroid Build Coastguard Worker 3324*4f2df630SAndroid Build Coastguard Worker /* The DMA channel mapping config for stm32f4. */ 3325*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_TX_REQ_CH 3326*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_UART_RX_REQ_CH 3327*4f2df630SAndroid Build Coastguard Worker 3328*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3329*4f2df630SAndroid Build Coastguard Worker /* USB PD config */ 3330*4f2df630SAndroid Build Coastguard Worker 3331*4f2df630SAndroid Build Coastguard Worker /* Include all USB Power Delivery modules */ 3332*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_POWER_DELIVERY 3333*4f2df630SAndroid Build Coastguard Worker 3334*4f2df630SAndroid Build Coastguard Worker /* Support for USB PD alternate mode */ 3335*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_ALT_MODE 3336*4f2df630SAndroid Build Coastguard Worker 3337*4f2df630SAndroid Build Coastguard Worker /* Support for USB PD alternate mode of Downward Facing Port */ 3338*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_ALT_MODE_DFP 3339*4f2df630SAndroid Build Coastguard Worker 3340*4f2df630SAndroid Build Coastguard Worker /* Check if max voltage request is allowed before each request */ 3341*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_CHECK_MAX_REQUEST_ALLOWED 3342*4f2df630SAndroid Build Coastguard Worker 3343*4f2df630SAndroid Build Coastguard Worker /* Default state of PD communication disabled flag */ 3344*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_COMM_DISABLED 3345*4f2df630SAndroid Build Coastguard Worker 3346*4f2df630SAndroid Build Coastguard Worker /* 3347*4f2df630SAndroid Build Coastguard Worker * Do not enable PD communication in RO as a security measure. 3348*4f2df630SAndroid Build Coastguard Worker * We don't want to allow communication to outside world until 3349*4f2df630SAndroid Build Coastguard Worker * we jump to RW. This can by overridden with the removal of 3350*4f2df630SAndroid Build Coastguard Worker * the write protect screw to allow for easier testing. 3351*4f2df630SAndroid Build Coastguard Worker */ 3352*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_COMM_LOCKED 3353*4f2df630SAndroid Build Coastguard Worker 3354*4f2df630SAndroid Build Coastguard Worker /* Default USB data role when a USB PD debug accessory is seen */ 3355*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_DEBUG_DR PD_ROLE_DFP 3356*4f2df630SAndroid Build Coastguard Worker 3357*4f2df630SAndroid Build Coastguard Worker /* 3358*4f2df630SAndroid Build Coastguard Worker * Define to have a fixed PD Task debug level. 3359*4f2df630SAndroid Build Coastguard Worker * Undef to allow runtime change via console command. 3360*4f2df630SAndroid Build Coastguard Worker */ 3361*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DEBUG_LEVEL 3362*4f2df630SAndroid Build Coastguard Worker 3363*4f2df630SAndroid Build Coastguard Worker /* 3364*4f2df630SAndroid Build Coastguard Worker * Define if this board can enable VBUS discharge (eg. through a GPIO-controlled 3365*4f2df630SAndroid Build Coastguard Worker * discharge circuit, or through port controller registers) to discharge VBUS 3366*4f2df630SAndroid Build Coastguard Worker * rapidly on disconnect. Will be defined automatically when one of the below 3367*4f2df630SAndroid Build Coastguard Worker * options is defined. 3368*4f2df630SAndroid Build Coastguard Worker */ 3369*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DISCHARGE 3370*4f2df630SAndroid Build Coastguard Worker 3371*4f2df630SAndroid Build Coastguard Worker /* Define if discharge circuit is EC GPIO-controlled. */ 3372*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DISCHARGE_GPIO 3373*4f2df630SAndroid Build Coastguard Worker 3374*4f2df630SAndroid Build Coastguard Worker /* Define if discharge circuit is using PD discharge registers on TCPC. */ 3375*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DISCHARGE_TCPC 3376*4f2df630SAndroid Build Coastguard Worker 3377*4f2df630SAndroid Build Coastguard Worker /* Define if discharge circuit is using PD discharge registers on PPC. */ 3378*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DISCHARGE_PPC 3379*4f2df630SAndroid Build Coastguard Worker 3380*4f2df630SAndroid Build Coastguard Worker /* Define if this board can act as a dual-role PD port (source and sink) */ 3381*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DUAL_ROLE 3382*4f2df630SAndroid Build Coastguard Worker 3383*4f2df630SAndroid Build Coastguard Worker /* Define if this board can used TCPC-controlled DRP toggle */ 3384*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE 3385*4f2df630SAndroid Build Coastguard Worker 3386*4f2df630SAndroid Build Coastguard Worker /* Define to reduces VBUS droop caused by inrush current during charging */ 3387*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BD9995X_DELAY_INPUT_PORT_SELECT 3388*4f2df630SAndroid Build Coastguard Worker 3389*4f2df630SAndroid Build Coastguard Worker /* Initial DRP / toggle policy */ 3390*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_INITIAL_DRP_STATE PD_DRP_TOGGLE_OFF 3391*4f2df630SAndroid Build Coastguard Worker 3392*4f2df630SAndroid Build Coastguard Worker /* 3393*4f2df630SAndroid Build Coastguard Worker * Define if VBUS source GPIOs (GPIO_USB_C*_5V_EN) are active-low (and named 3394*4f2df630SAndroid Build Coastguard Worker * (..._L) rather than default active-high. 3395*4f2df630SAndroid Build Coastguard Worker */ 3396*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_5V_EN_ACTIVE_LOW 3397*4f2df630SAndroid Build Coastguard Worker 3398*4f2df630SAndroid Build Coastguard Worker /* Ask charger if VBUS is enabled on a source port, instead of using GPIO */ 3399*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_5V_CHARGER_CTRL 3400*4f2df630SAndroid Build Coastguard Worker 3401*4f2df630SAndroid Build Coastguard Worker /* 3402*4f2df630SAndroid Build Coastguard Worker * If defined, use a custom function to determine if VBUS is enabled on a 3403*4f2df630SAndroid Build Coastguard Worker * source port. The custom function is board_is_sourcing_vbus(port). 3404*4f2df630SAndroid Build Coastguard Worker */ 3405*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_5V_EN_CUSTOM 3406*4f2df630SAndroid Build Coastguard Worker 3407*4f2df630SAndroid Build Coastguard Worker /* Dynamic USB PD source capability */ 3408*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DYNAMIC_SRC_CAP 3409*4f2df630SAndroid Build Coastguard Worker 3410*4f2df630SAndroid Build Coastguard Worker /* Support USB PD flash. */ 3411*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_FLASH 3412*4f2df630SAndroid Build Coastguard Worker 3413*4f2df630SAndroid Build Coastguard Worker /* Check whether PD is the sole power source before flash erase operation */ 3414*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_FLASH_ERASE_CHECK 3415*4f2df630SAndroid Build Coastguard Worker 3416*4f2df630SAndroid Build Coastguard Worker /* Define if this board, operating as a sink, can give power back to a source */ 3417*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_GIVE_BACK 3418*4f2df630SAndroid Build Coastguard Worker 3419*4f2df630SAndroid Build Coastguard Worker /* Enable USB PD Rev3.0 features */ 3420*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_REV30 3421*4f2df630SAndroid Build Coastguard Worker 3422*4f2df630SAndroid Build Coastguard Worker /* Major and Minor ChromeOS specific PD device Hardware IDs. */ 3423*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_HW_DEV_ID_BOARD_MAJOR 3424*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_HW_DEV_ID_BOARD_MINOR 3425*4f2df630SAndroid Build Coastguard Worker 3426*4f2df630SAndroid Build Coastguard Worker /* HW & SW version for alternate mode discover identity response (4bits each) */ 3427*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_IDENTITY_HW_VERS 3428*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_IDENTITY_SW_VERS 3429*4f2df630SAndroid Build Coastguard Worker 3430*4f2df630SAndroid Build Coastguard Worker /* Define if using internal comparator for PD receive */ 3431*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_INTERNAL_COMP 3432*4f2df630SAndroid Build Coastguard Worker 3433*4f2df630SAndroid Build Coastguard Worker /* Record main PD events in a circular buffer */ 3434*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_LOGGING 3435*4f2df630SAndroid Build Coastguard Worker 3436*4f2df630SAndroid Build Coastguard Worker /* The size in bytes of the FIFO used for event logging */ 3437*4f2df630SAndroid Build Coastguard Worker #define CONFIG_EVENT_LOG_SIZE 512 3438*4f2df630SAndroid Build Coastguard Worker 3439*4f2df630SAndroid Build Coastguard Worker /* Save power by waking up on VBUS rather than polling CC */ 3440*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_LOW_POWER 3441*4f2df630SAndroid Build Coastguard Worker 3442*4f2df630SAndroid Build Coastguard Worker /* Allow chip to go into low power idle even when a PD device is attached */ 3443*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_LOW_POWER_IDLE_WHEN_CONNECTED 3444*4f2df630SAndroid Build Coastguard Worker 3445*4f2df630SAndroid Build Coastguard Worker /* Number of USB PD ports */ 3446*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_PORT_COUNT 3447*4f2df630SAndroid Build Coastguard Worker 3448*4f2df630SAndroid Build Coastguard Worker /* Simple DFP, such as power adapter, will not send discovery VDM on connect */ 3449*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_SIMPLE_DFP 3450*4f2df630SAndroid Build Coastguard Worker 3451*4f2df630SAndroid Build Coastguard Worker /* Use comparator module for PD RX interrupt */ 3452*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_RX_COMP_IRQ 3453*4f2df630SAndroid Build Coastguard Worker 3454*4f2df630SAndroid Build Coastguard Worker /* Use TCPC module (type-C port controller) */ 3455*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPC 3456*4f2df630SAndroid Build Coastguard Worker 3457*4f2df630SAndroid Build Coastguard Worker /* Enable TCPC to enter low power mode */ 3458*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPC_LOW_POWER 3459*4f2df630SAndroid Build Coastguard Worker 3460*4f2df630SAndroid Build Coastguard Worker /* Enable the encoding of msg SOP* in bits 31-28 of 32-bit msg header type */ 3461*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_DECODE_SOP 3462*4f2df630SAndroid Build Coastguard Worker 3463*4f2df630SAndroid Build Coastguard Worker /* 3464*4f2df630SAndroid Build Coastguard Worker * Track VBUS level in TCPC module. This will only be needed if we're acting 3465*4f2df630SAndroid Build Coastguard Worker * as an external TCPC. 3466*4f2df630SAndroid Build Coastguard Worker */ 3467*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPC_TRACK_VBUS 3468*4f2df630SAndroid Build Coastguard Worker 3469*4f2df630SAndroid Build Coastguard Worker /* Enable runtime config the TCPC */ 3470*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPC_RUNTIME_CONFIG 3471*4f2df630SAndroid Build Coastguard Worker 3472*4f2df630SAndroid Build Coastguard Worker /* 3473*4f2df630SAndroid Build Coastguard Worker * Choose one of the following TCPMs (type-C port manager) to manage TCPC. The 3474*4f2df630SAndroid Build Coastguard Worker * TCPM stub is used to make direct function calls to TCPC when TCPC is on 3475*4f2df630SAndroid Build Coastguard Worker * the same MCU. The TCPCI TCPM uses the standard TCPCI i2c interface to TCPC. 3476*4f2df630SAndroid Build Coastguard Worker */ 3477*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_STUB 3478*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_TCPCI 3479*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_FUSB302 3480*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ITE83XX 3481*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ANX3429 3482*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ANX740X 3483*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ANX741X 3484*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ANX7447 3485*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ANX7688 3486*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_NCT38XX 3487*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_PS8751 3488*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_PS8805 3489*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_MT6370 3490*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_TUSB422 3491*4f2df630SAndroid Build Coastguard Worker 3492*4f2df630SAndroid Build Coastguard Worker /* 3493*4f2df630SAndroid Build Coastguard Worker * Type-C retimer mux configuration tends to be set on a specific 3494*4f2df630SAndroid Build Coastguard Worker * driver's need basis. After including the board/baseboard.h files 3495*4f2df630SAndroid Build Coastguard Worker * the drivers will be checked and if one of these are needed it will 3496*4f2df630SAndroid Build Coastguard Worker * automatically be included. This does not stop a board/basebord.h 3497*4f2df630SAndroid Build Coastguard Worker * configration from defining these as well. 3498*4f2df630SAndroid Build Coastguard Worker */ 3499*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_MUX_RETIMER 3500*4f2df630SAndroid Build Coastguard Worker 3501*4f2df630SAndroid Build Coastguard Worker /* 3502*4f2df630SAndroid Build Coastguard Worker * Type-C retimer drivers to be used. 3503*4f2df630SAndroid Build Coastguard Worker */ 3504*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_RETIMER_INTEL_BB 3505*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_RETIMER_PI3DPX1207 3506*4f2df630SAndroid Build Coastguard Worker 3507*4f2df630SAndroid Build Coastguard Worker /* 3508*4f2df630SAndroid Build Coastguard Worker * Adds an EC console command to erase the ANX7447 OCM flash. 3509*4f2df630SAndroid Build Coastguard Worker * Note: this is intended to be a temporary option and 3510*4f2df630SAndroid Build Coastguard Worker * won't be needed when ANX7447 are put on boards with OCM already erased 3511*4f2df630SAndroid Build Coastguard Worker */ 3512*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ANX7447_OCM_ERASE_COMMAND 3513*4f2df630SAndroid Build Coastguard Worker 3514*4f2df630SAndroid Build Coastguard Worker /* 3515*4f2df630SAndroid Build Coastguard Worker * Use this config option to enable and internal pullup resistor on the AUX_N 3516*4f2df630SAndroid Build Coastguard Worker * and internal pulldown resistor on the AUX_P line. Only use this config 3517*4f2df630SAndroid Build Coastguard Worker * option if there are no external pu/pd resistors on these signals. This 3518*4f2df630SAndroid Build Coastguard Worker * configuration should be used to avoid noise issues on the DDI1_AUX_N & 3519*4f2df630SAndroid Build Coastguard Worker * DDI1_AUX_P signals (b/122873171) 3520*4f2df630SAndroid Build Coastguard Worker */ 3521*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_ANX7447_AUX_PU_PD 3522*4f2df630SAndroid Build Coastguard Worker 3523*4f2df630SAndroid Build Coastguard Worker /* 3524*4f2df630SAndroid Build Coastguard Worker * Use this option if the TCPC port controller supports the optional register 3525*4f2df630SAndroid Build Coastguard Worker * 18h CONFIG_STANDARD_OUTPUT to steer the high-speed muxes. 3526*4f2df630SAndroid Build Coastguard Worker */ 3527*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TCPM_MUX 3528*4f2df630SAndroid Build Coastguard Worker 3529*4f2df630SAndroid Build Coastguard Worker /* 3530*4f2df630SAndroid Build Coastguard Worker * The TCPM must know whether VBUS is present in order to make proper state 3531*4f2df630SAndroid Build Coastguard Worker * transitions. In addition, charge_manager must know about VBUS presence in 3532*4f2df630SAndroid Build Coastguard Worker * order to make charging decisions. VBUS state can be determined by various 3533*4f2df630SAndroid Build Coastguard Worker * methods: 3534*4f2df630SAndroid Build Coastguard Worker * - Some TCPCs can detect and report the presence of VBUS. 3535*4f2df630SAndroid Build Coastguard Worker * - In some configurations, charger ICs can report the presence of VBUS. 3536*4f2df630SAndroid Build Coastguard Worker * - On some boards, dedicated VBUS interrupt pins are available. 3537*4f2df630SAndroid Build Coastguard Worker * - Some power path controllers (PPC) can report the presence of VBUS. 3538*4f2df630SAndroid Build Coastguard Worker * 3539*4f2df630SAndroid Build Coastguard Worker * Exactly one of these should be defined for all boards that run the PD 3540*4f2df630SAndroid Build Coastguard Worker * state machine. 3541*4f2df630SAndroid Build Coastguard Worker */ 3542*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_VBUS_DETECT_TCPC 3543*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_VBUS_DETECT_CHARGER 3544*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_VBUS_DETECT_GPIO 3545*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_VBUS_DETECT_PPC 3546*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_VBUS_DETECT_NONE 3547*4f2df630SAndroid Build Coastguard Worker 3548*4f2df630SAndroid Build Coastguard Worker /* Define if the there is a separate ADC channel for each USB-C Vbus voltage */ 3549*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_VBUS_MEASURE_ADC_EACH_PORT 3550*4f2df630SAndroid Build Coastguard Worker 3551*4f2df630SAndroid Build Coastguard Worker /* Define if the there is no hardware to measure Vbus voltage */ 3552*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT 3553*4f2df630SAndroid Build Coastguard Worker 3554*4f2df630SAndroid Build Coastguard Worker /* Define the type-c port controller I2C base address. */ 3555*4f2df630SAndroid Build Coastguard Worker #define CONFIG_TCPC_I2C_BASE_ADDR_FLAGS 0x4E 3556*4f2df630SAndroid Build Coastguard Worker 3557*4f2df630SAndroid Build Coastguard Worker /* Use this option to enable Try.SRC mode for Dual Role devices */ 3558*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TRY_SRC 3559*4f2df630SAndroid Build Coastguard Worker 3560*4f2df630SAndroid Build Coastguard Worker /* Set the default minimum battery percentage for Try.Src to be enabled */ 3561*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_TRY_SRC_MIN_BATT_SOC 1 3562*4f2df630SAndroid Build Coastguard Worker 3563*4f2df630SAndroid Build Coastguard Worker /* 3564*4f2df630SAndroid Build Coastguard Worker * Set the minimum battery percentage to allow a PD port to send resets as a 3565*4f2df630SAndroid Build Coastguard Worker * sink (and risk a hard reset, losing Vbus). Note this may cause a high-power 3566*4f2df630SAndroid Build Coastguard Worker * charger to appear as only a low-power 15W charger until a reset is sent to 3567*4f2df630SAndroid Build Coastguard Worker * re-start PD negotiation. 3568*4f2df630SAndroid Build Coastguard Worker */ 3569*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_RESET_MIN_BATT_SOC 3570*4f2df630SAndroid Build Coastguard Worker 3571*4f2df630SAndroid Build Coastguard Worker /* Alternative configuration keeping only the TX part of PHY */ 3572*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_TX_PHY_ONLY 3573*4f2df630SAndroid Build Coastguard Worker 3574*4f2df630SAndroid Build Coastguard Worker /* Use DAC as reference for comparator at 850mV. */ 3575*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PD_USE_DAC_AS_REF 3576*4f2df630SAndroid Build Coastguard Worker 3577*4f2df630SAndroid Build Coastguard Worker /* Type-C VCONN Powered Device */ 3578*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_TYPEC_VPD 3579*4f2df630SAndroid Build Coastguard Worker 3580*4f2df630SAndroid Build Coastguard Worker /* Type-C Charge Through VCONN Powered Device */ 3581*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_TYPEC_CTVPD 3582*4f2df630SAndroid Build Coastguard Worker 3583*4f2df630SAndroid Build Coastguard Worker /* Type-C DRP with Accessory and Try.SRC */ 3584*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_TYPEC_DRP_ACC_TRYSRC 3585*4f2df630SAndroid Build Coastguard Worker 3586*4f2df630SAndroid Build Coastguard Worker /* Type-C Fast Role Swap */ 3587*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_TYPEC_PD_FAST_ROLE_SWAP 3588*4f2df630SAndroid Build Coastguard Worker 3589*4f2df630SAndroid Build Coastguard Worker /* 3590*4f2df630SAndroid Build Coastguard Worker * USB Product ID. Each platform (e.g. baseboard set) should have a single 3591*4f2df630SAndroid Build Coastguard Worker * VID/PID combination. If there is a big enough change within a platform, 3592*4f2df630SAndroid Build Coastguard Worker * then we can differentiate USB topologies by varying the HW version field 3593*4f2df630SAndroid Build Coastguard Worker * in the Sink and Source Capabilities Extended messages. 3594*4f2df630SAndroid Build Coastguard Worker * 3595*4f2df630SAndroid Build Coastguard Worker * To reserve a new PID, use go/usb. 3596*4f2df630SAndroid Build Coastguard Worker */ 3597*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PID 3598*4f2df630SAndroid Build Coastguard Worker 3599*4f2df630SAndroid Build Coastguard Worker /* PPC needs to be informed of CC polarity */ 3600*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_POLARITY 3601*4f2df630SAndroid Build Coastguard Worker 3602*4f2df630SAndroid Build Coastguard Worker /* 3603*4f2df630SAndroid Build Coastguard Worker * Disable charging from Default(USB) Rp as a type-c supplier. If your device 3604*4f2df630SAndroid Build Coastguard Worker * can detect such a supplier by BC 1.2, define this to get more current 3605*4f2df630SAndroid Build Coastguard Worker * from a BC 1.2 supplier. 3606*4f2df630SAndroid Build Coastguard Worker */ 3607*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_DISABLE_CHARGE_FROM_RP_DEF 3608*4f2df630SAndroid Build Coastguard Worker 3609*4f2df630SAndroid Build Coastguard Worker /* USB Type-C Power Path Controllers (PPC) */ 3610*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_AOZ1380 3611*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_NX20P3481 3612*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_NX20P3483 3613*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_SN5S330 3614*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_SYV682X 3615*4f2df630SAndroid Build Coastguard Worker 3616*4f2df630SAndroid Build Coastguard Worker /* PPC is capable of gating the SBU lines. */ 3617*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_SBU 3618*4f2df630SAndroid Build Coastguard Worker 3619*4f2df630SAndroid Build Coastguard Worker /* PPC is capable of providing VCONN */ 3620*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_VCONN 3621*4f2df630SAndroid Build Coastguard Worker 3622*4f2df630SAndroid Build Coastguard Worker /* PPC has level interrupts and has a dedicated interrupt pin to check */ 3623*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_PPC_DEDICATED_INT 3624*4f2df630SAndroid Build Coastguard Worker 3625*4f2df630SAndroid Build Coastguard Worker /* Support for USB type-c superspeed mux */ 3626*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_SS_MUX 3627*4f2df630SAndroid Build Coastguard Worker 3628*4f2df630SAndroid Build Coastguard Worker /* 3629*4f2df630SAndroid Build Coastguard Worker * Only configure USB type-c superspeed mux when DFP (for chipsets that 3630*4f2df630SAndroid Build Coastguard Worker * don't support being a UFP) 3631*4f2df630SAndroid Build Coastguard Worker */ 3632*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_SS_MUX_DFP_ONLY 3633*4f2df630SAndroid Build Coastguard Worker 3634*4f2df630SAndroid Build Coastguard Worker /* Support v1.1 type-C connection state machine */ 3635*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_BACKWARDS_COMPATIBLE_DFP 3636*4f2df630SAndroid Build Coastguard Worker 3637*4f2df630SAndroid Build Coastguard Worker /* Support for USB type-c vconn. Not needed for captive cables. */ 3638*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_VCONN 3639*4f2df630SAndroid Build Coastguard Worker 3640*4f2df630SAndroid Build Coastguard Worker /* Support VCONN swap */ 3641*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USBC_VCONN_SWAP 3642*4f2df630SAndroid Build Coastguard Worker 3643*4f2df630SAndroid Build Coastguard Worker /* USB Binary device Object Store support */ 3644*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_BOS 3645*4f2df630SAndroid Build Coastguard Worker 3646*4f2df630SAndroid Build Coastguard Worker /* USB Device version of product */ 3647*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_BCD_DEV 3648*4f2df630SAndroid Build Coastguard Worker 3649*4f2df630SAndroid Build Coastguard Worker /* 3650*4f2df630SAndroid Build Coastguard Worker * Used during generation of VIF for USB Type-C Compliance Testing. 3651*4f2df630SAndroid Build Coastguard Worker * Indicates whether the UUT can communicate with USB 2.0 or USB 3.1 as a host 3652*4f2df630SAndroid Build Coastguard Worker * or as the Downstream Facing Port of a hub. 3653*4f2df630SAndroid Build Coastguard Worker */ 3654*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_VIF_TYPE_C_CAN_ACT_AS_HOST 3655*4f2df630SAndroid Build Coastguard Worker 3656*4f2df630SAndroid Build Coastguard Worker /* 3657*4f2df630SAndroid Build Coastguard Worker * Used during generation of VIF for USB Type-C Compliance Testing. 3658*4f2df630SAndroid Build Coastguard Worker * Indicates whether the UUT has a captive cable. 3659*4f2df630SAndroid Build Coastguard Worker */ 3660*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_VIF_CAPTIVE_CABLE 3661*4f2df630SAndroid Build Coastguard Worker 3662*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3663*4f2df630SAndroid Build Coastguard Worker 3664*4f2df630SAndroid Build Coastguard Worker /* Compile chip support for the USB device controller */ 3665*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB 3666*4f2df630SAndroid Build Coastguard Worker 3667*4f2df630SAndroid Build Coastguard Worker /* Support USB isochronous handler */ 3668*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_ISOCHRONOUS 3669*4f2df630SAndroid Build Coastguard Worker 3670*4f2df630SAndroid Build Coastguard Worker /* Support USB blob handler. */ 3671*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_BLOB 3672*4f2df630SAndroid Build Coastguard Worker 3673*4f2df630SAndroid Build Coastguard Worker /* Common USB / BC1.2 charger detection routines */ 3674*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_CHARGER 3675*4f2df630SAndroid Build Coastguard Worker 3676*4f2df630SAndroid Build Coastguard Worker /* 3677*4f2df630SAndroid Build Coastguard Worker * Used for bc1.2 chips that need to be triggered from data role swaps instead 3678*4f2df630SAndroid Build Coastguard Worker * of just VBUS changes. 3679*4f2df630SAndroid Build Coastguard Worker */ 3680*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BC12_DETECT_DATA_ROLE_TRIGGER 3681*4f2df630SAndroid Build Coastguard Worker 3682*4f2df630SAndroid Build Coastguard Worker /* External BC1.2 charger detection devices. */ 3683*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BC12_DETECT_MAX14637 3684*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BC12_DETECT_PI3USB9201 3685*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BC12_DETECT_PI3USB9281 3686*4f2df630SAndroid Build Coastguard Worker /* Number of Pericom PI3USB9281 chips present in system */ 3687*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BC12_DETECT_PI3USB9281_CHIP_COUNT 3688*4f2df630SAndroid Build Coastguard Worker 3689*4f2df630SAndroid Build Coastguard Worker /* Enable USB serial console module. */ 3690*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_CONSOLE 3691*4f2df630SAndroid Build Coastguard Worker 3692*4f2df630SAndroid Build Coastguard Worker /* Require explicit enable call vs. active at time zero. */ 3693*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_CONSOLE_DEFAULT_DISABLED 3694*4f2df630SAndroid Build Coastguard Worker 3695*4f2df630SAndroid Build Coastguard Worker /* 3696*4f2df630SAndroid Build Coastguard Worker * Enable USB serial console module using usb stream config. 3697*4f2df630SAndroid Build Coastguard Worker * NOTE: CONFIG_USB_CONSOLE and CONFIG_USB_CONSOLE_STREAM should be defined 3698*4f2df630SAndroid Build Coastguard Worker * exclusively each other. 3699*4f2df630SAndroid Build Coastguard Worker */ 3700*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_CONSOLE_STREAM 3701*4f2df630SAndroid Build Coastguard Worker 3702*4f2df630SAndroid Build Coastguard Worker /* USB serial console transmit buffer size in bytes. */ 3703*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_CONSOLE_TX_BUF_SIZE 2048 3704*4f2df630SAndroid Build Coastguard Worker 3705*4f2df630SAndroid Build Coastguard Worker /* 3706*4f2df630SAndroid Build Coastguard Worker * Enable USB serial console crc32 computation. 3707*4f2df630SAndroid Build Coastguard Worker * Also makes console output block on overrun. 3708*4f2df630SAndroid Build Coastguard Worker */ 3709*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_CONSOLE_CRC 3710*4f2df630SAndroid Build Coastguard Worker 3711*4f2df630SAndroid Build Coastguard Worker /* Support USB HID interface. */ 3712*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_HID 3713*4f2df630SAndroid Build Coastguard Worker 3714*4f2df630SAndroid Build Coastguard Worker /* Support USB HID touchpad interface. */ 3715*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_HID_TOUCHPAD 3716*4f2df630SAndroid Build Coastguard Worker 3717*4f2df630SAndroid Build Coastguard Worker /* HID touchpad logical dimensions */ 3718*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 3719*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 3720*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 3721*4f2df630SAndroid Build Coastguard Worker /* HID touchpad physical dimensions (tenth of mm) */ 3722*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 3723*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 3724*4f2df630SAndroid Build Coastguard Worker 3725*4f2df630SAndroid Build Coastguard Worker /* USB device buffers and descriptors */ 3726*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_RAM_ACCESS_SIZE 3727*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_RAM_ACCESS_TYPE 3728*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_RAM_BASE 3729*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_RAM_SIZE 3730*4f2df630SAndroid Build Coastguard Worker 3731*4f2df630SAndroid Build Coastguard Worker /* Disable automatic connection of USB peripheral */ 3732*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_INHIBIT_CONNECT 3733*4f2df630SAndroid Build Coastguard Worker 3734*4f2df630SAndroid Build Coastguard Worker /* Disable automatic initialization of USB peripheral */ 3735*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_INHIBIT_INIT 3736*4f2df630SAndroid Build Coastguard Worker 3737*4f2df630SAndroid Build Coastguard Worker /* Support control of multiple PHY */ 3738*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_SELECT_PHY 3739*4f2df630SAndroid Build Coastguard Worker /* Select which USB PHY will be used at startup */ 3740*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_SELECT_PHY_DEFAULT 3741*4f2df630SAndroid Build Coastguard Worker 3742*4f2df630SAndroid Build Coastguard Worker /* Support simple control of power to the device's USB ports */ 3743*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PORT_POWER_DUMB 3744*4f2df630SAndroid Build Coastguard Worker 3745*4f2df630SAndroid Build Coastguard Worker /* 3746*4f2df630SAndroid Build Coastguard Worker * Support smart power control to the device's USB ports, using 3747*4f2df630SAndroid Build Coastguard Worker * dedicated power control chips. This potentially enables automatic 3748*4f2df630SAndroid Build Coastguard Worker * negotiation of supplying more power to peripherals. 3749*4f2df630SAndroid Build Coastguard Worker */ 3750*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PORT_POWER_SMART 3751*4f2df630SAndroid Build Coastguard Worker 3752*4f2df630SAndroid Build Coastguard Worker /* 3753*4f2df630SAndroid Build Coastguard Worker * Support smart power control to the device's USB ports, however only CDP and 3754*4f2df630SAndroid Build Coastguard Worker * SDP are supported. Usually this is the case if all the control lines to the 3755*4f2df630SAndroid Build Coastguard Worker * charging port controller are hard-wired. 3756*4f2df630SAndroid Build Coastguard Worker */ 3757*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PORT_POWER_SMART_CDP_SDP_ONLY 3758*4f2df630SAndroid Build Coastguard Worker 3759*4f2df630SAndroid Build Coastguard Worker /* 3760*4f2df630SAndroid Build Coastguard Worker * Override the default charging mode for USB smart power control. 3761*4f2df630SAndroid Build Coastguard Worker * Value is selected from usb_charge_mode in include/usb_charge.h 3762*4f2df630SAndroid Build Coastguard Worker */ 3763*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE 3764*4f2df630SAndroid Build Coastguard Worker 3765*4f2df630SAndroid Build Coastguard Worker /* 3766*4f2df630SAndroid Build Coastguard Worker * Smart USB power control can use a full set of control signals to the USB 3767*4f2df630SAndroid Build Coastguard Worker * port power chip, or a reduced set. If this is defined, use the reduced set. 3768*4f2df630SAndroid Build Coastguard Worker */ 3769*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PORT_POWER_SMART_SIMPLE 3770*4f2df630SAndroid Build Coastguard Worker 3771*4f2df630SAndroid Build Coastguard Worker /* Number of smart USB power ports. */ 3772*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PORT_POWER_SMART_PORT_COUNT 2 3773*4f2df630SAndroid Build Coastguard Worker 3774*4f2df630SAndroid Build Coastguard Worker /* 3775*4f2df630SAndroid Build Coastguard Worker * Smart USB power control current limit pins may be inverted. In this case 3776*4f2df630SAndroid Build Coastguard Worker * they are active low and the GPIO names will be GPIO_USBn_ILIM_SEL_L. 3777*4f2df630SAndroid Build Coastguard Worker */ 3778*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PORT_POWER_SMART_INVERTED 3779*4f2df630SAndroid Build Coastguard Worker 3780*4f2df630SAndroid Build Coastguard Worker /* 3781*4f2df630SAndroid Build Coastguard Worker * Support waking up host by setting the K-state on the data lines (requires 3782*4f2df630SAndroid Build Coastguard Worker * CONFIG_USB_SUSPEND to be set as well). 3783*4f2df630SAndroid Build Coastguard Worker */ 3784*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_REMOTE_WAKEUP 3785*4f2df630SAndroid Build Coastguard Worker 3786*4f2df630SAndroid Build Coastguard Worker /* Support programmable USB device iSerial field. */ 3787*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_SERIALNO 3788*4f2df630SAndroid Build Coastguard Worker 3789*4f2df630SAndroid Build Coastguard Worker /* Support reporting of configuration bMaxPower in mA */ 3790*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_MAXPOWER_MA 500 3791*4f2df630SAndroid Build Coastguard Worker 3792*4f2df630SAndroid Build Coastguard Worker /* Support reporting as self powered in USB configuration. */ 3793*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_SELF_POWERED 3794*4f2df630SAndroid Build Coastguard Worker 3795*4f2df630SAndroid Build Coastguard Worker /* Support correct handling of USB suspend (host-initiated). */ 3796*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_SUSPEND 3797*4f2df630SAndroid Build Coastguard Worker 3798*4f2df630SAndroid Build Coastguard Worker /* Default pull-up value on the USB-C ports when they are used as source. */ 3799*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_PULLUP TYPEC_RP_1A5 3800*4f2df630SAndroid Build Coastguard Worker /* 3801*4f2df630SAndroid Build Coastguard Worker * Override the pull-up value when only zero or one port is actively sourcing 3802*4f2df630SAndroid Build Coastguard Worker * current and we can advertise more current than what is defined by 3803*4f2df630SAndroid Build Coastguard Worker * `CONFIG_USB_PD_PULLUP`. 3804*4f2df630SAndroid Build Coastguard Worker * Should be defined with one of the tcpc_rp_value. 3805*4f2df630SAndroid Build Coastguard Worker */ 3806*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT 3807*4f2df630SAndroid Build Coastguard Worker 3808*4f2df630SAndroid Build Coastguard Worker /* 3809*4f2df630SAndroid Build Coastguard Worker * Total current in mA the board can supply to external devices through 3810*4f2df630SAndroid Build Coastguard Worker * USB-C ports 3811*4f2df630SAndroid Build Coastguard Worker * 3812*4f2df630SAndroid Build Coastguard Worker * When a sink device is plugged or unplugged, source current redistribution 3813*4f2df630SAndroid Build Coastguard Worker * occurs. If this macro is defined, redistribution occurs in such a way 3814*4f2df630SAndroid Build Coastguard Worker * that there is no current drop (e.g. 3A -> 1.5A) on active source ports. 3815*4f2df630SAndroid Build Coastguard Worker */ 3816*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_PD_MAX_TOTAL_SOURCE_CURRENT 3817*4f2df630SAndroid Build Coastguard Worker 3818*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 3819*4f2df630SAndroid Build Coastguard Worker /* stm32f4 dwc usb configs. */ 3820*4f2df630SAndroid Build Coastguard Worker 3821*4f2df630SAndroid Build Coastguard Worker /* Set USB speed to FS rather than HS */ 3822*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_DWC_FS 3823*4f2df630SAndroid Build Coastguard Worker 3824*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 3825*4f2df630SAndroid Build Coastguard Worker /* USB port switch */ 3826*4f2df630SAndroid Build Coastguard Worker 3827*4f2df630SAndroid Build Coastguard Worker /* Support the AMD FP5 USB/DP Mux */ 3828*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_MUX_AMD_FP5 3829*4f2df630SAndroid Build Coastguard Worker 3830*4f2df630SAndroid Build Coastguard Worker /* Support the ITE IT5205 Type-C USB alternate mode mux. */ 3831*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_MUX_IT5205 3832*4f2df630SAndroid Build Coastguard Worker 3833*4f2df630SAndroid Build Coastguard Worker /* Support the Pericom PI3USB30532 USB3.0/DP1.2 Matrix Switch */ 3834*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_MUX_PI3USB30532 3835*4f2df630SAndroid Build Coastguard Worker 3836*4f2df630SAndroid Build Coastguard Worker /* Support the Parade PS8740 Type-C Redriving Switch */ 3837*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_MUX_PS8740 3838*4f2df630SAndroid Build Coastguard Worker 3839*4f2df630SAndroid Build Coastguard Worker /* Support the Parade PS8743 Type-C Redriving Switch */ 3840*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_MUX_PS8743 3841*4f2df630SAndroid Build Coastguard Worker 3842*4f2df630SAndroid Build Coastguard Worker /* 'Virtual' USB mux under host (not EC) control */ 3843*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_MUX_VIRTUAL 3844*4f2df630SAndroid Build Coastguard Worker 3845*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3846*4f2df630SAndroid Build Coastguard Worker /* USB GPIO config */ 3847*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_GPIO 3848*4f2df630SAndroid Build Coastguard Worker 3849*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3850*4f2df630SAndroid Build Coastguard Worker /* USB SPI legacy protocol (V1). */ 3851*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_SPI 3852*4f2df630SAndroid Build Coastguard Worker /* USB_SPI protocol V2. */ 3853*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_SPI_V2 3854*4f2df630SAndroid Build Coastguard Worker 3855*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3856*4f2df630SAndroid Build Coastguard Worker /* USB I2C config */ 3857*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_I2C 3858*4f2df630SAndroid Build Coastguard Worker 3859*4f2df630SAndroid Build Coastguard Worker /* Allowed read/write count for USB over I2C */ 3860*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_I2C_MAX_WRITE_COUNT 60 3861*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_I2C_MAX_READ_COUNT 60 3862*4f2df630SAndroid Build Coastguard Worker 3863*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3864*4f2df630SAndroid Build Coastguard Worker /* USB Power monitoring interface config */ 3865*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_POWER 3866*4f2df630SAndroid Build Coastguard Worker 3867*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3868*4f2df630SAndroid Build Coastguard Worker /* 3869*4f2df630SAndroid Build Coastguard Worker * USB stream signing config. This allows data read over UART or SPI 3870*4f2df630SAndroid Build Coastguard Worker * to have a signature generated that can be used to validate the data 3871*4f2df630SAndroid Build Coastguard Worker * offline based on H1's registered key. Used by mn50. 3872*4f2df630SAndroid Build Coastguard Worker */ 3873*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_STREAM_SIGNATURE 3874*4f2df630SAndroid Build Coastguard Worker 3875*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3876*4f2df630SAndroid Build Coastguard Worker 3877*4f2df630SAndroid Build Coastguard Worker /* Support computing hash of code for verified boot */ 3878*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_VBOOT_HASH 3879*4f2df630SAndroid Build Coastguard Worker 3880*4f2df630SAndroid Build Coastguard Worker /* Support for secure temporary storage for verified boot */ 3881*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_VSTORE 3882*4f2df630SAndroid Build Coastguard Worker 3883*4f2df630SAndroid Build Coastguard Worker /* Number of supported slots for secure temporary storage */ 3884*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_VSTORE_SLOT_COUNT 3885*4f2df630SAndroid Build Coastguard Worker 3886*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3887*4f2df630SAndroid Build Coastguard Worker /* Watchdog config */ 3888*4f2df630SAndroid Build Coastguard Worker 3889*4f2df630SAndroid Build Coastguard Worker /* 3890*4f2df630SAndroid Build Coastguard Worker * Compile watchdog timer support. The watchdog timer will reboot the system 3891*4f2df630SAndroid Build Coastguard Worker * if the hook task (which is the lowest-priority task on the system) gets 3892*4f2df630SAndroid Build Coastguard Worker * starved for CPU time and isn't able to fire its HOOK_TICK event. 3893*4f2df630SAndroid Build Coastguard Worker */ 3894*4f2df630SAndroid Build Coastguard Worker #define CONFIG_WATCHDOG 3895*4f2df630SAndroid Build Coastguard Worker 3896*4f2df630SAndroid Build Coastguard Worker /* 3897*4f2df630SAndroid Build Coastguard Worker * Try to detect a watchdog that is about to fire, and print a trace. This is 3898*4f2df630SAndroid Build Coastguard Worker * required on chips such as STM32 where the watchdog timer simply reboots the 3899*4f2df630SAndroid Build Coastguard Worker * system without any early warning. 3900*4f2df630SAndroid Build Coastguard Worker */ 3901*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WATCHDOG_HELP 3902*4f2df630SAndroid Build Coastguard Worker 3903*4f2df630SAndroid Build Coastguard Worker /* 3904*4f2df630SAndroid Build Coastguard Worker * The maximum number of times that the watchdog timer may reset 3905*4f2df630SAndroid Build Coastguard Worker * before halting the system (or taking some sort of other 3906*4f2df630SAndroid Build Coastguard Worker * chip-dependent corrective action). 3907*4f2df630SAndroid Build Coastguard Worker */ 3908*4f2df630SAndroid Build Coastguard Worker #define CONFIG_WATCHDOG_MAX_RETRIES 4 3909*4f2df630SAndroid Build Coastguard Worker 3910*4f2df630SAndroid Build Coastguard Worker /* Watchdog period in ms; see also AUX_TIMER_PERIOD_MS */ 3911*4f2df630SAndroid Build Coastguard Worker #define CONFIG_WATCHDOG_PERIOD_MS 1600 3912*4f2df630SAndroid Build Coastguard Worker 3913*4f2df630SAndroid Build Coastguard Worker /* 3914*4f2df630SAndroid Build Coastguard Worker * Fire auxiliary timer 500ms before watchdog timer expires. This leaves 3915*4f2df630SAndroid Build Coastguard Worker * some time for debug trace to be printed. 3916*4f2df630SAndroid Build Coastguard Worker */ 3917*4f2df630SAndroid Build Coastguard Worker #define CONFIG_AUX_TIMER_PERIOD_MS (CONFIG_WATCHDOG_PERIOD_MS - 500) 3918*4f2df630SAndroid Build Coastguard Worker 3919*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3920*4f2df630SAndroid Build Coastguard Worker /* WebUSB config */ 3921*4f2df630SAndroid Build Coastguard Worker 3922*4f2df630SAndroid Build Coastguard Worker /* 3923*4f2df630SAndroid Build Coastguard Worker * Enable the WebUSB support and define its URL. 3924*4f2df630SAndroid Build Coastguard Worker * Export a WebUSB Platform Descriptor in the Binary Object Store descriptor. 3925*4f2df630SAndroid Build Coastguard Worker * The WebUSB landing page URL is equal to 'CONFIG_WEBUSB_URL' plus the 3926*4f2df630SAndroid Build Coastguard Worker * https:// prefix. 3927*4f2df630SAndroid Build Coastguard Worker * This requires CONFIG_USB_BOS. 3928*4f2df630SAndroid Build Coastguard Worker */ 3929*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WEBUSB_URL 3930*4f2df630SAndroid Build Coastguard Worker 3931*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 3932*4f2df630SAndroid Build Coastguard Worker 3933*4f2df630SAndroid Build Coastguard Worker /* 3934*4f2df630SAndroid Build Coastguard Worker * Support controlling power to WiFi, WWAN (3G/LTE), and/or bluetooth modules. 3935*4f2df630SAndroid Build Coastguard Worker */ 3936*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WIRELESS 3937*4f2df630SAndroid Build Coastguard Worker 3938*4f2df630SAndroid Build Coastguard Worker /* 3939*4f2df630SAndroid Build Coastguard Worker * Support for WiFi devices that must remain powered in suspend. Set to the 3940*4f2df630SAndroid Build Coastguard Worker * combination of EC_WIRELESS_SWITCH flags (from ec_commands.h) which should 3941*4f2df630SAndroid Build Coastguard Worker * be set in suspend. 3942*4f2df630SAndroid Build Coastguard Worker */ 3943*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WIRELESS_SUSPEND 3944*4f2df630SAndroid Build Coastguard Worker 3945*4f2df630SAndroid Build Coastguard Worker /* WiFi power control signal is active-low. */ 3946*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WLAN_POWER_ACTIVE_LOW 3947*4f2df630SAndroid Build Coastguard Worker 3948*4f2df630SAndroid Build Coastguard Worker /* Support Wake-on-Voice */ 3949*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WAKE_ON_VOICE 3950*4f2df630SAndroid Build Coastguard Worker 3951*4f2df630SAndroid Build Coastguard Worker /* 3952*4f2df630SAndroid Build Coastguard Worker * Write protect signal is active-high. If this is defined, there must be a 3953*4f2df630SAndroid Build Coastguard Worker * GPIO named GPIO_WP; if not defined, there must be a GPIO names GPIO_WP_L. 3954*4f2df630SAndroid Build Coastguard Worker */ 3955*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WP_ACTIVE_HIGH 3956*4f2df630SAndroid Build Coastguard Worker 3957*4f2df630SAndroid Build Coastguard Worker /* 3958*4f2df630SAndroid Build Coastguard Worker * The write protect signal is always asserted, 3959*4f2df630SAndroid Build Coastguard Worker * independently of the GPIO existence or current value. 3960*4f2df630SAndroid Build Coastguard Worker */ 3961*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_WP_ALWAYS 3962*4f2df630SAndroid Build Coastguard Worker 3963*4f2df630SAndroid Build Coastguard Worker /* 3964*4f2df630SAndroid Build Coastguard Worker * If needed to allocate some free space in the base of the RO or RW section 3965*4f2df630SAndroid Build Coastguard Worker * of the image, define these to be equal the required size of the free space. 3966*4f2df630SAndroid Build Coastguard Worker */ 3967*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RO_HEAD_ROOM 3968*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_RW_HEAD_ROOM 3969*4f2df630SAndroid Build Coastguard Worker 3970*4f2df630SAndroid Build Coastguard Worker /* Firmware upgrade options. */ 3971*4f2df630SAndroid Build Coastguard Worker /* Firmware updates using other than HC channel(s). */ 3972*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_NON_HC_FW_UPDATE 3973*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_USB_FW_UPDATE 3974*4f2df630SAndroid Build Coastguard Worker 3975*4f2df630SAndroid Build Coastguard Worker /* PDU size for fw update over USB (or TPM). */ 3976*4f2df630SAndroid Build Coastguard Worker #define CONFIG_UPDATE_PDU_SIZE 1024 3977*4f2df630SAndroid Build Coastguard Worker 3978*4f2df630SAndroid Build Coastguard Worker /* 3979*4f2df630SAndroid Build Coastguard Worker * If defined, charge_get_state returns a special status if battery is 3980*4f2df630SAndroid Build Coastguard Worker * discharging and battery is nearly full. 3981*4f2df630SAndroid Build Coastguard Worker */ 3982*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_PWR_STATE_DISCHARGE_FULL 3983*4f2df630SAndroid Build Coastguard Worker 3984*4f2df630SAndroid Build Coastguard Worker /* 3985*4f2df630SAndroid Build Coastguard Worker * Define this if a chip needs to add some information to the common 'version' 3986*4f2df630SAndroid Build Coastguard Worker * command output. 3987*4f2df630SAndroid Build Coastguard Worker */ 3988*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_EXTENDED_VERSION_INFO 3989*4f2df630SAndroid Build Coastguard Worker 3990*4f2df630SAndroid Build Coastguard Worker /* 3991*4f2df630SAndroid Build Coastguard Worker * Define this if board ID support is required. For g chip based boards it 3992*4f2df630SAndroid Build Coastguard Worker * allows to nail different images to different boards. 3993*4f2df630SAndroid Build Coastguard Worker */ 3994*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_BOARD_ID_SUPPORT 3995*4f2df630SAndroid Build Coastguard Worker 3996*4f2df630SAndroid Build Coastguard Worker /* 3997*4f2df630SAndroid Build Coastguard Worker * Define this if serial number support is required. For g chip based boards 3998*4f2df630SAndroid Build Coastguard Worker * it allows a verifiable serial number to be stored / certified. 3999*4f2df630SAndroid Build Coastguard Worker */ 4000*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_SN_BITS_SUPPORT 4001*4f2df630SAndroid Build Coastguard Worker 4002*4f2df630SAndroid Build Coastguard Worker /* 4003*4f2df630SAndroid Build Coastguard Worker * Define this to enable Cros Board Info support. I2C_EEPROM_PORT and 4004*4f2df630SAndroid Build Coastguard Worker * I2C_EEPROM_ADDR must be defined as well. 4005*4f2df630SAndroid Build Coastguard Worker */ 4006*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CROS_BOARD_INFO 4007*4f2df630SAndroid Build Coastguard Worker 4008*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4009*4f2df630SAndroid Build Coastguard Worker /* 4010*4f2df630SAndroid Build Coastguard Worker * ISH config defaults 4011*4f2df630SAndroid Build Coastguard Worker */ 4012*4f2df630SAndroid Build Coastguard Worker /* 4013*4f2df630SAndroid Build Coastguard Worker * This will be automatically defined below if the board supports power 4014*4f2df630SAndroid Build Coastguard Worker * modes that will require the AONTASK functionality. 4015*4f2df630SAndroid Build Coastguard Worker */ 4016*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_PM_AONTASK 4017*4f2df630SAndroid Build Coastguard Worker 4018*4f2df630SAndroid Build Coastguard Worker /* 4019*4f2df630SAndroid Build Coastguard Worker * Define the following if the power state support is required. 4020*4f2df630SAndroid Build Coastguard Worker */ 4021*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_PM_D0I1 4022*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_PM_D0I2 4023*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_PM_D0I3 4024*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_PM_D3 4025*4f2df630SAndroid Build Coastguard Worker 4026*4f2df630SAndroid Build Coastguard Worker /* 4027*4f2df630SAndroid Build Coastguard Worker * Define the following to the number of uSeconds of elapsed time that is 4028*4f2df630SAndroid Build Coastguard Worker * required to enter D0I2 and D0I3, if they are supported 4029*4f2df630SAndroid Build Coastguard Worker */ 4030*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_D0I2_MIN_USEC 4031*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_D0I3_MIN_USEC 4032*4f2df630SAndroid Build Coastguard Worker 4033*4f2df630SAndroid Build Coastguard Worker /* 4034*4f2df630SAndroid Build Coastguard Worker * Define the following in order to perform power management reset 4035*4f2df630SAndroid Build Coastguard Worker * prep IRQ setup when entering a new state 4036*4f2df630SAndroid Build Coastguard Worker */ 4037*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_PM_RESET_PREP 4038*4f2df630SAndroid Build Coastguard Worker 4039*4f2df630SAndroid Build Coastguard Worker /* 4040*4f2df630SAndroid Build Coastguard Worker * Define the following if combined ISR is required for ipc communication 4041*4f2df630SAndroid Build Coastguard Worker * between host and ISH. 4042*4f2df630SAndroid Build Coastguard Worker */ 4043*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_HOST2ISH_COMBINED_ISR 4044*4f2df630SAndroid Build Coastguard Worker 4045*4f2df630SAndroid Build Coastguard Worker /* 4046*4f2df630SAndroid Build Coastguard Worker * Define the following if there is need to clear ISH fabric error. 4047*4f2df630SAndroid Build Coastguard Worker */ 4048*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_CLEAR_FABRIC_ERRORS 4049*4f2df630SAndroid Build Coastguard Worker 4050*4f2df630SAndroid Build Coastguard Worker /* 4051*4f2df630SAndroid Build Coastguard Worker * Define the following if the version of ISH uses Synopsys Designware uart. 4052*4f2df630SAndroid Build Coastguard Worker */ 4053*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_ISH_DW_UART 4054*4f2df630SAndroid Build Coastguard Worker 4055*4f2df630SAndroid Build Coastguard Worker /* 4056*4f2df630SAndroid Build Coastguard Worker * On Intel devices EC's USB-C port numbers may not be physically equal to 4057*4f2df630SAndroid Build Coastguard Worker * AP's USB3 & USB2 port number. Because there can be MAX 15 USB2 ports on 4058*4f2df630SAndroid Build Coastguard Worker * PCH and MAX 15 USB3 ports on SOC, based on the complexity of the physical 4059*4f2df630SAndroid Build Coastguard Worker * layout of the board, USB3 & USB2 port signals of AP are routed to respective 4060*4f2df630SAndroid Build Coastguard Worker * USB-C port of EC. Hence, to configure the Intel Virtual MUX, information of 4061*4f2df630SAndroid Build Coastguard Worker * USB3 and USB2 port numbers of the respective USB-C port is needed. 4062*4f2df630SAndroid Build Coastguard Worker */ 4063*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_INTEL_VIRTUAL_MUX 4064*4f2df630SAndroid Build Coastguard Worker 4065*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4066*4f2df630SAndroid Build Coastguard Worker /* 4067*4f2df630SAndroid Build Coastguard Worker * Include board and core configs, since those hold the CONFIG_ constants for a 4068*4f2df630SAndroid Build Coastguard Worker * given configuration. This guarantees they get included everywhere, and 4069*4f2df630SAndroid Build Coastguard Worker * fixes a fairly common bug where we gate out code with #ifndef 4070*4f2df630SAndroid Build Coastguard Worker * CONFIG_SOMETHING and but forget to include both of these. 4071*4f2df630SAndroid Build Coastguard Worker * 4072*4f2df630SAndroid Build Coastguard Worker * Board is included after chip, so that chip defaults can be overridden on a 4073*4f2df630SAndroid Build Coastguard Worker * per-board basis as needed. 4074*4f2df630SAndroid Build Coastguard Worker */ 4075*4f2df630SAndroid Build Coastguard Worker #ifdef __CROS_EC_CONFIG_CHIP_H 4076*4f2df630SAndroid Build Coastguard Worker #error Include config.h instead of config_chip.h! 4077*4f2df630SAndroid Build Coastguard Worker #endif 4078*4f2df630SAndroid Build Coastguard Worker #ifdef __BOARD_H 4079*4f2df630SAndroid Build Coastguard Worker #error Include config.h instead of board.h! 4080*4f2df630SAndroid Build Coastguard Worker #endif 4081*4f2df630SAndroid Build Coastguard Worker 4082*4f2df630SAndroid Build Coastguard Worker #include "config_chip.h" 4083*4f2df630SAndroid Build Coastguard Worker #include "board.h" 4084*4f2df630SAndroid Build Coastguard Worker 4085*4f2df630SAndroid Build Coastguard Worker /* 4086*4f2df630SAndroid Build Coastguard Worker * Define CONFIG_HOST_ESPI_VW_POWER_SIGNAL if any power signals from the host 4087*4f2df630SAndroid Build Coastguard Worker * are configured as virtual wires. 4088*4f2df630SAndroid Build Coastguard Worker */ 4089*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_HOSTCMD_ESPI_VW_SLP_S3) || \ 4090*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_HOSTCMD_ESPI_VW_SLP_S4) 4091*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOST_ESPI_VW_POWER_SIGNAL 4092*4f2df630SAndroid Build Coastguard Worker #endif 4093*4f2df630SAndroid Build Coastguard Worker 4094*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_HOST_ESPI_VW_POWER_SIGNAL) && !defined(CONFIG_HOSTCMD_ESPI) 4095*4f2df630SAndroid Build Coastguard Worker #error Must enable eSPI to enable virtual wires. 4096*4f2df630SAndroid Build Coastguard Worker #endif 4097*4f2df630SAndroid Build Coastguard Worker 4098*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4099*4f2df630SAndroid Build Coastguard Worker /* 4100*4f2df630SAndroid Build Coastguard Worker * Automatically define CONFIG_HOSTCMD_X86 if either child option is defined. 4101*4f2df630SAndroid Build Coastguard Worker * Ensure LPC and eSPI are mutually exclusive 4102*4f2df630SAndroid Build Coastguard Worker */ 4103*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_HOSTCMD_LPC) || defined(CONFIG_HOSTCMD_ESPI) 4104*4f2df630SAndroid Build Coastguard Worker #define CONFIG_HOSTCMD_X86 4105*4f2df630SAndroid Build Coastguard Worker #endif 4106*4f2df630SAndroid Build Coastguard Worker 4107*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_HOSTCMD_LPC) && defined(CONFIG_HOSTCMD_ESPI) 4108*4f2df630SAndroid Build Coastguard Worker #error Must select only one type of host communication bus. 4109*4f2df630SAndroid Build Coastguard Worker #endif 4110*4f2df630SAndroid Build Coastguard Worker 4111*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_HOSTCMD_X86) && !defined(CONFIG_HOSTCMD_LPC) && \ 4112*4f2df630SAndroid Build Coastguard Worker !defined(CONFIG_HOSTCMD_ESPI) 4113*4f2df630SAndroid Build Coastguard Worker #error Must select one type of host communication bus. 4114*4f2df630SAndroid Build Coastguard Worker #endif 4115*4f2df630SAndroid Build Coastguard Worker 4116*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4117*4f2df630SAndroid Build Coastguard Worker /* 4118*4f2df630SAndroid Build Coastguard Worker * Set default data ram size unless it's customized by the chip. 4119*4f2df630SAndroid Build Coastguard Worker */ 4120*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_DATA_RAM_SIZE 4121*4f2df630SAndroid Build Coastguard Worker #define CONFIG_DATA_RAM_SIZE CONFIG_RAM_SIZE 4122*4f2df630SAndroid Build Coastguard Worker #endif 4123*4f2df630SAndroid Build Coastguard Worker 4124*4f2df630SAndroid Build Coastguard Worker /* Automatic configuration of RAM banks **************************************/ 4125*4f2df630SAndroid Build Coastguard Worker /* Assume one RAM bank if not specified, auto-compute number of banks */ 4126*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_RAM_BANK_SIZE 4127*4f2df630SAndroid Build Coastguard Worker #define CONFIG_RAM_BANK_SIZE CONFIG_RAM_SIZE 4128*4f2df630SAndroid Build Coastguard Worker #endif 4129*4f2df630SAndroid Build Coastguard Worker 4130*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_RAM_BANKS 4131*4f2df630SAndroid Build Coastguard Worker #define CONFIG_RAM_BANKS (CONFIG_RAM_SIZE / CONFIG_RAM_BANK_SIZE) 4132*4f2df630SAndroid Build Coastguard Worker #endif 4133*4f2df630SAndroid Build Coastguard Worker 4134*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4135*4f2df630SAndroid Build Coastguard Worker /* 4136*4f2df630SAndroid Build Coastguard Worker * Set minimum shared memory size, unless it is defined in board file. 4137*4f2df630SAndroid Build Coastguard Worker */ 4138*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_SHAREDMEM_MINIMUM_SIZE 4139*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_COMMON_RUNTIME 4140*4f2df630SAndroid Build Coastguard Worker /* If RWSIG is used, we may need more space. */ 4141*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_RWSIG) 4142*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SHAREDMEM_MINIMUM_SIZE_RWSIG (CONFIG_RSA_KEY_SIZE / 8 * 3) 4143*4f2df630SAndroid Build Coastguard Worker #else 4144*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SHAREDMEM_MINIMUM_SIZE_RWSIG 0 4145*4f2df630SAndroid Build Coastguard Worker #endif 4146*4f2df630SAndroid Build Coastguard Worker 4147*4f2df630SAndroid Build Coastguard Worker /* 4148*4f2df630SAndroid Build Coastguard Worker * We can't use the "MAX" function here, as it is too smart and BUILD_ASSERT 4149*4f2df630SAndroid Build Coastguard Worker * calls do not allow it as parameter. BUILD_MAX below works for both compiler 4150*4f2df630SAndroid Build Coastguard Worker * and linker. 4151*4f2df630SAndroid Build Coastguard Worker */ 4152*4f2df630SAndroid Build Coastguard Worker #define BUILD_MAX(x, y) ((x) > (y) ? (x) : (y)) 4153*4f2df630SAndroid Build Coastguard Worker 4154*4f2df630SAndroid Build Coastguard Worker /* Minimum: 1kb */ 4155*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SHAREDMEM_MINIMUM_SIZE \ 4156*4f2df630SAndroid Build Coastguard Worker BUILD_MAX(1024, CONFIG_SHAREDMEM_MINIMUM_SIZE_RWSIG) 4157*4f2df630SAndroid Build Coastguard Worker #else /* !CONFIG_COMMON_RUNTIME */ 4158*4f2df630SAndroid Build Coastguard Worker /* Without common runtime, we do not have support for shared memory. */ 4159*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SHAREDMEM_MINIMUM_SIZE 0 4160*4f2df630SAndroid Build Coastguard Worker #endif 4161*4f2df630SAndroid Build Coastguard Worker #endif /* !CONFIG_SHAREDMEM_MINIMUM_SIZE */ 4162*4f2df630SAndroid Build Coastguard Worker 4163*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4164*4f2df630SAndroid Build Coastguard Worker /* 4165*4f2df630SAndroid Build Coastguard Worker * Disable the built-in console history if using the experimental console. 4166*4f2df630SAndroid Build Coastguard Worker * 4167*4f2df630SAndroid Build Coastguard Worker * The experimental console keeps its own session-persistent history which 4168*4f2df630SAndroid Build Coastguard Worker * survives EC reboot. It also requires CRC8 for command integrity. 4169*4f2df630SAndroid Build Coastguard Worker */ 4170*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_EXPERIMENTAL_CONSOLE 4171*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CONSOLE_HISTORY 4172*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CRC8 4173*4f2df630SAndroid Build Coastguard Worker #endif /* defined(CONFIG_EXPERIMENTAL_CONSOLE) */ 4174*4f2df630SAndroid Build Coastguard Worker 4175*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4176*4f2df630SAndroid Build Coastguard Worker /* 4177*4f2df630SAndroid Build Coastguard Worker * Thermal throttling AP must have temperature sensor enabled to get 4178*4f2df630SAndroid Build Coastguard Worker * the temperature readings. 4179*4f2df630SAndroid Build Coastguard Worker */ 4180*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_THROTTLE_AP) && !defined(CONFIG_TEMP_SENSOR) 4181*4f2df630SAndroid Build Coastguard Worker #define CONFIG_TEMP_SENSOR 4182*4f2df630SAndroid Build Coastguard Worker #endif 4183*4f2df630SAndroid Build Coastguard Worker 4184*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4185*4f2df630SAndroid Build Coastguard Worker /* 4186*4f2df630SAndroid Build Coastguard Worker * DPTF must have temperature sensor enabled to get the readings for 4187*4f2df630SAndroid Build Coastguard Worker * generating DPTF thresholds events. 4188*4f2df630SAndroid Build Coastguard Worker */ 4189*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_DPTF) && !defined(CONFIG_TEMP_SENSOR) 4190*4f2df630SAndroid Build Coastguard Worker #define CONFIG_TEMP_SENSOR 4191*4f2df630SAndroid Build Coastguard Worker #endif 4192*4f2df630SAndroid Build Coastguard Worker 4193*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4194*4f2df630SAndroid Build Coastguard Worker /* The Matrix Keyboard Protocol depends on MKBP events. */ 4195*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_KEYBOARD_PROTOCOL_MKBP 4196*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MKBP_EVENT 4197*4f2df630SAndroid Build Coastguard Worker #endif 4198*4f2df630SAndroid Build Coastguard Worker 4199*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4200*4f2df630SAndroid Build Coastguard Worker /* MKBP events delivery methods. */ 4201*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_MKBP_EVENT 4202*4f2df630SAndroid Build Coastguard Worker #if !defined(CONFIG_MKBP_USE_CUSTOM) && \ 4203*4f2df630SAndroid Build Coastguard Worker !defined(CONFIG_MKBP_USE_HOST_EVENT) && \ 4204*4f2df630SAndroid Build Coastguard Worker !defined(CONFIG_MKBP_USE_GPIO) && \ 4205*4f2df630SAndroid Build Coastguard Worker !defined(CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT) && \ 4206*4f2df630SAndroid Build Coastguard Worker !defined(CONFIG_MKBP_USE_HECI) 4207*4f2df630SAndroid Build Coastguard Worker #error Please define one of CONFIG_MKBP_USE_* macro. 4208*4f2df630SAndroid Build Coastguard Worker #endif 4209*4f2df630SAndroid Build Coastguard Worker 4210*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_MKBP_USE_CUSTOM) + defined(CONFIG_MKBP_USE_GPIO) + \ 4211*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_MKBP_USE_HOST_EVENT) + \ 4212*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_MKBP_USE_HOST_HECI) > \ 4213*4f2df630SAndroid Build Coastguard Worker 1 4214*4f2df630SAndroid Build Coastguard Worker #error Must select only one type of MKBP event delivery method. 4215*4f2df630SAndroid Build Coastguard Worker #endif 4216*4f2df630SAndroid Build Coastguard Worker #endif /* CONFIG_MKBP_EVENT */ 4217*4f2df630SAndroid Build Coastguard Worker 4218*4f2df630SAndroid Build Coastguard Worker /******************************************************************************/ 4219*4f2df630SAndroid Build Coastguard Worker /* Set generic orientation config if a specific orientation config is set. */ 4220*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_KX022_ORIENTATION_SENSOR) || \ 4221*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_BMI160_ORIENTATION_SENSOR) 4222*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_ACCEL_FIFO 4223*4f2df630SAndroid Build Coastguard Worker #error CONFIG_ACCEL_FIFO must be defined to use hw orientation sensor support 4224*4f2df630SAndroid Build Coastguard Worker #endif 4225*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ORIENTATION_SENSOR 4226*4f2df630SAndroid Build Coastguard Worker #endif 4227*4f2df630SAndroid Build Coastguard Worker 4228*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4229*4f2df630SAndroid Build Coastguard Worker /* Define CONFIG_BATTERY if board has a battery. */ 4230*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_BATTERY_BQ20Z453) || defined(CONFIG_BATTERY_BQ27541) || \ 4231*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_BATTERY_BQ27621) || defined(CONFIG_BATTERY_BQ4050) || \ 4232*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_BATTERY_MAX17055) || defined(CONFIG_BATTERY_MM8013) || \ 4233*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_BATTERY_SMART) 4234*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BATTERY 4235*4f2df630SAndroid Build Coastguard Worker #endif 4236*4f2df630SAndroid Build Coastguard Worker 4237*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4238*4f2df630SAndroid Build Coastguard Worker /* Define CONFIG_USBC_PPC if board has a USB Type-C Power Path Controller. */ 4239*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_USBC_PPC_AOZ1380) || defined(CONFIG_USBC_PPC_NX20P3483) || \ 4240*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_USBC_PPC_SN5S330) 4241*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USBC_PPC 4242*4f2df630SAndroid Build Coastguard Worker #endif /* "has a PPC" */ 4243*4f2df630SAndroid Build Coastguard Worker 4244*4f2df630SAndroid Build Coastguard Worker /* The TI SN5S330 supports VCONN and needs to be informed of CC polarity */ 4245*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_USBC_PPC_SN5S330) 4246*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USBC_PPC_POLARITY 4247*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USBC_PPC_SBU 4248*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USBC_PPC_VCONN 4249*4f2df630SAndroid Build Coastguard Worker #endif 4250*4f2df630SAndroid Build Coastguard Worker 4251*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4252*4f2df630SAndroid Build Coastguard Worker /* 4253*4f2df630SAndroid Build Coastguard Worker * Define CONFIG_USB_PD_VBUS_MEASURE_CHARGER if the charger on the board 4254*4f2df630SAndroid Build Coastguard Worker * supports VBUS measurement. 4255*4f2df630SAndroid Build Coastguard Worker */ 4256*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_CHARGER_BD9995X) || defined(CONFIG_CHARGER_RT9466) || \ 4257*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHARGER_RT9467) || defined(CONFIG_CHARGER_MT6370) || \ 4258*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHARGER_BQ25710) || defined(CONFIG_CHARGER_ISL9241) 4259*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_VBUS_MEASURE_CHARGER 4260*4f2df630SAndroid Build Coastguard Worker #endif 4261*4f2df630SAndroid Build Coastguard Worker 4262*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4263*4f2df630SAndroid Build Coastguard Worker /* 4264*4f2df630SAndroid Build Coastguard Worker * Define CONFIG_CHARGER_NARROW_VDC for chargers that use a Narrow VDC power 4265*4f2df630SAndroid Build Coastguard Worker * architecture. 4266*4f2df630SAndroid Build Coastguard Worker */ 4267*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_CHARGER_ISL9237) || defined(CONFIG_CHARGER_ISL9238) || \ 4268*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHARGER_ISL9241) 4269*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHARGER_NARROW_VDC 4270*4f2df630SAndroid Build Coastguard Worker #endif 4271*4f2df630SAndroid Build Coastguard Worker 4272*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4273*4f2df630SAndroid Build Coastguard Worker /* 4274*4f2df630SAndroid Build Coastguard Worker * Define CONFIG_BUTTON_TRIGGERED_RECOVERY if a board has a dedicated recovery 4275*4f2df630SAndroid Build Coastguard Worker * button. 4276*4f2df630SAndroid Build Coastguard Worker */ 4277*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_DEDICATED_RECOVERY_BUTTON 4278*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BUTTON_TRIGGERED_RECOVERY 4279*4f2df630SAndroid Build Coastguard Worker #endif /* defined(CONFIG_DEDICATED_RECOVERY_BUTTON) */ 4280*4f2df630SAndroid Build Coastguard Worker 4281*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_LED_PWM_COUNT 4282*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM 4283*4f2df630SAndroid Build Coastguard Worker #endif /* defined(CONFIG_LED_PWM_COUNT) */ 4284*4f2df630SAndroid Build Coastguard Worker 4285*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY 4286*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LED_PWM_CHARGE_STATE_ONLY 4287*4f2df630SAndroid Build Coastguard Worker #endif 4288*4f2df630SAndroid Build Coastguard Worker 4289*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4290*4f2df630SAndroid Build Coastguard Worker /* Define derived USB PD Discharge common path */ 4291*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_USB_PD_DISCHARGE_GPIO) || \ 4292*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_USB_PD_DISCHARGE_TCPC) || \ 4293*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_USB_PD_DISCHARGE_PPC) 4294*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_DISCHARGE 4295*4f2df630SAndroid Build Coastguard Worker #endif 4296*4f2df630SAndroid Build Coastguard Worker 4297*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4298*4f2df630SAndroid Build Coastguard Worker /* Define derived thermistor common path */ 4299*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_THERMISTOR_NCP15WB 4300*4f2df630SAndroid Build Coastguard Worker #define CONFIG_THERMISTOR 4301*4f2df630SAndroid Build Coastguard Worker #endif 4302*4f2df630SAndroid Build Coastguard Worker 4303*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4304*4f2df630SAndroid Build Coastguard Worker /* Define derived config options for BC1.2 detection */ 4305*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_BC12_DETECT_PI3USB9201 4306*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BC12_DETECT_DATA_ROLE_TRIGGER 4307*4f2df630SAndroid Build Coastguard Worker #endif 4308*4f2df630SAndroid Build Coastguard Worker 4309*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4310*4f2df630SAndroid Build Coastguard Worker /* 4311*4f2df630SAndroid Build Coastguard Worker * Define derived config options for Retimer chips. There are 4312*4f2df630SAndroid Build Coastguard Worker * for convenience. Any retimer driver that also needs USBC MUX Retimers 4313*4f2df630SAndroid Build Coastguard Worker * will not have to include it in their own board/baseboard.h file. 4314*4f2df630SAndroid Build Coastguard Worker */ 4315*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_USBC_RETIMER_INTEL_BB) || \ 4316*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_USBC_RETIMER_PI3DPX1207) 4317*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USBC_MUX_RETIMER 4318*4f2df630SAndroid Build Coastguard Worker #endif 4319*4f2df630SAndroid Build Coastguard Worker 4320*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4321*4f2df630SAndroid Build Coastguard Worker /* 4322*4f2df630SAndroid Build Coastguard Worker * Define CONFIG_LIBCRYPTOC if a board needs to read secret data from the 4323*4f2df630SAndroid Build Coastguard Worker * anti-rollback block. 4324*4f2df630SAndroid Build Coastguard Worker */ 4325*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_ROLLBACK_SECRET_SIZE 4326*4f2df630SAndroid Build Coastguard Worker #define CONFIG_LIBCRYPTOC 4327*4f2df630SAndroid Build Coastguard Worker #endif 4328*4f2df630SAndroid Build Coastguard Worker 4329*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4330*4f2df630SAndroid Build Coastguard Worker /* 4331*4f2df630SAndroid Build Coastguard Worker * Handle task-dependent configs. 4332*4f2df630SAndroid Build Coastguard Worker * 4333*4f2df630SAndroid Build Coastguard Worker * This prevent sub-modules from being compiled when the task and parent module 4334*4f2df630SAndroid Build Coastguard Worker * are not present. 4335*4f2df630SAndroid Build Coastguard Worker */ 4336*4f2df630SAndroid Build Coastguard Worker 4337*4f2df630SAndroid Build Coastguard Worker #ifndef HAS_TASK_CHIPSET 4338*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_APOLLOLAKE 4339*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_BRASWELL 4340*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_CANNONLAKE 4341*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_COMETLAKE 4342*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_GEMINILAKE 4343*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_ICELAKE 4344*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_MT817X 4345*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_MT8183 4346*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_RK3399 4347*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_RK3288 4348*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_SDM845 4349*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_SKYLAKE 4350*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_STONEY 4351*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CHIPSET_TIGERLAKE 4352*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_POWER_COMMON 4353*4f2df630SAndroid Build Coastguard Worker #endif 4354*4f2df630SAndroid Build Coastguard Worker 4355*4f2df630SAndroid Build Coastguard Worker /* 4356*4f2df630SAndroid Build Coastguard Worker * If a board has a chipset task, set the minimum charger power required for 4357*4f2df630SAndroid Build Coastguard Worker * powering on to 15W. This is also the highest power discovered over Type-C by 4358*4f2df630SAndroid Build Coastguard Worker * analog signaling. The EC normally does not communicate using USB PD when the 4359*4f2df630SAndroid Build Coastguard Worker * system is locked and in RO, so it would not be able to tell if higher power 4360*4f2df630SAndroid Build Coastguard Worker * is available. However, if a 15W charger is discovered, it's likely that the 4361*4f2df630SAndroid Build Coastguard Worker * charger does speak USB PD and we would be able to negotiate more power after 4362*4f2df630SAndroid Build Coastguard Worker * booting the AP and jumping to EC RW. 4363*4f2df630SAndroid Build Coastguard Worker * 4364*4f2df630SAndroid Build Coastguard Worker * If a board needs more or less power to power on, they can re-define this 4365*4f2df630SAndroid Build Coastguard Worker * value in their board.h file. 4366*4f2df630SAndroid Build Coastguard Worker */ 4367*4f2df630SAndroid Build Coastguard Worker #ifdef HAS_TASK_CHIPSET 4368*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 4369*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON 15000 4370*4f2df630SAndroid Build Coastguard Worker #endif /* !defined(CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON) */ 4371*4f2df630SAndroid Build Coastguard Worker #endif /* defined(HAS_TASK_CHIPSET) */ 4372*4f2df630SAndroid Build Coastguard Worker 4373*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_CHARGER_LIMIT_POWER_THRESH_CHG_MW 4374*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT 4375*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHARGER_LIMIT_POWER_THRESH_BAT_PCT \ 4376*4f2df630SAndroid Build Coastguard Worker (CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON) 4377*4f2df630SAndroid Build Coastguard Worker #endif 4378*4f2df630SAndroid Build Coastguard Worker #endif 4379*4f2df630SAndroid Build Coastguard Worker 4380*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON 4381*4f2df630SAndroid Build Coastguard Worker /* 4382*4f2df630SAndroid Build Coastguard Worker * The function of MEASURE_BATTERY_IMBALANCE and these variables is to prevent a 4383*4f2df630SAndroid Build Coastguard Worker * battery brownout when the management IC reports a state of charge that is 4384*4f2df630SAndroid Build Coastguard Worker * higher than CHARGER_MIN_BAT_PCT_FOR_POWER_ON, but an individual cell is lower 4385*4f2df630SAndroid Build Coastguard Worker * than the rest of the pack. The critical term is MAX_IMBALANCE_MV, which must 4386*4f2df630SAndroid Build Coastguard Worker * be small enough to ensure that the system can reliably boot even when the 4387*4f2df630SAndroid Build Coastguard Worker * battery total state of charge barely passes the 4388*4f2df630SAndroid Build Coastguard Worker * CHARGER_MIN_BAT_PCT_FOR_POWER_ON threshold. 4389*4f2df630SAndroid Build Coastguard Worker * 4390*4f2df630SAndroid Build Coastguard Worker * Lowering CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON below 4391*4f2df630SAndroid Build Coastguard Worker * CHARGER_MIN_BAT_PCT_FOR_POWER_ON disables this check. Raising it too high 4392*4f2df630SAndroid Build Coastguard Worker * may needlessly prevent boot when the lowest cell can still support the 4393*4f2df630SAndroid Build Coastguard Worker * system. 4394*4f2df630SAndroid Build Coastguard Worker * 4395*4f2df630SAndroid Build Coastguard Worker * As this term is lowered and BATTERY_MAX_IMBALANCE_MV is raised, the risk of 4396*4f2df630SAndroid Build Coastguard Worker * cell-undervoltage brownout during startup increases. Raising this term and 4397*4f2df630SAndroid Build Coastguard Worker * lowering MAX_IMBALANCE_MV increases the risk of poor UX when the user must 4398*4f2df630SAndroid Build Coastguard Worker * wait longer to turn on their device. 4399*4f2df630SAndroid Build Coastguard Worker */ 4400*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON 5 4401*4f2df630SAndroid Build Coastguard Worker #endif 4402*4f2df630SAndroid Build Coastguard Worker 4403*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_BATTERY_MAX_IMBALANCE_MV 4404*4f2df630SAndroid Build Coastguard Worker /* 4405*4f2df630SAndroid Build Coastguard Worker * WAG. Imbalanced battery packs in this situation appear to have balanced 4406*4f2df630SAndroid Build Coastguard Worker * charge very quickly after beginning the charging cycle, since dV/dQ rapidly 4407*4f2df630SAndroid Build Coastguard Worker * decreases as the cell is charged out of deep discharge. Increasing the value 4408*4f2df630SAndroid Build Coastguard Worker * of CHARGER_MIN_BAT_PCT_IMBALANCED_POWER_ON will make a system tolerant of 4409*4f2df630SAndroid Build Coastguard Worker * larger values of BATTERY_MAX_IMBALANCE_MV. 4410*4f2df630SAndroid Build Coastguard Worker */ 4411*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BATTERY_MAX_IMBALANCE_MV 200 4412*4f2df630SAndroid Build Coastguard Worker #endif 4413*4f2df630SAndroid Build Coastguard Worker 4414*4f2df630SAndroid Build Coastguard Worker #ifndef HAS_TASK_KEYPROTO 4415*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_KEYBOARD_PROTOCOL_8042 4416*4f2df630SAndroid Build Coastguard Worker /* 4417*4f2df630SAndroid Build Coastguard Worker * Note that we don't undef CONFIG_KEYBOARD_PROTOCOL_MKBP, because it doesn't 4418*4f2df630SAndroid Build Coastguard Worker * have its own task. 4419*4f2df630SAndroid Build Coastguard Worker */ 4420*4f2df630SAndroid Build Coastguard Worker #endif 4421*4f2df630SAndroid Build Coastguard Worker 4422*4f2df630SAndroid Build Coastguard Worker #ifndef HAS_TASK_PDCMD 4423*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_HOSTCMD_PD 4424*4f2df630SAndroid Build Coastguard Worker #endif 4425*4f2df630SAndroid Build Coastguard Worker 4426*4f2df630SAndroid Build Coastguard Worker /* Certain console cmds are irrelevant without parent modules. */ 4427*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_BATTERY 4428*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_PWR_AVG 4429*4f2df630SAndroid Build Coastguard Worker #endif 4430*4f2df630SAndroid Build Coastguard Worker 4431*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_ADC 4432*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_CMD_ADC 4433*4f2df630SAndroid Build Coastguard Worker #endif 4434*4f2df630SAndroid Build Coastguard Worker 4435*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4436*4f2df630SAndroid Build Coastguard Worker /* Define derived Chipset configs */ 4437*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_CHIPSET_APOLLOLAKE) || defined(CONFIG_CHIPSET_GEMINILAKE) 4438*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHIPSET_APL_GLK 4439*4f2df630SAndroid Build Coastguard Worker #endif 4440*4f2df630SAndroid Build Coastguard Worker 4441*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_CHIPSET_ICELAKE) || defined(CONFIG_CHIPSET_TIGERLAKE) 4442*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHIPSET_ICL_TGL 4443*4f2df630SAndroid Build Coastguard Worker #endif 4444*4f2df630SAndroid Build Coastguard Worker 4445*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_CHIPSET_APL_GLK) 4446*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHIPSET_HAS_PRE_INIT_CALLBACK 4447*4f2df630SAndroid Build Coastguard Worker #endif 4448*4f2df630SAndroid Build Coastguard Worker 4449*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_CHIPSET_APOLLOLAKE) || defined(CONFIG_CHIPSET_BRASWELL) || \ 4450*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHIPSET_CANNONLAKE) || \ 4451*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHIPSET_COMETLAKE) || \ 4452*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHIPSET_COMETLAKE_DISCRETE) || \ 4453*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHIPSET_GEMINILAKE) || \ 4454*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHIPSET_ICELAKE) || defined(CONFIG_CHIPSET_SKYLAKE) || \ 4455*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHIPSET_TIGERLAKE) 4456*4f2df630SAndroid Build Coastguard Worker #define CONFIG_POWER_COMMON 4457*4f2df630SAndroid Build Coastguard Worker #endif 4458*4f2df630SAndroid Build Coastguard Worker 4459*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_CHIPSET_CANNONLAKE) || defined(CONFIG_CHIPSET_ICELAKE) || \ 4460*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_CHIPSET_SKYLAKE) || defined(CONFIG_CHIPSET_TIGERLAKE) 4461*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CHIPSET_X86_RSMRST_DELAY 4462*4f2df630SAndroid Build Coastguard Worker #endif 4463*4f2df630SAndroid Build Coastguard Worker 4464*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4465*4f2df630SAndroid Build Coastguard Worker /* Define derived seven segment display common path */ 4466*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_MAX695X_SEVEN_SEGMENT_DISPLAY 4467*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SEVEN_SEG_DISPLAY 4468*4f2df630SAndroid Build Coastguard Worker #endif /* CONFIG_MAX695X_SEVEN_SEGMENT_DISPLAY */ 4469*4f2df630SAndroid Build Coastguard Worker 4470*4f2df630SAndroid Build Coastguard Worker /* 4471*4f2df630SAndroid Build Coastguard Worker * Apply fuzzer and test config overrides last, since fuzzers and tests need to 4472*4f2df630SAndroid Build Coastguard Worker * override some of the config flags in non-standard ways to mock only parts of 4473*4f2df630SAndroid Build Coastguard Worker * the system. 4474*4f2df630SAndroid Build Coastguard Worker */ 4475*4f2df630SAndroid Build Coastguard Worker #include "fuzz_config.h" 4476*4f2df630SAndroid Build Coastguard Worker #include "test_config.h" 4477*4f2df630SAndroid Build Coastguard Worker 4478*4f2df630SAndroid Build Coastguard Worker /* 4479*4f2df630SAndroid Build Coastguard Worker * Validity checks to make sure some of the configs above make sense. 4480*4f2df630SAndroid Build Coastguard Worker */ 4481*4f2df630SAndroid Build Coastguard Worker 4482*4f2df630SAndroid Build Coastguard Worker #if (CONFIG_AUX_TIMER_PERIOD_MS) < ((HOOK_TICK_INTERVAL_MS) * 2) 4483*4f2df630SAndroid Build Coastguard Worker #error "CONFIG_AUX_TIMER_PERIOD_MS must be at least 2x HOOK_TICK_INTERVAL_MS" 4484*4f2df630SAndroid Build Coastguard Worker #endif 4485*4f2df630SAndroid Build Coastguard Worker 4486*4f2df630SAndroid Build Coastguard Worker /* Enable BMI160 secondary port if needed. */ 4487*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_MAG_BMI160_BMM150) || defined(CONFIG_MAG_BMI160_LIS2MDL) 4488*4f2df630SAndroid Build Coastguard Worker #define CONFIG_BMI160_SEC_I2C 4489*4f2df630SAndroid Build Coastguard Worker #endif 4490*4f2df630SAndroid Build Coastguard Worker 4491*4f2df630SAndroid Build Coastguard Worker /* Load LIS2MDL driver if needed */ 4492*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_MAG_BMI160_LIS2MDL) 4493*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MAG_LIS2MDL 4494*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_ACCELGYRO_SEC_ADDR_FLAGS 4495*4f2df630SAndroid Build Coastguard Worker #error "The i2c address of the magnetometer is not set." 4496*4f2df630SAndroid Build Coastguard Worker #endif 4497*4f2df630SAndroid Build Coastguard Worker #endif 4498*4f2df630SAndroid Build Coastguard Worker 4499*4f2df630SAndroid Build Coastguard Worker /* Load BMM150 driver if needed */ 4500*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_MAG_BMI160_BMM150) 4501*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MAG_BMM150 4502*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_ACCELGYRO_SEC_ADDR_FLAGS 4503*4f2df630SAndroid Build Coastguard Worker #error "The i2c address of the magnetometer is not set." 4504*4f2df630SAndroid Build Coastguard Worker #endif 4505*4f2df630SAndroid Build Coastguard Worker #endif 4506*4f2df630SAndroid Build Coastguard Worker 4507*4f2df630SAndroid Build Coastguard Worker /* Fill LPC sense data on X86 architecture. */ 4508*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_HOSTCMD_X86 4509*4f2df630SAndroid Build Coastguard Worker #define CONFIG_MOTION_FILL_LPC_SENSE_DATA 4510*4f2df630SAndroid Build Coastguard Worker #endif 4511*4f2df630SAndroid Build Coastguard Worker 4512*4f2df630SAndroid Build Coastguard Worker /* 4513*4f2df630SAndroid Build Coastguard Worker * TODO(crbug.com/888109): Makes sure RDP as PSTATE is only enabled where it 4514*4f2df630SAndroid Build Coastguard Worker * makes sense. 4515*4f2df630SAndroid Build Coastguard Worker */ 4516*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE 4517*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_FLASH_PSTATE 4518*4f2df630SAndroid Build Coastguard Worker #error "Flash readout protection and PSTATE may not work as intended." 4519*4f2df630SAndroid Build Coastguard Worker #endif 4520*4f2df630SAndroid Build Coastguard Worker 4521*4f2df630SAndroid Build Coastguard Worker #if !defined(CHIP_FAMILY_STM32H7) && !defined(CHIP_FAMILY_STM32F4) 4522*4f2df630SAndroid Build Coastguard Worker #error "Flash readout protection only implemented on STM32H7 and STM32F4." 4523*4f2df630SAndroid Build Coastguard Worker #endif 4524*4f2df630SAndroid Build Coastguard Worker #endif /* CONFIG_FLASH_READOUT_PROTECTION_AS_PSTATE */ 4525*4f2df630SAndroid Build Coastguard Worker 4526*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_USB_PD_TCPM_ANX3429) || \ 4527*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_USB_PD_TCPM_ANX740X) || \ 4528*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_USB_PD_TCPM_ANX7471) 4529*4f2df630SAndroid Build Coastguard Worker /* Note: ANX7447 is handled by its own driver, not ANX74XX. */ 4530*4f2df630SAndroid Build Coastguard Worker #define CONFIG_USB_PD_TCPM_ANX74XX 4531*4f2df630SAndroid Build Coastguard Worker #endif 4532*4f2df630SAndroid Build Coastguard Worker 4533*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_DPTF_MULTI_PROFILE) && !defined(CONFIG_DPTF) 4534*4f2df630SAndroid Build Coastguard Worker #error "CONFIG_DPTF_MULTI_PROFILE can be set only when CONFIG_DPTF is set." 4535*4f2df630SAndroid Build Coastguard Worker #endif /* CONFIG_DPTF_MULTI_PROFILE && !CONFIG_DPTF */ 4536*4f2df630SAndroid Build Coastguard Worker 4537*4f2df630SAndroid Build Coastguard Worker /* 4538*4f2df630SAndroid Build Coastguard Worker * Define the timeout in milliseconds between when the EC receives a suspend 4539*4f2df630SAndroid Build Coastguard Worker * command and when the EC times out and asserts wake because the sleep signal 4540*4f2df630SAndroid Build Coastguard Worker * SLP_S0 did not assert. 4541*4f2df630SAndroid Build Coastguard Worker */ 4542*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_SLEEP_TIMEOUT_MS 4543*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SLEEP_TIMEOUT_MS 10000 4544*4f2df630SAndroid Build Coastguard Worker #endif 4545*4f2df630SAndroid Build Coastguard Worker 4546*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_PWM_KBLIGHT 4547*4f2df630SAndroid Build Coastguard Worker #define CONFIG_KEYBOARD_BACKLIGHT 4548*4f2df630SAndroid Build Coastguard Worker #endif 4549*4f2df630SAndroid Build Coastguard Worker 4550*4f2df630SAndroid Build Coastguard Worker /*****************************************************************************/ 4551*4f2df630SAndroid Build Coastguard Worker /* ISH power management related definitions */ 4552*4f2df630SAndroid Build Coastguard Worker #if defined(CONFIG_ISH_PM_D0I2) || defined(CONFIG_ISH_PM_D0I3) || \ 4553*4f2df630SAndroid Build Coastguard Worker defined(CONFIG_ISH_PM_D3) || defined(CONFIG_ISH_PM_RESET_PREP) 4554*4f2df630SAndroid Build Coastguard Worker 4555*4f2df630SAndroid Build Coastguard Worker #ifndef CONFIG_LOW_POWER_IDLE 4556*4f2df630SAndroid Build Coastguard Worker #error "Must define CONFIG_LOW_POWER_IDLE if enable ISH low power states" 4557*4f2df630SAndroid Build Coastguard Worker #endif 4558*4f2df630SAndroid Build Coastguard Worker 4559*4f2df630SAndroid Build Coastguard Worker #define CONFIG_ISH_PM_AONTASK 4560*4f2df630SAndroid Build Coastguard Worker 4561*4f2df630SAndroid Build Coastguard Worker #endif 4562*4f2df630SAndroid Build Coastguard Worker 4563*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_ACCEL_FIFO 4564*4f2df630SAndroid Build Coastguard Worker #if !defined(CONFIG_ACCEL_FIFO_SIZE) || !defined(CONFIG_ACCEL_FIFO_THRES) 4565*4f2df630SAndroid Build Coastguard Worker #error "Using CONFIG_ACCEL_FIFO, must define _SIZE and _THRES" 4566*4f2df630SAndroid Build Coastguard Worker #endif 4567*4f2df630SAndroid Build Coastguard Worker #endif /* CONFIG_ACCEL_FIFO */ 4568*4f2df630SAndroid Build Coastguard Worker 4569*4f2df630SAndroid Build Coastguard Worker /* 4570*4f2df630SAndroid Build Coastguard Worker * If USB PD Discharge is enabled, verify that CONFIG_USB_PD_DISCHARGE_GPIO 4571*4f2df630SAndroid Build Coastguard Worker * and CONFIG_USB_PD_PORT_COUNT, CONFIG_USB_PD_DISCHARGE_TCPC, or 4572*4f2df630SAndroid Build Coastguard Worker * CONFIG_USB_PD_DISCHARGE_PPC is defined. 4573*4f2df630SAndroid Build Coastguard Worker */ 4574*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_USB_PD_DISCHARGE 4575*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_USB_PD_DISCHARGE_GPIO 4576*4f2df630SAndroid Build Coastguard Worker #if !defined(CONFIG_USB_PD_PORT_COUNT) 4577*4f2df630SAndroid Build Coastguard Worker #error "PD discharge port not defined" 4578*4f2df630SAndroid Build Coastguard Worker #endif 4579*4f2df630SAndroid Build Coastguard Worker #else 4580*4f2df630SAndroid Build Coastguard Worker #if !defined(CONFIG_USB_PD_DISCHARGE_TCPC) && \ 4581*4f2df630SAndroid Build Coastguard Worker !defined(CONFIG_USB_PD_DISCHARGE_PPC) 4582*4f2df630SAndroid Build Coastguard Worker #error "PD discharge implementation not defined" 4583*4f2df630SAndroid Build Coastguard Worker #endif 4584*4f2df630SAndroid Build Coastguard Worker #endif /* CONFIG_USB_PD_DISCHARGE_GPIO */ 4585*4f2df630SAndroid Build Coastguard Worker #endif /* CONFIG_USB_PD_DISCHARGE */ 4586*4f2df630SAndroid Build Coastguard Worker 4587*4f2df630SAndroid Build Coastguard Worker /* EC Codec Wake-on-Voice related definitions */ 4588*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_AUDIO_CODEC_WOV 4589*4f2df630SAndroid Build Coastguard Worker #define CONFIG_SHA256 4590*4f2df630SAndroid Build Coastguard Worker #endif 4591*4f2df630SAndroid Build Coastguard Worker 4592*4f2df630SAndroid Build Coastguard Worker #ifdef CONFIG_SMBUS_PEC 4593*4f2df630SAndroid Build Coastguard Worker #define CONFIG_CRC8 4594*4f2df630SAndroid Build Coastguard Worker #endif 4595*4f2df630SAndroid Build Coastguard Worker 4596*4f2df630SAndroid Build Coastguard Worker /* Don't run RSA 2048 known-answer test (+30 ms). */ 4597*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FIPS_RSA2048 4598*4f2df630SAndroid Build Coastguard Worker /* Don't run software HMAC_DRBG-SHA256 known-answer test (+30 ms). */ 4599*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FIPS_SW_HMAC_DRBG 4600*4f2df630SAndroid Build Coastguard Worker /* Don't run AES CBC 256 test (not used for U2F anymore). */ 4601*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FIPS_AES_CBC_256 4602*4f2df630SAndroid Build Coastguard Worker /* Don't use ECDSA pair-wise consistency test. We verify sign/verify. */ 4603*4f2df630SAndroid Build Coastguard Worker #undef CONFIG_FIPS_ECDSA_PWCT 4604*4f2df630SAndroid Build Coastguard Worker 4605*4f2df630SAndroid Build Coastguard Worker #endif /* __CROS_EC_CONFIG_H */ 4606