blob: aedf9824fc0e81e1ae384ab2fb973ac14e6b7035 (
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
|
/* 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.
*/
/* Meteorlake chipset power control module for Chrome EC */
#ifndef __CROS_EC_METEORLAKE_H
#define __CROS_EC_METEORLAKE_H
#include "stdbool.h"
/* Input state flags. */
#define IN_PCH_SLP_S3_DEASSERTED POWER_SIGNAL_MASK(X86_SLP_S3_DEASSERTED)
#define IN_PCH_SLP_S4_DEASSERTED POWER_SIGNAL_MASK(X86_SLP_S4_DEASSERTED)
#define IN_ALL_PM_SLP_DEASSERTED \
(IN_PCH_SLP_S3_DEASSERTED | IN_PCH_SLP_S4_DEASSERTED)
#define IN_PGOOD_ALL_CORE POWER_SIGNAL_MASK(X86_RSMRST_L_PGOOD)
#define IN_ALL_S0 (IN_PGOOD_ALL_CORE | IN_ALL_PM_SLP_DEASSERTED)
#define CHIPSET_G3S5_POWERUP_SIGNAL POWER_SIGNAL_MASK(X86_RSMRST_L_PGOOD)
#define CHARGER_INITIALIZED_DELAY_MS 100
#define CHARGER_INITIALIZED_TRIES 40
/* Power signals list */
enum power_signal {
X86_SLP_S0_DEASSERTED,
X86_SLP_S3_DEASSERTED,
X86_SLP_S4_DEASSERTED,
X86_SLP_S5_DEASSERTED,
X86_RSMRST_L_PGOOD,
X86_ALL_SYS_PGOOD,
/* Number of X86 signals */
POWER_SIGNAL_COUNT
};
struct intel_x86_pwrok_signal {
enum gpio_signal gpio;
bool active_low;
int delay_ms;
};
/*
* Meteorlake Generic Power delivery implementation
* - IMVP provides following power rails
* VccCORE
* VccSA
* VccGT
* - Platform logic provides following signals
* SYS_PWROK
* SYS_PWROK
*
* ALL_SYS_PWRGD is generated by the combination of below signals
* SLP_S4# -> VDD2_VR_PG
* RSMRST#
* SLP_S3#
* SLP_S3# -> S0_VR_PG
* ALL_SYS_PWRGD can be implemented as a single GPIO if the platform power logic
* combines the above power good signals. Otherwise your board can override
* intel_x86_get_pg_ec_all_sys_pwrgd() to check multiple power good signals.
*
* PLT_PWROK is generated by the combination of below signals
* ALL_SYS_PWRGD
* IMVP_VR_READY
*/
extern const struct intel_x86_pwrok_signal pwrok_signal_assert_list[];
extern const int pwrok_signal_assert_count;
extern const struct intel_x86_pwrok_signal pwrok_signal_deassert_list[];
extern const int pwrok_signal_deassert_count;
#endif /* __CROS_EC_METEORLAKE_H */
|