Thomas Heijligen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31501
Change subject: inteltool: coffeelake support ......................................................................
inteltool: coffeelake support
Change-Id: I9f3b3108f5672b557610fa7d8fbd5c199af8d353 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.com --- M util/inteltool/gpio.c M util/inteltool/gpio_groups.c M util/inteltool/pcr.c 3 files changed, 495 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/31501/1
diff --git a/util/inteltool/gpio.c b/util/inteltool/gpio.c index dd09214..2f51a44 100644 --- a/util/inteltool/gpio.c +++ b/util/inteltool/gpio.c @@ -1033,6 +1033,16 @@ case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_BASE: case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_IHDCP_PREM: case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_Y_IHDCP_PREM: + case PCI_DEVICE_ID_INTEL_H310: + case PCI_DEVICE_ID_INTEL_H370: + case PCI_DEVICE_ID_INTEL_Z390: + case PCI_DEVICE_ID_INTEL_Q370: + case PCI_DEVICE_ID_INTEL_B360: + case PCI_DEVICE_ID_INTEL_C246: + case PCI_DEVICE_ID_INTEL_C242: + case PCI_DEVICE_ID_INTEL_QM370: + case PCI_DEVICE_ID_INTEL_HM370: + case PCI_DEVICE_ID_INTEL_CM246: print_gpio_groups(sb); return 0; case PCI_DEVICE_ID_INTEL_82371XX: diff --git a/util/inteltool/gpio_groups.c b/util/inteltool/gpio_groups.c index 53a8eb9..c50917e 100644 --- a/util/inteltool/gpio_groups.c +++ b/util/inteltool/gpio_groups.c @@ -841,6 +841,456 @@ &denverton_community_north, &denverton_community_south, };
+ + +// heijligen +static const char *const coffeelake_group_a_names[] = { + "GPP_A0", "RCIN#", "n/a", "ESPI_ALERT1#", "n/a", + "GPP_A1", "LAD0", "n/a", "ESPI_IO0", "n/a", + "GPP_A2", "LAD1", "n/a", "ESPI_IO1", "n/a", + "GPP_A3", "LAD2", "n/a", "ESPI_IO2", "n/a", + "GPP_A4", "LAD3", "n/a", "ESPI_IO3", "n/a", + "GPP_A5", "LFRAME#", "n/a", "ESPI_CS0#", "n/a", + "GPP_A6", "SERIRQ", "n/a", "ESPI_CS1#", "n/a", + "GPP_A7", "PIRQA#", "n/a", "ESPI_ALERT0#", "n/a", + "GPP_A8", "CLKRUN#", "n/a", "n/a", "n/a", + "GPP_A9", "CLKOUT_LPC0", "n/a", "ESPI_CLK", "n/a", + "GPP_A10", "CLKOUT_LPC1", "n/a", "n/a", "n/a", + "GPP_A11", "PME#", "SD_VDD_PWR_EN#", "n/a", "n/a", + "GPP_A12", "BM_BUSY#", "ISH_GP6", "SX_EXIT_HOLDOFF#", "n/a", + "GPP_A13", "SUSWARN#/SUSPWRDNACK", "n/a", "n/a", "n/a", + "GPP_A14", "SUS_STAT#", "n/a", "ESPI_RESET#", "n/a", + "GPP_A15", "SUSACK#", "n/a", "n/a", "n/a", + "GPP_A16", "CLKOUT_48", "n/a", "n/a", "n/a", + "GPP_A17", "SD_VDD1_PWR_EN#", "ISH_GP7", "n/a", "n/a", + "GPP_A18", "ISH_GP0", "n/a", "n/a", "n/a", + "GPP_A19", "ISH_GP1", "n/a", "n/a", "n/a", + "GPP_A20", "ISH_GP2", "n/a", "n/a", "n/a", + "GPP_A21", "ISH_GP3", "n/a", "n/a", "n/a", + "GPP_A22", "ISH_GP4", "n/a", "n/a", "n/a", + "GPP_A23", "ISH_GP5", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_a = { + .display = "------- GPIO Group GPP_A -------", + .pad_count = ARRAY_SIZE(coffeelake_group_a_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_a_names, +}; + +static const char *const coffeelake_group_b_names[] = { + "GPP_B0", "GSPI0_CS1#", "n/a", "n/a", "n/a", + "GPP_B1", "GSPI1_CS1#", "TIME_SYNC1", "n/a", "n/a", + "GPP_B2", "VRALRERT#", "n/a", "n/a", "n/a", + "GPP_B3", "CPU_GP2", "n/a", "n/a", "n/a", + "GPP_B4", "CPU_GP3", "n/a", "n/a", "n/a", + "GPP_B5", "SRCCLKREQ0#", "n/a", "n/a", "n/a", + "GPP_B6", "SRCCLKREQ1#", "n/a", "n/a", "n/a", + "GPP_B7", "SRCCLKREQ2#", "n/a", "n/a", "n/a", + "GPP_B8", "SRCCLKREQ3#", "n/a", "n/a", "n/a", + "GPP_B9", "SRCCLKREQ4#", "n/a", "n/a", "n/a", + "GPP_B10", "SRCCLKREQ5#", "n/a", "n/a", "n/a", + "GPP_B11", "I2S_MCLK", "n/a", "n/a", "n/a", + "GPP_B12", "SLP_S0#", "n/a", "n/a", "n/a", + "GPP_B13", "PLTRST#", "n/a", "n/a", "n/a", + "GPP_B14", "SPKR", "n/a", "n/a", "n/a", + "GPP_B15", "GSPI0_CS0#", "n/a", "n/a", "n/a", + "GPP_B16", "GSPI0_CLK", "n/a", "n/a", "n/a", + "GPP_B17", "GSPI0_MISO", "n/a", "n/a", "n/a", + "GPP_B18", "GSPI0_MOSI", "n/a", "n/a", "n/a", + "GPP_B19", "GSPI1_CS0#", "n/a", "n/a", "n/a", + "GPP_B20", "GSPI1_CLK", "n/a", "n/a", "n/a", + "GPP_B21", "GSPI1_MISO", "n/a", "n/a", "n/a", + "GPP_B22", "GSPI1_MOSI", "n/a", "n/a", "n/a", + "GPP_B23", "SML1ALERT#", "PCHHOT#", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_b = { + .display = "------- GPIO Group GPP_B -------", + .pad_count = ARRAY_SIZE(coffeelake_group_b_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_b_names, +}; + + +static const char *const coffeelake_group_c_names[] = { + "GPP_C0", "SMBCLK", "n/a", "n/a", "n/a", + "GPP_C1", "SMBDATA", "n/a", "n/a", "n/a", + "GPP_C2", "SMBALERT#", "n/a", "n/a", "n/a", + "GPP_C3", "SML0CLK", "n/a", "n/a", "n/a", + "GPP_C4", "SML0DATA", "n/a", "n/a", "n/a", + "GPP_C5", "SML0ALERT#", "n/a", "n/a", "n/a", + "GPP_C6", "SML1CLK", "n/a", "n/a", "n/a", + "GPP_C7", "SML1DATA", "n/a", "n/a", "n/a", + "GPP_C8", "UART0A_RXD", "n/a", "n/a", "n/a", + "GPP_C9", "UART0A_TXD", "n/a", "n/a", "n/a", + "GPP_C10", "UART0A_RTS#", "n/a", "n/a", "n/a", + "GPP_C11", "UART0A_CTS#", "n/a", "n/a", "n/a", + "GPP_C12", "UART1_RXD", "ISH_UART1_RXD", "n/a", "n/a", + "GPP_C13", "UART1_TXD", "ISH_UART1_TXD", "n/a", "n/a", + "GPP_C14", "UART1_RTS#", "ISH_UART1_RTS#", "n/a", "n/a", + "GPP_C15", "UART1_CTS#", "ISH_UART1_CTS#", "n/a", "n/a", + "GPP_C16", "I2C0_SDA", "n/a", "n/a", "n/a", + "GPP_C17", "I2C0_SCL", "n/a", "n/a", "n/a", + "GPP_C18", "I2C1_SDA", "n/a", "n/a", "n/a", + "GPP_C19", "I2C1_SCL", "n/a", "n/a", "n/a", + "GPP_C20", "UART2_RXD", "n/a", "n/a", "n/a", + "GPP_C21", "UART2_TXD", "n/a", "n/a", "n/a", + "GPP_C22", "UART2_RTS#", "n/a", "n/a", "n/a", + "GPP_C23", "UART2_CTS#", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_c = { + .display = "------- GPIO Group GPP_C -------", + .pad_count = ARRAY_SIZE(coffeelake_group_c_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_c_names, +}; + + +static const char *const coffeelake_group_d_names[] = { + "GPP_D0", "SPI1_CS#", "n/a", "SBK0", "BK0", + "GPP_D1", "SPI1_CLK", "n/a", "SBK1", "BK1", + "GPP_D2", "SPI1_MISO", "n/a", "SBK2", "BK2", + "GPP_D3", "SPI2_MOSI", "n/a", "SBK3", "BK3", + "GPP_D4", "ISH_I2C2SDA", "I2C3_SDA", "SBK4", "BK4" + "GPP_D5", "I2S2_SFRM", "n/a", "CNV_RF_RESET#", "n/a", + "GPP_D6", "I2S2_TXD", "n/a", "modem_CLKREQ", "n/a", + "GPP_D7", "I2S2_RXD", "n/a", "n/a", "n/a", + "GPP_D8", "I2S2_SCLK", "n/a", "n/a", "n/a", + "GPP_D9", "ISH_SPI_CS#", "n/a", "GSPI2_CS0#", "n/a", + "GPP_D10", "ISH_SPI_CLK", "n/a", "GSPI2_CLK", "n/a", + "GPP_D11", "ISH_SPI_MISO", "GP_BSSB_CLK", "GSPI2_MISO", "n/a", + "GPP_D12", "ISH_SPI_MOSI", "GP_BSSB_DI", "GSPI2_MOSI", "n/a", + "GPP_D13", "ISH_UART0_RXD", "n/a", "I2C2_SDA", "n/a", + "GPP_D14", "ISH_UART0_TXD", "n/a", "I2C2_SCL", "n/a", + "GPP_D15", "ISH_UART0_RTS#", "GSPI_CS1#", "n/a", "CNV_WFEN", + "GPP_D16", "ISH_UART0_CTS#", "n/a", "n/a", "CNV_WCEN", + "GPP_D17", "DMIC_CLK1", "SNDW3_CLK", "n/a", "n/a", + "GPP_D18", "DMIC_DATA1", "SNDW3_DATA", "n/a", "n/a", + "GPP_D19", "DMIC_CLK0", "SNDW4_CLK", "n/a", "n/a", + "GPP_D20", "DMIC_DATA0", "SNDW4_DATA", "n/a", "n/a", + "GPP_D21", "SPI1_IO2", "n/a", "n/a", "n/a", + "GPP_D22", "SPI1_IO3", "n/a", "n/a", "n/a", + "GPP_D23", "ISH_I2C2_SCL", "I2C3_SCL", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_d = { + .display = "------- GPIO Group GPP_D -------", + .pad_count = ARRAY_SIZE(coffeelake_group_d_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_d_names, +}; + +static const char *const coffeelake_group_e_names[] = { + "GPP_E0", "SATAXPCIE0", "SATAGP0", "n/a", "n/a", + "GPP_E1", "SATAXPCIE1", "SATAGP1", "n/a", "n/a", + "GPP_E2", "SATAXPCIE2", "SATAGP2", "n/a", "n/a", + "GPP_E3", "CPU_GP0", "n/a", "n/a", "n/a", + "GPP_E4", "SATA_DEVSLP0", "n/a", "n/a", "n/a", + "GPP_E5", "SATA_DEVSLP1", "n/a", "n/a", "n/a", + "GPP_E6", "SATA_DEVSLP2", "n/a", "n/a", "n/a", + "GPP_E7", "CPU_GP1", "n/a", "n/a", "n/a", + "GPP_E8", "SATALED#", "n/a", "n/a", "n/a", + "GPP_E9", "USB2_OC0#", "n/a", "n/a", "n/a", + "GPP_E10", "USB2_OC1#", "n/a", "n/a", "n/a", + "GPP_E11", "USB2_OC2#", "n/a", "n/a", "n/a", + "GPP_E12", "USB2_OC3#", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_e = { + .display = "-------GPIO Group GPP_E -------", + .pad_count = ARRAY_SIZE(coffeelake_group_e_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_e_names, +}; + + +static const char *const coffeelake_group_f_names[] = { + "GPP_F0", "SATAXPCIE3", "SATAGP3", "n/a", "n/a", + "GPP_F1", "SATAXPCIE4", "SATAGP4", "n/a", "n/a", + "GPP_F2", "SATAXPCIE5", "SATAGP5", "n/a", "n/a", + "GPP_F3", "SATAXPCIE6", "SATAGP6", "n/a", "n/a", + "GPP_F4", "SATAXPCIE7", "SATAGP7", "n/a", "n/a", + "GPP_F5", "SATA_DEVSLP3", "n/a", "n/a", "n/a", + "GPP_F6", "SATA_DEVSLP4", "n/a", "n/a", "n/a", + "GPP_F7", "SATA_DEVSLP5", "n/a", "n/a", "n/a", + "GPP_F8", "SATA_DEVSLP6", "n/a", "n/a", "n/a", + "GPP_F9", "SATA_DEVSLP7", "n/a", "n/a", "n/a", + "GPP_F10", "SATA_SCLOCK", "n/a", "n/a", "n/a", + "GPP_F11", "SATA_SLOAD", "n/a", "n/a", "n/a", + "GPP_F12", "SATA_SDATAOUT1", "n/a", "n/a", "n/a", + "GPP_F13", "SATA_SDATAOUT0", "n/a", "n/a", "n/a", + "GPP_F14", "n/a", "PS_ON#", "n/a", "n/a", + "GPP_F15", "USB2_OC4#", "n/a", "n/a", "n/a", + "GPP_F16", "USB2_OC5#", "n/a", "n/a", "n/a", + "GPP_F17", "USB2_OC6#", "n/a", "n/a", "n/a", + "GPP_F18", "USB2_OC7#", "n/a", "n/a", "n/a", + "GPP_F19", "eDP_VDDEN", "n/a", "n/a", "n/a", + "GPP_F20", "eDP_BKLTEN", "n/a", "n/a", "n/a", + "GPP_F21", "eDP_BKLTCTL", "n/a", "n/a", "n/a", + "GPP_F22", "DDPF_CTRLCLK", "n/a", "n/a", "n/a", + "GPP_F23", "DDPF_CTRLDATA", "n/a", "n/a", "n/a", + +}; + +static const struct gpio_group coffeelake_group_f = { + .display = "-------GPIO Group GPP_F -------", + .pad_count = ARRAY_SIZE(coffeelake_group_f_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_f_names, +}; + + +static const char *const coffeelake_group_g_names[] = { + "GPP_G0", "SD_CMD", "n/a", "n/a", "n/a", + "GPP_G1", "SD_DATA0", "n/a", "n/a", "n/a", + "GPP_G2", "SD_DATA1", "n/a", "n/a", "n/a", + "GPP_G3", "SD_DATRA2", "n/a", "n/a", "n/a", + "GPP_G4", "SD_DATA3", "n/a", "n/a", "n/a", + "GPP_G5", "SD_CD#", "n/a", "n/a", "n/a", + "GPP_G6", "SD_CLK", "n/a", "n/a", "n/a", + "GPP_G7", "SD_WP", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_g = { + .display = "-------GPIO Group GPP_G -------", + .pad_count = ARRAY_SIZE(coffeelake_group_g_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_g_names, +}; + + +static const char *const coffeelake_group_h_names[] = { + "GPP_H0", "SRCCLKREQ6#", "n/a", "n/a", "n/a", + "GPP_H1", "SRCCLKREQ7#", "n/a", "n/a", "n/a", + "GPP_H2", "SRCCLKREQ8#", "n/a", "n/a", "n/a", + "GPP_H3", "SRCCLKREQ9#", "n/a", "n/a", "n/a", + "GPP_H4", "SRCCLKREQ10#", "n/a", "n/a", "n/a", + "GPP_H5", "SRCCLKREQ11#", "n/a", "n/a", "n/a", + "GPP_H6", "SRCCLKREQ12#", "n/a", "n/a", "n/a", + "GPP_H7", "SRCCLKREQ13#", "n/a", "n/a", "n/a", + "GPP_H8", "SRCCLKREQ14#", "n/a", "n/a", "n/a", + "GPP_H9", "SRCCLKREQ15#", "n/a", "n/a", "n/a", + "GPP_H10", "SML2CLK", "n/a", "n/a", "n/a", + "GPP_H11", "SML2DATA", "n/a", "n/a", "n/a", + "GPP_H12", "SML2ALERT#", "n/a", "n/a", "n/a", + "GPP_H13", "SML3CLK", "n/a", "n/a", "n/a", + "GPP_H14", "SML3DATA", "n/a", "n/a", "n/a", + "GPP_H15", "SML3ALERT#", "n/a", "n/a", "n/a", + "GPP_H16", "SML4CLK", "n/a", "n/a", "n/a", + "GPP_H17", "SML4DATA", "n/a", "n/a", "n/a", + "GPP_H18", "SML4ALERT#", "n/a", "n/a", "n/a", + "GPP_H19", "ISH_I2C0_SDA", "n/a", "n/a", "n/a", + "GPP_H20", "ISH_I2C0_SCL", "n/a", "n/a", "n/a", + "GPP_H21", "ISH_I2C1_SDA", "n/a", "n/a", "n/a", + "GPP_H22", "ISH_I2C1_SCL", "n/a", "n/a", "n/a", + "GPP_H23", "TIME_SYNC0", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_h = { + .display = "-------GPIO Group GPP_H -------", + .pad_count = ARRAY_SIZE(coffeelake_group_h_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_h_names, +}; + + +static const char *const coffeelake_group_i_names[] = { + "GPP_I0", "DDPB_HPD0", "DISP_MISC0", "n/a", "n/a", + "GPP_I1", "DDPB_HPD1", "DISP_MISC1", "n/a", "n/a", + "GPP_I2", "DDPB_HPD2", "DISP_MISC2", "n/a", "n/a", + "GPP_I3", "DDPB_HPD3", "DISP_MISC3", "n/a", "n/a", + "GPP_I4", "EDP_HPD", "DISP_MISC4", "n/a", "n/a", + "GPP_I5", "DDPB_CTRLCLK", "n/a", "n/a", "n/a", + "GPP_I6", "DDPB_CTRLDATA", "n/a", "n/a", "n/a", + "GPP_I7", "DDPC_CTRLCLK", "n/a", "n/a", "n/a", + "GPP_I8", "DDPC_CTRLDATA", "n/a", "n/a", "n/a", + "GPP_I9", "DDPD_CTRLCLK", "n/a", "n/a", "n/a", + "GPP_I10", "DDPD_CTRLDATA", "n/a", "n/a", "n/a", + "GPP_I11", "M2_SKT2_CFG0", "n/a", "n/a", "n/a", + "GPP_I12", "M2_SKT2_CFG1", "n/a", "n/a", "n/a", + "GPP_I13", "M2_SKT2_CFG2", "n/a", "n/a", "n/a", + "GPP_I14", "M2_SKT2_CFG3", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_i = { + .display = "-------GPIO Group GPP_I -------", + .pad_count = ARRAY_SIZE(coffeelake_group_i_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_i_names, +}; + + +static const char *const coffeelake_group_j_names[] = { + "GPP_J0", "CNV_PA_BLANKING", "n/a", "n/a", "n/a", + "GPP_J1", "n/a", "CPU_C10_GATE#", "n/a", "n/a", + "GPP_J2", "n/a", "n/a", "n/a", "n/a", + "GPP_J3", "n/a", "n/a", "n/a", "n/a", + "GPP_J4", "CNV_BRI_DT", "UART0B_RTS#", "n/a", "n/a", + "GPP_J5", "CNV_BRI_RSP", "UART0B_RXD", "n/a", "n/a", + "GPP_J6", "CNV_RGI_DT", "UART0B_TXD", "n/a", "n/a", + "GPP_J7", "CNV_RGI_RSP", "UART0B_CTS#", "n/a", "n/a", + "GPP_J8", "CNV_MFUART2_RXD", "n/a", "n/a", "n/a", + "GPP_J9", "CNV_MFUART2_TXD", "n/a", "n/a", "n/a", + "GPP_J10", "n/a", "n/a", "n/a", "n/a", + "GPP_J11", "A4WP_PRESENT", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_j = { + .display = "-------GPIO Group GPP_J -------", + .pad_count = ARRAY_SIZE(coffeelake_group_j_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_j_names, +}; + + +static const char *const coffeelake_group_k_names[] = { + "GPP_K0", "n/a", "n/a", "n/a", "n/a", + "GPP_K1", "n/a", "n/a", "n/a", "n/a", + "GPP_K2", "n/a", "n/a", "n/a", "n/a", + "GPP_K3", "n/a", "n/a", "n/a", "n/a", + "GPP_K4", "n/a", "n/a", "n/a", "n/a", + "GPP_K5", "n/a", "n/a", "n/a", "n/a", + "GPP_K6", "n/a", "n/a", "n/a", "n/a", + "GPP_K7", "n/a", "n/a", "n/a", "n/a", + "GPP_K8", "Reserved", "n/a", "n/a", "n/a", + "GPP_K9", "Reserved", "n/a", "n/a", "n/a", + "GPP_K10", "Reserved", "n/a", "n/a", "n/a", + "GPP_K11", "Reserved", "n/a", "n/a", "n/a", + "GPP_K12", "GSXOUT", "n/a", "n/a", "n/a", + "GPP_K13", "GSXSLOAD", "n/a", "n/a", "n/a", + "GPP_K14", "GSXDIN", "n/a", "n/a", "n/a", + "GPP_K15", "GSXSRESET#", "n/a", "n/a", "n/a", + "GPP_K16", "GSXCLK", "n/a", "n/a", "n/a", + "GPP_K17", "ADR_COMPLETE", "n/a", "n/a", "n/a", + "GPP_K18", "NMI#", "n/a", "n/a", "n/a", + "GPP_K19", "SMI#", "n/a", "n/a", "n/a", + "GPP_K20", "Reserved", "n/a", "n/a", "n/a", + "GPP_K21", "Reserved", "n/a", "n/a", "n/a", + "GPP_K22", "IMGCLKOUT0", "n/a", "n/a", "n/a", + "GPP_K23", "IMGCLKOUT1", "n/a", "n/a", "n/a", +}; + +static const struct gpio_group coffeelake_group_k = { + .display = "-------GPIO Group GPP_K -------", + .pad_count = ARRAY_SIZE(coffeelake_group_k_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_k_names, +}; + +static const char *const coffeelake_group_ds_names[] = { + "GPD0", "BATLOW#", "n/a", "n/a", "n/a", + "GPD1", "ACPRESENT", "n/a", "n/a", "n/a", + "GPD2", "LAN_WAKE#", "n/a", "n/a", "n/a", + "GPD3", "PRWBTN#", "n/a", "n/a", "n/a", + "GPD4", "SLP_S3#", "n/a", "n/a", "n/a", + "GPD5", "SLP_S4#", "n/a", "n/a", "n/a", + "GPD6", "SLP_A#", "n/a", "n/a", "n/a", + "GPD7", "n/a", "n/a", "n/a", "n/a", + "GPD8", "SUSCLK", "n/a", "n/a", "n/a", + "GPD9", "SLP_WLAN#", "n/a", "n/a", "n/a", + "GPD10", "SLP_S5#", "n/a", "n/a", "n/a", + "GPD11", "LANPHYPC", "n/a", "n/a", "n/a", +}; +static const struct gpio_group coffeelake_group_ds = { + .display = "------- GPIO Group GPD -------", + .pad_count = ARRAY_SIZE(coffeelake_group_ds_names) / 5, + .func_count = 5, + .pad_names = coffeelake_group_ds_names, +}; + + +static const struct gpio_group *const coffeelake_community_ab_groups[] = { + &coffeelake_group_a, + &coffeelake_group_b, +}; +static const struct gpio_community coffeelake_community_ab = { + .name = "------- GPIO Community 0 -------", + .pcr_port_id = 0x6e, + .group_count = ARRAY_SIZE(coffeelake_community_ab_groups), + .groups = coffeelake_community_ab_groups, +}; + + +static const struct gpio_group *const coffeelake_community_cdg_groups[] = { + &coffeelake_group_c, + &coffeelake_group_d, + &coffeelake_group_g, +}; +static const struct gpio_community coffeelake_community_cdg = { + .name = "------- GPIO Community 1 -------", + .pcr_port_id = 0x6d, + .group_count = ARRAY_SIZE(coffeelake_community_cdg_groups), + .groups = coffeelake_community_cdg_groups, +}; + + +static const struct gpio_group *const coffeelake_community_ds_groups[] = { + &coffeelake_group_ds, +}; +static const struct gpio_community coffeelake_community_ds = { + .name = "------- GPIO Community 2 -------", + .pcr_port_id = 0x6c, + .group_count = ARRAY_SIZE(coffeelake_community_ds_groups), + .groups = coffeelake_community_ds_groups, +}; + + +static const struct gpio_group *const coffeelake_community_khef_groups[] = { + &coffeelake_group_k, + &coffeelake_group_h, + &coffeelake_group_e, + &coffeelake_group_f, +}; +static const struct gpio_community coffeelake_community_khef = { + .name = "------- GPIO Community 3 -------", + .pcr_port_id = 0x6b, + .group_count = ARRAY_SIZE(coffeelake_community_khef_groups), + .groups = coffeelake_community_khef_groups, +}; + + +static const struct gpio_group *const coffeelake_community_ij_groups[] = { + &coffeelake_group_i, + &coffeelake_group_j, +}; +static const struct gpio_community coffeelake_community_ij = { + .name = "------- GPIO Community 4 -------", + .pcr_port_id = 0x6a, + .group_count = ARRAY_SIZE(coffeelake_community_ij_groups), + .groups = coffeelake_community_ij_groups, +}; + +static const struct gpio_community *const coffeelake_communities[] = { + &coffeelake_community_ab, + &coffeelake_community_cdg, + &coffeelake_community_ds, + &coffeelake_community_khef, + &coffeelake_community_ij, +}; + + + + + + + + + + + + + + + + + + + + + + static const char *decode_pad_mode(const struct gpio_group *const group, const size_t pad, const uint32_t dw0) { @@ -860,7 +1310,7 @@
printf("%s\n", group->display);
- for (p = 0; p < group->pad_count; ++p, pad_cfg += 8) { + for (p = 0; p < group->pad_count; ++p, pad_cfg += 16) { const uint32_t dw0 = read_pcr32(pid, pad_cfg); const uint32_t dw1 = read_pcr32(pid, pad_cfg + 4);
@@ -892,7 +1342,7 @@ for (group = 0; group < community->group_count; ++group) { print_gpio_group(community->pcr_port_id, pad_cfg, community->groups[group]); - pad_cfg += community->groups[group]->pad_count * 8; + pad_cfg += community->groups[group]->pad_count * 16; } }
@@ -923,6 +1373,20 @@ communities = denverton_communities; pcr_init(sb); break; + case PCI_DEVICE_ID_INTEL_H310: + case PCI_DEVICE_ID_INTEL_H370: + case PCI_DEVICE_ID_INTEL_Z390: + case PCI_DEVICE_ID_INTEL_Q370: + case PCI_DEVICE_ID_INTEL_B360: + case PCI_DEVICE_ID_INTEL_C246: + case PCI_DEVICE_ID_INTEL_C242: + case PCI_DEVICE_ID_INTEL_QM370: + case PCI_DEVICE_ID_INTEL_HM370: + case PCI_DEVICE_ID_INTEL_CM246: + community_count = ARRAY_SIZE(coffeelake_communities); + communities = coffeelake_communities; + pcr_init(sb); + break; default: return; } diff --git a/util/inteltool/pcr.c b/util/inteltool/pcr.c index 5c97a6c..0814c8b 100644 --- a/util/inteltool/pcr.c +++ b/util/inteltool/pcr.c @@ -74,7 +74,7 @@
if (sbbar) return; - +#if 0 switch (sb->device_id) { case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_PRE: case PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_U_BASE: @@ -103,6 +103,17 @@ case PCI_DEVICE_ID_INTEL_APL_LPC: p2sb = pci_get_dev(sb->access, 0, 0, 0x0d, 0); break; + case PCI_DEVICE_ID_INTEL_H310: + case PCI_DEVICE_ID_INTEL_H370: + case PCI_DEVICE_ID_INTEL_Z390: + case PCI_DEVICE_ID_INTEL_Q370: + case PCI_DEVICE_ID_INTEL_B360: + case PCI_DEVICE_ID_INTEL_C246: + case PCI_DEVICE_ID_INTEL_C242: + case PCI_DEVICE_ID_INTEL_QM370: + case PCI_DEVICE_ID_INTEL_HM370: + case PCI_DEVICE_ID_INTEL_CM246: + break; default: perror("Unknown LPC device."); exit(1); @@ -135,23 +146,28 @@ pci_fill_info(p2sb, PCI_FILL_BASES | PCI_FILL_CLASS);
const pciaddr_t sbbar_phys = p2sb->base_addr[0] & ~0xfULL; +#endif + const pciaddr_t sbbar_phys = 0xfd000000; + printf("SBREG_BAR = 0x%08"PRIx64" (MEM)\n\n", (uint64_t)sbbar_phys); sbbar = map_physical(sbbar_phys, SBBAR_SIZE); if (sbbar == NULL) { perror("Error mapping SBREG_BAR"); error_exit = true; } - +#if 0 if (p2sb_revealed) { printf("Hiding Primary to Sideband Bridge (P2SB).\n"); pci_write_byte(p2sb, 0xe0 + 1, 1); } pci_free_dev(p2sb); - +#endif if (error_exit) exit(1); }
+ + void pcr_cleanup(void) { if (sbbar)
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31501 )
Change subject: inteltool: coffeelake support ......................................................................
Patch Set 1:
(68 comments)
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c File util/inteltool/gpio_groups.c:
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@848 PS1, Line 848: "GPP_A0", "RCIN#", "n/a", "ESPI_ALERT1#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@849 PS1, Line 849: "GPP_A1", "LAD0", "n/a", "ESPI_IO0", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@850 PS1, Line 850: "GPP_A2", "LAD1", "n/a", "ESPI_IO1", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@851 PS1, Line 851: "GPP_A3", "LAD2", "n/a", "ESPI_IO2", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@852 PS1, Line 852: "GPP_A4", "LAD3", "n/a", "ESPI_IO3", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@853 PS1, Line 853: "GPP_A5", "LFRAME#", "n/a", "ESPI_CS0#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@854 PS1, Line 854: "GPP_A6", "SERIRQ", "n/a", "ESPI_CS1#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@855 PS1, Line 855: "GPP_A7", "PIRQA#", "n/a", "ESPI_ALERT0#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@856 PS1, Line 856: "GPP_A8", "CLKRUN#", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@857 PS1, Line 857: "GPP_A9", "CLKOUT_LPC0", "n/a", "ESPI_CLK", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@858 PS1, Line 858: "GPP_A10", "CLKOUT_LPC1", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@859 PS1, Line 859: "GPP_A11", "PME#", "SD_VDD_PWR_EN#", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@860 PS1, Line 860: "GPP_A12", "BM_BUSY#", "ISH_GP6", "SX_EXIT_HOLDOFF#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@861 PS1, Line 861: "GPP_A13", "SUSWARN#/SUSPWRDNACK", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@862 PS1, Line 862: "GPP_A14", "SUS_STAT#", "n/a", "ESPI_RESET#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@863 PS1, Line 863: "GPP_A15", "SUSACK#", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@864 PS1, Line 864: "GPP_A16", "CLKOUT_48", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@865 PS1, Line 865: "GPP_A17", "SD_VDD1_PWR_EN#", "ISH_GP7", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@866 PS1, Line 866: "GPP_A18", "ISH_GP0", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@867 PS1, Line 867: "GPP_A19", "ISH_GP1", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@868 PS1, Line 868: "GPP_A20", "ISH_GP2", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@869 PS1, Line 869: "GPP_A21", "ISH_GP3", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@870 PS1, Line 870: "GPP_A22", "ISH_GP4", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@871 PS1, Line 871: "GPP_A23", "ISH_GP5", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@952 PS1, Line 952: "GPP_D0", "SPI1_CS#", "n/a", "SBK0", "BK0", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@953 PS1, Line 953: "GPP_D1", "SPI1_CLK", "n/a", "SBK1", "BK1", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@954 PS1, Line 954: "GPP_D2", "SPI1_MISO", "n/a", "SBK2", "BK2", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@955 PS1, Line 955: "GPP_D3", "SPI2_MOSI", "n/a", "SBK3", "BK3", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@956 PS1, Line 956: "GPP_D4", "ISH_I2C2SDA", "I2C3_SDA", "SBK4", "BK4" line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@957 PS1, Line 957: "GPP_D5", "I2S2_SFRM", "n/a", "CNV_RF_RESET#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@958 PS1, Line 958: "GPP_D6", "I2S2_TXD", "n/a", "modem_CLKREQ", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@959 PS1, Line 959: "GPP_D7", "I2S2_RXD", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@960 PS1, Line 960: "GPP_D8", "I2S2_SCLK", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@961 PS1, Line 961: "GPP_D9", "ISH_SPI_CS#", "n/a", "GSPI2_CS0#", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@962 PS1, Line 962: "GPP_D10", "ISH_SPI_CLK", "n/a", "GSPI2_CLK", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@963 PS1, Line 963: "GPP_D11", "ISH_SPI_MISO", "GP_BSSB_CLK", "GSPI2_MISO", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@964 PS1, Line 964: "GPP_D12", "ISH_SPI_MOSI", "GP_BSSB_DI", "GSPI2_MOSI", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@965 PS1, Line 965: "GPP_D13", "ISH_UART0_RXD", "n/a", "I2C2_SDA", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@966 PS1, Line 966: "GPP_D14", "ISH_UART0_TXD", "n/a", "I2C2_SCL", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@967 PS1, Line 967: "GPP_D15", "ISH_UART0_RTS#", "GSPI_CS1#", "n/a", "CNV_WFEN", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@968 PS1, Line 968: "GPP_D16", "ISH_UART0_CTS#", "n/a", "n/a", "CNV_WCEN", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@969 PS1, Line 969: "GPP_D17", "DMIC_CLK1", "SNDW3_CLK", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@970 PS1, Line 970: "GPP_D18", "DMIC_DATA1", "SNDW3_DATA", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@971 PS1, Line 971: "GPP_D19", "DMIC_CLK0", "SNDW4_CLK", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@972 PS1, Line 972: "GPP_D20", "DMIC_DATA0", "SNDW4_DATA", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@973 PS1, Line 973: "GPP_D21", "SPI1_IO2", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@974 PS1, Line 974: "GPP_D22", "SPI1_IO3", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@975 PS1, Line 975: "GPP_D23", "ISH_I2C2_SCL", "I2C3_SCL", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1046 PS1, Line 1046: "GPP_G0", "SD_CMD", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1047 PS1, Line 1047: "GPP_G1", "SD_DATA0", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1048 PS1, Line 1048: "GPP_G2", "SD_DATA1", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1049 PS1, Line 1049: "GPP_G3", "SD_DATRA2", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1050 PS1, Line 1050: "GPP_G4", "SD_DATA3", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1051 PS1, Line 1051: "GPP_G5", "SD_CD#", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1052 PS1, Line 1052: "GPP_G6", "SD_CLK", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1053 PS1, Line 1053: "GPP_G7", "SD_WP", "n/a", "n/a", "n/a", trailing whitespace
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1126 PS1, Line 1126: "GPP_J0", "CNV_PA_BLANKING", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1127 PS1, Line 1127: "GPP_J1", "n/a", "CPU_C10_GATE#", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1128 PS1, Line 1128: "GPP_J2", "n/a", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1129 PS1, Line 1129: "GPP_J3", "n/a", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1130 PS1, Line 1130: "GPP_J4", "CNV_BRI_DT", "UART0B_RTS#", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1131 PS1, Line 1131: "GPP_J5", "CNV_BRI_RSP", "UART0B_RXD", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1132 PS1, Line 1132: "GPP_J6", "CNV_RGI_DT", "UART0B_TXD", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1133 PS1, Line 1133: "GPP_J7", "CNV_RGI_RSP", "UART0B_CTS#", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1134 PS1, Line 1134: "GPP_J8", "CNV_MFUART2_RXD", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1135 PS1, Line 1135: "GPP_J9", "CNV_MFUART2_TXD", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1136 PS1, Line 1136: "GPP_J10", "n/a", "n/a", "n/a", "n/a", line over 80 characters
https://review.coreboot.org/#/c/31501/1/util/inteltool/gpio_groups.c@1137 PS1, Line 1137: "GPP_J11", "A4WP_PRESENT", "n/a", "n/a", "n/a", line over 80 characters
Thomas Heijligen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31501 )
Change subject: inteltool: add coffeelake support ......................................................................
Patch Set 4:
This change is ready for review.
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31501 )
Change subject: inteltool: add coffeelake support ......................................................................
Patch Set 4:
The GPIO definitions in the parent change are useless without this. Maybe squash or order differently (e.g. 1. add ids, 2. add PCR support, 3. add GPIO support).
Thomas Heijligen has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31501 )
Change subject: inteltool: add coffeelake support ......................................................................
Abandoned
squashed with inteltool: add 300 and C240 Series PCH