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#include "plat_gpio.h"
21
22#define DC_ON_DELAY5_SEC 5
23// BIC checks for CXL readiness every three seconds, with a maximum of 10 attempts
24#define CXL_READY_RETRY_TIMES 10
25#define CXL_READY_INTERVAL_SECONDS 3
26#define CXL_HEART_BEAT_LABEL "HB0"
27#define CHK_PWR_DELAY_MSEC 100
28#define SYS_CLK_STABLE_DELAY_MSEC 25
29#define PWR_ON_RST_DELAY_MSEC 25
30#define P1V8_POWER_OFF_DELAY_MSEC 3500
31
40};
41
51};
52
53void set_mb_dc_status(uint8_t gpio_num);
55bool is_power_controlled(uint8_t power_pin, uint8_t check_power_status, char *power_name);
56int check_powers_enabled(uint8_t pwr_stage);
57int check_powers_disabled(uint8_t pwr_stage);
58void enable_powers(uint8_t pwr_stage);
59void disable_powers(uint8_t pwr_stage);
60int power_on_handler(uint8_t power_stage);
61int power_off_handler(uint8_t power_stage);
66bool cxl_ready_access(uint8_t sensor_num);
67
68#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
uint8_t sensor_num
Definition: storage_handler.h:6
int check_power_status(uint8_t power_status, uint8_t power_seq)
Definition: plat_power_seq.c:402
void execute_power_off_sequence()
Definition: plat_power_seq.c:97
void execute_power_on_sequence()
Definition: plat_power_seq.c:87
int check_powers_enabled(uint8_t pwr_stage)
Definition: plat_power_seq.c:234
@ ASIC_POWER_OFF_STAGE_2
Definition: plat_power_seq.h:47
@ ASIC_POWER_OFF_STAGE_3
Definition: plat_power_seq.h:48
@ DIMM_POWER_OFF_STAGE_1
Definition: plat_power_seq.h:43
@ DIMM_POWER_OFF_STAGE_3
Definition: plat_power_seq.h:45
@ DIMM_POWER_OFF_STAGE_2
Definition: plat_power_seq.h:44
@ MAX_POWER_OFF_STAGES
Definition: plat_power_seq.h:50
@ CLK_POWER_OFF_STAGE
Definition: plat_power_seq.h:49
@ ASIC_POWER_OFF_STAGE_1
Definition: plat_power_seq.h:46
void enable_power_on_rst()
Definition: plat_power_seq.c:36
bool cxl_ready_access(uint8_t sensor_num)
Definition: plat_power_seq.c:408
bool is_power_controlled(uint8_t power_pin, uint8_t check_power_status, char *power_name)
Definition: plat_power_seq.c:360
int check_powers_disabled(uint8_t pwr_stage)
Definition: plat_power_seq.c:297
void enable_powers(uint8_t pwr_stage)
Definition: plat_power_seq.c:151
void disable_powers(uint8_t pwr_stage)
Definition: plat_power_seq.c:188
void cxl_ready_handler()
Definition: plat_power_seq.c:372
bool get_cxl_ready_status()
Definition: plat_power_seq.c:403
@ ASIC_POWER_ON_STAGE_2
Definition: plat_power_seq.h:35
@ ASIC_POWER_ON_STAGE_1
Definition: plat_power_seq.h:34
@ DIMM_POWER_ON_STAGE_2
Definition: plat_power_seq.h:37
@ DIMM_POWER_ON_STAGE_3
Definition: plat_power_seq.h:38
@ DIMM_POWER_ON_STAGE_1
Definition: plat_power_seq.h:36
@ MAX_POWER_ON_STAGES
Definition: plat_power_seq.h:39
@ CLK_POWER_ON_STAGE
Definition: plat_power_seq.h:33
void set_mb_dc_status(uint8_t gpio_num)
Definition: plat_power_seq.c:41