blob: 075974a128e4f863beae1a6a78f34a3acc84d6dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
/**
Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@file
PchRegsSmbus.h
@brief
Register names for VLV Smbus Device.
Conventions:
- Prefixes:
Definitions beginning with "R_" are registers
Definitions beginning with "B_" are bits within registers
Definitions beginning with "V_" are meaningful values of bits within the registers
Definitions beginning with "S_" are register sizes
Definitions beginning with "N_" are the bit position
- In general, PCH registers are denoted by "_PCH_" in register names
- Registers / bits that are different between PCH generations are denoted by
"_PCH_<generation_name>_" in register/bit names. e.g., "_PCH_VLV_"
- Registers / bits that are different between SKUs are denoted by "_<SKU_name>"
at the end of the register/bit names
- Registers / bits of new devices introduced in a PCH generation will be just named
as "_PCH_" without <generation_name> inserted.
**/
#ifndef _PCH_REGS_SMBUS_H_
#define _PCH_REGS_SMBUS_H_
///
/// SMBus Controller Registers (D31:F3)
///
#define PCI_DEVICE_NUMBER_PCH_SMBUS 31
#define PCI_FUNCTION_NUMBER_PCH_SMBUS 3
#define R_PCH_SMBUS_VENDOR_ID 0x00 // Vendor ID
#define V_PCH_SMBUS_VENDOR_ID V_PCH_INTEL_VENDOR_ID // Intel Vendor ID
#define R_PCH_SMBUS_DEVICE_ID 0x02 // Device ID
#define V_PCH_SMBUS_DEVICE_ID 0x0F12
#define R_PCH_SMBUS_PCICMD 0x04 // CMD register enables/disables, Memory/IO space access and interrupt
#define B_PCH_SMBUS_PCICMD_INTR_DIS BIT10 // Interrupt Disable
#define B_PCH_SMBUS_PCICMD_FBE BIT9 // FBE - reserved as '0'
#define B_PCH_SMBUS_PCICMD_SERR_EN BIT8 // SERR Enable - reserved as '0'
#define B_PCH_SMBUS_PCICMD_WCC BIT7 // Wait Cycle Control - reserved as '0'
#define B_PCH_SMBUS_PCICMD_PER BIT6 // Parity Error - reserved as '0'
#define B_PCH_SMBUS_PCICMD_VPS BIT5 // VGA Palette Snoop - reserved as '0'
#define B_PCH_SMBUS_PCICMD_PMWE BIT4 // Postable Memory Write Enable - reserved as '0'
#define B_PCH_SMBUS_PCICMD_SCE BIT3 // Special Cycle Enable - reserved as '0'
#define B_PCH_SMBUS_PCICMD_BME BIT2 // Bus Master Enable - reserved as '0'
#define B_PCH_SMBUS_PCICMD_MSE BIT1 // Memory Space Enable
#define B_PCH_SMBUS_PCICMD_IOSE BIT0 // I/O Space Enable
#define R_PCH_SMBUS_BASE 0x20 // The I/O memory bar
#define B_PCH_SMBUS_BASE_BAR 0x0000FFE0 // Base Address
#define B_PCH_SMBUS_BASE_IOSI BIT0 // IO Space Indicator
#define R_PCH_SMBUS_SVID 0x2C // Subsystem Vendor ID
#define B_PCH_SMBUS_SVID 0xFFFF // Subsystem Vendor ID
//
// SMBus I/O Registers
//
#define R_PCH_SMBUS_HSTS 0x00 // Host Status Register R/W
#define B_PCH_SMBUS_HSTS_ALL 0xFF
#define B_PCH_SMBUS_BYTE_DONE_STS BIT7 // Byte Done Status
#define B_PCH_SMBUS_IUS BIT6 // In Use Status
#define B_PCH_SMBUS_SMBALERT_STS BIT5 // SMBUS Alert
#define B_PCH_SMBUS_FAIL BIT4 // Failed
#define B_PCH_SMBUS_BERR BIT3 // Bus Error
#define B_PCH_SMBUS_DERR BIT2 // Device Error
#define B_PCH_SMBUS_ERRORS (B_PCH_SMBUS_FAIL | B_PCH_SMBUS_BERR | B_PCH_SMBUS_DERR)
#define B_PCH_SMBUS_INTR BIT1 // Interrupt
#define B_PCH_SMBUS_HBSY BIT0 // Host Busy
#define R_PCH_SMBUS_HCTL 0x02 // Host Control Register R/W
#define B_PCH_SMBUS_PEC_EN BIT7 // Packet Error Checking Enable
#define B_PCH_SMBUS_START BIT6 // Start
#define B_PCH_SMBUS_LAST_BYTE BIT5 // Last Byte
#define B_PCH_SMBUS_SMB_CMD 0x1C // SMB Command
#define V_PCH_SMBUS_SMB_CMD_BLOCK_PROCESS 0x1C // Block Process
#define V_PCH_SMBUS_SMB_CMD_IIC_READ 0x18 // I2C Read
#define V_PCH_SMBUS_SMB_CMD_BLOCK 0x14 // Block
#define V_PCH_SMBUS_SMB_CMD_PROCESS_CALL 0x10 // Process Call
#define V_PCH_SMBUS_SMB_CMD_WORD_DATA 0x0C // Word Data
#define V_PCH_SMBUS_SMB_CMD_BYTE_DATA 0x08 // Byte Data
#define V_PCH_SMBUS_SMB_CMD_BYTE 0x04 // Byte
#define V_PCH_SMBUS_SMB_CMD_QUICK 0x00 // Quick
#define B_PCH_SMBUS_KILL BIT1 // Kill
#define B_PCH_SMBUS_INTREN BIT0 // Interrupt Enable
#define R_PCH_SMBUS_HCMD 0x03 // Host Command Register R/W
#define B_PCH_SMBUS_HCMD 0xFF // Command to be transmitted
#define R_PCH_SMBUS_TSA 0x04 // Transmit Slave Address Register R/W
#define B_PCH_SMBUS_ADDRESS 0xFE // 7-bit address of the targeted slave
#define B_PCH_SMBUS_RW_SEL BIT0 // Direction of the host transfer, 1 = read, 0 = write
#define B_PCH_SMBUS_RW_SEL_READ 0x01 // Read
#define B_PCH_SMBUS_RW_SEL_WRITE 0x00 // Write
//
#define R_PCH_SMBUS_HD0 0x05 // Data 0 Register R/W
#define R_PCH_SMBUS_HD1 0x06 // Data 1 Register R/W
#define R_PCH_SMBUS_HBD 0x07 // Host Block Data Register R/W
#define R_PCH_SMBUS_PEC 0x08 // Packet Error Check Data Register R/W
#define R_PCH_SMBUS_RSA 0x09 // Receive Slave Address Register R/W
#define B_PCH_SMBUS_SLAVE_ADDR 0x7F // TCO slave address (Not used, reserved)
#define R_PCH_SMBUS_SD 0x0A // Receive Slave Data Register R/W
#define R_PCH_SMBUS_AUXS 0x0C // Auxiliary Status Register R/WC
#define B_PCH_SMBUS_CRCE BIT0 // CRC Error
//
#define R_PCH_SMBUS_AUXC 0x0D // Auxiliary Control Register R/W
#define B_PCH_SMBUS_E32B BIT1 // Enable 32-byte Buffer
#define B_PCH_SMBUS_AAC BIT0 // Automatically Append CRC
#define R_PCH_SMBUS_SMLC 0x0E // SMLINK Pin Control Register R/W
#define B_PCH_SMBUS_SMLINK_CLK_CTL BIT2 // Not supported
#define B_PCH_SMBUS_SMLINK1_CUR_STS BIT1 // Not supported
#define B_PCH_SMBUS_SMLINK0_CUR_STS BIT0 // Not supported
#define R_PCH_SMBUS_SMBC 0x0F // SMBus Pin Control Register R/W
#define B_PCH_SMBUS_SMBCLK_CTL BIT2 // SMBCLK Control
#define B_PCH_SMBUS_SMBDATA_CUR_STS BIT1 // SMBDATA Current Status
#define B_PCH_SMBUS_SMBCLK_CUR_STS BIT0 // SMBCLK Current Status
#define R_PCH_SMBUS_SSTS 0x10 // Slave Status Register R/WC
#define B_PCH_SMBUS_HOST_NOTIFY_STS BIT0 // Host Notify Status
#define R_PCH_SMBUS_SCMD 0x11 // Slave Command Register R/W
#define B_PCH_SMBUS_SMBALERT_DIS BIT2 // Not supported
#define B_PCH_SMBUS_HOST_NOTIFY_WKEN BIT1 // Host Notify Wake Enable
#define B_PCH_SMBUS_HOST_NOTIFY_INTREN BIT0 // Host Notify Interrupt Enable
#define R_PCH_SMBUS_NDA 0x14 // Notify Device Address Register RO
#define B_PCH_SMBUS_DEVICE_ADDRESS 0xFE // Device Address
#define R_PCH_SMBUS_NDLB 0x16 // Notify Data Low Byte Register RO
#define R_PCH_SMBUS_NDHB 0x17 // Notify Data High Byte Register RO
#endif
|