blob: d9e20b91ef4667c490fd56d884b2085f516df3de [file] [log] [blame]
Angel Pons182dbde2020-04-02 23:49:05 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Kyösti Mälkkia1ebbc42014-10-17 22:33:22 +03003
4#ifndef _SMBUS_SPD_H_
5#define _SMBUS_SPD_H_
6
7#define READ_BIT 0x01
8
9#define SMBUS_INTERRUPT_MASK 0x02
10#define HOSTBUSY_MASK 0x01
11
12#define SMBUS_READ_BYTE_COMMAND 0x48
13#define SMBUS_READ_COMMAND 0x44
14
15#define MAX_READ_TSC_COUNT (2000000000 / 10)
16
17#define PMIO_INDEX_REG 0xCD6
18#define PMIO_DATA_REG 0xCD7
19
20#define SMBUS_BAR_LOW_BYTE 0x2C
21#define SMBUS_BAR_HIGH_BYTE 0x2D
22
23#define SMBUS_STATUS_REG 0x00
24#define SMBUS_SLAVE_STATUS_REG 0x01
25#define SMBUS_COMMAND_REG 0x02
26#define SMBUS_CONTROL_REG 0x03
27#define SMBUS_HOST_CMD_REG 0x04
28#define SMBUS_DATA0_REG 0x05
29#define SMBUS_CLOCK_REG 0x0E
30
31#define STATUS__COMPLETED_SUCCESSFULLY 0x02
32
33#define SMBUS_FREQUENCY_CONST 66000000 / 4
34
35#endif