GoogleGit

blob: 6cc5687ea8d35e3054e2c490d4888892b7ae5241 [file] [log] [blame]
  1. /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
  2. * Use of this source code is governed by a BSD-style license that can be
  3. * found in the LICENSE file.
  4. */
  5. /*
  6. * config.h - Top-level configuration Chrome EC
  7. *
  8. * All configuration settings (CONFIG_*) are defined in this file or in a
  9. * sub-configuration file (config_chip.h, board.h, etc.) included by this file.
  10. *
  11. * Note that this file is included by assembly (.S) files. Any C-isms such as
  12. * struct definitions or enums in a sub-configuration file MUST be guarded with
  13. * #ifndef __ASSEMBLER__ to prevent those C-isms from being evaluated by the
  14. * assembler.
  15. */
  16. #ifndef __CROS_EC_CONFIG_H
  17. #define __CROS_EC_CONFIG_H
  18. /*
  19. * All config options are listed alphabetically and described here.
  20. *
  21. * If you add a new config option somewhere in the code, you must add a
  22. * default value here and describe what it does.
  23. *
  24. * To get a list current list, run this command:
  25. * git grep " CONFIG_" | grep -o "CONFIG_[A-Za-z0-9_]\+" | sort | uniq
  26. *
  27. * Some options are #defined here to enable them by default. Chips or boards
  28. * may override this by #undef'ing them in config_chip.h or board.h,
  29. * respectively.
  30. *
  31. * TODO(crosbug.com/p/23758): Describe all of these. Also describe the
  32. * HAS_TASK_* macro and how/when it should be used vs. a config define. And
  33. * BOARD_*, CHIP_*, and CHIP_FAMILY_*.
  34. */
  35. /* Enable accelerometer interrupts. */
  36. #undef CONFIG_ACCEL_INTERRUPTS
  37. /* Specify type of accelerometers attached. */
  38. #undef CONFIG_ACCEL_KXCJ9
  39. /* Compile chip support for analog-to-digital convertor */
  40. #undef CONFIG_ADC
  41. /*
  42. * ADC module has certain clock requirement. If this is defined, the ADC module
  43. * should call clock_enable_module() to configure clock for ADC.
  44. */
  45. #undef CONFIG_ADC_CLOCK
  46. /* ADC sample time selection. The value is chip-dependent. */
  47. #undef CONFIG_ADC_SAMPLE_TIME
  48. /* Include the ADC analog watchdog feature in the ADC code */
  49. #define CONFIG_ADC_WATCHDOG
  50. /*
  51. * Some ALS modules may be connected to the EC. We need the command, and
  52. * specific drivers for each module.
  53. */
  54. #undef CONFIG_ALS
  55. #undef CONFIG_ALS_ISL29035
  56. /* Support AP hang detection host command and state machine */
  57. #undef CONFIG_AP_HANG_DETECT
  58. /*
  59. * Support controlling the display backlight based on the state of the lid
  60. * switch. The EC will disable the backlight when the lid is closed.
  61. */
  62. #undef CONFIG_BACKLIGHT_LID
  63. /*
  64. * If defined, EC will enable the backlight signal only if this GPIO is
  65. * asserted AND the lid is open. This supports passing the backlight-enable
  66. * signal from the AP through EC.
  67. */
  68. #undef CONFIG_BACKLIGHT_REQ_GPIO
  69. /*****************************************************************************/
  70. /* Battery config */
  71. /*
  72. * Compile battery-specific code. Choose at most one.
  73. *
  74. * Note that some boards have their own unique battery constants / functions.
  75. * In this case, those are provided in board/(boardname)/battery.c, and none of
  76. * these are defined.
  77. */
  78. #undef CONFIG_BATTERY_BQ20Z453 /* BQ20Z453 battery used on some ARM laptops */
  79. #undef CONFIG_BATTERY_BQ27541 /* BQ27541 battery */
  80. #undef CONFIG_BATTERY_LINK /* Battery used on Link */
  81. /* Compile mock battery support; used by tests. */
  82. #undef CONFIG_BATTERY_MOCK
  83. /*
  84. * Charger should call battery_override_params() to limit/correct the voltage
  85. * and current requested by the battery pack before acting on the request.
  86. *
  87. * This is valid with CONFIG_CHARGER_V1 only.
  88. */
  89. #undef CONFIG_BATTERY_OVERRIDE_PARAMS
  90. /*
  91. * If defined, the charger will check for battery presence before attempting
  92. * to communicate with it. This avoids the 30 second delay when booting
  93. * without a battery present. Do not use with CONFIG_BATTERY_PRESENT_GPIO.
  94. *
  95. * Replace the default battery_is_present() function with a board-specific
  96. * implementation in board.c
  97. */
  98. #undef CONFIG_BATTERY_PRESENT_CUSTOM
  99. /*
  100. * If defined, GPIO which is driven low when battery is present.
  101. * Charger will check for battery presence before attempting to communicate
  102. * with it. This avoids the 30 second delay when booting without a battery
  103. * present. Do not use with CONFIG_BATTERY_PRESENT_CUSTOM.
  104. */
  105. #undef CONFIG_BATTERY_PRESENT_GPIO
  106. /*
  107. * Compile smart battery support
  108. *
  109. * For batteries which support this specification:
  110. * http://sbs-forum.org/specs/sbdat110.pdf)
  111. */
  112. #undef CONFIG_BATTERY_SMART
  113. /*
  114. * Critical battery shutdown timeout (seconds)
  115. *
  116. * If the battery is at extremely low charge (and discharging) or extremely
  117. * high temperature, the EC will shut itself down. This defines the timeout
  118. * period in seconds between the critical condition being detected and the
  119. * EC shutting itself down. Note that if the critical condition is corrected
  120. * before the timeout expiration, the EC will not shut itself down.
  121. *
  122. */
  123. #define CONFIG_BATTERY_CRITICAL_SHUTDOWN_TIMEOUT 30
  124. /*
  125. * Support battery cut-off as host command and console command.
  126. *
  127. * Once defined, you have to implement a board_cut_off_battery() function
  128. * in board/???/battery.c file.
  129. */
  130. #undef CONFIG_BATTERY_CUT_OFF
  131. /*
  132. * The default delay is 1 second. Define this if a board prefers
  133. * different delay.
  134. */
  135. #undef CONFIG_BATTERY_CUTOFF_DELAY_US
  136. /*
  137. * The board-specific battery.c implements get and set functions to read and
  138. * write arbirary vendor-specific parameters stored in the battery.
  139. * See include/battery.h for prototypes.
  140. */
  141. #undef CONFIG_BATTERY_VENDOR_PARAM
  142. /*
  143. * TODO(crosbug.com/p/29467): allows charging of a dead battery that
  144. * requests nil for current and voltage. Remove this workaround when
  145. * possible.
  146. */
  147. #undef CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEAD
  148. /*
  149. * Check for battery in disconnect state (similar to cut-off state). If this
  150. * battery is found to be in disconnect state, take it out of this state by
  151. * force-applying a charge current.
  152. */
  153. #undef CONFIG_BATTERY_REVIVE_DISCONNECT
  154. /*****************************************************************************/
  155. /*
  156. * Call board_config_post_gpio_init() after GPIOs are initialized. See
  157. * include/board_config.h for more information.
  158. */
  159. #undef CONFIG_BOARD_POST_GPIO_INIT
  160. /*
  161. * Call board_config_pre_init() before any inits are called. See
  162. * include/board_config.h for more information.
  163. */
  164. #undef CONFIG_BOARD_PRE_INIT
  165. /* EC has GPIOs attached to board version stuffing resistors */
  166. #undef CONFIG_BOARD_VERSION
  167. /* Permanent LM4 boot configuration */
  168. #undef CONFIG_BOOTCFG_VALUE
  169. /*****************************************************************************/
  170. /* Modify the default behavior to make system bringup easier. */
  171. #undef CONFIG_BRINGUP
  172. /*****************************************************************************/
  173. /*
  174. * Number of extra buttons not on the keyboard scan matrix. Doesn't include
  175. * the power button, which has its own handler.
  176. */
  177. #undef CONFIG_BUTTON_COUNT
  178. /*
  179. * Enable case close debug (CCD) mode.
  180. */
  181. #undef CONFIG_CASE_CLOSED_DEBUG
  182. /*
  183. * Capsense chip has buttons, too.
  184. */
  185. #undef CONFIG_CAPSENSE
  186. /*****************************************************************************/
  187. /* Compile charge manager */
  188. #undef CONFIG_CHARGE_MANAGER
  189. /* Compile input current ramping support */
  190. #undef CONFIG_CHARGE_RAMP
  191. /*****************************************************************************/
  192. /* Charger config */
  193. /* Compile common charge state code. You must pick an implementation. */
  194. #undef CONFIG_CHARGER
  195. #undef CONFIG_CHARGER_V1
  196. #undef CONFIG_CHARGER_V2
  197. /* Compile charger-specific code for these chargers (pick at most one) */
  198. #undef CONFIG_CHARGER_BQ24707A
  199. #undef CONFIG_CHARGER_BQ24715
  200. #undef CONFIG_CHARGER_BQ24725
  201. #undef CONFIG_CHARGER_BQ24738
  202. #undef CONFIG_CHARGER_BQ24770
  203. #undef CONFIG_CHARGER_BQ24773
  204. #undef CONFIG_CHARGER_BQ25890
  205. #undef CONFIG_CHARGER_BQ25892
  206. #undef CONFIG_CHARGER_BQ25895
  207. #undef CONFIG_CHARGER_TPS65090 /* Note: does not use CONFIG_CHARGER */
  208. /*
  209. * Board specific charging current limit, in mA. If defined, the charge state
  210. * machine will not allow the battery to request more current than this.
  211. */
  212. #undef CONFIG_CHARGER_CURRENT_LIMIT
  213. /*
  214. * Board supports discharge mode. In this mode, the battery will discharge
  215. * even if AC is present. Used for testing.
  216. */
  217. #undef CONFIG_CHARGER_DISCHARGE_ON_AC
  218. /*
  219. * Board specific flag used to disable external ILIM pin used to determine input
  220. * current limit. When defined, the input current limit is decided only by
  221. * the software register value.
  222. */
  223. #undef CONFIG_CHARGER_ILIM_PIN_DISABLED
  224. /*
  225. * Maximum amount of input current the charger can receive, in mA.
  226. *
  227. * This value should depend on external power adapter, designed charging
  228. * voltage, and the maximum power of the running system.
  229. */
  230. #undef CONFIG_CHARGER_INPUT_CURRENT
  231. /*
  232. * Equivalent of CONFIG_BATTERY_OVERRIDE_PARAMS for use with
  233. * CONFIG_CHARGER_V2
  234. */
  235. #undef CONFIG_CHARGER_PROFILE_OVERRIDE
  236. /* Value of the charge sense resistor, in mOhms */
  237. #undef CONFIG_CHARGER_SENSE_RESISTOR
  238. /* Value of the input current sense resistor, in mOhms */
  239. #undef CONFIG_CHARGER_SENSE_RESISTOR_AC
  240. /*
  241. * Maximum time to charge the battery, in hours.
  242. *
  243. * If this timeout is reached, the charger will enter force-idle state.
  244. * If not defined, charger will provide current until the battery asks it to
  245. * stop.
  246. */
  247. #undef CONFIG_CHARGER_TIMEOUT_HOURS
  248. /*
  249. * Board has an GPIO pin to enable or disable charging.
  250. *
  251. * This GPIO should be named GPIO_CHARGER_EN, if active high. Or
  252. * GPIO_CHARGER_EN_L if active low.
  253. */
  254. #undef CONFIG_CHARGER_EN_GPIO
  255. /* Charger enable GPIO is active low */
  256. #undef CONFIG_CHARGER_EN_ACTIVE_LOW
  257. /*****************************************************************************/
  258. /* Chipset config */
  259. /* AP chipset support; pick at most one */
  260. #undef CONFIG_CHIPSET_BAYTRAIL /* Intel Bay Trail (x86) */
  261. #undef CONFIG_CHIPSET_GAIA /* Gaia and Ares (ARM) */
  262. #undef CONFIG_CHIPSET_HASWELL /* Intel Haswell (x86) */
  263. #undef CONFIG_CHIPSET_IVYBRIDGE /* Intel Ivy Bridge (x86) */
  264. #undef CONFIG_CHIPSET_ROCKCHIP /* Rockchip rk32xx */
  265. #undef CONFIG_CHIPSET_TEGRA /* nVidia Tegra 5 */
  266. #undef CONFIG_CHIPSET_BRASWELL /* Intel Braswell (x86) */
  267. /* Support chipset throttling */
  268. #undef CONFIG_CHIPSET_CAN_THROTTLE
  269. /* Enable additional chipset debugging */
  270. #undef CONFIG_CHIPSET_DEBUG
  271. /* Support power rail control */
  272. #define CONFIG_CHIPSET_HAS_PP1350
  273. #define CONFIG_CHIPSET_HAS_PP5000
  274. /*****************************************************************************/
  275. /*
  276. * Chip config for clock circuitry
  277. * define = crystal / undef = oscillator
  278. */
  279. #undef CONFIG_CLOCK_CRYSTAL
  280. /*****************************************************************************/
  281. /* PMIC config */
  282. /* Support firmware long press power-off timer */
  283. #undef CONFIG_PMIC_FW_LONG_PRESS_TIMER
  284. /*****************************************************************************/
  285. /*
  286. * Optional console commands
  287. *
  288. * Defining these options will enable the corresponding command on the EC
  289. * console.
  290. */
  291. #undef CONFIG_CMD_ACCELS
  292. #undef CONFIG_CMD_ACCEL_INFO
  293. #undef CONFIG_CMD_BATDEBUG
  294. #undef CONFIG_CMD_CHGRAMP
  295. #undef CONFIG_CMD_CLOCKGATES
  296. #undef CONFIG_CMD_COMXTEST
  297. #undef CONFIG_CMD_ECTEMP
  298. #undef CONFIG_CMD_FLASH
  299. #undef CONFIG_CMD_FORCETIME
  300. #undef CONFIG_CMD_GSV
  301. #define CONFIG_CMD_HASH
  302. #undef CONFIG_CMD_HOSTCMD
  303. #define CONFIG_CMD_I2C_SCAN
  304. #define CONFIG_CMD_I2C_XFER
  305. #define CONFIG_CMD_IDLE_STATS
  306. #undef CONFIG_CMD_ILIM
  307. #undef CONFIG_CMD_JUMPTAGS
  308. #define CONFIG_CMD_PD
  309. #undef CONFIG_CMD_PD_DEV_DUMP_INFO
  310. #undef CONFIG_CMD_PD_FLASH
  311. #undef CONFIG_CMD_PLL
  312. #undef CONFIG_CMD_PMU
  313. #define CONFIG_CMD_POWER_AP
  314. #define CONFIG_CMD_POWERINDEBUG
  315. #undef CONFIG_CMD_POWERLED
  316. #undef CONFIG_CMD_RTC_ALARM
  317. #undef CONFIG_CMD_SCRATCHPAD
  318. #define CONFIG_CMD_SHMEM
  319. #undef CONFIG_CMD_SLEEP
  320. #undef CONFIG_CMD_SPI_FLASH
  321. #undef CONFIG_CMD_STACKOVERFLOW
  322. #undef CONFIG_CMD_TASKREADY
  323. #define CONFIG_CMD_TIMERINFO
  324. #define CONFIG_CMD_TYPEC
  325. #undef CONFIG_CMD_USB_PD_PE
  326. /*****************************************************************************/
  327. /* Provide common core code to output panic information without interrupts. */
  328. #define CONFIG_COMMON_PANIC_OUTPUT
  329. /*
  330. * Store a panic log and halt the system for a software-related reasons, such as
  331. * stack overflow or assertion failure.
  332. */
  333. #undef CONFIG_SOFTWARE_PANIC
  334. /*
  335. * Provide the default GPIO abstraction layer.
  336. * You want this unless you are doing a really tiny firmware.
  337. */
  338. #define CONFIG_COMMON_GPIO
  339. /*
  340. * Provides smaller GPIO names to reduce flash size. Instead of the 'name'
  341. * field in GPIO macro it will concat 'port' and 'pin' to reduce flash size.
  342. */
  343. #undef CONFIG_COMMON_GPIO_SHORTNAMES
  344. /*
  345. * Provide common runtime layer code (tasks, hooks ...)
  346. * You want this unless you are doing a really tiny firmware.
  347. */
  348. #define CONFIG_COMMON_RUNTIME
  349. /* Provide common core code to handle the operating system timers. */
  350. #define CONFIG_COMMON_TIMER
  351. /*****************************************************************************/
  352. /*
  353. * Provide additional help on console commands, such as the supported
  354. * options/usage.
  355. *
  356. * Boards may #undef this to reduce image size.
  357. */
  358. #define CONFIG_CONSOLE_CMDHELP
  359. /*
  360. * Number of entries in console history buffer.
  361. *
  362. * Boards may #undef this to reduce memory usage.
  363. */
  364. #define CONFIG_CONSOLE_HISTORY 8
  365. /* Max length of a single line of input */
  366. #define CONFIG_CONSOLE_INPUT_LINE_SIZE 80
  367. /*
  368. * Disable EC console input if the system is locked. This is needed for
  369. * security on platforms where the EC console is accessible from outside the
  370. * case - for example, via a special USB dongle.
  371. */
  372. #undef CONFIG_CONSOLE_RESTRICTED_INPUT
  373. /* Include CRC-8 utility function */
  374. #undef CONFIG_CRC8
  375. /*****************************************************************************/
  376. /*
  377. * Debugging config
  378. *
  379. * Note that these options are enabled by default, because they're really
  380. * handy for debugging systems during bringup and even at factory time.
  381. *
  382. * A board may undefine any or all of these to reduce image size and RAM usage,
  383. * at the cost of debuggability.
  384. */
  385. /*
  386. * ASSERT() macros are checked at runtime. See CONFIG_DEBUG_ASSERT_REBOOTS
  387. * to see what happens if one fails.
  388. *
  389. * Boards may #undef this to reduce image size.
  390. */
  391. #define CONFIG_DEBUG_ASSERT
  392. /*
  393. * Prints a message and reboots if an ASSERT() macro fails at runtime. When
  394. * enabled, an ASSERT() which fails will produce a message of the form:
  395. *
  396. * ASSERTION FAILURE '<expr>' in function() at file:line
  397. *
  398. * If this is not defined, failing ASSERT() will trigger a BKPT instruction
  399. * instead.
  400. *
  401. * Ignored if CONFIG_DEBUG_ASSERT is not defined.
  402. *
  403. * Boards may #undef this to reduce image size.
  404. */
  405. #define CONFIG_DEBUG_ASSERT_REBOOTS
  406. /*
  407. * On assertion failure, prints only the file name and the line number.
  408. *
  409. * Ignored if CONFIG_DEBUG_ASSERT_REBOOTS is not defined.
  410. *
  411. * Boards may define this to reduce image size.
  412. */
  413. #undef CONFIG_DEBUG_ASSERT_BRIEF
  414. /*
  415. * Disable the write buffer used for default memory map accesses.
  416. * This turns "Imprecise data bus errors" into "Precise" errors
  417. * in exception traces at the cost of some performance.
  418. * This may help identify the offending instruction causing an
  419. * exception. Supported on cortex-m.
  420. */
  421. #undef CONFIG_DEBUG_DISABLE_WRITE_BUFFER
  422. /*
  423. * Print additional information when exceptions are triggered, such as the
  424. * fault address, here shown as bfar. This shows the reason for the fault
  425. * and may help to determine the cause.
  426. *
  427. * === EXCEPTION: 03 ====== xPSR: 01000000 ===========
  428. * r0 :0000000b r1 :00000047 r2 :60000000 r3 :200013dd
  429. * r4 :00000000 r5 :080053f4 r6 :200013d0 r7 :00000002
  430. * r8 :00000000 r9 :200013de r10:00000000 r11:00000000
  431. * r12:00000000 sp :200009a0 lr :08002b85 pc :08003a8a
  432. * Precise data bus error, Forced hard fault, Vector catch, bfar = 60000000
  433. * mmfs = 00008200, shcsr = 00000000, hfsr = 40000000, dfsr = 00000008
  434. *
  435. * If this is not defined, only a register dump will be printed.
  436. *
  437. * Boards may #undef this to reduce image size.
  438. */
  439. #define CONFIG_DEBUG_EXCEPTIONS
  440. /* Check for stack overflows on every context switch */
  441. #define CONFIG_DEBUG_STACK_OVERFLOW
  442. /*****************************************************************************/
  443. /* Support DMA transfers inside the EC */
  444. #undef CONFIG_DMA
  445. /* Use the common interrupt handlers for DMA IRQs */
  446. #define CONFIG_DMA_DEFAULT_HANDLERS
  447. /* Compile extra debugging and tests for the DMA module */
  448. #undef CONFIG_DMA_HELP
  449. /* Support EC chip internal data EEPROM */
  450. #undef CONFIG_EEPROM
  451. /*
  452. * Compile the eoption module, which provides a higher-level interface to
  453. * options stored in internal data EEPROM.
  454. */
  455. #undef CONFIG_EOPTION
  456. /* Include code for handling external power */
  457. #define CONFIG_EXTPOWER
  458. /* Support turbo-mode chargers */
  459. #undef CONFIG_EXTPOWER_FALCO
  460. /* Support detecting external power presence via a GPIO */
  461. #undef CONFIG_EXTPOWER_GPIO
  462. /*
  463. * Support detecting external power presence via a pair of GPIOs, as used
  464. * on Snow.
  465. */
  466. #undef CONFIG_EXTPOWER_SNOW
  467. /* Support providing power to the device via USB on Spring. */
  468. #undef CONFIG_EXTPOWER_SPRING
  469. /*****************************************************************************/
  470. /* Number of cooling fans. Undef if none. */
  471. #undef CONFIG_FANS
  472. /*
  473. * Replace the default fan_percent_to_rpm() function with a board-specific
  474. * implementation in board.c
  475. */
  476. #undef CONFIG_FAN_RPM_CUSTOM
  477. /*
  478. * We normally check and update the fans once per second (HOOK_SECOND). If this
  479. * is #defined to a postive integer N, we will only update the fans every N
  480. * seconds instead.
  481. */
  482. #undef CONFIG_FAN_UPDATE_PERIOD
  483. /*****************************************************************************/
  484. /* Flash configuration */
  485. /* Support programming on-chip flash */
  486. #define CONFIG_FLASH
  487. #undef CONFIG_FLASH_BANK_SIZE
  488. #undef CONFIG_FLASH_BASE
  489. #undef CONFIG_FLASH_ERASED_VALUE32
  490. #undef CONFIG_FLASH_ERASE_SIZE
  491. /*
  492. * Flash is directly mapped into the EC's address space. If this is not
  493. * defined, the flash driver must implement flash_physical_read().
  494. */
  495. #define CONFIG_FLASH_MAPPED
  496. #undef CONFIG_FLASH_PHYSICAL_SIZE
  497. #undef CONFIG_FLASH_PROTECT_NEXT_BOOT
  498. /*
  499. * Store persistent write protect for the flash inside the flash data itself.
  500. * This allows ECs with internal flash to emulate something closer to a SPI
  501. * flash write protect register. If this is not defined, write protect state
  502. * is maintained solely by the physical flash driver.
  503. */
  504. #define CONFIG_FLASH_PSTATE
  505. /*
  506. * Store the pstate data in its own dedicated bank of flash. This allows
  507. * disabling the protect-RO-at-boot flag without rewriting the RO firmware,
  508. * but costs a bank of flash.
  509. *
  510. * If this is not defined, the pstate data is stored inside the RO firmware
  511. * image itself. This is more space-efficient, but the only way to clear the
  512. * flag once it's set is to rewrite the RO firmware (after removing the WP
  513. * screw, of course).
  514. */
  515. #define CONFIG_FLASH_PSTATE_BANK
  516. #undef CONFIG_FLASH_SIZE
  517. #undef CONFIG_FLASH_WRITE_IDEAL_SIZE
  518. #undef CONFIG_FLASH_WRITE_SIZE
  519. /*****************************************************************************/
  520. /* Include a flashmap in the compiled firmware image */
  521. #define CONFIG_FMAP
  522. /* Allow EC serial console input to wake up the EC from STOP mode */
  523. #undef CONFIG_FORCE_CONSOLE_RESUME
  524. /* Enable support for floating point unit */
  525. #undef CONFIG_FPU
  526. /*****************************************************************************/
  527. /* Firmware region configuration */
  528. #undef CONFIG_FW_IMAGE_SIZE
  529. #undef CONFIG_FW_PSTATE_OFF
  530. #undef CONFIG_FW_PSTATE_SIZE
  531. #undef CONFIG_FW_RO_OFF
  532. #undef CONFIG_FW_RO_SIZE
  533. #undef CONFIG_FW_RW_OFF
  534. #undef CONFIG_FW_RW_SIZE
  535. #undef CONFIG_FW_WP_RO_OFF
  536. #undef CONFIG_FW_WP_RO_SIZE
  537. /*
  538. * Board Image ec.bin contains a RO firmware. If not defined, the image will
  539. * only contain the RW firmware. The RO firmware comes from another board.
  540. */
  541. #define CONFIG_FW_INCLUDE_RO
  542. /*****************************************************************************/
  543. /* Motion sensor based gesture recognition information */
  544. #undef CONFIG_GESTURE_DETECTION
  545. #ifndef CONFIG_GESTURE_DETECTION
  546. /* Which sensor to look for gesture recognition */
  547. #undef CONFIG_SENSOR_BATTERY_TAP
  548. /* Sensor sampling interval for gesture recognition */
  549. #undef CONFIG_GESTURE_SAMPLING_INTERVAL_MS
  550. /*
  551. * Double tap detection parameters
  552. * Double tap works by looking for two isolated Z-axis accelerometer impulses
  553. * preceded and followed by relatively calm periods of accelerometer motion.
  554. *
  555. * Define an outer and inner window. The inner window specifies how
  556. * long the tap impulse is expected to last. The outer window specifies the
  557. * period before the initial tap impluse and after the final tap impulse for
  558. * which to check for relatively calm periods. In between the two impulses
  559. * there is a minimum and maximum interstice time allowed.
  560. */
  561. #undef CONFIG_GESTURE_TAP_OUTER_WINDOW_T
  562. #undef CONFIG_GESTURE_TAP_INNER_WINDOW_T
  563. #undef CONFIG_GESTURE_TAP_MIN_INTERSTICE_T
  564. #undef CONFIG_GESTURE_TAP_MAX_INTERSTICE_T
  565. #endif
  566. #undef CONFIG_LID_ANGLE
  567. #ifndef CONFIG_LID_ANGLE
  568. #undef CONFIG_SENSOR_BASE
  569. #undef CONFIG_SENSOR_LID
  570. /*
  571. * Allows using the lid angle measurement to determine if key scanning should
  572. * be enabled or disabled when chipset is suspended.
  573. */
  574. #undef CONFIG_LID_ANGLE_KEY_SCAN
  575. #endif
  576. /*****************************************************************************/
  577. /*
  578. * Support the host asking the EC about the status of the most recent host
  579. * command.
  580. *
  581. * When the AP is attached to the EC via a serialized bus such as I2C or SPI,
  582. * it needs a way to minimize the length of time an EC command will tie up the
  583. * bus (and the kernel driver on the AP). If this config is defined, the EC
  584. * may return an in-progress result code for slow commands such as flash
  585. * erase/write instead of stalling until the command finishes processing, and
  586. * the AP may then inquire the status of the current command and/or the result
  587. * of the previous command.
  588. */
  589. #undef CONFIG_HOST_COMMAND_STATUS
  590. /* If we have host command task, assume we also are using host events. */
  591. #ifdef HAS_TASK_HOSTCMD
  592. #define CONFIG_HOSTCMD_EVENTS
  593. #else
  594. #undef CONFIG_HOSTCMD_EVENTS
  595. #endif
  596. /*
  597. * For ECs where the host command interface is I2C, slave
  598. * address which the EC will respond to.
  599. */
  600. #undef CONFIG_HOSTCMD_I2C_SLAVE_ADDR
  601. /*
  602. * Host command rate limiting assures EC will have time to process lower
  603. * priority tasks even if the AP is hammering the EC with host commands.
  604. * If there is less than CONFIG_HOSTCMD_RATE_LIMITING_MIN_REST between
  605. * host commands for CONFIG_HOSTCMD_RATE_LIMITING_PERIOD, then a
  606. * recess period of CONFIG_HOSTCMD_RATE_LIMITING_RECESS will be
  607. * enforced.
  608. */
  609. #define CONFIG_HOSTCMD_RATE_LIMITING_PERIOD (500 * MSEC)
  610. #define CONFIG_HOSTCMD_RATE_LIMITING_MIN_REST (3 * MSEC)
  611. #define CONFIG_HOSTCMD_RATE_LIMITING_RECESS (20 * MSEC)
  612. /* Panic when status of PD MCU reflects that it has crashed */
  613. #undef CONFIG_HOSTCMD_PD_PANIC
  614. /*****************************************************************************/
  615. /* Enable debugging and profiling statistics for hook functions */
  616. #undef CONFIG_HOOK_DEBUG
  617. /*****************************************************************************/
  618. /* CRC configuration */
  619. /* Enable the hardware accelerator for CRC computation */
  620. #undef CONFIG_HW_CRC
  621. /* Enable the software routine for CRC computation */
  622. #undef CONFIG_SW_CRC
  623. /*****************************************************************************/
  624. /* Enable system hibernate */
  625. #define CONFIG_HIBERNATE
  626. /* Default delay after shutting down before hibernating */
  627. #define CONFIG_HIBERNATE_DELAY_SEC 3600
  628. /*
  629. * Use to define going in to hibernate early if low on battery.
  630. * CONFIG_HIBERNATE_BATT_PCT specifies the low battery threshold
  631. * for going into hibernate early, and CONFIG_HIBERNATE_BATT_SEC defines
  632. * the minimum amount of time to stay in G3 before checking for low
  633. * battery hibernate.
  634. */
  635. #undef CONFIG_HIBERNATE_BATT_PCT
  636. #undef CONFIG_HIBERNATE_BATT_SEC
  637. /* For ECs with multiple wakeup pins, define enabled wakeup pins */
  638. #undef CONFIG_HIBERNATE_WAKEUP_PINS
  639. /*****************************************************************************/
  640. /* I2C configuration */
  641. #undef CONFIG_I2C
  642. #undef CONFIG_I2C_ARBITRATION
  643. #undef CONFIG_I2C_DEBUG
  644. #undef CONFIG_I2C_DEBUG_PASSTHRU
  645. #undef CONFIG_I2C_PASSTHROUGH
  646. #undef CONFIG_I2C_PASSTHRU_RESTRICTED
  647. /*
  648. * I2C SCL gating.
  649. *
  650. * If CONFIG_I2C_SCL_GATE_ADDR/PORT is defined, whenever the defined address
  651. * is addressed, CONFIG_I2C_SCL_GATE_GPIO is set to high. When the I2C
  652. * transaction is done, the pin is set back to low.
  653. */
  654. #undef CONFIG_I2C_SCL_GATE_PORT
  655. #undef CONFIG_I2C_SCL_GATE_ADDR
  656. #undef CONFIG_I2C_SCL_GATE_GPIO
  657. /*
  658. * I2C multi-port controller.
  659. *
  660. * If CONFIG_I2C_MULTI_PORT_CONTROLLER is defined, a single on-chip I2C
  661. * controller may have multiple I2C ports attached. Therefore, I2c operations
  662. * must lock the controller (not just the port) to prevent hardware access
  663. * conflicts.
  664. */
  665. #undef CONFIG_I2C_MULTI_PORT_CONTROLLER
  666. /*****************************************************************************/
  667. /* Current/Power monitor */
  668. /*
  669. * Compile driver for INA219 or INA231. These two flags may not be both
  670. * defined.
  671. */
  672. #undef CONFIG_INA219
  673. #undef CONFIG_INA231
  674. /*****************************************************************************/
  675. /* Inductive charging */
  676. /* Enable inductive charging support */
  677. #undef CONFIG_INDUCTIVE_CHARGING
  678. /*****************************************************************************/
  679. /* Number of IRQs supported on the EC chip */
  680. #undef CONFIG_IRQ_COUNT
  681. /*****************************************************************************/
  682. /* Keyboard config */
  683. /*
  684. * The Silego reset chip sits in between the EC and the physical keyboard on
  685. * column 2. To save power in low-power modes, some Silego variants require
  686. * the signal to be inverted so that the open-drain output from the EC isn't
  687. * costing power due to the pull-up resistor in the Silego.
  688. */
  689. #undef CONFIG_KEYBOARD_COL2_INVERTED
  690. /*
  691. * Config KSO to start from a different KSO pin. This is to allow some chips
  692. * to use alternate functions on KSO pins.
  693. */
  694. #define CONFIG_KEYBOARD_KSO_BASE 0
  695. /* Enable extra debugging output from keyboard modules */
  696. #undef CONFIG_KEYBOARD_DEBUG
  697. /* The board uses a negative edge-triggered GPIO for keyboard interrupts. */
  698. #undef CONFIG_KEYBOARD_IRQ_GPIO
  699. /* Compile code for 8042 keyboard protocol */
  700. #undef CONFIG_KEYBOARD_PROTOCOL_8042
  701. /* Compile code for MKBP keyboard protocol */
  702. #undef CONFIG_KEYBOARD_PROTOCOL_MKBP
  703. /*
  704. * Keyboard config (struct keyboard_scan_config) is in board.c. If this is
  705. * not defined, default values from common/keyboard_scan.c will be used.
  706. */
  707. #undef CONFIG_KEYBOARD_BOARD_CONFIG
  708. /*
  709. * Minimum CPU clocks between scans. This ensures that keyboard scanning
  710. * doesn't starve the other EC tasks of CPU when running at a decreased system
  711. * clock.
  712. */
  713. #undef CONFIG_KEYBOARD_POST_SCAN_CLOCKS
  714. /*
  715. * Call board-supplied keyboard_suppress_noise() function when the debounced
  716. * keyboard state changes. Some boards use this to send a signal to the audio
  717. * codec to suppress typing noise picked up by the microphone.
  718. */
  719. #undef CONFIG_KEYBOARD_SUPPRESS_NOISE
  720. /*
  721. * Enable keyboard testing functionality. This enables a message which receives
  722. * a list of keyscan events from the AP and processes them. This will cause
  723. * keypresses to appear on the AP through the same mechanism as a normal
  724. * keyboard press.
  725. *
  726. * This can be used to spoof keyboard events, so is not normally defined,
  727. * except during internal testing.
  728. */
  729. #undef CONFIG_KEYBOARD_TEST
  730. /*****************************************************************************/
  731. /* Support common LED interface */
  732. #undef CONFIG_LED_COMMON
  733. /* Standard LED behavior according to spec given that we have a red-green
  734. * bicolor led for charging and one power led
  735. */
  736. #undef CONFIG_LED_POLICY_STD
  737. /*
  738. * LEDs for LED_POLICY STD may be inverted. In this case they are active low
  739. * and the GPIO names will be GPIO_LED..._L.
  740. */
  741. #undef CONFIG_LED_BAT_ACTIVE_LOW
  742. #undef CONFIG_LED_POWER_ACTIVE_LOW
  743. /* Support for LED driver chip(s) */
  744. #undef CONFIG_LED_DRIVER_DS2413 /* Maxim DS2413, on one-wire interface */
  745. #undef CONFIG_LED_DRIVER_LP5562 /* LP5562, on I2C interface */
  746. /*
  747. * Compile lid switch support.
  748. *
  749. * This is enabled by default because all boards other than reference boards
  750. * are for laptops with lid switchs. Reference boards #undef it.
  751. */
  752. #define CONFIG_LID_SWITCH
  753. /*
  754. * Support for turning the lightbar power rails on briefly when the AP is off.
  755. * Enabling this requires implementing the board-specific lb_power() function
  756. * to do it (see lb_common.h).
  757. */
  758. #undef CONFIG_LIGHTBAR_POWER_RAILS
  759. /*
  760. * For tap sequence, show the last segment in dim to give a better idea of
  761. * battery percentage.
  762. */
  763. #undef CONFIG_LIGHTBAR_TAP_DIM_LAST_SEGMENT
  764. /*
  765. * Low power idle options. These are disabled by default and all boards that
  766. * want to use low power idle must define it. When using the LFIOSC, the low
  767. * frequency clock will be used to conserve even more power when possible.
  768. *
  769. * GPIOs which need to trigger interrupts in low power idle must specify the
  770. * GPIO_INT_DSLEEP flag in gpio_list[].
  771. *
  772. * Note that for some processors (e.g. LM4), an active JTAG connection will
  773. * prevent the EC from using low-power idle.
  774. */
  775. #undef CONFIG_LOW_POWER_IDLE
  776. #undef CONFIG_LOW_POWER_USE_LFIOSC
  777. /*
  778. * Enable deep sleep during S0 (ignores SLEEP_MASK_AP_RUN).
  779. */
  780. #undef CONFIG_LOW_POWER_S0
  781. /* Support LPC interface */
  782. #undef CONFIG_LPC
  783. /* Support MKBP event */
  784. #undef CONFIG_MKBP_EVENT
  785. /* Support memory protection unit (MPU) */
  786. #undef CONFIG_MPU
  787. /* Support one-wire interface */
  788. #undef CONFIG_ONEWIRE
  789. /* Support PECI interface to x86 processor */
  790. #undef CONFIG_PECI
  791. /*
  792. * Maximum operating temperature in degrees Celcius used on some x86
  793. * processors. CPU chip temperature is reported relative to this value and
  794. * is never reported greater than this value. Processor asserts PROCHOT#
  795. * and starts throttling frequency and voltage at this temp. Operation may
  796. * become unreliable if temperature exceeds this limit.
  797. */
  798. #undef CONFIG_PECI_TJMAX
  799. /*****************************************************************************/
  800. /* PMU config */
  801. /*
  802. * Force switching on and off the FETs on the PMU controlling various power
  803. * rails during AP startup and shutdown sequences. This is mainly useful for
  804. * bringup when we don't have the corresponding sequences in the AP code.
  805. *
  806. * Currently supported only on spring platform.
  807. */
  808. #undef CONFIG_PMU_FORCE_FET
  809. /*
  810. * Enable hard-resetting the PMU from the EC. The implementation is rather
  811. * hacky; it simply shorts out the 3.3V rail to force the PMIC to panic. We
  812. * need this unfortunate hack because it's the only way to reset the I2C engine
  813. * inside the PMU.
  814. */
  815. #undef CONFIG_PMU_HARD_RESET
  816. /* Support TPS65090 PMU */
  817. #undef CONFIG_PMU_TPS65090
  818. /*
  819. * Support PMU powerinfo host and console commands. Note that the
  820. * implementation is currently specific to the Pit board, so don't blindly
  821. * enable this for another board without fixing that first.
  822. */
  823. #undef CONFIG_PMU_POWERINFO
  824. /*****************************************************************************/
  825. /* Compile common code to support power button debouncing */
  826. #undef CONFIG_POWER_BUTTON
  827. /* Force the active state of the power button : 0(default if unset) or 1 */
  828. #undef CONFIG_POWER_BUTTON_ACTIVE_STATE
  829. /* Allow the power button to send events while the lid is closed */
  830. #undef CONFIG_POWER_BUTTON_IGNORE_LID
  831. /* Support sending the power button signal to x86 chipsets */
  832. #undef CONFIG_POWER_BUTTON_X86
  833. /* Compile common code for AP power state machine */
  834. #undef CONFIG_POWER_COMMON
  835. /* Use part of the EC's data EEPROM to hold persistent storage for the AP. */
  836. #undef CONFIG_PSTORE
  837. /*****************************************************************************/
  838. /* Support PWM control */
  839. #undef CONFIG_PWM
  840. /* Support PWM control while in low-power idle */
  841. #undef CONFIG_PWM_DSLEEP
  842. /*****************************************************************************/
  843. /* Support PWM output to keyboard backlight */
  844. #undef CONFIG_PWM_KBLIGHT
  845. /* Base address of RAM for the chip */
  846. #undef CONFIG_RAM_BASE
  847. /* Size of RAM available on the chip, in bytes */
  848. #undef CONFIG_RAM_SIZE
  849. /* Support IR357x Link voltage regulator debugging / reprogramming */
  850. #undef CONFIG_REGULATOR_IR357X
  851. /* Support verifying 2048-bit RSA signature */
  852. #undef CONFIG_RSA
  853. /*
  854. * Verify the RW firmware using the RSA signature.
  855. * (for accessories without software sync)
  856. */
  857. #undef CONFIG_RWSIG
  858. /*
  859. * If defined, the hash module will save its last computed hash when jumping
  860. * between EC images.
  861. */
  862. #undef CONFIG_SAVE_VBOOT_HASH
  863. /* Enable smart battery firmware update driver */
  864. #undef CONFIG_SB_FIRMWARE_UPDATE
  865. /* Allow the board to use a GPIO for the SCI# signal. */
  866. #undef CONFIG_SCI_GPIO
  867. /* Support computing SHA-1 hash */
  868. #undef CONFIG_SHA1
  869. /* Support computing SHA-256 hash (without the VBOOT code) */
  870. #undef CONFIG_SHA256
  871. /* Emulate the CLZ (Count Leading Zeros) in software for CPU lacking support */
  872. #undef CONFIG_SOFTWARE_CLZ
  873. /* Support smbus interface */
  874. #undef CONFIG_SMBUS
  875. /* Support SPI interfaces */
  876. #undef CONFIG_SPI
  877. /* Support SPI flash */
  878. #undef CONFIG_SPI_FLASH
  879. /* Support W25Q64 SPI flash */
  880. #undef CONFIG_SPI_FLASH_W25Q64
  881. /* Support W25X40 SPI flash */
  882. #undef CONFIG_SPI_FLASH_W25X40
  883. /* SPI flash part supports SR2 register */
  884. #undef CONFIG_SPI_FLASH_HAS_SR2
  885. /* Size (bytes) of SPI flash memory */
  886. #undef CONFIG_SPI_FLASH_SIZE
  887. /* SPI module port used for master interface */
  888. #undef CONFIG_SPI_MASTER_PORT
  889. /* Default stack size to use for tasks, in bytes */
  890. #undef CONFIG_STACK_SIZE
  891. /* Fake hibernate mode */
  892. #undef CONFIG_STM32L_FAKE_HIBERNATE
  893. /*
  894. * Compile common code to handle simple switch inputs such as the recovery
  895. * button input from the servo debug interface.
  896. */
  897. #undef CONFIG_SWITCH
  898. /* Support dedicated recovery signal from servo board */
  899. #undef CONFIG_SWITCH_DEDICATED_RECOVERY
  900. /*
  901. * System should remain unlocked even if write protect is enabled.
  902. *
  903. * NOTE: This should ONLY be defined during bringup, and should never be
  904. * defined on a shipping / released platform.
  905. */
  906. #undef CONFIG_SYSTEM_UNLOCKED
  907. /*****************************************************************************/
  908. /* Task config */
  909. /*
  910. * List of enabled tasks in ascending priority order. This is normally
  911. * defined in each board's ec.tasklist file.
  912. *
  913. * For each task, use the macro TASK_ALWAYS(n, r, d, s) for base tasks and
  914. * TASK_NOTEST(n, r, d, s) for tasks that can be excluded in test binaries,
  915. * where :
  916. * 'n' is the name of the task
  917. * 'r' is the main routine of the task
  918. * 'd' is an opaque parameter passed to the routine at startup
  919. * 's' is the stack size in bytes; must be a multiple of 8
  920. */
  921. #undef CONFIG_TASK_LIST
  922. /*
  923. * List of test tasks. Same format as CONFIG_TASK_LIST, but used to define
  924. * additional tasks for a unit test. Normally defined in
  925. * test/{testname}.tasklist.
  926. */
  927. #undef CONFIG_TEST_TASK_LIST
  928. /*
  929. * Enable task profiling.
  930. *
  931. * Boards may #undef this to reduce image size and RAM usage.
  932. */
  933. #define CONFIG_TASK_PROFILING
  934. /*****************************************************************************/
  935. /* Temperature sensor config */
  936. /* Compile common code for temperature sensor support */
  937. #undef CONFIG_TEMP_SENSOR
  938. /* Support particular temperature sensor chips */
  939. #undef CONFIG_TEMP_SENSOR_G781 /* G781 sensor, on I2C bus */
  940. #undef CONFIG_TEMP_SENSOR_TMP006 /* TI TMP006 sensor, on I2C bus */
  941. #undef CONFIG_TEMP_SENSOR_TMP432 /* TI TMP432 sensor, on I2C bus */
  942. /*
  943. * If defined, active-high GPIO which indicates temperature sensor chips are
  944. * powered. If not defined, temperature sensors are assumed to be always
  945. * powered.
  946. */
  947. #undef CONFIG_TEMP_SENSOR_POWER_GPIO
  948. /*****************************************************************************/
  949. /* Stream config
  950. *
  951. * Streams are an abstraction for managing character based IO streams. Streams
  952. * can virtualize USARTs (interrupt, polled, or DMA driven), USB bulk
  953. * endpoints, I2C transfers, and more.
  954. */
  955. #undef CONFIG_STREAM
  956. /*****************************************************************************/
  957. /* USART stream config */
  958. #undef CONFIG_STREAM_USART
  959. /*
  960. * Each USART stream can be individually enabled and accessible using the
  961. * stream interface provided in the usart_config struct.
  962. */
  963. #undef CONFIG_STREAM_USART1
  964. #undef CONFIG_STREAM_USART2
  965. #undef CONFIG_STREAM_USART3
  966. #undef CONFIG_STREAM_USART4
  967. /*****************************************************************************/
  968. /* USB stream config */
  969. #undef CONFIG_STREAM_USB
  970. /*****************************************************************************/
  971. /* UART config */
  972. /* Baud rate for UARTs */
  973. #define CONFIG_UART_BAUD_RATE 115200
  974. /* UART index (number) for EC console */
  975. #undef CONFIG_UART_CONSOLE
  976. /* UART index (number) for host UART, if present */
  977. #undef CONFIG_UART_HOST
  978. /* Use uart_input_filter() to filter UART input. See prototype in uart.h */
  979. #undef CONFIG_UART_INPUT_FILTER
  980. /*
  981. * UART receive buffer size in bytes. Must be a power of 2 for macros in
  982. * common/uart_buffering.c to work properly. Must be larger than
  983. * CONFIG_CONSOLE_INPUT_LINE_SIZE to copy and paste scripts.
  984. */
  985. #define CONFIG_UART_RX_BUF_SIZE 128
  986. /* Use DMA for UART input */
  987. #undef CONFIG_UART_RX_DMA
  988. /*
  989. * On some platforms, UART receive DMA can't trigger an interrupt when a single
  990. * character is received. Those platforms poll for characters every HOOK_TICK.
  991. * When a character is received, make this many additional checks between then
  992. * and the next HOOK_TICK, to increase responsiveness of the console to input.
  993. */
  994. #define CONFIG_UART_RX_DMA_RECHECKS 5
  995. /*
  996. * UART transmit buffer size in bytes. Must be a power of 2 for macros in
  997. * common/uart_buffering.c to work properly.
  998. */
  999. #define CONFIG_UART_TX_BUF_SIZE 512
  1000. /* Use DMA for UART output */
  1001. #undef CONFIG_UART_TX_DMA
  1002. /* The DMA channel for UART. If not defined, default to UART1. */
  1003. #undef CONFIG_UART_TX_DMA_CH
  1004. #undef CONFIG_UART_RX_DMA_CH
  1005. /*****************************************************************************/
  1006. /* USB PD config */
  1007. /* Include all USB Power Delivery modules */
  1008. #undef CONFIG_USB_POWER_DELIVERY
  1009. /* Support for USB PD alternate mode */
  1010. #undef CONFIG_USB_PD_ALT_MODE
  1011. /* Support for USB PD alternate mode of Downward Facing Port */
  1012. #undef CONFIG_USB_PD_ALT_MODE_DFP
  1013. /* Check if max voltage request is allowed before each request */
  1014. #undef CONIFG_USB_PD_CHECK_MAX_REQUEST_ALLOWED
  1015. /* Default state of PD communication enabled flag */
  1016. #define CONFIG_USB_PD_COMM_ENABLED 1
  1017. /* Respond to custom vendor-defined messages over PD */
  1018. #undef CONFIG_USB_PD_CUSTOM_VDM
  1019. /* Define if this board can act as a dual-role PD port (source and sink) */
  1020. #undef CONFIG_USB_PD_DUAL_ROLE
  1021. /* Dynamic USB PD source capability */
  1022. #undef CONFIG_USB_PD_DYNAMIC_SRC_CAP
  1023. /* Check whether PD is the sole power source before flash erase operation */
  1024. #undef CONFIG_USB_PD_FLASH_ERASE_CHECK
  1025. /* HW & SW version for alternate mode discover identity response (4bits each) */
  1026. #undef CONFIG_USB_PD_IDENTITY_HW_ID
  1027. #undef CONFIG_USB_PD_IDENTITY_SW_ID
  1028. /* USB PD MCU slave address for host commands */
  1029. #define CONFIG_USB_PD_I2C_SLAVE_ADDR 0x3c
  1030. /* Define if using internal comparator for PD receive */
  1031. #undef CONFIG_USB_PD_INTERNAL_COMP
  1032. /* Record main PD events in a circular buffer */
  1033. #undef CONFIG_USB_PD_LOGGING
  1034. /* The size in bytes of the FIFO used for PD events logging */
  1035. #undef CONFIG_USB_PD_LOG_SIZE
  1036. /* Define if USB-PD device has no way of detecting USB VBUS */
  1037. #undef CONFIG_USB_PD_NO_VBUS_DETECT
  1038. /* Simple DFP, such as power adapter, will not send discovery VDM on connect */
  1039. #undef CONFIG_USB_PD_SIMPLE_DFP
  1040. /* Use comparator module for PD RX interrupt */
  1041. #define CONFIG_USB_PD_RX_COMP_IRQ
  1042. /* Alternative configuration keeping only the TX part of PHY */
  1043. #undef CONFIG_USB_PD_TX_PHY_ONLY
  1044. /* Support for USB type-c superspeed mux */
  1045. #undef CONFIG_USBC_SS_MUX
  1046. /* Support v1.1 type-C connection state machine */
  1047. #undef CONFIG_USBC_BACKWARDS_COMPATIBLE_DFP
  1048. /* Support for USB type-c vconn. Not needed for captive cables. */
  1049. #undef CONFIG_USBC_VCONN
  1050. /* Support VCONN swap */
  1051. #undef CONFIG_USBC_VCONN_SWAP
  1052. /* USB Binary device Object Store support */
  1053. #undef CONFIG_USB_BOS
  1054. /* USB Device version of product */
  1055. #undef CONFIG_USB_BCD_DEV
  1056. /*****************************************************************************/
  1057. /* Compile chip support for the USB device controller */
  1058. #undef CONFIG_USB
  1059. /* Disable automatic connection of USB peripheral */
  1060. #undef CONFIG_USB_INHIBIT_CONNECT
  1061. /* Disable automatic initialization of USB peripheral */
  1062. #undef CONFIG_USB_INHIBIT_INIT
  1063. /* Support simple control of power to the device's USB ports */
  1064. #undef CONFIG_USB_PORT_POWER_DUMB
  1065. /*
  1066. * Support supplying USB power in S3, if the host leaves the port enabled when
  1067. * entering S3.
  1068. */
  1069. #undef CONFIG_USB_PORT_POWER_IN_S3
  1070. /*
  1071. * Support smart power control to the device's USB ports, using
  1072. * dedicated power control chips. This potentially enables automatic
  1073. * negotiation of supplying more power to peripherals.
  1074. */
  1075. #undef CONFIG_USB_PORT_POWER_SMART
  1076. /*
  1077. * Override the default charging mode for USB smart power control.
  1078. * Value is selected from usb_charge_mode in include/usb_charge.h
  1079. */
  1080. #undef CONFIG_USB_PORT_POWER_SMART_DEFAULT_MODE
  1081. /*
  1082. * Smart USB power control can use a full set of control signals to the USB
  1083. * port power chip, or a reduced set. If this is defined, use the reduced set.
  1084. */
  1085. #undef CONFIG_USB_PORT_POWER_SMART_SIMPLE
  1086. /*
  1087. * Smart USB power control current limit pins may be inverted. In this case
  1088. * they are active low and the GPIO names will be GPIO_USBn_ILIM_SEL_L.
  1089. */
  1090. #undef CONFIG_USB_PORT_POWER_SMART_INVERTED
  1091. /* Support the TSU6721 I2C smart switch */
  1092. #undef CONFIG_USB_SWITCH_TSU6721
  1093. /* Support the Pericom PI3USB9281 I2C USB switch */
  1094. #undef CONFIG_USB_SWITCH_PI3USB9281
  1095. /* Select GPIO MUX for Pericom PI3USB9281 I2C USB switch */
  1096. #undef CONFIG_USB_SWITCH_PI3USB9281_MUX_GPIO
  1097. /*****************************************************************************/
  1098. /* USB GPIO config */
  1099. #undef CONFIG_USB_GPIO
  1100. /*****************************************************************************/
  1101. /* USB SPI config */
  1102. #undef CONFIG_USB_SPI
  1103. /*****************************************************************************/
  1104. /* Support computing hash of code for verified boot */
  1105. #undef CONFIG_VBOOT_HASH
  1106. /*****************************************************************************/
  1107. /* Watchdog config */
  1108. /*
  1109. * Compile watchdog timer support. The watchdog timer will reboot the system
  1110. * if the hook task (which is the lowest-priority task on the system) gets
  1111. * starved for CPU time and isn't able to fire its HOOK_TICK event.
  1112. */
  1113. #define CONFIG_WATCHDOG
  1114. /*
  1115. * Try to detect a watchdog that is about to fire, and print a trace. This is
  1116. * required on chips such as STM32 where the watchdog timer simply reboots the
  1117. * system without any early warning.
  1118. */
  1119. #undef CONFIG_WATCHDOG_HELP
  1120. /* Watchdog period in ms; see also AUX_TIMER_PERIOD_MS */
  1121. #define CONFIG_WATCHDOG_PERIOD_MS 1600
  1122. /*
  1123. * Fire auxiliary timer 500ms before watchdog timer expires. This leaves
  1124. * some time for debug trace to be printed.
  1125. */
  1126. #define CONFIG_AUX_TIMER_PERIOD_MS (CONFIG_WATCHDOG_PERIOD_MS - 500)
  1127. /*****************************************************************************/
  1128. /*
  1129. * Support controlling power to WiFi, WWAN (3G/LTE), and/or bluetooth modules.
  1130. */
  1131. #undef CONFIG_WIRELESS
  1132. /*
  1133. * Support for WiFi devices that must remain powered in suspend. Set to the
  1134. * combination of EC_WIRELESS_SWITCH flags (from ec_commands.h) which should
  1135. * be set in suspend.
  1136. */
  1137. #undef CONFIG_WIRELESS_SUSPEND
  1138. /*
  1139. * Write protect signal is active-high. If this is defined, there must be a
  1140. * GPIO named GPIO_WP; if not defined, there must be a GPIO names GPIO_WP_L.
  1141. */
  1142. #undef CONFIG_WP_ACTIVE_HIGH
  1143. /*
  1144. * The write protect signal is always asserted,
  1145. * independantly of the GPIO existence or current value.
  1146. */
  1147. #undef CONFIG_WP_ALWAYS
  1148. /*****************************************************************************/
  1149. /*
  1150. * Include board and core configs, since those hold the CONFIG_ constants for a
  1151. * given configuration. This guarantees they get included everywhere, and
  1152. * fixes a fairly common bug where we gate out code with #ifndef
  1153. * CONFIG_SOMETHING and but forget to include both of these.
  1154. *
  1155. * Board is included after chip, so that chip defaults can be overridden on a
  1156. * per-board basis as needed.
  1157. */
  1158. #ifdef __CROS_EC_CONFIG_CHIP_H
  1159. #error Include config.h instead of config_chip.h!
  1160. #endif
  1161. #ifdef __BOARD_H
  1162. #error Include config.h instead of board.h!
  1163. #endif
  1164. #include "config_chip.h"
  1165. #include "board.h"
  1166. /*****************************************************************************/
  1167. /*
  1168. * Handle task-dependent configs.
  1169. *
  1170. * This prevent sub-modules from being compiled when the task and parent module
  1171. * are not present.
  1172. */
  1173. #ifndef HAS_TASK_CHIPSET
  1174. #undef CONFIG_CHIPSET_BAYTRAIL
  1175. #undef CONFIG_CHIPSET_BRASWELL
  1176. #undef CONFIG_CHIPSET_GAIA
  1177. #undef CONFIG_CHIPSET_HASWELL
  1178. #undef CONFIG_CHIPSET_IVYBRIDGE
  1179. #undef CONFIG_CHIPSET_ROCKCHIP
  1180. #undef CONFIG_CHIPSET_TEGRA
  1181. #undef CONFIG_POWER_COMMON
  1182. #endif
  1183. #ifndef HAS_TASK_KEYPROTO
  1184. #undef CONFIG_KEYBOARD_PROTOCOL_8042
  1185. /*
  1186. * Note that we don't undef CONFIG_KEYBOARD_PROTOCOL_MKBP, because it doesn't
  1187. * have its own task.
  1188. */
  1189. #endif
  1190. #ifndef HAS_TASK_KEYSCAN
  1191. #undef CONFIG_KEYBOARD_PROTOCOL_8042
  1192. #undef CONFIG_KEYBOARD_PROTOCOL_MKBP
  1193. #endif
  1194. /*****************************************************************************/
  1195. /*
  1196. * Apply test config overrides last, since tests need to override some of the
  1197. * config flags in non-standard ways to mock only parts of the system.
  1198. */
  1199. #include "test_config.h"
  1200. /*****************************************************************************/
  1201. /*
  1202. * Sanity checks to make sure some of the configs above make sense.
  1203. */
  1204. #if (CONFIG_AUX_TIMER_PERIOD_MS) < ((HOOK_TICK_INTERVAL_MS) * 2)
  1205. #error "CONFIG_AUX_TIMER_PERIOD_MS must be at least 2x HOOK_TICK_INTERVAL_MS"
  1206. #endif
  1207. #endif /* __CROS_EC_CONFIG_H */