forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
driver: intc: add MIWU driver support in NPCM series.
The device Multi-Input Wake-Up Unit (MIWU) supports the embedded controller (EC) to exit 'Sleep' or 'Deep Sleep' power state which allows chip has better power consumption. Also, it provides signal conditioning such as 'Level' and 'Edge' trigger type and grouping of external interrupt sources of NVIC. The NPCM series has three identical MIWU modules: MIWU0, MIWU1, MIWU2. Together, they support a total of 143 internal and/or external wake-up sources. In this CL, we use device tree files to present the relationship bewteen MIWU and the other devices in different npcm series. For npcm4 series, it include: 1. npcm4-miwus-int-map.dtsi: it presents relationship between MIWU group and NVIC interrupt in npcm4. Please notice it isn't 1-to-1 mapping. 2. npcm4-miwus-wui-map.dtsi: it presents relationship between input of MIWU and its source device such as gpio, timer, eSPI VWs and so on. This CL also includes: 1. Add MIWU device tree declarations. 2. MIWU api function declarations and implementation to configure signal conditions and callback function mechanism. They can be be classified into two types. One is for GPIO which connects original gpio callback implemetation and the other is for generic devices such as timer, eSPI, and so on. 3. Update the npcm gpio driver for the interaction with npcm MIWU driver. Signed-off-by: Tyrone Ting <[email protected]>
- Loading branch information
Showing
11 changed files
with
616 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,6 @@ CONFIG_UART_CONSOLE=y | |
# GPIO Driver | ||
CONFIG_GPIO=y | ||
CONFIG_GPIO_NPCM=y | ||
|
||
# MIWU Driver | ||
CONFIG_NPCM_MIWU=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# NPCM GPIO driver configuration options | ||
|
||
# Copyright (c) 2024 Nuvoton Technology Corporation. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config NPCM_MIWU | ||
bool "Nuvoton NPCM embedded controller (EC) miwu driver" | ||
default y | ||
depends on SOC_FAMILY_NPCM | ||
help | ||
This option enables the Multi-Input Wake-Up Unit (MIWU) driver | ||
for NPCM family ofprocessors. | ||
This is required for GPIO, RTC, LPC/eSPI interrupt support. |
Oops, something went wrong.