Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver: intc: add MIWU driver support in NPCM series. #113

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

warp5tw
Copy link
Collaborator

@warp5tw warp5tw commented Jun 13, 2024

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.

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]>
@maxdog988 maxdog988 merged commit b2ffc1a into Nuvoton-Israel:npcm-main Jun 13, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants