Skip to content

Commit d970d59

Browse files
committed
nai_68int6: enable LPSS I2C0 and declare the board I2C0/GSPI0 devices in the DSDT
1 parent ae804ad commit d970d59

5 files changed

Lines changed: 271 additions & 6 deletions

File tree

‎docs/Targets.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8942,7 +8942,7 @@ Notable options in [config/examples/nai_68int6.config](../config/examples/nai_68
89428942
| Option | Meaning |
89438943
|---|---|
89448944
| `X86_UART_NUMBER=2` | LPSS UART2 for all three FSP phases (Kontron uses 0) |
8945-
| `ACPI=1` | Required. Generates ACPI tables (RSDP/XSDT/FADT/MADT/MCFG and a minimal DSDT); the board's PCI interrupt routing is only in the DSDT `_PRT`, since the MP table is the Kontron one |
8945+
| `ACPI=1` | Required. Generates ACPI tables (RSDP/XSDT/FADT/MADT/MCFG and a minimal DSDT); the board's PCI interrupt routing is only in the DSDT `_PRT`, since the MP table is the Kontron one. The DSDT also declares the board devices on LPSS I2C0 (EEPROMs, RTC/watchdog) and GSPI0 (the PRC, for NAI's `naigspi` driver) |
89468946
| `ANTI_ROLLBACK=1` | Persistent version floor and boot audit counters in TPM NV |
89478947
| `MEASURED_BOOT=1`, `MEASURED_PCR_OS=4` | Firmware into PCR 0, the verified OS image into PCR 4 |
89488948
| `WOLFBOOT_BOOT_DISK=0` | Boot from GPT partitions; the A/B indices (sda3/sda4) are set in `src/update_disk.c` |

‎include/x86/acpi_dsdt.h‎

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
* Regenerate: iasl src/x86/acpi_dsdt.asl &&
2323
* xxd -i -n acpi_dsdt_aml src/x86/acpi_dsdt.aml (append below this header). */
2424
static const unsigned char acpi_dsdt_aml[] = {
25-
0x44, 0x53, 0x44, 0x54, 0x1e, 0x02, 0x00, 0x00, 0x02, 0x48, 0x57, 0x4f,
25+
0x44, 0x53, 0x44, 0x54, 0x29, 0x05, 0x00, 0x00, 0x02, 0xa7, 0x57, 0x4f,
2626
0x4c, 0x46, 0x42, 0x54, 0x4e, 0x41, 0x49, 0x54, 0x47, 0x4c, 0x00, 0x00,
2727
0x01, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x54, 0x4c, 0x28, 0x06, 0x23, 0x20,
28-
0x10, 0x49, 0x1f, 0x5f, 0x53, 0x42, 0x5f, 0x5b, 0x82, 0x41, 0x1f, 0x50,
28+
0x10, 0x44, 0x50, 0x5f, 0x53, 0x42, 0x5f, 0x5b, 0x82, 0x4c, 0x4f, 0x50,
2929
0x43, 0x49, 0x30, 0x08, 0x5f, 0x48, 0x49, 0x44, 0x0c, 0x41, 0xd0, 0x0a,
3030
0x08, 0x08, 0x5f, 0x43, 0x49, 0x44, 0x0c, 0x41, 0xd0, 0x0a, 0x03, 0x08,
3131
0x5f, 0x53, 0x45, 0x47, 0x00, 0x08, 0x5f, 0x42, 0x42, 0x4e, 0x00, 0x08,
@@ -67,6 +67,71 @@ static const unsigned char acpi_dsdt_aml[] = {
6767
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
6868
0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6969
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
70-
0x79, 0x00
70+
0x79, 0x00, 0x5b, 0x82, 0x49, 0x25, 0x49, 0x32, 0x43, 0x30, 0x08, 0x5f,
71+
0x41, 0x44, 0x52, 0x0c, 0x00, 0x00, 0x15, 0x00, 0x5b, 0x82, 0x43, 0x0c,
72+
0x45, 0x45, 0x50, 0x32, 0x08, 0x5f, 0x48, 0x49, 0x44, 0x0d, 0x31, 0x35,
73+
0x41, 0x43, 0x30, 0x30, 0x30, 0x32, 0x00, 0x08, 0x5f, 0x43, 0x49, 0x44,
74+
0x0d, 0x50, 0x52, 0x50, 0x30, 0x30, 0x30, 0x31, 0x00, 0x08, 0x5f, 0x44,
75+
0x44, 0x4e, 0x0d, 0x4e, 0x41, 0x49, 0x20, 0x4d, 0x6f, 0x74, 0x68, 0x65,
76+
0x72, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x20, 0x45, 0x45, 0x50, 0x52, 0x4f,
77+
0x4d, 0x00, 0x08, 0x5f, 0x43, 0x52, 0x53, 0x11, 0x26, 0x0a, 0x23, 0x8e,
78+
0x1e, 0x00, 0x02, 0x00, 0x01, 0x02, 0x00, 0x00, 0x01, 0x06, 0x00, 0xa0,
79+
0x86, 0x01, 0x00, 0x56, 0x00, 0x5c, 0x5f, 0x53, 0x42, 0x2e, 0x50, 0x43,
80+
0x49, 0x30, 0x2e, 0x49, 0x32, 0x43, 0x30, 0x00, 0x79, 0x00, 0x08, 0x5f,
81+
0x44, 0x53, 0x44, 0x12, 0x41, 0x05, 0x02, 0x11, 0x13, 0x0a, 0x10, 0x14,
82+
0xd8, 0xff, 0xda, 0xba, 0x6e, 0x8c, 0x4d, 0x8a, 0x91, 0xbc, 0x9b, 0xbf,
83+
0x4a, 0xa3, 0x01, 0x12, 0x39, 0x03, 0x12, 0x1b, 0x02, 0x0d, 0x63, 0x6f,
84+
0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x00, 0x0d, 0x61, 0x74,
85+
0x6d, 0x65, 0x6c, 0x2c, 0x32, 0x34, 0x63, 0x30, 0x32, 0x00, 0x12, 0x0b,
86+
0x02, 0x0d, 0x73, 0x69, 0x7a, 0x65, 0x00, 0x0b, 0x00, 0x01, 0x12, 0x0e,
87+
0x02, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x00, 0x0a,
88+
0x08, 0x5b, 0x82, 0x46, 0x0d, 0x45, 0x45, 0x50, 0x33, 0x08, 0x5f, 0x48,
89+
0x49, 0x44, 0x0d, 0x31, 0x35, 0x41, 0x43, 0x30, 0x30, 0x30, 0x33, 0x00,
90+
0x08, 0x5f, 0x43, 0x49, 0x44, 0x0d, 0x50, 0x52, 0x50, 0x30, 0x30, 0x30,
91+
0x31, 0x00, 0x08, 0x5f, 0x44, 0x44, 0x4e, 0x0d, 0x4e, 0x41, 0x49, 0x20,
92+
0x4d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x20,
93+
0x45, 0x45, 0x50, 0x52, 0x4f, 0x4d, 0x20, 0x53, 0x4e, 0x00, 0x08, 0x5f,
94+
0x43, 0x52, 0x53, 0x11, 0x26, 0x0a, 0x23, 0x8e, 0x1e, 0x00, 0x02, 0x00,
95+
0x01, 0x02, 0x00, 0x00, 0x01, 0x06, 0x00, 0xa0, 0x86, 0x01, 0x00, 0x5e,
96+
0x00, 0x5c, 0x5f, 0x53, 0x42, 0x2e, 0x50, 0x43, 0x49, 0x30, 0x2e, 0x49,
97+
0x32, 0x43, 0x30, 0x00, 0x79, 0x00, 0x08, 0x5f, 0x44, 0x53, 0x44, 0x12,
98+
0x41, 0x06, 0x02, 0x11, 0x13, 0x0a, 0x10, 0x14, 0xd8, 0xff, 0xda, 0xba,
99+
0x6e, 0x8c, 0x4d, 0x8a, 0x91, 0xbc, 0x9b, 0xbf, 0x4a, 0xa3, 0x01, 0x12,
100+
0x49, 0x04, 0x04, 0x12, 0x1c, 0x02, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61,
101+
0x74, 0x69, 0x62, 0x6c, 0x65, 0x00, 0x0d, 0x61, 0x74, 0x6d, 0x65, 0x6c,
102+
0x2c, 0x32, 0x34, 0x63, 0x73, 0x30, 0x32, 0x00, 0x12, 0x0a, 0x02, 0x0d,
103+
0x73, 0x69, 0x7a, 0x65, 0x00, 0x0a, 0x10, 0x12, 0x0e, 0x02, 0x0d, 0x70,
104+
0x61, 0x67, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x00, 0x0a, 0x08, 0x12, 0x0e,
105+
0x02, 0x0d, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x6f, 0x6e, 0x6c, 0x79, 0x00,
106+
0x01, 0x5b, 0x82, 0x4a, 0x0a, 0x52, 0x54, 0x43, 0x31, 0x08, 0x5f, 0x48,
107+
0x49, 0x44, 0x0d, 0x31, 0x35, 0x41, 0x43, 0x30, 0x30, 0x30, 0x34, 0x00,
108+
0x08, 0x5f, 0x43, 0x49, 0x44, 0x0d, 0x50, 0x52, 0x50, 0x30, 0x30, 0x30,
109+
0x31, 0x00, 0x08, 0x5f, 0x44, 0x44, 0x4e, 0x0d, 0x4e, 0x41, 0x49, 0x20,
110+
0x4d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x20,
111+
0x57, 0x44, 0x54, 0x20, 0x52, 0x54, 0x43, 0x00, 0x08, 0x5f, 0x43, 0x52,
112+
0x53, 0x11, 0x26, 0x0a, 0x23, 0x8e, 0x1e, 0x00, 0x02, 0x00, 0x01, 0x02,
113+
0x00, 0x00, 0x01, 0x06, 0x00, 0xa0, 0x86, 0x01, 0x00, 0x68, 0x00, 0x5c,
114+
0x5f, 0x53, 0x42, 0x2e, 0x50, 0x43, 0x49, 0x30, 0x2e, 0x49, 0x32, 0x43,
115+
0x30, 0x00, 0x79, 0x00, 0x08, 0x5f, 0x44, 0x53, 0x44, 0x12, 0x37, 0x02,
116+
0x11, 0x13, 0x0a, 0x10, 0x14, 0xd8, 0xff, 0xda, 0xba, 0x6e, 0x8c, 0x4d,
117+
0x8a, 0x91, 0xbc, 0x9b, 0xbf, 0x4a, 0xa3, 0x01, 0x12, 0x20, 0x01, 0x12,
118+
0x1d, 0x02, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x6c,
119+
0x65, 0x00, 0x0d, 0x64, 0x61, 0x6c, 0x6c, 0x61, 0x73, 0x2c, 0x64, 0x73,
120+
0x31, 0x33, 0x37, 0x34, 0x00, 0x5b, 0x82, 0x4e, 0x0a, 0x53, 0x50, 0x49,
121+
0x30, 0x08, 0x5f, 0x41, 0x44, 0x52, 0x0c, 0x02, 0x00, 0x1e, 0x00, 0x5b,
122+
0x82, 0x4c, 0x09, 0x50, 0x52, 0x43, 0x30, 0x08, 0x5f, 0x48, 0x49, 0x44,
123+
0x0d, 0x31, 0x35, 0x41, 0x43, 0x30, 0x30, 0x30, 0x31, 0x00, 0x08, 0x5f,
124+
0x53, 0x54, 0x52, 0x11, 0x42, 0x05, 0x0a, 0x4e, 0x4e, 0x00, 0x41, 0x00,
125+
0x49, 0x00, 0x20, 0x00, 0x47, 0x00, 0x53, 0x00, 0x50, 0x00, 0x49, 0x00,
126+
0x20, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x63, 0x00, 0x65, 0x00,
127+
0x73, 0x00, 0x73, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x52, 0x00,
128+
0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, 0x65, 0x00,
129+
0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00,
130+
0x72, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x72, 0x00,
131+
0x00, 0x00, 0x08, 0x5f, 0x43, 0x52, 0x53, 0x11, 0x29, 0x0a, 0x26, 0x8e,
132+
0x21, 0x00, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x09, 0x00, 0x20,
133+
0xa1, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x5f, 0x53, 0x42,
134+
0x2e, 0x50, 0x43, 0x49, 0x30, 0x2e, 0x53, 0x50, 0x49, 0x30, 0x00, 0x79,
135+
0x00
71136
};
72-
static const unsigned int acpi_dsdt_aml_len = 542;
137+
static const unsigned int acpi_dsdt_aml_len = 1321;

‎include/x86/gpio_config.h‎

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939

4040
#define GPIO_GPPC_B9_CFG_OFF (0x790)
4141
#define GPIO_GPPC_B10_CFG_OFF (0x7a0)
42+
#define GPIO_GPPC_B15_CFG_OFF (0x7f0)
43+
#define GPIO_GPPC_B16_CFG_OFF (0x800)
44+
#define GPIO_GPPC_B17_CFG_OFF (0x810)
45+
#define GPIO_GPPC_B18_CFG_OFF (0x820)
4246
#define GPIO_GPPC_C6_CFG_OFF (0x760)
4347
#define GPIO_GPPC_C7_CFG_OFF (0x770)
4448
#define GPIO_GPPC_C8_CFG_OFF (0x780)
@@ -49,6 +53,8 @@
4953
#define GPIO_GPPC_C13_CFG_OFF (0x7d0)
5054
#define GPIO_GPPC_C14_CFG_OFF (0x7e0)
5155
#define GPIO_GPPC_C15_CFG_OFF (0x7f0)
56+
#define GPIO_GPPC_C16_CFG_OFF (0x800)
57+
#define GPIO_GPPC_C17_CFG_OFF (0x810)
5258
#define GPIO_GPPC_C20_CFG_OFF (0x840)
5359
#define GPIO_GPPC_C21_CFG_OFF (0x850)
5460
#define GPIO_GPPC_C22_CFG_OFF (0x860)
@@ -688,6 +694,109 @@ static const struct tgl_gpio_conf gpio_table_presilicon[] = {
688694
.gpio_rxinv = 0x00,
689695
.gpio_rxevconf = 0x02,
690696
.gpio_reset = GPIO_RESET_PLTRST},
697+
/* GSPI0 (B15-B18) and I2C0 (C16/C17) in native mode, as stock. */
698+
/* PAD B15 (DW0=0x44000601 DW1=0x00000027) */
699+
{.gpio =
700+
{
701+
.comm_port_id = GPIO_COMM_0_PORT_ID,
702+
.cfg_offset = GPIO_GPPC_B15_CFG_OFF,
703+
},
704+
.flags =
705+
(GPIO_SET_MODE | GPIO_SET_DIRECTION | GPIO_SET_RESET |
706+
GPIO_SET_TERM | GPIO_SET_INTERRUPT | GPIO_SET_RXINV |
707+
GPIO_SET_RXEVCONF),
708+
.gpio_mode = GPIO_MODE_NATIVE_1,
709+
.gpio_dir = GPIO_DIR_OUTPUT,
710+
.gpio_term = GPIO_TERM_NONE,
711+
.gpio_interrupt = 0x00,
712+
.gpio_rxinv = 0x00,
713+
.gpio_rxevconf = 0x02,
714+
.gpio_reset = GPIO_RESET_HOSTDEEPRESET},
715+
/* PAD B16 (DW0=0x84000601 DW1=0x00000028) */
716+
{.gpio =
717+
{
718+
.comm_port_id = GPIO_COMM_0_PORT_ID,
719+
.cfg_offset = GPIO_GPPC_B16_CFG_OFF,
720+
},
721+
.flags =
722+
(GPIO_SET_MODE | GPIO_SET_DIRECTION | GPIO_SET_RESET |
723+
GPIO_SET_TERM | GPIO_SET_INTERRUPT | GPIO_SET_RXINV |
724+
GPIO_SET_RXEVCONF),
725+
.gpio_mode = GPIO_MODE_NATIVE_1,
726+
.gpio_dir = GPIO_DIR_OUTPUT,
727+
.gpio_term = GPIO_TERM_NONE,
728+
.gpio_interrupt = 0x00,
729+
.gpio_rxinv = 0x00,
730+
.gpio_rxevconf = 0x02,
731+
.gpio_reset = GPIO_RESET_PLTRST},
732+
/* PAD B17 (DW0=0x44000702 DW1=0x00010029) */
733+
{.gpio =
734+
{
735+
.comm_port_id = GPIO_COMM_0_PORT_ID,
736+
.cfg_offset = GPIO_GPPC_B17_CFG_OFF,
737+
},
738+
.flags =
739+
(GPIO_SET_MODE | GPIO_SET_DIRECTION | GPIO_SET_RESET |
740+
GPIO_SET_TERM | GPIO_SET_INTERRUPT | GPIO_SET_RXINV |
741+
GPIO_SET_RXEVCONF),
742+
.gpio_mode = GPIO_MODE_NATIVE_1,
743+
.gpio_dir = 0x03,
744+
.gpio_term = GPIO_TERM_NONE,
745+
.gpio_interrupt = 0x00,
746+
.gpio_rxinv = 0x00,
747+
.gpio_rxevconf = 0x02,
748+
.gpio_reset = GPIO_RESET_HOSTDEEPRESET},
749+
/* PAD B18 (DW0=0x84000600 DW1=0x0000002A) */
750+
{.gpio =
751+
{
752+
.comm_port_id = GPIO_COMM_0_PORT_ID,
753+
.cfg_offset = GPIO_GPPC_B18_CFG_OFF,
754+
},
755+
.flags =
756+
(GPIO_SET_MODE | GPIO_SET_DIRECTION | GPIO_SET_RESET |
757+
GPIO_SET_TERM | GPIO_SET_INTERRUPT | GPIO_SET_RXINV |
758+
GPIO_SET_RXEVCONF),
759+
.gpio_mode = GPIO_MODE_NATIVE_1,
760+
.gpio_dir = GPIO_DIR_OUTPUT,
761+
.gpio_term = GPIO_TERM_NONE,
762+
.gpio_interrupt = 0x00,
763+
.gpio_rxinv = 0x00,
764+
.gpio_rxevconf = 0x02,
765+
.gpio_reset = GPIO_RESET_PLTRST},
766+
/* PAD C16 (DW0=0x44000702 DW1=0x0000001E) */
767+
{.gpio =
768+
{
769+
.comm_port_id = GPIO_COMM_4_PORT_ID,
770+
.cfg_offset = GPIO_GPPC_C16_CFG_OFF,
771+
},
772+
.flags =
773+
(GPIO_SET_MODE | GPIO_SET_DIRECTION | GPIO_SET_RESET |
774+
GPIO_SET_TERM | GPIO_SET_INTERRUPT | GPIO_SET_RXINV |
775+
GPIO_SET_RXEVCONF),
776+
.gpio_mode = GPIO_MODE_NATIVE_1,
777+
.gpio_dir = 0x03,
778+
.gpio_term = GPIO_TERM_NONE,
779+
.gpio_interrupt = 0x00,
780+
.gpio_rxinv = 0x00,
781+
.gpio_rxevconf = 0x02,
782+
.gpio_reset = GPIO_RESET_HOSTDEEPRESET},
783+
/* PAD C17 (DW0=0x44000702 DW1=0x0000001F) */
784+
{.gpio =
785+
{
786+
.comm_port_id = GPIO_COMM_4_PORT_ID,
787+
.cfg_offset = GPIO_GPPC_C17_CFG_OFF,
788+
},
789+
.flags =
790+
(GPIO_SET_MODE | GPIO_SET_DIRECTION | GPIO_SET_RESET |
791+
GPIO_SET_TERM | GPIO_SET_INTERRUPT | GPIO_SET_RXINV |
792+
GPIO_SET_RXEVCONF),
793+
.gpio_mode = GPIO_MODE_NATIVE_1,
794+
.gpio_dir = 0x03,
795+
.gpio_term = GPIO_TERM_NONE,
796+
.gpio_interrupt = 0x00,
797+
.gpio_rxinv = 0x00,
798+
.gpio_rxevconf = 0x02,
799+
.gpio_reset = GPIO_RESET_HOSTDEEPRESET},
691800
};
692801

