OpenBIC
OpenSource Bridge-IC
pex90144.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 PEX_89000_H
18#define PEX_89000_H
19
20#include <stdint.h>
21#include "sensor.h"
22
24
25typedef enum pex_access {
31
36};
37
38/* sensor offset */
41};
42
43typedef struct {
44 uint8_t idx; // Create index based on init variable
45 struct k_mutex mutex;
47 sys_snode_t node; // linked list node
49
72};
73
74/* Note: Could be used only after pex89000 sensor init successed */
75uint8_t pex90144_access_engine(uint8_t bus, uint8_t addr, uint8_t idx, pex_access_t key,
76 uint32_t *resp);
77uint8_t pex90144_init(sensor_cfg *cfg);
78
79#endif
uint8_t idx
Definition: plat_util.c:42
uint8_t addr
Definition: isl69259.c:0
pex_access
Definition: pex89000.h:25
PEX_CCR_SYSTEM_ERROR_STATUS
Definition: pex89000.h:56
pex_sensor_offset
Definition: pex89000.h:44
enum pex_dev pex_dev_t
pex_dev
Definition: pex89000.h:23
pex_api_ret
Definition: pex89000.h:37
enum pex_access pex_access_t
@ pex_access_sbr_ver
Definition: pex90144.h:28
@ pex_access_temp
Definition: pex90144.h:26
@ pex_access_unknown
Definition: pex90144.h:29
@ pex_access_id
Definition: pex90144.h:27
@ PEX_PSB_STATION_FATAL_ERROR
Definition: pex90144.h:71
@ PEX_WDT0_SYSTEM_RESET
Definition: pex90144.h:56
@ PEX_WDT1_CPU_RESET
Definition: pex90144.h:57
@ PEX_ARM_FLASH_SIGNATURE_FAIL
Definition: pex90144.h:54
@ PEX_STATION_1_FATAL_ERROR
Definition: pex90144.h:63
@ PEX_STATION_0_FATAL_ERROR
Definition: pex90144.h:62
@ PEX_STATION_5_FATAL_ERROR
Definition: pex90144.h:67
@ PEX_WDT1_SYSTEM_RESET
Definition: pex90144.h:58
@ PEX_STATION_4_FATAL_ERROR
Definition: pex90144.h:66
@ PEX_STATION_7_FATAL_ERROR
Definition: pex90144.h:69
@ PEX_SECURE_BOOT_FAIL
Definition: pex90144.h:60
@ PEX_SYSTEM_ERROR
Definition: pex90144.h:51
@ PEX_STATION_3_FATAL_ERROR
Definition: pex90144.h:65
@ PEX_WDT0_CPU_RESET
Definition: pex90144.h:55
@ PEX_SBR_LOAD_FAIL
Definition: pex90144.h:61
@ PEX_LOCAL_CPU_PARITY_ERROR
Definition: pex90144.h:59
@ PEX_STATION_8_FATAL_ERROR
Definition: pex90144.h:70
@ PEX_STATION_6_FATAL_ERROR
Definition: pex90144.h:68
@ PEX_FATAL_ERROR
Definition: pex90144.h:52
@ PEX_POR_BISR_TIMEOUT
Definition: pex90144.h:53
@ PEX_STATION_2_FATAL_ERROR
Definition: pex90144.h:64
uint8_t pex90144_init(sensor_cfg *cfg)
Definition: pex90144.c:421
uint8_t pex90144_access_engine(uint8_t bus, uint8_t addr, uint8_t idx, pex_access_t key, uint32_t *resp)
Definition: pex90144.c:262
@ PEX_TEMP
Definition: pex90144.h:40
enum pex_dev pex_dev_t
@ pex_dev_pcie_switch
Definition: pex90144.h:23
@ pex_dev_unknown
Definition: pex90144.h:23
@ pex_api_success
Definition: pex90144.h:33
@ pex_api_mutex_err
Definition: pex90144.h:35
@ pex_api_unspecific_err
Definition: pex90144.h:34
enum pex_access pex_access_t
Definition: sensor.h:262
Definition: pex90144.h:43
pex_dev_t pex_type
Definition: pex90144.h:46
sys_snode_t node
Definition: pex90144.h:47
uint8_t idx
Definition: pex90144.h:44