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 */ 621625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_H 0xA13A /* Sunrise Point H */ 631625c7ecSTomas Winkler #define MEI_DEV_ID_SPT_H_2 0xA13B /* Sunrise Point H 2 */ 64dd16f6cdSTomas Winkler 659ff2007bSTomas Winkler #define MEI_DEV_ID_LBG 0xA1BA /* Lewisburg (SPT) */ 669ff2007bSTomas Winkler 67dd16f6cdSTomas Winkler #define MEI_DEV_ID_BXT_M 0x1A9A /* Broxton M */ 68dd16f6cdSTomas Winkler #define MEI_DEV_ID_APL_I 0x5A9A /* Apollo Lake I */ 69dd16f6cdSTomas Winkler 70f7ee8eadSTomas Winkler #define MEI_DEV_ID_DNV_IE 0x19E5 /* Denverton IE */ 71f7ee8eadSTomas Winkler 72688cb678STomas Winkler #define MEI_DEV_ID_GLK 0x319A /* Gemini Lake */ 73688cb678STomas Winkler 74ac182e8aSAlexander Usyskin #define MEI_DEV_ID_KBP 0xA2BA /* Kaby Point */ 75ac182e8aSAlexander Usyskin #define MEI_DEV_ID_KBP_2 0xA2BB /* Kaby Point 2 */ 76ac182e8aSAlexander Usyskin 77f8f4aa68SAlexander Usyskin #define MEI_DEV_ID_CNP_LP 0x9DE0 /* Cannon Point LP */ 782a4ac172STomas Winkler #define MEI_DEV_ID_CNP_LP_4 0x9DE4 /* Cannon Point LP 4 (iTouch) */ 79f8f4aa68SAlexander Usyskin #define MEI_DEV_ID_CNP_H 0xA360 /* Cannon Point H */ 802a4ac172STomas Winkler #define MEI_DEV_ID_CNP_H_4 0xA364 /* Cannon Point H 4 (iTouch) */ 81f8f4aa68SAlexander Usyskin 824d86dfd3STomas Winkler #define MEI_DEV_ID_CMP_LP 0x02e0 /* Comet Point LP */ 834d86dfd3STomas Winkler #define MEI_DEV_ID_CMP_LP_3 0x02e4 /* Comet Point LP 3 (iTouch) */ 84559e575aSTomas Winkler 8582b29b9fSAlexander Usyskin #define MEI_DEV_ID_CMP_V 0xA3BA /* Comet Point Lake V */ 864d86dfd3STomas Winkler 87559e575aSTomas Winkler #define MEI_DEV_ID_CMP_H 0x06e0 /* Comet Lake H */ 88559e575aSTomas Winkler #define MEI_DEV_ID_CMP_H_3 0x06e4 /* Comet Lake H 3 (iTouch) */ 89559e575aSTomas Winkler 90efe814e9STomas Winkler #define MEI_DEV_ID_ICP_LP 0x34E0 /* Ice Lake Point LP */ 91efe814e9STomas Winkler 92*0db4a15dSTomas Winkler #define MEI_DEV_ID_JSP_N 0x4DE0 /* Jasper Lake Point N */ 93*0db4a15dSTomas Winkler 94587f1740STomas Winkler #define MEI_DEV_ID_TGP_LP 0xA0E0 /* Tiger Lake Point LP */ 95587f1740STomas Winkler 961be8624aSAlexander Usyskin #define MEI_DEV_ID_MCC 0x4B70 /* Mule Creek Canyon (EHL) */ 971be8624aSAlexander Usyskin #define MEI_DEV_ID_MCC_4 0x4B75 /* Mule Creek Canyon 4 (EHL) */ 981be8624aSAlexander Usyskin 999dc64d6aSTomas Winkler /* 1009dc64d6aSTomas Winkler * MEI HW Section 1019dc64d6aSTomas Winkler */ 1029dc64d6aSTomas Winkler 103edca5ea3SAlexander Usyskin /* Host Firmware Status Registers in PCI Config Space */ 104edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_1 0x40 105bb9f4d26SAlexander Usyskin # define PCI_CFG_HFS_1_D0I3_MSK 0x80000000 106edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_2 0x48 107edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_3 0x60 108edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_4 0x64 109edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_5 0x68 110edca5ea3SAlexander Usyskin #define PCI_CFG_HFS_6 0x6C 111edca5ea3SAlexander Usyskin 1129dc64d6aSTomas Winkler /* MEI registers */ 1139dc64d6aSTomas Winkler /* H_CB_WW - Host Circular Buffer (CB) Write Window register */ 1149dc64d6aSTomas Winkler #define H_CB_WW 0 1159dc64d6aSTomas Winkler /* H_CSR - Host Control Status register */ 1169dc64d6aSTomas Winkler #define H_CSR 4 1179dc64d6aSTomas Winkler /* ME_CB_RW - ME Circular Buffer Read Window register (read only) */ 1189dc64d6aSTomas Winkler #define ME_CB_RW 8 1199dc64d6aSTomas Winkler /* ME_CSR_HA - ME Control Status Host Access register (read only) */ 1209dc64d6aSTomas Winkler #define ME_CSR_HA 0xC 121ad4d355bSTomas Winkler /* H_HGC_CSR - PGI register */ 122ad4d355bSTomas Winkler #define H_HPG_CSR 0x10 12311830486STomas Winkler /* H_D0I3C - D0I3 Control */ 12411830486STomas Winkler #define H_D0I3C 0x800 1259dc64d6aSTomas Winkler 1269dc64d6aSTomas Winkler /* register bits of H_CSR (Host Control Status register) */ 1279dc64d6aSTomas Winkler /* Host Circular Buffer Depth - maximum number of 32-bit entries in CB */ 1289dc64d6aSTomas Winkler #define H_CBD 0xFF000000 1299dc64d6aSTomas Winkler /* Host Circular Buffer Write Pointer */ 1309dc64d6aSTomas Winkler #define H_CBWP 0x00FF0000 1319dc64d6aSTomas Winkler /* Host Circular Buffer Read Pointer */ 1329dc64d6aSTomas Winkler #define H_CBRP 0x0000FF00 1339dc64d6aSTomas Winkler /* Host Reset */ 1349dc64d6aSTomas Winkler #define H_RST 0x00000010 1359dc64d6aSTomas Winkler /* Host Ready */ 1369dc64d6aSTomas Winkler #define H_RDY 0x00000008 1379dc64d6aSTomas Winkler /* Host Interrupt Generate */ 1389dc64d6aSTomas Winkler #define H_IG 0x00000004 1399dc64d6aSTomas Winkler /* Host Interrupt Status */ 1409dc64d6aSTomas Winkler #define H_IS 0x00000002 1419dc64d6aSTomas Winkler /* Host Interrupt Enable */ 1429dc64d6aSTomas Winkler #define H_IE 0x00000001 14311830486STomas Winkler /* Host D0I3 Interrupt Enable */ 14411830486STomas Winkler #define H_D0I3C_IE 0x00000020 14511830486STomas Winkler /* Host D0I3 Interrupt Status */ 14611830486STomas Winkler #define H_D0I3C_IS 0x00000040 1479dc64d6aSTomas Winkler 1481fa55b4eSAlexander Usyskin /* H_CSR masks */ 1491fa55b4eSAlexander Usyskin #define H_CSR_IE_MASK (H_IE | H_D0I3C_IE) 1501fa55b4eSAlexander Usyskin #define H_CSR_IS_MASK (H_IS | H_D0I3C_IS) 1511fa55b4eSAlexander Usyskin 1529dc64d6aSTomas Winkler /* register bits of ME_CSR_HA (ME Control Status Host Access register) */ 1539dc64d6aSTomas Winkler /* ME CB (Circular Buffer) Depth HRA (Host Read Access) - host read only 1549dc64d6aSTomas Winkler access to ME_CBD */ 1559dc64d6aSTomas Winkler #define ME_CBD_HRA 0xFF000000 1569dc64d6aSTomas Winkler /* ME CB Write Pointer HRA - host read only access to ME_CBWP */ 1579dc64d6aSTomas Winkler #define ME_CBWP_HRA 0x00FF0000 1589dc64d6aSTomas Winkler /* ME CB Read Pointer HRA - host read only access to ME_CBRP */ 1599dc64d6aSTomas Winkler #define ME_CBRP_HRA 0x0000FF00 160ad4d355bSTomas Winkler /* ME Power Gate Isolation Capability HRA - host ready only access */ 161ad4d355bSTomas Winkler #define ME_PGIC_HRA 0x00000040 1629dc64d6aSTomas Winkler /* ME Reset HRA - host read only access to ME_RST */ 1639dc64d6aSTomas Winkler #define ME_RST_HRA 0x00000010 1649dc64d6aSTomas Winkler /* ME Ready HRA - host read only access to ME_RDY */ 1659dc64d6aSTomas Winkler #define ME_RDY_HRA 0x00000008 1669dc64d6aSTomas Winkler /* ME Interrupt Generate HRA - host read only access to ME_IG */ 1679dc64d6aSTomas Winkler #define ME_IG_HRA 0x00000004 1689dc64d6aSTomas Winkler /* ME Interrupt Status HRA - host read only access to ME_IS */ 1699dc64d6aSTomas Winkler #define ME_IS_HRA 0x00000002 1709dc64d6aSTomas Winkler /* ME Interrupt Enable HRA - host read only access to ME_IE */ 1719dc64d6aSTomas Winkler #define ME_IE_HRA 0x00000001 17252f6efdfSAlexander Usyskin /* TRC control shadow register */ 17352f6efdfSAlexander Usyskin #define ME_TRC 0x00000030 174ad4d355bSTomas Winkler 17511830486STomas Winkler /* H_HPG_CSR register bits */ 176ad4d355bSTomas Winkler #define H_HPG_CSR_PGIHEXR 0x00000001 177ad4d355bSTomas Winkler #define H_HPG_CSR_PGI 0x00000002 178ad4d355bSTomas Winkler 17911830486STomas Winkler /* H_D0I3C register bits */ 18011830486STomas Winkler #define H_D0I3C_CIP 0x00000001 18111830486STomas Winkler #define H_D0I3C_IR 0x00000002 18211830486STomas Winkler #define H_D0I3C_I3 0x00000004 18311830486STomas Winkler #define H_D0I3C_RR 0x00000008 18411830486STomas Winkler 1859dc64d6aSTomas Winkler #endif /* _MEI_HW_MEI_REGS_H_ */ 186