OpenBIC
OpenSource Bridge-IC
m88rt51632.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 M88RT51632_H
18#define M88RT51632_H
19
20#include "hal_i2c.h"
21
22#define I2C_READ_CCODE_START 0x82
23#define I2C_READ_CCODE_END 0x81
24#define I2C_READ_BYTCNT 0x2
25#define I2C_WRITE_CCODE_START 0x87
26#define I2C_WRITE_BYTCNT 0x6
27
28#define RETIMER_VERSION 0x0104c
29#define RETIMER_ADDRPORT 0xfff0
30#define RETIMER_DATAPORT 0xfff4
31
32#define M88RT51632_TEMP_OFFSET 0x00
33#define M88RT51632_EEPROM_BASE_OFFSET 0x800000
34
35#define MAX_SENSORS 2
36
37#define IMAGE_PACKAGE_SIZE 0x40
38
39#define M88RT51632_MUTEX_LOCK_MS 1000
40
41#define MAX_RETRY 3
42
44bool m88rt51632_get_fw_version(I2C_MSG *msg, uint32_t *version);
45uint8_t m88rt51632_fw_update(I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf,
46 uint8_t flag);
47
48#endif
bool m88rt51632_get_fw_version(I2C_MSG *msg, uint32_t *version)
Definition: m88rt51632.c:243
bool m88rt51632_get_vendor_id(I2C_MSG *msg)
Definition: m88rt51632.c:154
uint8_t m88rt51632_fw_update(I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag)
Definition: m88rt51632.c:291
uint32_t version
Definition: pldm_base.h:1
uint32_t offset
Definition: pldm_firmware_update.h:0
Definition: hal_i2c.h:163