power: npcx: add leakage-io support for better power consumption

This CL adds a DT node, 'power_leakage_io', which property,
'leak-gpios', contains GPIOs that have leakage current. In oerder to get
better power consumption, npcx power driver will disable the connections
between these io pads and input buffers before entering deep sleep.
Then, restore the connections after ec wakes up.

The users can overwrite this property at board DT file. Here is an
example:

    &power_leakage_io {
        leak-gpios = <&gpio0 0 0
                      &gpiob 1 0>;
    };

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
This commit is contained in:
Mulin Chao 2022-07-18 19:07:32 -07:00 committed by Carles Cufí
commit 8cf0feb3e2
3 changed files with 89 additions and 0 deletions

View file

@ -52,6 +52,14 @@
status = "okay";
};
/* Dummy node of IOs that have leakage current. The user can override
* 'leak-gpios' prop. at board DT file to save more power consumption.
*/
power_leakage_io: power-leakage-io {
compatible = "nuvoton,npcx-leakage-io";
status = "okay";
};
soc {
bbram: bb-ram@400af000 {
compatible = "nuvoton,npcx-bbram";