xref: /linux/drivers/misc/mei/hw-me-regs.h (revision 7bbbd0845818cffa9fa8ccfe52fa1cad58e7e4f2)
19fff0425STomas Winkler /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
29fff0425STomas Winkler /*
31e55b609STomas Winkler  * Copyright (c) 2003-2019, Intel Corporation. All rights reserved.
49dc64d6aSTomas Winkler  * Intel Management Engine Interface (Intel MEI) Linux driver
59fff0425STomas Winkler  */
69dc64d6aSTomas Winkler #ifndef _MEI_HW_MEI_REGS_H_
79dc64d6aSTomas Winkler #define _MEI_HW_MEI_REGS_H_
89dc64d6aSTomas Winkler 
99dc64d6aSTomas Winkler /*
109dc64d6aSTomas Winkler  * MEI device IDs
119dc64d6aSTomas Winkler  */
129dc64d6aSTomas Winkler #define MEI_DEV_ID_82946GZ    0x2974  /* 82946GZ/GL */
139dc64d6aSTomas Winkler #define MEI_DEV_ID_82G35      0x2984  /* 82G35 Express */
149dc64d6aSTomas Winkler #define MEI_DEV_ID_82Q965     0x2994  /* 82Q963/Q965 */
159dc64d6aSTomas Winkler #define MEI_DEV_ID_82G965     0x29A4  /* 82P965/G965 */
169dc64d6aSTomas Winkler 
179dc64d6aSTomas Winkler #define MEI_DEV_ID_82GM965    0x2A04  /* Mobile PM965/GM965 */
189dc64d6aSTomas Winkler #define MEI_DEV_ID_82GME965   0x2A14  /* Mobile GME965/GLE960 */
199dc64d6aSTomas Winkler 
209dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82Q35 0x29B4  /* 82Q35 Express */
219dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82G33 0x29C4  /* 82G33/G31/P35/P31 Express */
229dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82Q33 0x29D4  /* 82Q33 Express */
239dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_82X38 0x29E4  /* 82X38/X48 Express */
249dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_3200  0x29F4  /* 3200/3210 Server */
259dc64d6aSTomas Winkler 
269dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_6     0x28B4  /* Bearlake */
279dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_7     0x28C4  /* Bearlake */
289dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_8     0x28D4  /* Bearlake */
299dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_9     0x28E4  /* Bearlake */
309dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9_10    0x28F4  /* Bearlake */
319dc64d6aSTomas Winkler 
329dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_1    0x2A44  /* Cantiga */
339dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_2    0x2A54  /* Cantiga */
349dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_3    0x2A64  /* Cantiga */
359dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH9M_4    0x2A74  /* Cantiga */
369dc64d6aSTomas Winkler 
379dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_1    0x2E04  /* Eaglelake */
389dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_2    0x2E14  /* Eaglelake */
399dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_3    0x2E24  /* Eaglelake */
409dc64d6aSTomas Winkler #define MEI_DEV_ID_ICH10_4    0x2E34  /* Eaglelake */
419dc64d6aSTomas Winkler 
429dc64d6aSTomas Winkler #define MEI_DEV_ID_IBXPK_1    0x3B64  /* Calpella */
439dc64d6aSTomas Winkler #define MEI_DEV_ID_IBXPK_2    0x3B65  /* Calpella */
449dc64d6aSTomas Winkler 
459dc64d6aSTomas Winkler #define MEI_DEV_ID_CPT_1      0x1C3A  /* Couger Point */
469dc64d6aSTomas Winkler #define MEI_DEV_ID_PBG_1      0x1D3A  /* C600/X79 Patsburg */
479dc64d6aSTomas Winkler 
489dc64d6aSTomas Winkler #define MEI_DEV_ID_PPT_1      0x1E3A  /* Panther Point */
499dc64d6aSTomas Winkler #define MEI_DEV_ID_PPT_2      0x1CBA  /* Panther Point */
509dc64d6aSTomas Winkler #define MEI_DEV_ID_PPT_3      0x1DBA  /* Panther Point */
519dc64d6aSTomas Winkler 
5276a96359STomas Winkler #define MEI_DEV_ID_LPT_H      0x8C3A  /* Lynx Point H */
53838b3a6dSTomas Winkler #define MEI_DEV_ID_LPT_W      0x8D3A  /* Lynx Point - Wellsburg */
549dc64d6aSTomas Winkler #define MEI_DEV_ID_LPT_LP     0x9C3A  /* Lynx Point LP */
5576a96359STomas Winkler #define MEI_DEV_ID_LPT_HR     0x8CBA  /* Lynx Point H Refresh */
5676a96359STomas Winkler 
5776a96359STomas Winkler #define MEI_DEV_ID_WPT_LP     0x9CBA  /* Wildcat Point LP */
58d238a0ecSAlexander Usyskin #define MEI_DEV_ID_WPT_LP_2   0x9CBB  /* Wildcat Point LP 2 */
595e6533a6STomas Winkler 
601625c7ecSTomas Winkler #define MEI_DEV_ID_SPT        0x9D3A  /* Sunrise Point */
611625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_2      0x9D3B  /* Sunrise Point 2 */
62372a8298STomas Winkler #define MEI_DEV_ID_SPT_3      0x9D3E  /* Sunrise Point 3 (iToutch) */
631625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_H      0xA13A  /* Sunrise Point H */
641625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_H_2    0xA13B  /* Sunrise Point H 2 */
65dd16f6cdSTomas Winkler 
669ff2007bSTomas Winkler #define MEI_DEV_ID_LBG        0xA1BA  /* Lewisburg (SPT) */
679ff2007bSTomas Winkler 
68dd16f6cdSTomas Winkler #define MEI_DEV_ID_BXT_M      0x1A9A  /* Broxton M */
69dd16f6cdSTomas Winkler #define MEI_DEV_ID_APL_I      0x5A9A  /* Apollo Lake I */
70dd16f6cdSTomas Winkler 
71f7ee8eadSTomas Winkler #define MEI_DEV_ID_DNV_IE     0x19E5  /* Denverton IE */
72f7ee8eadSTomas Winkler 
73688cb678STomas Winkler #define MEI_DEV_ID_GLK        0x319A  /* Gemini Lake */
74688cb678STomas Winkler 
75ac182e8aSAlexander Usyskin #define MEI_DEV_ID_KBP        0xA2BA  /* Kaby Point */
76ac182e8aSAlexander Usyskin #define MEI_DEV_ID_KBP_2      0xA2BB  /* Kaby Point 2 */
774afc339eSTomas Winkler #define MEI_DEV_ID_KBP_3      0xA2BE  /* Kaby Point 3 (iTouch) */
78ac182e8aSAlexander Usyskin 
79f8f4aa68SAlexander Usyskin #define MEI_DEV_ID_CNP_LP     0x9DE0  /* Cannon Point LP */
80c23df7deSAlexander Usyskin #define MEI_DEV_ID_CNP_LP_3   0x9DE4  /* Cannon Point LP 3 (iTouch) */
81f8f4aa68SAlexander Usyskin #define MEI_DEV_ID_CNP_H      0xA360  /* Cannon Point H */
82c23df7deSAlexander Usyskin #define MEI_DEV_ID_CNP_H_3    0xA364  /* Cannon Point H 3 (iTouch) */
83f8f4aa68SAlexander Usyskin 
844d86dfd3STomas Winkler #define MEI_DEV_ID_CMP_LP     0x02e0  /* Comet Point LP */
854d86dfd3STomas Winkler #define MEI_DEV_ID_CMP_LP_3   0x02e4  /* Comet Point LP 3 (iTouch) */
86559e575aSTomas Winkler 
8782b29b9fSAlexander Usyskin #define MEI_DEV_ID_CMP_V      0xA3BA  /* Comet Point Lake V */
884d86dfd3STomas Winkler 
89559e575aSTomas Winkler #define MEI_DEV_ID_CMP_H      0x06e0  /* Comet Lake H */
90559e575aSTomas Winkler #define MEI_DEV_ID_CMP_H_3    0x06e4  /* Comet Lake H 3 (iTouch) */
91559e575aSTomas Winkler 
9299397d33SAlexander Usyskin #define MEI_DEV_ID_CDF        0x18D3  /* Cedar Fork */
9399397d33SAlexander Usyskin 
94efe814e9STomas Winkler #define MEI_DEV_ID_ICP_LP     0x34E0  /* Ice Lake Point LP */
9575c10c5eSAndy Shevchenko #define MEI_DEV_ID_ICP_N      0x38E0  /* Ice Lake Point N */
96efe814e9STomas Winkler 
970db4a15dSTomas Winkler #define MEI_DEV_ID_JSP_N      0x4DE0  /* Jasper Lake Point N */
980db4a15dSTomas Winkler 
99587f1740STomas Winkler #define MEI_DEV_ID_TGP_LP     0xA0E0  /* Tiger Lake Point LP */
1008c289ea0SAlexander Usyskin #define MEI_DEV_ID_TGP_H      0x43E0  /* Tiger Lake Point H */
101587f1740STomas Winkler 
1021be8624aSAlexander Usyskin #define MEI_DEV_ID_MCC        0x4B70  /* Mule Creek Canyon (EHL) */
1031be8624aSAlexander Usyskin #define MEI_DEV_ID_MCC_4      0x4B75  /* Mule Creek Canyon 4 (EHL) */
1041be8624aSAlexander Usyskin 
105372726cbSTomas Winkler #define MEI_DEV_ID_EBG        0x1BE0  /* Emmitsburg WS */
106372726cbSTomas Winkler 
107f7545efaSAlexander Usyskin #define MEI_DEV_ID_ADP_S      0x7AE8  /* Alder Lake Point S */
108930c922aSAlexander Usyskin #define MEI_DEV_ID_ADP_LP     0x7A60  /* Alder Lake Point LP */
1090df74278STomas Winkler #define MEI_DEV_ID_ADP_P      0x51E0  /* Alder Lake Point P */
110*7bbbd084SAlexander Usyskin #define MEI_DEV_ID_ADP_N      0x54E0  /* Alder Lake Point N */
111f7545efaSAlexander Usyskin 
1129dc64d6aSTomas Winkler /*
1139dc64d6aSTomas Winkler  * MEI HW Section
1149dc64d6aSTomas Winkler  */
1159dc64d6aSTomas Winkler 
116edca5ea3SAlexander Usyskin /* Host Firmware Status Registers in PCI Config Space */
117edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_1         0x40
118bb9f4d26SAlexander Usyskin #  define PCI_CFG_HFS_1_D0I3_MSK     0x80000000
1194d3c6c8eSTomas Winkler #  define PCI_CFG_HFS_1_OPMODE_MSK 0xf0000 /* OP MODE Mask: SPS <= 4.0 */
1204d3c6c8eSTomas Winkler #  define PCI_CFG_HFS_1_OPMODE_SPS 0xf0000 /* SPS SKU : SPS <= 4.0 */
121edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_2         0x48
122edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_3         0x60
123f76d77f5STomas Winkler #  define PCI_CFG_HFS_3_FW_SKU_MSK   0x00000070
124ccdf6f80SAlexander Usyskin #  define PCI_CFG_HFS_3_FW_SKU_IGN   0x00000000
125f76d77f5STomas Winkler #  define PCI_CFG_HFS_3_FW_SKU_SPS   0x00000060
126edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_4         0x64
127edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_5         0x68
128edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_6         0x6C
129edca5ea3SAlexander Usyskin 
1309dc64d6aSTomas Winkler /* MEI registers */
1319dc64d6aSTomas Winkler /* H_CB_WW - Host Circular Buffer (CB) Write Window register */
1329dc64d6aSTomas Winkler #define H_CB_WW    0
1339dc64d6aSTomas Winkler /* H_CSR - Host Control Status register */
1349dc64d6aSTomas Winkler #define H_CSR      4
1359dc64d6aSTomas Winkler /* ME_CB_RW - ME Circular Buffer Read Window register (read only) */
1369dc64d6aSTomas Winkler #define ME_CB_RW   8
1379dc64d6aSTomas Winkler /* ME_CSR_HA - ME Control Status Host Access register (read only) */
1389dc64d6aSTomas Winkler #define ME_CSR_HA  0xC
139ad4d355bSTomas Winkler /* H_HGC_CSR - PGI register */
140ad4d355bSTomas Winkler #define H_HPG_CSR  0x10
14111830486STomas Winkler /* H_D0I3C - D0I3 Control  */
14211830486STomas Winkler #define H_D0I3C    0x800
1439dc64d6aSTomas Winkler 
1449dc64d6aSTomas Winkler /* register bits of H_CSR (Host Control Status register) */
1459dc64d6aSTomas Winkler /* Host Circular Buffer Depth - maximum number of 32-bit entries in CB */
1469dc64d6aSTomas Winkler #define H_CBD             0xFF000000
1479dc64d6aSTomas Winkler /* Host Circular Buffer Write Pointer */
1489dc64d6aSTomas Winkler #define H_CBWP            0x00FF0000
1499dc64d6aSTomas Winkler /* Host Circular Buffer Read Pointer */
1509dc64d6aSTomas Winkler #define H_CBRP            0x0000FF00
1519dc64d6aSTomas Winkler /* Host Reset */
1529dc64d6aSTomas Winkler #define H_RST             0x00000010
1539dc64d6aSTomas Winkler /* Host Ready */
1549dc64d6aSTomas Winkler #define H_RDY             0x00000008
1559dc64d6aSTomas Winkler /* Host Interrupt Generate */
1569dc64d6aSTomas Winkler #define H_IG              0x00000004
1579dc64d6aSTomas Winkler /* Host Interrupt Status */
1589dc64d6aSTomas Winkler #define H_IS              0x00000002
1599dc64d6aSTomas Winkler /* Host Interrupt Enable */
1609dc64d6aSTomas Winkler #define H_IE              0x00000001
16111830486STomas Winkler /* Host D0I3 Interrupt Enable */
16211830486STomas Winkler #define H_D0I3C_IE        0x00000020
16311830486STomas Winkler /* Host D0I3 Interrupt Status */
16411830486STomas Winkler #define H_D0I3C_IS        0x00000040
1659dc64d6aSTomas Winkler 
1661fa55b4eSAlexander Usyskin /* H_CSR masks */
1671fa55b4eSAlexander Usyskin #define H_CSR_IE_MASK     (H_IE | H_D0I3C_IE)
1681fa55b4eSAlexander Usyskin #define H_CSR_IS_MASK     (H_IS | H_D0I3C_IS)
1691fa55b4eSAlexander Usyskin 
1709dc64d6aSTomas Winkler /* register bits of ME_CSR_HA (ME Control Status Host Access register) */
1719dc64d6aSTomas Winkler /* ME CB (Circular Buffer) Depth HRA (Host Read Access) - host read only
1729dc64d6aSTomas Winkler access to ME_CBD */
1739dc64d6aSTomas Winkler #define ME_CBD_HRA        0xFF000000
1749dc64d6aSTomas Winkler /* ME CB Write Pointer HRA - host read only access to ME_CBWP */
1759dc64d6aSTomas Winkler #define ME_CBWP_HRA       0x00FF0000
1769dc64d6aSTomas Winkler /* ME CB Read Pointer HRA - host read only access to ME_CBRP */
1779dc64d6aSTomas Winkler #define ME_CBRP_HRA       0x0000FF00
178ad4d355bSTomas Winkler /* ME Power Gate Isolation Capability HRA  - host ready only access */
179ad4d355bSTomas Winkler #define ME_PGIC_HRA       0x00000040
1809dc64d6aSTomas Winkler /* ME Reset HRA - host read only access to ME_RST */
1819dc64d6aSTomas Winkler #define ME_RST_HRA        0x00000010
1829dc64d6aSTomas Winkler /* ME Ready HRA - host read only access to ME_RDY */
1839dc64d6aSTomas Winkler #define ME_RDY_HRA        0x00000008
1849dc64d6aSTomas Winkler /* ME Interrupt Generate HRA - host read only access to ME_IG */
1859dc64d6aSTomas Winkler #define ME_IG_HRA         0x00000004
1869dc64d6aSTomas Winkler /* ME Interrupt Status HRA - host read only access to ME_IS */
1879dc64d6aSTomas Winkler #define ME_IS_HRA         0x00000002
1889dc64d6aSTomas Winkler /* ME Interrupt Enable HRA - host read only access to ME_IE */
1899dc64d6aSTomas Winkler #define ME_IE_HRA         0x00000001
19052f6efdfSAlexander Usyskin /* TRC control shadow register */
19152f6efdfSAlexander Usyskin #define ME_TRC            0x00000030
192ad4d355bSTomas Winkler 
19311830486STomas Winkler /* H_HPG_CSR register bits */
194ad4d355bSTomas Winkler #define H_HPG_CSR_PGIHEXR 0x00000001
195ad4d355bSTomas Winkler #define H_HPG_CSR_PGI     0x00000002
196ad4d355bSTomas Winkler 
19711830486STomas Winkler /* H_D0I3C register bits */
19811830486STomas Winkler #define H_D0I3C_CIP      0x00000001
19911830486STomas Winkler #define H_D0I3C_IR       0x00000002
20011830486STomas Winkler #define H_D0I3C_I3       0x00000004
20111830486STomas Winkler #define H_D0I3C_RR       0x00000008
20211830486STomas Winkler 
2039dc64d6aSTomas Winkler #endif /* _MEI_HW_MEI_REGS_H_ */
204