1# Copyright (c) 2022, CSIRO.
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig POWER_DOMAIN
5	bool "Power domain drivers"
6	help
7	  Include drivers for power domains in system config
8
9if POWER_DOMAIN
10
11module = POWER_DOMAIN
12module-str = power_domain
13source "subsys/logging/Kconfig.template.log_config"
14
15config POWER_DOMAIN_INIT_PRIORITY
16	int "Power domain init priority"
17	default 75
18	help
19	  Power domain initialization priority.
20
21config POWER_DOMAIN_GPIO
22	bool "GPIO controlled power domain"
23	default y
24	depends on DT_HAS_POWER_DOMAIN_GPIO_ENABLED
25	depends on GPIO
26	depends on PM_DEVICE || !PM_DEVICE_POWER_DOMAIN
27	depends on TIMEOUT_64BIT
28	select DEVICE_DEPS
29
30if POWER_DOMAIN_GPIO
31
32config POWER_DOMAIN_GPIO_INIT_PRIORITY
33	int "GPIO power domain init priority"
34	default POWER_DOMAIN_INIT_PRIORITY
35	help
36	  GPIO power domain initialization priority.
37
38endif #POWER_DOMAIN_GPIO_MONITOR
39
40config POWER_DOMAIN_INTEL_ADSP
41	bool "Use Intel ADSP power gating mechanisms"
42	default y
43	depends on DT_HAS_INTEL_ADSP_POWER_DOMAIN_ENABLED
44	select DEVICE_DEPS
45	help
46	  Include Intel ADSP power domain control mechanisms
47
48if POWER_DOMAIN_INTEL_ADSP
49
50config POWER_DOMAIN_INTEL_ADSP_INIT_PRIORITY
51	int "Intel ADSP power domain init priority"
52	default KERNEL_INIT_PRIORITY_DEFAULT
53	help
54	  Intel ADSP power domain initialization priority.
55
56endif #POWER_DOMAIN_INTEL_ADSP
57
58config POWER_DOMAIN_GPIO_MONITOR
59	bool "GPIO monitor for sensing power on rail"
60	default y
61	depends on DT_HAS_POWER_DOMAIN_GPIO_MONITOR_ENABLED
62	depends on GPIO
63	select DEVICE_DEPS
64
65if POWER_DOMAIN_GPIO_MONITOR
66
67config POWER_DOMAIN_GPIO_MONITOR_INIT_PRIORITY
68	int "GPIO monitor power domain init priority"
69	default POWER_DOMAIN_INIT_PRIORITY
70	help
71	  GPIO monitor power domain initialization priority.
72
73endif #POWER_DOMAIN_GPIO_MONITOR
74
75endif
76