summaryrefslogtreecommitdiff
path: root/zephyr/test/ap_power/boards/native_posix.overlay
blob: c6cd8c3790a85a0e3a8b26bbc7b8957d8844abfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/* Copyright 2022 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <board-overlays/native_posix.dts>
#include <cros/binman.dtsi>
#include <dt-bindings/gpio_defines.h>
#include <freq.h>

/ {
	chosen {
		cros-ec,espi = &espi0;
		intel-ap-pwrseq,espi = &espi0;
	};

	/*
	 * Keep these GPIOs in pin order.
	 * If you need to add one, make sure you increase
	 * ngpios in the gpio0 node further down.
	 */
	named-gpios {
		compatible = "named-gpios";

		gpio_ec_pwr_btn_odl: ec_pwr_btn_odl {
			/* GPIO_PULL_UP will cause this start asserted,
			 * i.e. not pressed.
			 */
			gpios = <&gpio0 1 (GPIO_INPUT | GPIO_PULL_UP)>;
			enum-name = "GPIO_POWER_BUTTON_L";
		};
		gpio_pch_pwrbtn_l: pch_pwrbtn_l {
			gpios = <&gpio0 2 GPIO_OUTPUT>;
			enum-name = "GPIO_PCH_PWRBTN_L";
		};
		gpio_ec_pch_wake_odl: ec_pch_wake_odl {
			gpios = <&gpio0 3 GPIO_OUTPUT_HIGH>;
		};
		gpio_lid_open_ec: lid_open_ec {
			/* GPIO_PULL_UP will cause this start asserted. */
			gpios = <&gpio0 4 (GPIO_INPUT | GPIO_PULL_UP)>;
			enum-name = "GPIO_LID_OPEN";
		};
	};
	gpio-interrupts {
		compatible = "cros-ec,gpio-interrupts";

		int_lid_open_ec: lid_open_ec {
			irq-pin = <&gpio_lid_open_ec>;
			flags = <GPIO_INT_EDGE_BOTH>;
			handler = "lid_interrupt";
		};
	};

	common-pwrseq {
		compatible = "intel,ap-pwrseq";
	};

	pwr-en-pp5000-s5 {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "PP5000_S5 enable output to regulator";
		enum-name = "PWR_EN_PP5000_A";
		gpios = <&gpio0 10 0>;
		output;
	};
	pwr-en-pp3300-s5 {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "PP3300_S5 enable output to LS";
		enum-name = "PWR_EN_PP3300_A";
		gpios = <&gpio0 11 0>;
		output;
	};
	pwr-pg-ec-rsmrst-odl {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "RSMRST power good from regulator";
		enum-name = "PWR_RSMRST";
		gpios = <&gpio0 12 0>;
		interrupt-flags = <GPIO_INT_EDGE_BOTH>;
	};
	pwr-ec-pch-rsmrst-odl {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "RSMRST output to PCH";
		enum-name = "PWR_EC_PCH_RSMRST";
		gpios = <&gpio0 13 0>;
		output;
	};
	pwr-slp-s0-l {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "SLP_S0_L input from PCH";
		enum-name = "PWR_SLP_S0";
		gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
		interrupt-flags = <GPIO_INT_EDGE_BOTH>;
		no-enable;
	};
	pwr-slp-s3-l {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "SLP_S3_L input from PCH";
		enum-name = "PWR_SLP_S3";
		gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
		interrupt-flags = <GPIO_INT_EDGE_BOTH>;
	};
	pwr-slp-sus-l {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "SLP_SUS_L input from PCH";
		enum-name = "PWR_SLP_SUS";
		gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
		interrupt-flags = <GPIO_INT_EDGE_BOTH>;
	};
	pwr-ec-soc-dsw-pwrok {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "DSW_PWROK output to PCH";
		enum-name = "PWR_EC_SOC_DSW_PWROK";
		gpios = <&gpio0 17 0>;
		output;
	};
	pwr-vccst-pwrgd-od {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "VCCST_PWRGD output to PCH";
		enum-name = "PWR_VCCST_PWRGD";
		gpios = <&gpio0 18 0>;
		output;
	};
	pwr-imvp9-vrrdy-od {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "VRRDY input from IMVP9";
		enum-name = "PWR_IMVP9_VRRDY";
		gpios = <&gpio0 19 0>;
	};
	pwr-pch-pwrok {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "PCH_PWROK output to PCH";
		enum-name = "PWR_PCH_PWROK";
		gpios = <&gpio0 20 0>;
		output;
	};
	pwr-ec-pch-sys-pwrok {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "SYS_PWROK output to PCH";
		enum-name = "PWR_EC_PCH_SYS_PWROK";
		gpios = <&gpio0 21 0>;
		output;
	};
	pwr-sys-rst-l {
		compatible = "intel,ap-pwrseq-gpio";
		dbg-label = "SYS_RESET# output to PCH";
		enum-name = "PWR_SYS_RST";
		gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
		output;
	};
	pwr-slp-s4 {
		compatible = "intel,ap-pwrseq-vw";
		dbg-label = "SLP_S4 virtual wire input from PCH";
		enum-name = "PWR_SLP_S4";
		virtual-wire = "ESPI_VWIRE_SIGNAL_SLP_S4";
		vw-invert;
	};
	pwr-slp-s5 {
		compatible = "intel,ap-pwrseq-vw";
		dbg-label = "SLP_S5 virtual wire input from PCH";
		enum-name = "PWR_SLP_S5";
		virtual-wire = "ESPI_VWIRE_SIGNAL_SLP_S5";
		vw-invert;
	};
	pwr-all-sys-pwrgd {
		compatible = "intel,ap-pwrseq-external";
		dbg-label = "Combined all power good";
		enum-name = "PWR_ALL_SYS_PWRGD";
	};
	pwr-pp3300-pwrok {
		compatible = "intel,ap-pwrseq-external";
		dbg-label = "PP3300 PWROK";
		enum-name = "PWR_DSW_PWROK";
	};
	pwr-pp1p05-pwrok {
		compatible = "intel,ap-pwrseq-external";
		dbg-label = "PP1P05 PWROK";
		enum-name = "PWR_PG_PP1P05";
	};

	clock: clock {
		compatible = "cros,clock-control-emul";
		clock-frequency = <DT_FREQ_M(100)>; /* 100 MHz */
	};
};

&espi0 {
	espi-host@0 {
		status = "okay";
		compatible = "zephyr,espi-emul-espi-host";
		reg = <0x0>;
	};
};

&gpio0 {
	ngpios = <23>;
};