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_PWRSEQ_H
18#define PLAT_PWRSEQ_H
19
20#include "hal_gpio.h"
21#include "plat_gpio.h"
22
23#define DEFAULT_POWER_ON_SEQ 0x00
24#define DEFAULT_POWER_OFF_SEQ 0x0B
25#define NUMBER_OF_POWER_ON_SEQ 0x0A
26#define NUMBER_OF_POWER_OFF_SEQ 0x00
27#define CHKPWR_DELAY_MSEC 100
28#define DEV_RESET_DELAY_USEC 100
29
30#define CXL_POWER_OFF 0
31#define CXL_POWER_ON 1
32
36};
37
44};
45
53};
54
56 CONTROL_POWER_SEQ_01 = FM_P0V8_ASICA_EN,
57 CONTROL_POWER_SEQ_02 = FM_P0V8_ASICD_EN,
58 CONTROL_POWER_SEQ_03 = FM_P0V9_ASICA_EN,
59 CONTROL_POWER_SEQ_04 = P1V8_ASIC_EN_R,
60 CONTROL_POWER_SEQ_05 = PVPP_AB_EN_R,
61 CONTROL_POWER_SEQ_06 = PVPP_CD_EN_R,
62 CONTROL_POWER_SEQ_07 = FM_PVDDQ_AB_EN,
63 CONTROL_POWER_SEQ_08 = FM_PVDDQ_CD_EN,
64 CONTROL_POWER_SEQ_09 = PVTT_AB_EN_R,
65 CONTROL_POWER_SEQ_10 = PVTT_CD_EN_R,
66};
67
69 CHECK_POWER_SEQ_01 = P0V8_ASICA_PWRGD,
70 CHECK_POWER_SEQ_02 = P0V8_ASICD_PWRGD,
71 CHECK_POWER_SEQ_03 = P0V9_ASICA_PWRGD,
72 CHECK_POWER_SEQ_04 = P1V8_ASIC_PG_R,
73 CHECK_POWER_SEQ_05 = PVPP_AB_PG_R,
74 CHECK_POWER_SEQ_06 = PVPP_CD_PG_R,
75 CHECK_POWER_SEQ_07 = PWRGD_PVDDQ_AB,
76 CHECK_POWER_SEQ_08 = PWRGD_PVDDQ_CD,
77 CHECK_POWER_SEQ_09 = PVTT_AB_PG_R,
78 CHECK_POWER_SEQ_10 = PVTT_CD_PG_R,
79};
80
81void set_MB_DC_status(uint8_t gpio_num);
84void control_power_stage(uint8_t control_mode, uint8_t control_seq);
85int check_power_stage(uint8_t check_mode, uint8_t check_seq, uint8_t stage);
86
87#endif
void control_power_on_sequence(void *initial_stage, void *arvg0, void *arvg1)
Definition: plat_power_seq.c:1139
void control_power_stage(uint8_t control_mode, uint8_t control_seq)
Definition: plat_power_seq.c:292
void control_power_off_sequence()
Definition: plat_power_seq.c:1153
POWER_OFF_STAGE
Definition: plat_power_seq.h:50
CONTROL_POWER_MODE
Definition: plat_power_seq.h:31
@ DISABLE_POWER_MODE
Definition: plat_power_seq.h:34
@ ENABLE_POWER_MODE
Definition: plat_power_seq.h:32
POWER_ON_STAGE
Definition: plat_power_seq.h:38
CHECK_POWER_SEQ_NUM_MAPPING
Definition: plat_power_seq.h:63
@ 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
int check_power_stage(uint8_t check_mode, uint8_t check_seq)
Definition: plat_power_seq.c:313
@ 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_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
@ 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 set_MB_DC_status(uint8_t gpio_num)
Definition: plat_power_seq.c:37
@ CHECK_POWER_SEQ_10
Definition: plat_power_seq.h:64
@ CHECK_POWER_SEQ_09
Definition: plat_power_seq.h:63
@ DIMM_POWER_ON_STAGE1
Definition: plat_power_seq.h:26
@ DIMM_POWER_ON_STAGE3
Definition: plat_power_seq.h:28
@ DIMM_POWER_ON_STAGE2
Definition: plat_power_seq.h:27
@ ASIC_POWER_ON_STAGE
Definition: plat_power_seq.h:39
@ BOARD_POWER_ON_STAGE
Definition: plat_power_seq.h:43
CONTROL_POWER_SEQ_NUM_MAPPING
Definition: plat_power_seq.h:55