693802
#else /* TARGET_kontron_vx3060_s2 */

‎src/x86/acpi_dsdt.asl‎

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* acpi_dsdt.asl
22
*
33
* Minimal DSDT for the NAI 68INT6: the PCI root bus with its _CRS and the
4-
* _PRT INTx routing. Compiled offline with iasl and committed as a C array.
4+
* _PRT INTx routing, plus the board devices on LPSS I2C0 and GSPI0. Compiled offline with iasl and committed as a C array.
55
*
66
* Regenerate after editing:
77
* iasl src/x86/acpi_dsdt.asl
@@ -84,6 +84,95 @@ DefinitionBlock ("", "DSDT", 2, "WOLFBT", "NAITGL", 0x00000001)
8484
0x0000000000000000, 0x0000004000000000, 0x0000007FFFFFFFFF,
8585
0x0000000000000000, 0x0000004000000000)
8686
})
87+
88+
/* LPSS I2C0 and GSPI0 with the board devices the stock BIOS
89+
* declares, so NAI's Linux drivers (naigspi, at24) bind. */
90+
Device (I2C0)
91+
{
92+
Name (_ADR, 0x00150000)
93+
94+
Device (EEP2)
95+
{
96+
Name (_HID, "15AC0002")
97+
Name (_CID, "PRP0001")
98+
Name (_DDN, "NAI Motherboard EEPROM")
99+
Name (_CRS, ResourceTemplate ()
100+
{
101+
I2cSerialBusV2 (0x0056, ControllerInitiated, 100000,
102+
AddressingMode7Bit, "\\_SB.PCI0.I2C0")
103+
})
104+
Name (_DSD, Package ()
105+
{
106+
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
107+
Package ()
108+
{
109+
Package () { "compatible", "atmel,24c02" },
110+
Package () { "size", 256 },
111+
Package () { "pagesize", 8 }
112+
}
113+
})
114+
}
115+
116+
Device (EEP3)
117+
{
118+
Name (_HID, "15AC0003")
119+
Name (_CID, "PRP0001")
120+
Name (_DDN, "NAI Motherboard EEPROM SN")
121+
Name (_CRS, ResourceTemplate ()
122+
{
123+
I2cSerialBusV2 (0x005E, ControllerInitiated, 100000,
124+
AddressingMode7Bit, "\\_SB.PCI0.I2C0")
125+
})
126+
Name (_DSD, Package ()
127+
{
128+
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
129+
Package ()
130+
{
131+
Package () { "compatible", "atmel,24cs02" },
132+
Package () { "size", 16 },
133+
Package () { "pagesize", 8 },
134+
Package () { "read-only", One }
135+
}
136+
})
137+
}
138+
139+
Device (RTC1)
140+
{
141+
Name (_HID, "15AC0004")
142+
Name (_CID, "PRP0001")
143+
Name (_DDN, "NAI Motherboard WDT RTC")
144+
Name (_CRS, ResourceTemplate ()
145+
{
146+
I2cSerialBusV2 (0x0068, ControllerInitiated, 100000,
147+
AddressingMode7Bit, "\\_SB.PCI0.I2C0")
148+
})
149+
Name (_DSD, Package ()
150+
{
151+
ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
152+
Package ()
153+
{
154+
Package () { "compatible", "dallas,ds1374" }
155+
}
156+
})
157+
}
158+
}
159+
160+
Device (SPI0)
161+
{
162+
Name (_ADR, 0x001E0002)
163+
164+
Device (PRC0)
165+
{
166+
Name (_HID, "15AC0001")
167+
Name (_STR, Unicode ("NAI GSPI Processor Register Controller"))
168+
Name (_CRS, ResourceTemplate ()
169+
{
170+
SpiSerialBusV2 (0x0000, PolarityLow, FourWireMode, 8,
171+
ControllerInitiated, 500000, ClockPolarityLow,
172+
ClockPhaseFirst, "\\_SB.PCI0.SPI0")
173+
})
174+
}
175+
}
87176
}
88177
}
89178
}

‎src/x86/tgl_fsp.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,8 @@ int fsp_machine_update_s_parameters(uint8_t *default_s_params)
10351035
upd->Cx = FSP_C_STATES;
10361036
upd->TxtEnable = FSP_TXT;
10371037
upd->ThermalMonitor = FSP_THERMAL_THROTTLING;
1038+
/* I2C0 (PCI mode) carries the board EEPROMs and the watchdog RTC */
1039+
upd->SerialIoI2cMode[0] = 1;
10381040
#endif
10391041
return 0;
10401042
}

0 commit comments

Comments
 (0)