OpenBIC
OpenSource Bridge-IC
plat_power_seq.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef PLAT_PWR_SEQ_H
18#define PLAT_PWR_SEQ_H
19
20#define POWER_SEQ_HANDLER_STACK_SIZE 1000
21#define CHECKK_POWER_DELAY_MS 100
22
29};
30
38};
39
41 CONTROL_POWER_SEQ_01 = P0V75_ASIC_EN_BIC,
42 CONTROL_POWER_SEQ_02 = P0V8_BIC_ASIC_EN,
43 CONTROL_POWER_SEQ_03 = P0V85_BIC_ASIC_EN,
44 CONTROL_POWER_SEQ_04 = P1V2_BIC_ASIC_EN,
45 CONTROL_POWER_SEQ_05 = P1V8_BIC_ASIC_EN,
46 CONTROL_POWER_SEQ_06 = PVPP_AB_BIC_DIMM_EN,
47 CONTROL_POWER_SEQ_07 = PVPP_CD_BIC_DIMM_EN,
48 CONTROL_POWER_SEQ_08 = PVDDQ_AB_EN_BIC,
49 CONTROL_POWER_SEQ_09 = PVDDQ_CD_EN_BIC,
50 CONTROL_POWER_SEQ_10 = PVTT_AB_BIC_DIMM_EN,
51 CONTROL_POWER_SEQ_11 = PVTT_CD_BIC_DIMM_EN,
52};
53
55 CHECK_POWER_SEQ_01 = PWRGD_P0V75_ASIC_BIC,
56 CHECK_POWER_SEQ_02 = PWRGD_P0V8_ASIC,
57 CHECK_POWER_SEQ_03 = PWRGD_P0V85_ASIC,
58 CHECK_POWER_SEQ_04 = PWRGD_P1V2_ASIC,
59 CHECK_POWER_SEQ_05 = PWRGD_P1V8_ASIC,
60 CHECK_POWER_SEQ_06 = PWRGD_PVPP_AB,
61 CHECK_POWER_SEQ_07 = PWRGD_PVPP_CD,
62 CHECK_POWER_SEQ_08 = PWRGD_PVDDQ_AB_BIC,
63 CHECK_POWER_SEQ_09 = PWRGD_PVDDQ_CD_BIC,
64 CHECK_POWER_SEQ_10 = PWRGD_PVTT_AB,
65 CHECK_POWER_SEQ_11 = PWRGD_PVTT_CD,
66};
67
68void set_MB_DC_status(uint8_t gpio_num);
70void init_power_thread(uint8_t power_status);
74int power_on_handler(uint8_t control_stage);
75int power_off_handler(uint8_t control_stage);
76int enable_power(uint8_t control_stage);
77int disable_power(uint8_t control_stage);
78int check_power_enable(uint8_t control_stage);
79int check_power_disable(uint8_t control_stage);
80int check_power_status(uint8_t power_status, uint8_t power_seq);
81
82#endif
bool power_on_handler(uint8_t initial_stage)
Definition: plat_power_seq.c:817
POWER_OFF_STAGE
Definition: plat_power_seq.h:50
bool power_off_handler(uint8_t initial_stage)
Definition: plat_power_seq.c:983
POWER_ON_STAGE
Definition: plat_power_seq.h:38
@ CHECK_POWER_SEQ_03
Definition: plat_power_seq.h:66
@ CHECK_POWER_SEQ_01
Definition: plat_power_seq.h:64
@ CHECK_POWER_SEQ_06
Definition: plat_power_seq.h:69
@ CHECK_POWER_SEQ_05
Definition: plat_power_seq.h:68
@ CHECK_POWER_SEQ_07
Definition: plat_power_seq.h:70
@ CHECK_POWER_SEQ_02
Definition: plat_power_seq.h:65
@ CHECK_POWER_SEQ_08
Definition: plat_power_seq.h:71
@ CHECK_POWER_SEQ_04
Definition: plat_power_seq.h:67
void init_power_thread(uint8_t power_status)
Definition: plat_power_seq.c:65
int check_power_status(uint8_t power_status, uint8_t power_seq)
Definition: plat_power_seq.c:402
CONTROL_POWER_SEQ_PIN_MAPPING
Definition: plat_power_seq.h:40
@ CONTROL_POWER_SEQ_08
Definition: plat_power_seq.h:48
@ CONTROL_POWER_SEQ_09
Definition: plat_power_seq.h:49
@ CONTROL_POWER_SEQ_02
Definition: plat_power_seq.h:42
@ CONTROL_POWER_SEQ_10
Definition: plat_power_seq.h:50
@ CONTROL_POWER_SEQ_07
Definition: plat_power_seq.h:47
@ CONTROL_POWER_SEQ_11
Definition: plat_power_seq.h:51
@ CONTROL_POWER_SEQ_06
Definition: plat_power_seq.h:46
@ CONTROL_POWER_SEQ_03
Definition: plat_power_seq.h:43
@ CONTROL_POWER_SEQ_05
Definition: plat_power_seq.h:45
@ CONTROL_POWER_SEQ_01
Definition: plat_power_seq.h:41
@ CONTROL_POWER_SEQ_04
Definition: plat_power_seq.h:44
void execute_power_off_sequence()
Definition: plat_power_seq.c:97
@ ASIC_POWER_OFF_STAGE1
Definition: plat_power_seq.h:35
@ BOARD_POWER_OFF_STAGE
Definition: plat_power_seq.h:37
@ ASIC_POWER_OFF_STAGE2
Definition: plat_power_seq.h:36
@ DIMM_POWER_OFF_STAGE3
Definition: plat_power_seq.h:34
@ DIMM_POWER_OFF_STAGE2
Definition: plat_power_seq.h:33
@ DIMM_POWER_OFF_STAGE1
Definition: plat_power_seq.h:32
void abort_power_thread()
Definition: plat_isr.c:161
void execute_power_on_sequence()
Definition: plat_power_seq.c:87
void control_power_sequence()
Definition: plat_isr.c:116
void set_MB_DC_status(uint8_t gpio_num)
Definition: plat_power_seq.c:37
CHECK_POWER_SEQ_PIN_MAPPING
Definition: plat_power_seq.h:54
@ CHECK_POWER_SEQ_10
Definition: plat_power_seq.h:64
@ CHECK_POWER_SEQ_11
Definition: plat_power_seq.h:65
@ CHECK_POWER_SEQ_09
Definition: plat_power_seq.h:63
int check_power_enable(uint8_t control_stage)
Definition: plat_power_seq.c:216
int enable_power(uint8_t control_stage)
Definition: plat_power_seq.c:180
@ DIMM_POWER_ON_STAGE1
Definition: plat_power_seq.h:26
@ ASIC_POWER_ON_STAGE1
Definition: plat_power_seq.h:24
@ ASIC_POWER_ON_STAGE2
Definition: plat_power_seq.h:25
@ DIMM_POWER_ON_STAGE3
Definition: plat_power_seq.h:28
@ DIMM_POWER_ON_STAGE2
Definition: plat_power_seq.h:27
int disable_power(uint8_t control_stage)
Definition: plat_power_seq.c:291
int check_power_disable(uint8_t control_stage)
Definition: plat_power_seq.c:331