diff options
Diffstat (limited to 'docs/configuration/ec_chipset.md')
-rw-r--r-- | docs/configuration/ec_chipset.md | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/docs/configuration/ec_chipset.md b/docs/configuration/ec_chipset.md index b006736712..defc27eec8 100644 --- a/docs/configuration/ec_chipset.md +++ b/docs/configuration/ec_chipset.md @@ -6,20 +6,20 @@ The EC chipset is selected using board specific make file [build.mk]. The following configuration options specify the type and size of flash memory used by the EC. - - `CONFIG_SPI_FLASH_REGS` - Should always be defined when using internal or +- `CONFIG_SPI_FLASH_REGS` - Should always be defined when using internal or external SPI flash. - - `CONFIG_SPI_FLASH` - Define only if your board uses an external flash. - - `CONFIG_SPI_FLASH_<device_type>` - Select exactly one the supported flash +- `CONFIG_SPI_FLASH` - Define only if your board uses an external flash. +- `CONFIG_SPI_FLASH_<device_type>` - Select exactly one the supported flash devices to compile in the required driver. This is needed even when using the internal SPI flash of the EC chipset. - - Additional EC Chipset options are prefixed with `CONFIG_HIBERNATE*` and +- Additional EC Chipset options are prefixed with `CONFIG_HIBERNATE*` and should be evaluated for relevance on your board. ## Feature Parameters - - `CONFIG_FLASH_SIZE_BYTES <bytes>` - Set to the size of the internal flash of the - EC. Must be defined to link the final image. - - `CONFIG_SPI_FLASH_PORT <port>` - Only used if your board as an external +- `CONFIG_FLASH_SIZE_BYTES <bytes>` - Set to the size of the internal flash of + the EC. Must be defined to link the final image. +- `CONFIG_SPI_FLASH_PORT <port>` - Only used if your board as an external flash. ## GPIOs and Alternate Pins @@ -27,38 +27,39 @@ by the EC. Configure the signals which will wakeup the EC from hibernate or deep sleep. Typical wakeup sources include: -- `GPIO_LID_OPEN` - An active high signal that indicates the lid has been - opened. The source of the signal is typically from a [GMR](../ec_terms.md#gmr) - or Hall-Effect sensor. The `GPIO_INT()` entry for this signal should be - connected to the `lid_interrupt()` routine. -- `GPIO_AC_PRESENT` - A signal from the battery charger that indicates the - device is connected to AC power. This signal is connected to the - `power_interrupt()` routine. -- `GPIO_POWER_BUTTON_L` - An active low signal from the power switch. This signal is connected to the `power_button_interrupt()` routine. -- `GPIO_EC_RST_ODL` - On some Nuvoton EC chipsets, the reset signal is - dual-routed to both a dedicated reset pin and a GPIO. In this case, no - interrupt handler needs to be registered to the GPIO signal, but the GPIO pin - must still be configured to wake on both edge types. The GPIO pin should also - be locked prevent the pin configuration from changing after the EC read-only - code runs. +- `GPIO_LID_OPEN` - An active high signal that indicates the lid has been + opened. The source of the signal is typically from a + [GMR](../ec_terms.md#gmr) or Hall-Effect sensor. The `GPIO_INT()` entry for + this signal should be connected to the `lid_interrupt()` routine. +- `GPIO_AC_PRESENT` - A signal from the battery charger that indicates the + device is connected to AC power. This signal is connected to the + `power_interrupt()` routine. +- `GPIO_POWER_BUTTON_L` - An active low signal from the power switch. This + signal is connected to the `power_button_interrupt()` routine. +- `GPIO_EC_RST_ODL` - On some Nuvoton EC chipsets, the reset signal is + dual-routed to both a dedicated reset pin and a GPIO. In this case, no + interrupt handler needs to be registered to the GPIO signal, but the GPIO + pin must still be configured to wake on both edge types. The GPIO pin should + also be locked prevent the pin configuration from changing after the EC + read-only code runs. See the [GPIO](./gpio.md) documentation for additional details on the GPIO macros. ## Data structures -- `const enum gpio_signal hibernate_wake_pins[]` - add all GPIO signals that - should trigger a wakeup of the EC. -- `const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);` - - configures the number of wake signals used on the board. +- `const enum gpio_signal hibernate_wake_pins[]` - add all GPIO signals that + should trigger a wakeup of the EC. +- `const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins);` - + configures the number of wake signals used on the board. All ChromeOS wake sources are documented on the ChromeOS partner site in the -[Wake Sources and Battery Life] section. The EC specific wake sources are found +[Wake Sources and Battery Life] section. The EC specific wake sources are found under the Deep Sleep and Shipping states and include: -- Power button -- AC insert -- Lid open +- Power button +- AC insert +- Lid open ## Tasks @@ -95,19 +96,21 @@ ALTERNATE(PIN_MASK(D, BIT(2)), 0, MODULE_PMU, 0) ALTERNATE(PIN_MASK(0, BIT(0) | BIT(1) | BIT(2)), 0, MODULE_PMU, 0) ``` -The final step is to add the hibernate signals array to Volteer [baseboard.c] file: +The final step is to add the hibernate signals array to Volteer [baseboard.c] +file: ```c /* Wake up pins */ const enum gpio_signal hibernate_wake_pins[] = { - GPIO_LID_OPEN, - GPIO_ACOK_OD, - GPIO_POWER_BUTTON_L, - GPIO_EC_RST_ODL, + GPIO_LID_OPEN, + GPIO_ACOK_OD, + GPIO_POWER_BUTTON_L, + GPIO_EC_RST_ODL, }; const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); ``` + [gpio.inc]: ../../board/volteer/gpio.inc [baseboard.c]: ../../baseboard/volteer/baseboard.c [build.mk]: ../new_board_checklist.md#board_build_mk -[Wake Sources and Battery Life]: https://chromeos.google.com/partner/dlm/docs/latest-requirements/chromebook.html#wake-sources-and-battery-life
\ No newline at end of file +[Wake Sources and Battery Life]: https://chromeos.google.com/partner/dlm/docs/latest-requirements/chromebook.html#wake-sources-and-battery-life |