OpenBIC
OpenSource Bridge-IC
bcm85658.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 BCM85658_H
18#define BCM85658_H
19
20#include "hal_i2c.h"
21
22#define BCM85658_MUTEX_LOCK_MS 1000
23#define IS_BCM85658_TEMP_VAILD(r) (((r) >> 11) & 0x1)
24#define BCM85658_TEMP_SENSOR_DATA_GET(r) ((r) & 0x7ff)
25
26#define INTEL_SMBUS_RD32_4ADDR_D 0x09
27#define SMBUS_WR_BLOCK_CMD 0xA7
28#define SMBUS_PROCESS_BLOCK_CMD 0xA9
29#define BCM85658_TEMP_OFFSET 0x981c
30#define BCM85658_TEMP_OFFSET_32B 0x6000981c
31#define BCM85658_VERSION_OFFSET 0x600004a0
32
33bool bcm85658_get_fw_version(I2C_MSG *msg, uint8_t *version);
34uint8_t pcie_retimer_fw_update(I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf,
35 uint8_t flag);
36
37#endif
bool bcm85658_get_fw_version(I2C_MSG *msg, uint8_t *version)
Definition: bcm85658.c:28
uint8_t pcie_retimer_fw_update(I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag)
Definition: pt5161l.c:854
uint32_t version
Definition: pldm_base.h:1
uint32_t offset
Definition: pldm_firmware_update.h:0
Definition: hal_i2c.h:163