Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 3 | #include <acpi/acpi.h> |
Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 4 | #include <device/device.h> |
Kyösti Mälkki | b78e462 | 2022-12-15 22:12:29 +0200 | [diff] [blame] | 5 | #include <identity.h> |
Michał Żygowski | c6ee1509 | 2022-10-03 10:53:36 +0200 | [diff] [blame] | 6 | #include <soc/pci_devs.h> |
Michał Kopeć | a833d19 | 2022-04-07 10:24:52 +0200 | [diff] [blame] | 7 | #include <soc/ramstage.h> |
Michał Żygowski | ee52f23 | 2022-05-04 14:16:07 +0200 | [diff] [blame] | 8 | #include <smbios.h> |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 9 | #include <string.h> |
| 10 | |
| 11 | void mainboard_fill_fadt(acpi_fadt_t *fadt) |
| 12 | { |
| 13 | fadt->preferred_pm_profile = PM_DESKTOP; |
| 14 | fadt->iapc_boot_arch |= ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042; |
| 15 | } |
Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 16 | |
| 17 | static void mainboard_init(void *chip_info) |
| 18 | { |
Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 19 | } |
| 20 | |
Michał Żygowski | ee52f23 | 2022-05-04 14:16:07 +0200 | [diff] [blame] | 21 | u8 smbios_mainboard_feature_flags(void) |
Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 22 | { |
Michał Żygowski | ee52f23 | 2022-05-04 14:16:07 +0200 | [diff] [blame] | 23 | return SMBIOS_FEATURE_FLAGS_HOSTING_BOARD | SMBIOS_FEATURE_FLAGS_REPLACEABLE; |
| 24 | } |
Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 25 | |
Michał Żygowski | ee52f23 | 2022-05-04 14:16:07 +0200 | [diff] [blame] | 26 | smbios_wakeup_type smbios_system_wakeup_type(void) |
| 27 | { |
| 28 | return SMBIOS_WAKEUP_TYPE_POWER_SWITCH; |
| 29 | } |
| 30 | |
| 31 | const char *smbios_system_product_name(void) |
| 32 | { |
| 33 | return "MS-7D25"; |
| 34 | } |
| 35 | |
Michał Żygowski | c6ee1509 | 2022-10-03 10:53:36 +0200 | [diff] [blame] | 36 | const char *smbios_mainboard_product_name(void) |
| 37 | { |
Michał Żygowski | c6ee1509 | 2022-10-03 10:53:36 +0200 | [diff] [blame] | 38 | if (CONFIG(BOARD_MSI_Z690_A_PRO_WIFI_DDR4)) { |
| 39 | if (is_devfn_enabled(PCH_DEVFN_CNVI_WIFI)) |
| 40 | return "PRO Z690-A WIFI DDR4(MS-7D25)"; |
| 41 | else |
| 42 | return "PRO Z690-A DDR4(MS-7D25)"; |
| 43 | } |
| 44 | |
Michał Żygowski | 9f87ad2 | 2022-10-15 12:38:35 +0200 | [diff] [blame] | 45 | if (CONFIG(BOARD_MSI_Z690_A_PRO_WIFI_DDR5)) { |
| 46 | if (is_devfn_enabled(PCH_DEVFN_CNVI_WIFI)) |
| 47 | return "PRO Z690-A WIFI (MS-7D25)"; |
| 48 | else |
| 49 | return "PRO Z690-A (MS-7D25)"; |
| 50 | } |
| 51 | |
Kyösti Mälkki | b78e462 | 2022-12-15 22:12:29 +0200 | [diff] [blame] | 52 | return mainboard_part_number; |
Michał Żygowski | c6ee1509 | 2022-10-03 10:53:36 +0200 | [diff] [blame] | 53 | } |
| 54 | |
Michał Żygowski | ee52f23 | 2022-05-04 14:16:07 +0200 | [diff] [blame] | 55 | /* Only baseboard serial number is populated */ |
| 56 | const char *smbios_system_serial_number(void) |
| 57 | { |
| 58 | return "Default string"; |
| 59 | } |
| 60 | |
| 61 | const char *smbios_system_sku(void) |
| 62 | { |
| 63 | return "Default string"; |
Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 64 | } |
| 65 | |
Michał Kopeć | a833d19 | 2022-04-07 10:24:52 +0200 | [diff] [blame] | 66 | void mainboard_silicon_init_params(FSP_S_CONFIG *params) |
| 67 | { |
Michał Żygowski | 9711248 | 2022-11-09 18:15:51 +0100 | [diff] [blame] | 68 | uint8_t aspm, aspm_l1; |
| 69 | |
| 70 | /* ASPM L1 sub-states require CLKREQ, so CLK_PM should be enabled as well */ |
| 71 | if (CONFIG(PCIEXP_L1_SUB_STATE) && CONFIG(PCIEXP_CLK_PM)) |
| 72 | aspm_l1 = 2; // 2 - L1.1 and L1.2 |
| 73 | else |
| 74 | aspm_l1 = 0; |
| 75 | |
| 76 | if (CONFIG(PCIEXP_ASPM)) { |
| 77 | aspm = CONFIG(PCIEXP_L1_SUB_STATE) ? 3 : 1; // 3 - L0sL1, 1 - L0s |
| 78 | } else { |
| 79 | aspm = 0; |
| 80 | aspm_l1 = 0; |
| 81 | } |
| 82 | |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 83 | memset(params->PcieRpEnableCpm, 0, sizeof(params->PcieRpEnableCpm)); |
| 84 | memset(params->CpuPcieRpEnableCpm, 0, sizeof(params->CpuPcieRpEnableCpm)); |
| 85 | memset(params->CpuPcieClockGating, 0, sizeof(params->CpuPcieClockGating)); |
| 86 | memset(params->CpuPciePowerGating, 0, sizeof(params->CpuPciePowerGating)); |
| 87 | |
Michał Żygowski | 1c3b443 | 2022-05-12 15:21:08 +0200 | [diff] [blame] | 88 | params->UsbPdoProgramming = 1; |
| 89 | |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 90 | params->CpuPcieFiaProgramming = 1; |
| 91 | |
| 92 | params->PcieRpFunctionSwap = 0; |
| 93 | params->CpuPcieRpFunctionSwap = 0; |
| 94 | |
Michał Żygowski | cd3a99e | 2022-11-18 17:33:45 +0100 | [diff] [blame] | 95 | params->PchLegacyIoLowLatency = 1; |
| 96 | params->PchDmiAspmCtrl = 0; |
| 97 | |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 98 | params->CpuPcieRpPmSci[0] = 1; // M2_1 |
| 99 | params->CpuPcieRpPmSci[1] = 1; // PCI_E1 |
| 100 | params->PcieRpPmSci[0] = 1; // PCI_E2 |
| 101 | params->PcieRpPmSci[1] = 1; // PCI_E4 |
| 102 | params->PcieRpPmSci[2] = 1; // Ethernet |
| 103 | params->PcieRpPmSci[4] = 1; // PCI_E3 |
| 104 | params->PcieRpPmSci[8] = 1; // M2_3 |
| 105 | params->PcieRpPmSci[20] = 1; // M2_4 |
| 106 | params->PcieRpPmSci[24] = 1; // M2_2 |
| 107 | |
Michał Żygowski | 9711248 | 2022-11-09 18:15:51 +0100 | [diff] [blame] | 108 | params->PcieRpMaxPayload[0] = 1; // PCI_E2 |
| 109 | params->PcieRpMaxPayload[1] = 1; // PCI_E4 |
| 110 | params->PcieRpMaxPayload[2] = 1; // Ethernet |
| 111 | params->PcieRpMaxPayload[4] = 1; // PCI_E3 |
| 112 | params->PcieRpMaxPayload[8] = 1; // M2_3 |
| 113 | params->PcieRpMaxPayload[20] = 1; // M2_4 |
| 114 | params->PcieRpMaxPayload[24] = 1; // M2_2 |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 115 | |
| 116 | params->CpuPcieRpTransmitterHalfSwing[0] = 1; // M2_1 |
| 117 | params->CpuPcieRpTransmitterHalfSwing[1] = 1; // PCI_E1 |
| 118 | params->PcieRpTransmitterHalfSwing[0] = 1; // PCI_E2 |
| 119 | params->PcieRpTransmitterHalfSwing[1] = 1; // PCI_E4 |
| 120 | params->PcieRpTransmitterHalfSwing[2] = 1; // Ethernet |
| 121 | params->PcieRpTransmitterHalfSwing[4] = 1; // PCI_E3 |
| 122 | params->PcieRpTransmitterHalfSwing[8] = 1; // M2_3 |
| 123 | params->PcieRpTransmitterHalfSwing[20] = 1; // M2_4 |
| 124 | params->PcieRpTransmitterHalfSwing[24] = 1; // M2_2 |
| 125 | |
Michał Żygowski | 9711248 | 2022-11-09 18:15:51 +0100 | [diff] [blame] | 126 | params->CpuPcieRpEnableCpm[0] = CONFIG(PCIEXP_CLK_PM); // M2_1 |
| 127 | params->CpuPcieRpEnableCpm[1] = CONFIG(PCIEXP_CLK_PM); // PCI_E1 |
| 128 | params->PcieRpEnableCpm[0] = CONFIG(PCIEXP_CLK_PM); // PCI_E2 |
| 129 | params->PcieRpEnableCpm[1] = CONFIG(PCIEXP_CLK_PM); // PCI_E4 |
| 130 | params->PcieRpEnableCpm[4] = CONFIG(PCIEXP_CLK_PM); // PCI_E3 |
| 131 | params->PcieRpEnableCpm[8] = CONFIG(PCIEXP_CLK_PM); // M2_3 |
| 132 | params->PcieRpEnableCpm[20] = CONFIG(PCIEXP_CLK_PM); // M2_4 |
| 133 | params->PcieRpEnableCpm[24] = CONFIG(PCIEXP_CLK_PM); // M2_2 |
| 134 | |
| 135 | params->CpuPcieRpL1Substates[0] = aspm_l1; // M2_1 |
| 136 | params->CpuPcieRpL1Substates[1] = aspm_l1; // PCI_E1 |
| 137 | params->PcieRpL1Substates[0] = aspm_l1; // PCI_E2 |
| 138 | params->PcieRpL1Substates[1] = aspm_l1; // PCI_E4 |
| 139 | params->PcieRpL1Substates[4] = aspm_l1; // PCI_E3 |
| 140 | params->PcieRpL1Substates[8] = aspm_l1; // M2_3 |
| 141 | params->PcieRpL1Substates[20] = aspm_l1; // M2_4 |
| 142 | params->PcieRpL1Substates[24] = aspm_l1; // M2_2 |
| 143 | |
| 144 | params->CpuPcieRpAspm[0] = aspm; // M2_1 |
| 145 | params->CpuPcieRpAspm[1] = aspm; // PCI_E1 |
| 146 | params->PcieRpAspm[0] = aspm; // PCI_E2 |
| 147 | params->PcieRpAspm[1] = aspm; // PCI_E4 |
| 148 | params->PcieRpAspm[4] = aspm; // PCI_E3 |
| 149 | params->PcieRpAspm[8] = aspm; // M2_3 |
| 150 | params->PcieRpAspm[20] = aspm; // M2_4 |
| 151 | params->PcieRpAspm[24] = aspm; // M2_2 |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 152 | |
| 153 | params->PcieRpAcsEnabled[0] = 1; // PCI_E2 |
| 154 | params->PcieRpAcsEnabled[1] = 1; // PCI_E4 |
| 155 | params->PcieRpAcsEnabled[2] = 1; // Ethernet |
| 156 | params->PcieRpAcsEnabled[4] = 1; // PCI_E3 |
| 157 | params->PcieRpAcsEnabled[8] = 1; // M2_3 |
| 158 | params->PcieRpAcsEnabled[20] = 1; // M2_4 |
| 159 | params->PcieRpAcsEnabled[24] = 1; // M2_2 |
| 160 | |
Michał Żygowski | 9711248 | 2022-11-09 18:15:51 +0100 | [diff] [blame] | 161 | params->CpuPcieClockGating[0] = CONFIG(PCIEXP_CLK_PM); |
| 162 | params->CpuPciePowerGating[0] = CONFIG(PCIEXP_CLK_PM); |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 163 | params->CpuPcieRpMultiVcEnabled[0] = 1; |
| 164 | params->CpuPcieRpPeerToPeerMode[0] = 1; |
| 165 | params->CpuPcieRpMaxPayload[0] = 2; // 512B |
| 166 | params->CpuPcieRpAcsEnabled[0] = 1; |
| 167 | |
Michał Żygowski | 9711248 | 2022-11-09 18:15:51 +0100 | [diff] [blame] | 168 | params->CpuPcieClockGating[1] = CONFIG(PCIEXP_CLK_PM); |
| 169 | params->CpuPciePowerGating[1] = CONFIG(PCIEXP_CLK_PM); |
Michał Żygowski | c354f31 | 2022-04-15 18:19:19 +0200 | [diff] [blame] | 170 | params->CpuPcieRpPeerToPeerMode[1] = 1; |
| 171 | params->CpuPcieRpMaxPayload[1] = 2; // 512B |
| 172 | params->CpuPcieRpAcsEnabled[1] = 1; |
| 173 | |
| 174 | params->SataPortsSolidStateDrive[6] = 1; // M2_3 |
| 175 | params->SataPortsSolidStateDrive[7] = 1; // M2_4 |
| 176 | params->SataLedEnable = 1; |
Michał Kopeć | a833d19 | 2022-04-07 10:24:52 +0200 | [diff] [blame] | 177 | } |
| 178 | |
Michał Żygowski | ee52f23 | 2022-05-04 14:16:07 +0200 | [diff] [blame] | 179 | #if CONFIG(GENERATE_SMBIOS_TABLES) |
| 180 | static const struct port_information smbios_type8_info[] = { |
| 181 | { |
| 182 | .internal_reference_designator = "PS2_USB1", |
| 183 | .internal_connector_type = CONN_NONE, |
| 184 | .external_reference_designator = "Keyboard", |
| 185 | .external_connector_type = CONN_PS_2, |
| 186 | .port_type = TYPE_KEYBOARD_PORT |
| 187 | }, |
| 188 | { |
| 189 | .internal_reference_designator = "PS2_USB1", |
| 190 | .internal_connector_type = CONN_NONE, |
| 191 | .external_reference_designator = "PS2Mouse", |
| 192 | .external_connector_type = CONN_PS_2, |
| 193 | .port_type = TYPE_MOUSE_PORT |
| 194 | }, |
| 195 | { |
| 196 | .internal_reference_designator = "PS2_USB1", |
| 197 | .internal_connector_type = CONN_NONE, |
| 198 | .external_reference_designator = "USB 2.0 Type-A", |
| 199 | .external_connector_type = CONN_ACCESS_BUS_USB, |
| 200 | .port_type = TYPE_USB |
| 201 | }, |
| 202 | { |
| 203 | .internal_reference_designator = "PS2_USB1", |
| 204 | .internal_connector_type = CONN_NONE, |
| 205 | .external_reference_designator = "USB 2.0 Type-A (Flash BIOS)", |
| 206 | .external_connector_type = CONN_ACCESS_BUS_USB, |
| 207 | .port_type = TYPE_USB |
| 208 | }, |
| 209 | { |
| 210 | .internal_reference_designator = "JTPM1 - TPM HDR", |
| 211 | .internal_connector_type = CONN_OTHER, |
| 212 | .external_reference_designator = "", |
| 213 | .external_connector_type = CONN_NONE, |
| 214 | .port_type = TYPE_OTHER_PORT |
| 215 | }, |
| 216 | { |
| 217 | .internal_reference_designator = "LAN_USB1", |
| 218 | .internal_connector_type = CONN_NONE, |
| 219 | .external_reference_designator = "Ethernet", |
| 220 | .external_connector_type = CONN_RJ_45, |
| 221 | .port_type = TYPE_NETWORK_PORT |
| 222 | }, |
| 223 | { |
| 224 | .internal_reference_designator = "LAN_USB1", |
| 225 | .internal_connector_type = CONN_NONE, |
| 226 | .external_reference_designator = "USB 3.2 Gen2x2 Type-C", |
| 227 | .external_connector_type = CONN_USB_TYPE_C, |
| 228 | .port_type = TYPE_USB |
| 229 | }, |
| 230 | { |
| 231 | .internal_reference_designator = "LAN_USB1", |
| 232 | .internal_connector_type = CONN_NONE, |
| 233 | .external_reference_designator = "USB 3.2 Gen2 Type-A", |
| 234 | .external_connector_type = CONN_ACCESS_BUS_USB, |
| 235 | .port_type = TYPE_USB |
| 236 | }, |
| 237 | { |
| 238 | .internal_reference_designator = "SATA1", |
| 239 | .internal_connector_type = CONN_SAS_SATA, |
| 240 | .external_reference_designator = "", |
| 241 | .external_connector_type = CONN_NONE, |
| 242 | .port_type = TYPE_SATA |
| 243 | }, |
| 244 | { |
| 245 | .internal_reference_designator = "SATA2", |
| 246 | .internal_connector_type = CONN_SAS_SATA, |
| 247 | .external_reference_designator = "", |
| 248 | .external_connector_type = CONN_NONE, |
| 249 | .port_type = TYPE_SATA |
| 250 | }, |
| 251 | { |
| 252 | .internal_reference_designator = "SATA3", |
| 253 | .internal_connector_type = CONN_SAS_SATA, |
| 254 | .external_reference_designator = "", |
| 255 | .external_connector_type = CONN_NONE, |
| 256 | .port_type = TYPE_SATA |
| 257 | }, |
| 258 | { |
| 259 | .internal_reference_designator = "SATA4", |
| 260 | .internal_connector_type = CONN_SAS_SATA, |
| 261 | .external_reference_designator = "", |
| 262 | .external_connector_type = CONN_NONE, |
| 263 | .port_type = TYPE_SATA |
| 264 | }, |
| 265 | { |
| 266 | .internal_reference_designator = "SATA5", |
| 267 | .internal_connector_type = CONN_SAS_SATA, |
| 268 | .external_reference_designator = "", |
| 269 | .external_connector_type = CONN_NONE, |
| 270 | .port_type = TYPE_SATA |
| 271 | }, |
| 272 | { |
| 273 | .internal_reference_designator = "SATA6", |
| 274 | .internal_connector_type = CONN_SAS_SATA, |
| 275 | .external_reference_designator = "", |
| 276 | .external_connector_type = CONN_NONE, |
| 277 | .port_type = TYPE_SATA |
| 278 | }, |
| 279 | { |
| 280 | .internal_reference_designator = "JTBT1", |
| 281 | .internal_connector_type = CONN_OTHER, |
| 282 | .external_reference_designator = "", |
| 283 | .external_connector_type = CONN_NONE, |
| 284 | .port_type = TYPE_THUNDERBOLT |
| 285 | }, |
| 286 | { |
| 287 | .internal_reference_designator = "JC1 - CHASSIS INTRUSION", |
| 288 | .internal_connector_type = CONN_OTHER, |
| 289 | .external_reference_designator = "", |
| 290 | .external_connector_type = CONN_NONE, |
| 291 | .port_type = TYPE_OTHER_PORT |
| 292 | }, |
| 293 | { |
| 294 | .internal_reference_designator = "JAUD1 - FRONT AUDIO", |
| 295 | .internal_connector_type = CONN_OTHER, |
| 296 | .external_reference_designator = "", |
| 297 | .external_connector_type = CONN_NONE, |
| 298 | .port_type = TYPE_AUDIO_PORT |
| 299 | }, |
| 300 | { |
| 301 | .internal_reference_designator = "AUDIO1 - REAR AUDIO", |
| 302 | .internal_connector_type = CONN_NONE, |
| 303 | .external_reference_designator = "Audio", |
| 304 | .external_connector_type = CONN_OTHER, |
| 305 | .port_type = TYPE_AUDIO_PORT |
| 306 | }, |
| 307 | { |
| 308 | .internal_reference_designator = "JFP1 - FRONT PANEL", |
| 309 | .internal_connector_type = CONN_OTHER, |
| 310 | .external_reference_designator = "", |
| 311 | .external_connector_type = CONN_NONE, |
| 312 | .port_type = TYPE_OTHER_PORT |
| 313 | }, |
| 314 | { |
| 315 | .internal_reference_designator = "JFP2 - PC SPEAKER", |
| 316 | .internal_connector_type = CONN_OTHER, |
| 317 | .external_reference_designator = "", |
| 318 | .external_connector_type = CONN_NONE, |
| 319 | .port_type = TYPE_OTHER_PORT |
| 320 | }, |
| 321 | { |
| 322 | .internal_reference_designator = "JBAT1 - CLEAR CMOS", |
| 323 | .internal_connector_type = CONN_OTHER, |
| 324 | .external_reference_designator = "", |
| 325 | .external_connector_type = CONN_NONE, |
| 326 | .port_type = TYPE_OTHER_PORT |
| 327 | }, |
| 328 | { |
| 329 | .internal_reference_designator = "JDASH1 - TUNING CONTROLLER", |
| 330 | .internal_connector_type = CONN_OTHER, |
| 331 | .external_reference_designator = "", |
| 332 | .external_connector_type = CONN_NONE, |
| 333 | .port_type = TYPE_OTHER_PORT |
| 334 | }, |
| 335 | { |
| 336 | .internal_reference_designator = "JRGB1 - 5050 RGB LED", |
| 337 | .internal_connector_type = CONN_OTHER, |
| 338 | .external_reference_designator = "", |
| 339 | .external_connector_type = CONN_NONE, |
| 340 | .port_type = TYPE_OTHER_PORT |
| 341 | }, |
| 342 | { |
| 343 | .internal_reference_designator = "JRAINBOW1 - WS2812B RGB LED", |
| 344 | .internal_connector_type = CONN_OTHER, |
| 345 | .external_reference_designator = "", |
| 346 | .external_connector_type = CONN_NONE, |
| 347 | .port_type = TYPE_OTHER_PORT |
| 348 | }, |
| 349 | { |
| 350 | .internal_reference_designator = "JRAINBOW2 - WS2812B RGB LED", |
| 351 | .internal_connector_type = CONN_OTHER, |
| 352 | .external_reference_designator = "", |
| 353 | .external_connector_type = CONN_NONE, |
| 354 | .port_type = TYPE_OTHER_PORT |
| 355 | }, |
| 356 | { |
| 357 | .internal_reference_designator = "CPU_FAN1", |
| 358 | .internal_connector_type = CONN_OTHER, |
| 359 | .external_reference_designator = "", |
| 360 | .external_connector_type = CONN_NONE, |
| 361 | .port_type = TYPE_OTHER_PORT |
| 362 | }, |
| 363 | { |
| 364 | .internal_reference_designator = "PUMP_FAN1", |
| 365 | .internal_connector_type = CONN_OTHER, |
| 366 | .external_reference_designator = "", |
| 367 | .external_connector_type = CONN_NONE, |
| 368 | .port_type = TYPE_OTHER_PORT |
| 369 | }, |
| 370 | { |
| 371 | .internal_reference_designator = "SYS_FAN1", |
| 372 | .internal_connector_type = CONN_OTHER, |
| 373 | .external_reference_designator = "", |
| 374 | .external_connector_type = CONN_NONE, |
| 375 | .port_type = TYPE_OTHER_PORT |
| 376 | }, |
| 377 | { |
| 378 | .internal_reference_designator = "SYS_FAN2", |
| 379 | .internal_connector_type = CONN_OTHER, |
| 380 | .external_reference_designator = "", |
| 381 | .external_connector_type = CONN_NONE, |
| 382 | .port_type = TYPE_OTHER_PORT |
| 383 | }, |
| 384 | { |
| 385 | .internal_reference_designator = "SYS_FAN3", |
| 386 | .internal_connector_type = CONN_OTHER, |
| 387 | .external_reference_designator = "", |
| 388 | .external_connector_type = CONN_NONE, |
| 389 | .port_type = TYPE_OTHER_PORT |
| 390 | }, |
| 391 | { |
| 392 | .internal_reference_designator = "SYS_FAN4", |
| 393 | .internal_connector_type = CONN_OTHER, |
| 394 | .external_reference_designator = "", |
| 395 | .external_connector_type = CONN_NONE, |
| 396 | .port_type = TYPE_OTHER_PORT |
| 397 | }, |
| 398 | { |
| 399 | .internal_reference_designator = "SYS_FAN5", |
| 400 | .internal_connector_type = CONN_OTHER, |
| 401 | .external_reference_designator = "", |
| 402 | .external_connector_type = CONN_NONE, |
| 403 | .port_type = TYPE_OTHER_PORT |
| 404 | }, |
| 405 | { |
| 406 | .internal_reference_designator = "SYS_FAN6", |
| 407 | .internal_connector_type = CONN_OTHER, |
| 408 | .external_reference_designator = "", |
| 409 | .external_connector_type = CONN_NONE, |
| 410 | .port_type = TYPE_OTHER_PORT |
| 411 | }, |
| 412 | { |
| 413 | .internal_reference_designator = "DP_HDMI1", |
| 414 | .internal_connector_type = CONN_NONE, |
| 415 | .external_reference_designator = "HDMI", |
| 416 | .external_connector_type = CONN_OTHER, |
| 417 | .port_type = TYPE_VIDEO_PORT |
| 418 | }, |
| 419 | { |
| 420 | .internal_reference_designator = "DP_HDMI1", |
| 421 | .internal_connector_type = CONN_NONE, |
| 422 | .external_reference_designator = "Display Port", |
| 423 | .external_connector_type = CONN_OTHER, |
| 424 | .port_type = TYPE_VIDEO_PORT |
| 425 | }, |
| 426 | { |
| 427 | .internal_reference_designator = "USB2", |
| 428 | .internal_connector_type = CONN_NONE, |
| 429 | .external_reference_designator = "USB 2.0 Type-A (Upper)", |
| 430 | .external_connector_type = CONN_ACCESS_BUS_USB, |
| 431 | .port_type = TYPE_USB |
| 432 | }, |
| 433 | { |
| 434 | .internal_reference_designator = "USB2", |
| 435 | .internal_connector_type = CONN_NONE, |
| 436 | .external_reference_designator = "USB 2.0 Type-A (Lower)", |
| 437 | .external_connector_type = CONN_ACCESS_BUS_USB, |
| 438 | .port_type = TYPE_USB |
| 439 | }, |
| 440 | { |
| 441 | .internal_reference_designator = "USB2", |
| 442 | .internal_connector_type = CONN_NONE, |
| 443 | .external_reference_designator = "USB 3.2 Gen1 Type-A (Upper)", |
| 444 | .external_connector_type = CONN_ACCESS_BUS_USB, |
| 445 | .port_type = TYPE_USB |
| 446 | }, |
| 447 | { |
| 448 | .internal_reference_designator = "USB2", |
| 449 | .internal_connector_type = CONN_NONE, |
| 450 | .external_reference_designator = "USB 3.2 Gen1 Type-A (Lower)", |
| 451 | .external_connector_type = CONN_ACCESS_BUS_USB, |
| 452 | .port_type = TYPE_USB |
| 453 | }, |
| 454 | { |
| 455 | .internal_reference_designator = "JUSB1 - USB 2.0 ", |
| 456 | .internal_connector_type = CONN_OTHER, |
| 457 | .external_reference_designator = "", |
| 458 | .external_connector_type = CONN_NONE, |
| 459 | .port_type = TYPE_USB |
| 460 | }, |
| 461 | { |
| 462 | .internal_reference_designator = "JUSB2 - USB 2.0", |
| 463 | .internal_connector_type = CONN_OTHER, |
| 464 | .external_reference_designator = "", |
| 465 | .external_connector_type = CONN_NONE, |
| 466 | .port_type = TYPE_USB |
| 467 | }, |
| 468 | { |
| 469 | .internal_reference_designator = "JUSB3 - USB 3.2 GEN 1", |
| 470 | .internal_connector_type = CONN_OTHER, |
| 471 | .external_reference_designator = "", |
| 472 | .external_connector_type = CONN_NONE, |
| 473 | .port_type = TYPE_USB |
| 474 | }, |
| 475 | { |
| 476 | .internal_reference_designator = "JUSB4 - USB 3.2 GEN 1", |
| 477 | .internal_connector_type = CONN_OTHER, |
| 478 | .external_reference_designator = "", |
| 479 | .external_connector_type = CONN_NONE, |
| 480 | .port_type = TYPE_USB |
| 481 | }, |
| 482 | { |
| 483 | .internal_reference_designator = "JUSB5 - USB-C", |
| 484 | .internal_connector_type = CONN_OTHER, |
| 485 | .external_reference_designator = "", |
| 486 | .external_connector_type = CONN_NONE, |
| 487 | .port_type = TYPE_USB |
| 488 | }, |
| 489 | { |
| 490 | .internal_reference_designator = "ATX_PWR1", |
| 491 | .internal_connector_type = CONN_OTHER, |
| 492 | .external_reference_designator = "", |
| 493 | .external_connector_type = CONN_NONE, |
| 494 | .port_type = TYPE_OTHER_PORT |
| 495 | }, |
| 496 | { |
| 497 | .internal_reference_designator = "CPU_PWR1", |
| 498 | .internal_connector_type = CONN_OTHER, |
| 499 | .external_reference_designator = "", |
| 500 | .external_connector_type = CONN_NONE, |
| 501 | .port_type = TYPE_OTHER_PORT |
| 502 | }, |
| 503 | { |
| 504 | .internal_reference_designator = "CPU_PWR2", |
| 505 | .internal_connector_type = CONN_OTHER, |
| 506 | .external_reference_designator = "", |
| 507 | .external_connector_type = CONN_NONE, |
| 508 | .port_type = TYPE_OTHER_PORT |
| 509 | }, |
| 510 | }; |
| 511 | |
| 512 | static int mainboard_smbios_data(struct device *dev, int *handle, unsigned long *current) |
| 513 | { |
| 514 | int len = 0; |
| 515 | |
| 516 | // add port information |
| 517 | len += smbios_write_type8( |
| 518 | current, handle, |
| 519 | smbios_type8_info, |
| 520 | ARRAY_SIZE(smbios_type8_info) |
| 521 | ); |
| 522 | |
| 523 | return len; |
| 524 | } |
| 525 | #endif |
| 526 | |
| 527 | static void mainboard_enable(struct device *dev) |
| 528 | { |
| 529 | #if CONFIG(GENERATE_SMBIOS_TABLES) |
| 530 | dev->ops->get_smbios_data = mainboard_smbios_data; |
| 531 | #endif |
| 532 | } |
| 533 | |
Michał Żygowski | 90989b3 | 2022-04-07 15:16:46 +0200 | [diff] [blame] | 534 | struct chip_operations mainboard_ops = { |
| 535 | .init = mainboard_init, |
| 536 | .enable_dev = mainboard_enable, |
| 537 | }; |