summaryrefslogtreecommitdiff
path: root/ReferenceCode/Chipset/LynxPoint/Include/PchRegs/PchRegsSerialIo.h
blob: c99d758e231fb632be5e4a1d0ea7fe2aea33b153 (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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/** @file
  Register names for PCH Serial IO Controllers

  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_CPT_"
  - 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.

@copyright
  Copyright (c) 2012 Intel Corporation. All rights reserved
  This software and associated documentation (if any) is furnished
  under a license and may only be used or copied in accordance
  with the terms of the license. Except as permitted by such
  license, no part of this software or documentation may be
  reproduced, stored in a retrieval system, or transmitted in any
  form or by any means without the express written consent of
  Intel Corporation.

  This file contains an 'Intel Peripheral Driver' and uniquely
  identified as "Intel Reference Module" and is
  licensed for Intel CPUs and chipsets under the terms of your
  license agreement with Intel or your vendor.  This file may
  be modified by the user, subject to additional terms of the
  license agreement
**/
#ifndef _PCH_REGS_SERIAL_IO_H_
#define _PCH_REGS_SERIAL_IO_H_

#ifdef SERIAL_IO_FLAG

//
//  Serial IO DMA Controller Registers (D21:F0)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_DMA          21
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_DMA        0
#define R_PCH_LP_SERIAL_IO_DMA_VENDOR_ID                0x00
#define V_PCH_LP_SERIAL_IO_DMA_VENDOR_ID                V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_DMA_DEVICE_ID                0x02
#define V_PCH_LP_SERIAL_IO_DMA_DEVICE_ID                0x9C60

//
//  Serial IO I2C0 Controller Registers (D21:F1)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_I2C0         21
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_I2C0       1
#define R_PCH_LP_SERIAL_IO_I2C0_VENDOR_ID               0x00
#define V_PCH_LP_SERIAL_IO_I2C0_VENDOR_ID               V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_I2C0_DEVICE_ID               0x02
#define V_PCH_LP_SERIAL_IO_I2C0_DEVICE_ID               0x9C61

//
//  Serial IO I2C0 Controller Registers (D21:F2)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_I2C1         21
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_I2C1       2
#define R_PCH_LP_SERIAL_IO_I2C1_VENDOR_ID               0x00
#define V_PCH_LP_SERIAL_IO_I2C1_VENDOR_ID               V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_I2C1_DEVICE_ID               0x02
#define V_PCH_LP_SERIAL_IO_I2C1_DEVICE_ID               0x9C62

//
//  Serial IO SPI0 Controller Registers (D21:F3)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_SPI0         21
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_SPI0       3
#define R_PCH_LP_SERIAL_IO_SPI0_VENDOR_ID               0x00
#define V_PCH_LP_SERIAL_IO_SPI0_VENDOR_ID               V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_SPI0_DEVICE_ID               0x02
#define V_PCH_LP_SERIAL_IO_SPI0_DEVICE_ID               0x9C65

//
//  Serial IO SPI1 Controller Registers (D21:F4)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_SPI1         21
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_SPI1       4
#define R_PCH_LP_SERIAL_IO_SPI1_VENDOR_ID               0x00
#define V_PCH_LP_SERIAL_IO_SPI1_VENDOR_ID               V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_SPI1_DEVICE_ID               0x02
#define V_PCH_LP_SERIAL_IO_SPI1_DEVICE_ID               0x9C66

//
//  Serial IO UART0 Controller Registers (D21:F5)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_UART0        21
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_UART0      5
#define R_PCH_LP_SERIAL_IO_UART0_VENDOR_ID              0x00
#define V_PCH_LP_SERIAL_IO_UART0_VENDOR_ID              V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_UART0_DEVICE_ID              0x02
#define V_PCH_LP_SERIAL_IO_UART0_DEVICE_ID              0x9C63

//
//  Serial IO UART1 Controller Registers (D21:F6)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_UART1        21
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_UART1      6
#define R_PCH_LP_SERIAL_IO_UART1_VENDOR_ID              0x00
#define V_PCH_LP_SERIAL_IO_UART1_VENDOR_ID              V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_UART1_DEVICE_ID              0x02
#define V_PCH_LP_SERIAL_IO_UART1_DEVICE_ID              0x9C64

//
//  Serial IO SDIO Controller Registers (D23:F0)
//
#define PCI_DEVICE_NUMBER_PCH_LP_SERIAL_IO_SDIO         23
#define PCI_FUNCTION_NUMBER_PCH_LP_SERIAL_IO_SDIO       0
#define R_PCH_LP_SERIAL_IO_SDIO_VENDOR_ID               0x00
#define V_PCH_LP_SERIAL_IO_SDIO_VENDOR_ID               V_PCH_INTEL_VENDOR_ID
#define R_PCH_LP_SERIAL_IO_SDIO_DEVICE_ID               0x02
#define V_PCH_LP_SERIAL_IO_SDIO_DEVICE_ID               0x9C35
#define R_PCH_LP_SERIAL_IO_SDIO_PPR_CMD12               0x3C
#define R_PCH_LP_SERIAL_IO_SDIO_PPR_GEN                 0x1008
#define B_PCH_LP_SERIAL_IO_SDIO_PPR_GEN_LTR_MODE        BIT2
#define R_PCH_LP_SERIAL_IO_SDIO_PPR_SW_LTR              0x1010


#define R_PCH_LP_SERIAL_IO_SDIO_SLAVE_DELAY_DDR50_MODE   0x1034

#define V_LP_SERIAL_IO_DEV_MIN_FUN                      0
#define V_LP_SERIAL_IO_DEV_MAX_FUN                      6

//
// Serial IO Controllers General PCI Configuration Registers
//
#define R_PCH_LP_SERIAL_IO_VENDOR_ID                    0x00
#define R_PCH_LP_SERIAL_IO_DEVICE_ID                    0x02
#define R_PCH_LP_SERIAL_IO_COMMAND                      0x04
#define B_PCH_LP_SERIAL_IO_COMMAND_BME                  BIT2
#define B_PCH_LP_SERIAL_IO_COMMAND_MSE                  BIT1
#define R_PCH_LP_SERIAL_IO_BAR0                         0x10
#define B_PCH_LP_SERIAL_IO_BAR0_BAR                     0xFFFFF000
#define R_PCH_LP_SERIAL_IO_BAR1                         0x14
#define B_PCH_LP_SERIAL_IO_BAR1_BAR                     0xFFFFF000
#define V_PCH_LP_SERIAL_IO_BAR_SIZE                     (4 * 1024)
#define V_PCH_LP_SERIAL_SDIO_BAR_SIZE                   (8 * 1024)
#define N_PCH_LP_SERIAL_IO_BAR_ALIGNMENT                12
#define R_PCH_LP_SERIAL_IO_PME_CTRL_STS                 0x84
#define B_PCH_LP_SERIAL_IO_PME_CTRL_STS_PWR_ST          (BIT1| BIT0)

//
// Serial IO Controllers Private Registers
//
#define R_PCH_LP_SERIAL_IO_PPR_RST                      0x804
#define B_PCH_LP_SERIAL_IO_PPR_RST_APB                  BIT0
#define B_PCH_LP_SERIAL_IO_PPR_RST_FUNC                 BIT1
#define R_PCH_LP_SERIAL_IO_PPR_GEN                      0x808
#define B_PCH_LP_SERIAL_IO_PPR_GEN_LTR_MODE             BIT2
#define B_PCH_LP_SERIAL_IO_PPR_GEN_IO_VOLTAGE_SEL       BIT3
#define R_PCH_LP_SERIAL_IO_PPR_AUTO_LTR                 0x814

#define R_PCH_LP_SERIAL_IO_GPIODF0                      0x154
#define B_PCH_LP_SERIAL_IO_GPIODF0_SPI_IDLE_DET_EN      BIT0
#define B_PCH_LP_SERIAL_IO_GPIODF0_I2C_IDLE_DET_EN      BIT1
#define B_PCH_LP_SERIAL_IO_GPIODF0_UART_IDLE_DET_EN     BIT2
#define B_PCH_LP_SERIAL_IO_GPIODF0_DMA_IDLE_DET_EN      BIT3
#define B_PCH_LP_SERIAL_IO_GPIODF0_SDIO_IDLE_DET_EN     BIT4

#endif // SERIAL_IO_FLAG
#endif