OpenBIC
OpenSource Bridge-IC
plat_pmic.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_PMIC_H
18#define PLAT_PMIC_H
19
20#include <stdint.h>
21
22#define MONITOR_PMIC_ERROR_STACK_SIZE 4096
23#define MONITOR_PMIC_ERROR_TIME_MS (3 * 1000) // 3s
24
25#define MAX_COUNT_PMIC_ERROR_OFFSET 7
26#define MAX_COUNT_PMIC_ERROR_TYPE 17
27
28#define GL_CPLD_BMC_CHANNEL_ADDR 0x1E // 8 bits
29#define PMIC_FAULT_STATUS_OFFSET 0x0B
30#define PMIC_CLEAR_STATUS_BITS4_OFFSET 0x14
31#define PMIC_VENDOR_PASSWORD_CONTROL_OFFSET 0x39
32
35int compare_pmic_error(uint8_t dimm_id, uint8_t *pmic_err_data, uint8_t pmic_err_data_len);
36void add_pmic_error_sel(uint8_t dimm_id, uint8_t error_type);
39void clear_pmic_error();
40
41#endif
int compare_pmic_error(uint8_t dimm_id, uint8_t *pmic_err_data)
Definition: plat_pmic.c:198
void add_pmic_error_sel(uint8_t dimm_id, uint8_t error_type)
Definition: plat_pmic.c:237
void start_monitor_pmic_error_thread()
Definition: plat_pmic.c:77
void clear_pmic_error()
Definition: plat_pmic.c:531
void read_pmic_error_when_dc_off()
Definition: plat_pmic.c:434
int get_pmic_fault_status()
Definition: plat_pmic.c:391
void monitor_pmic_error_via_i3c_handler()
Definition: plat_pmic.c:84