Hi, I've been having a problem reading GPIO pins properly. As of now, I added CM238 to gpio.c and gpio_groups.c to get a reading on the gpio pins so I can add them to my own GPIO.h for my coreboot port. My current machine is weird. It uses a kaby lake cpu (7820hq) but a sky lake south bridge/PCH (CM238). I'm getting weird gpio readings, that are 16 bytes long, and i'm not sure if these are the correct right outputs. Further more, I want to use _PAD_CFG_STRUCT() so I can dump the raw values, but i'm not sure what the second and third arguments represent. I would like to get the correct GPIO output and place them in the arguments of the function _PAD_CFG_STRUCT() properly, but I'm not sure how. Any help is appreciated.
Here is my dump:
CPU: ID 0x906e9, Processor Type 0x0, Family 0x6, Model 0x9e, Stepping 0x9 Northbridge: 8086:5910 (unknown) Southbridge: 8086:a154 (CM238) IGD: 8086:591b (Intel(R) UHD Graphics 630) Trying to reveal Primary to Sideband Bridge (P2SB), let's hope the OS doesn't mind... done. SBREG_BAR = 0xfd000000 (MEM)
Hiding Primary to Sideband Bridge (P2SB).
============= GPIOS =============
------- GPIO Community 0 -------
PCR Port ID: 0xaf0000
------- GPIO group GPP_A ------- 0x0400: 0x0000301844000502 GPP_A0 RCIN# 0x0408: 0x0000001944000402 GPP_A1 LAD0 0x0410: 0x0000001a44000402 GPP_A2 LAD1 0x0418: 0x0000001b44000402 GPP_A3 LAD2 0x0420: 0x0000001c44000402 GPP_A4 LAD3 0x0428: 0x0000001d44000600 GPP_A5 LFRAME# 0x0430: 0x0000241e44000400 GPP_A6 SERIRQ 0x0438: 0x0000001f44000900 GPP_A7 n/a 0x0440: 0x0000002044000500 GPP_A8 CLKRUN# 0x0448: 0x0000002144000600 GPP_A9 CLKOUT_LPC0 0x0450: 0x0000002244000600 GPP_A10 CLKOUT_LPC1 0x0458: 0x0000002344100102 GPP_A11 GPIO 0x0460: 0x0000002444000102 GPP_A12 GPIO 0x0468: 0x0000002544000600 GPP_A13 SUSWARN#/SUSPWRDNACK 0x0470: 0x0000302644000600 GPP_A14 SUS_STAT# 0x0478: 0x0000002744000502 GPP_A15 SUS_ACK# 0x0480: 0x0000002844000201 GPP_A16 GPIO 0x0488: 0x0000002944000201 GPP_A17 GPIO 0x0490: 0x0000002a44000402 GPP_A18 ISH_GP0 0x0498: 0x0000002b44000402 GPP_A19 ISH_GP1 0x04a0: 0x0000002c44000402 GPP_A20 ISH_GP2 0x04a8: 0x0000002d44000502 GPP_A21 ISH_GP3 0x04b0: 0x0000002e44000201 GPP_A22 GPIO 0x04b8: 0x0000002f44100102 GPP_A23 GPIO ------- GPIO Group GPP_B ------- 0x04c0: 0x0000003044000103 GPP_B0 GPIO 0x04c8: 0x0000003144000201 GPP_B1 GPIO 0x04d0: 0x0000003244000300 GPP_B2 GPIO 0x04d8: 0x0000003344000201 GPP_B3 GPIO 0x04e0: 0x0000003444000502 GPP_B4 CPU_GP3 0x04e8: 0x0000003504000102 GPP_B5 GPIO 0x04f0: 0x0000003644000700 GPP_B6 SRCCLKREQ1# 0x04f8: 0x0000003744000702 GPP_B7 SRCCLKREQ2# 0x0500: 0x0000003844000702 GPP_B8 SRCCLKREQ3# 0x0508: 0x0000003944000702 GPP_B9 SRCCLKREQ4# 0x0510: 0x0000003a44000700 GPP_B10 SRCCLKREQ5# 0x0518: 0x0000003b44000601 GPP_B11 EXT_PWR_GATE# 0x0520: 0x0000003c44000601 GPP_B12 SLP_S0# 0x0528: 0x0000003d44000601 GPP_B13 PLTRST# 0x0530: 0x0000003e42840101 GPP_B14 GPIO 0x0538: 0x0000003f44000300 GPP_B15 GPIO 0x0540: 0x0000004084800102 GPP_B16 GPIO 0x0548: 0x0000004144000201 GPP_B17 GPIO 0x0550: 0x0000004244000200 GPP_B18 GPIO 0x0558: 0x0000004344000200 GPP_B19 GPIO 0x0560: 0x0000004444000600 GPP_B20 GSPI1_CLK 0x0568: 0x0000004544000502 GPP_B21 GSPI1_MISO 0x0570: 0x0000004644000600 GPP_B22 GSPI1_MOSI 0x0578: 0x0000004744000201 GPP_B23 GPIO ------- GPIO Community 1 -------
PCR Port ID: 0xae0000
------- GPIO Group GPP_C ------- 0x0400: 0x0000004844000602 GPP_C0 SMBCLK 0x0408: 0x0000004944000402 GPP_C1 SMBDATA 0x0410: 0x0000104a44000502 GPP_C2 SMBALERT# 0x0418: 0x0000304b44000602 GPP_C3 SML0CLK 0x0420: 0x0000304c44000402 GPP_C4 SML0DATA 0x0428: 0x0000004d44000200 GPP_C5 GPIO 0x0430: 0xffffffffffffffff GPP_C6 RESERVED 0x0438: 0xffffffffffffffff GPP_C7 RESERVED 0x0440: 0x0000005044000502 GPP_C8 UART0_RXD 0x0448: 0x0000005144000600 GPP_C9 UART0_TXD 0x0450: 0x0000005244000600 GPP_C10 UART0_RTS# 0x0458: 0x0000005344000502 GPP_C11 UART0_CTS# 0x0460: 0x0000005444000502 GPP_C12 UART1_RXD 0x0468: 0x0000005544000600 GPP_C13 UART1_TXD 0x0470: 0x0000005644000600 GPP_C14 UART1_RTS# 0x0478: 0x0000005744000502 GPP_C15 UART1_CTS# 0x0480: 0x0000305844000402 GPP_C16 I2C0_SDA 0x0488: 0x0000305944000602 GPP_C17 I2C0_SCL 0x0490: 0x0000305a44000402 GPP_C18 I2C1_SDA 0x0498: 0x0000305b44000602 GPP_C19 I2C1_SCL 0x04a0: 0x0000005c44000502 GPP_C20 UART2_RXD 0x04a8: 0x0000005d44000600 GPP_C21 UART2_TXD 0x04b0: 0x0000005e44000600 GPP_C22 UART2_RTS# 0x04b8: 0x0000005f44000502 GPP_C23 UART2_CTS# ------- GPIO Group GPP_D ------- 0x04c0: 0x0000006044000600 GPP_D0 SPI1_CS# 0x04c8: 0x0000006144000600 GPP_D1 SPI1_CLK 0x04d0: 0x0000006244000500 GPP_D2 SPI1_MISO 0x04d8: 0x0000006344000600 GPP_D3 SPI1_MOSI 0x04e0: 0x0000306444000402 GPP_D4 FLASHTRIG 0x04e8: 0x0000006544000602 GPP_D5 ISH_I2C0_SDA 0x04f0: 0x0000006644000600 GPP_D6 ISH_I2C0_SCL 0x04f8: 0x0000006744000502 GPP_D7 ISH_I2C1_SDA 0x0500: 0x0000006844000602 GPP_D8 ISH_I2C1_SCL 0x0508: 0x0000006944000300 GPP_D9 GPIO 0x0510: 0x0000006a44000201 GPP_D10 GPIO 0x0518: 0x0000006b44000300 GPP_D11 GPIO 0x0520: 0x0000006c44000300 GPP_D12 GPIO 0x0528: 0x0200006d44000502 GPP_D13 ISH_UART0_RXD 0x0530: 0x0200006e44000600 GPP_D14 ISH_UART0_TXD 0x0538: 0x0000006f44000600 GPP_D15 ISH_UART0_RTS# 0x0540: 0x0200007044000502 GPP_D16 ISH_UART0_CTS# 0x0548: 0x0000007144000600 GPP_D17 DMIC_CLK1 0x0550: 0x0000107244000400 GPP_D18 DMIC_DATA1 0x0558: 0x0000007344000600 GPP_D19 DMIC_CLK0 0x0560: 0x0000107444000400 GPP_D20 DMIC_DATA0 0x0568: 0x0000007544000400 GPP_D21 SPI1_IO2 0x0570: 0x0000007644000400 GPP_D22 SPI1_IO3 0x0578: 0x0000307744000602 GPP_D23 I2S_MCLK ------- GPIO Group GPP_E ------- 0x0580: 0x0000001844000502 GPP_E0 SATAXPCIE0 0x0588: 0x0000001944000f00 GPP_E1 n/a 0x0590: 0x0000001a44000f00 GPP_E2 n/a 0x0598: 0x0000001b44000500 GPP_E3 CPU_GP0 0x05a0: 0x0000001c04000600 GPP_E4 SATA_DEVSLP0 0x05a8: 0x0000001d44000300 GPP_E5 GPIO 0x05b0: 0x0000001e80880102 GPP_E6 GPIO 0x05b8: 0x0000001f44000300 GPP_E7 GPIO 0x05c0: 0x0000002044000600 GPP_E8 SATALED# 0x05c8: 0x0000302144000503 GPP_E9 USB2_OC0# 0x05d0: 0x0000302244000503 GPP_E10 USB2_OC1# 0x05d8: 0x0000302344000503 GPP_E11 USB2_OC2# 0x05e0: 0x0000302444000503 GPP_E12 USB2_OC3# 0x05e8: 0x0000002544000502 GPP_E13 DDPB_HPD0 0x05f0: 0x0000002644000502 GPP_E14 DDPC_HPD1 0x05f8: 0x0000002744000200 GPP_E15 GPIO 0x0600: 0x0000002844000201 GPP_E16 GPIO 0x0608: 0x0000002944000200 GPP_E17 GPIO 0x0610: 0x0000002a44100102 GPP_E18 GPIO 0x0618: 0x0000002b04000600 GPP_E19 DDPB_CTRLDATA 0x0620: 0x0000002c44000200 GPP_E20 GPIO 0x0628: 0x0000002d44000102 GPP_E21 GPIO 0x0630: 0x0000002e84000102 GPP_E22 GPIO 0x0638: 0x0000002f44000300 GPP_E23 GPIO ------- GPIO Community 2 -------
PCR Port ID: 0xad0000
-------- GPIO Group GPD -------- 0x0400: 0x0000001844000502 GPD0 BATLOW# 0x0408: 0x0000001944000502 GPD1 ACPRESENT 0x0410: 0x00003c1a04000602 GPD2 LAN_WAKE# 0x0418: 0x0000001b44000502 GPD3 PWRBTN# 0x0420: 0x0000001c44000600 GPD4 SLP_S3# 0x0428: 0x0000001d44000600 GPD5 SLP_S4# 0x0430: 0x0000001e44000600 GPD6 SLP_A# 0x0438: 0x0000001f44000201 GPD7 GPIO 0x0440: 0x0000002044000600 GPD8 SUSCLK 0x0448: 0x0000002144000600 GPD9 SLP_WLAN# 0x0450: 0x0000002244000600 GPD10 SLP_S5# 0x0458: 0x0000002344000600 GPD11 LANPHYPC ------- GPIO Community 3 -------
PCR Port ID: 0xac0000
------- GPIO Group GPP_F ------- 0x0400: 0x0000006d44000500 GPP_F0 I2S2_SCLK 0x0408: 0x0000006e44000500 GPP_F1 I2S2_SFRM 0x0410: 0x0000106f44000500 GPP_F2 I2S2_TXD 0x0418: 0x0000107044000500 GPP_F3 I2S2_RXD 0x0420: 0x0000007144000502 GPP_F4 I2C2_SDA 0x0428: 0x0000007244000602 GPP_F5 I2C2_SCL 0x0430: 0x0000007344000402 GPP_F6 I2C3_SDA 0x0438: 0x0000007444000600 GPP_F7 I2C3_SCL 0x0440: 0x0000007544000400 GPP_F8 I2C4_SDA 0x0448: 0x0000007644000600 GPP_F9 I2C4_SCL 0x0450: 0x0000007744000400 GPP_F10 I2C5_SDA 0x0458: 0x0000000000000000 GPP_F11 GPIO 0x0460: 0x0000000000000000 GPP_F12 GPIO 0x0468: 0x0000000000000000 GPP_F13 GPIO 0x0470: 0x0000000000000000 GPP_F14 GPIO 0x0478: 0x0000000000000000 GPP_F15 GPIO 0x0480: 0x0000000000000000 GPP_F16 GPIO 0x0488: 0x0000000000000000 GPP_F17 GPIO 0x0490: 0x0000000000000000 GPP_F18 GPIO 0x0498: 0x0000000000000000 GPP_F19 GPIO 0x04a0: 0x0000000000000000 GPP_F20 GPIO 0x04a8: 0x0000000000000000 GPP_F21 GPIO 0x04b0: 0x0000000000000000 GPP_F22 GPIO 0x04b8: 0x0000000000000000 GPP_F23 GPIO ------- GPIO Group GPP_G ------- 0x04c0: 0x0000000000000000 GPP_G0 GPIO 0x04c8: 0x0000000000000000 GPP_G1 GPIO 0x04d0: 0x0000000000000000 GPP_G2 GPIO 0x04d8: 0x0000000000000000 GPP_G3 GPIO 0x04e0: 0x0000000000000000 GPP_G4 GPIO 0x04e8: 0x0000000000000000 GPP_G5 GPIO 0x04f0: 0x0000000000000000 GPP_G6 GPIO 0x04f8: 0x0000000000000000 GPP_G7 GPIO