coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
rtd3.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <acpi/acpigen.h>
4 #include <acpi/acpi_device.h>
5 #include <console/console.h>
6 #include <device/device.h>
7 #include <device/pci_ids.h>
8 #include <device/pci_ops.h>
9 #include <device/pci.h>
10 #include <intelblocks/pmc.h>
11 #include <intelblocks/pmc_ipc.h>
12 #include <intelblocks/pcie_rp.h>
13 #include <soc/iomap.h>
14 #include "chip.h"
15 
16 /*
17  * The "ExternalFacingPort" and "HotPlugSupportInD3" properties are defined at
18  * https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports
19  */
20 #define PCIE_EXTERNAL_PORT_UUID "EFCC06CC-73AC-4BC3-BFF0-76143807C389"
21 #define PCIE_EXTERNAL_PORT_PROPERTY "ExternalFacingPort"
22 
23 #define PCIE_HOTPLUG_IN_D3_UUID "6211E2C0-58A3-4AF3-90E1-927A4E0C55A4"
24 #define PCIE_HOTPLUG_IN_D3_PROPERTY "HotPlugSupportInD3"
25 
26 /*
27  * This UUID and the resulting ACPI Device Property is defined by the
28  * Power Management for Storage Hardware Devices:
29  *
30  * https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro
31  */
32 #define PCIE_RTD3_STORAGE_UUID "5025030F-842F-4AB4-A561-99A5189762D0"
33 #define PCIE_RTD3_STORAGE_PROPERTY "StorageD3Enable"
34 
35 /* PCIe Root Port registers for link status and L23 control. */
36 #define PCH_PCIE_CFG_LSTS 0x52 /* Link Status Register */
37 #define PCH_PCIE_CFG_SPR 0xe0 /* Scratchpad */
38 #define PCH_PCIE_CFG_RPPGEN 0xe2 /* Root Port Power Gating Enable */
39 #define PCH_PCIE_CFG_LCAP_PN 0x4f /* Root Port Number */
40 
41 /* ACPI register names corresponding to PCIe root port registers. */
42 #define ACPI_REG_PCI_LINK_ACTIVE "LASX" /* Link active status */
43 #define ACPI_REG_PCI_L23_RDY_ENTRY "L23E" /* L23_Rdy Entry Request */
44 #define ACPI_REG_PCI_L23_RDY_DETECT "L23R" /* L23_Rdy Detect Transition */
45 #define ACPI_REG_PCI_L23_SAVE_STATE "NCB7" /* Scratch bit to save L23 state */
46 
47 /* ACPI path to the mutex that protects accesses to PMC ModPhy power gating registers */
48 #define RTD3_MUTEX_PATH "\\_SB.PCI0.R3MX"
49 
52  PG_ENABLE = 1,
53 };
54 
55 /* Called from _ON to get PCIe link back to active state. */
56 static void pcie_rtd3_acpi_l23_exit(void)
57 {
58  /* Skip if port is not in L2/L3. */
60 
61  /* Initiate L2/L3 Ready To Detect transition. */
63 
64  /* Wait for transition to detect. */
66 
68 
69  /* Once in detect, wait for link active. */
71 
72  acpigen_pop_len(); /* If */
73 }
74 
75 /* Called from _OFF to put PCIe link into L2/L3 state. */
76 static void pcie_rtd3_acpi_l23_entry(void)
77 {
78  /* Initiate L2/L3 Entry request. */
80 
81  /* Wait for L2/L3 Entry request to clear. */
83 
85 }
86 
87 /* Called from _ON/_OFF to disable/enable ModPHY power gating */
88 static void pcie_rtd3_enable_modphy_pg(unsigned int pcie_rp, enum modphy_pg_state state)
89 {
90  /* Enter the critical section */
94 
97 
98  /* Exit the critical section */
101 }
102 
103 /* Method to enter L2/L3 */
104 static void pcie_rtd3_acpi_method_dl23(void)
105 {
108  acpigen_pop_len(); /* Method */
109 }
110 
111 /* Method to exit L2/L3 */
112 static void pcie_rtd3_acpi_method_l23d(void)
113 {
116  acpigen_pop_len(); /* Method */
117 }
118 
119 /* Method to disable PCH modPHY power gating */
120 static void pcie_rtd3_acpi_method_pds0(unsigned int pcie_rp)
121 {
124  acpigen_pop_len(); /* Method */
125 }
126 
127 /* Method to enable/disable the source clock */
128 static void pcie_rtd3_acpi_method_srck(unsigned int pcie_rp,
130 {
132 
133  if (config->srcclk_pin >= 0) {
135  pmc_ipc_acpi_set_pci_clock(pcie_rp, config->srcclk_pin, false);
137  pmc_ipc_acpi_set_pci_clock(pcie_rp, config->srcclk_pin, true);
138  acpigen_pop_len(); /* If */
139  }
140  acpigen_pop_len(); /* Method */
141 }
142 
143 static void
144 pcie_rtd3_acpi_method_on(unsigned int pcie_rp,
146  enum pcie_rp_type rp_type)
147 {
149 
150  /* When this feature is enabled, ONSK indicates if the previous _OFF was
151  * skipped. If so, since the device was not in Off state, and the current
152  * _ON can be skipped as well.
153  */
154  if (config->skip_on_off_support)
156 
157  /* Disable modPHY power gating for PCH RPs. */
158  if (rp_type == PCIE_RP_PCH)
160 
161  /* Assert enable GPIO to turn on device power. */
162  if (config->enable_gpio.pin_count) {
163  acpigen_enable_tx_gpio(&config->enable_gpio);
164  if (config->enable_delay_ms)
165  acpigen_write_sleep(config->enable_delay_ms);
166  }
167 
168  /* Enable SRCCLK for root port if pin is defined. */
169  if (config->srcclk_pin >= 0)
170  pmc_ipc_acpi_set_pci_clock(pcie_rp, config->srcclk_pin, true);
171 
172  /* De-assert reset GPIO to bring device out of reset. */
173  if (config->reset_gpio.pin_count) {
174  acpigen_disable_tx_gpio(&config->reset_gpio);
175  if (config->reset_delay_ms)
176  acpigen_write_sleep(config->reset_delay_ms);
177  }
178 
179  /* Trigger L23 ready exit flow unless disabled by config. */
180  if (!config->disable_l23)
182 
183  if (config->skip_on_off_support) {
184  /* If current _ON is skipped, ONSK is decremented so that _ON will be
185  * executed normally until _OFF is skipped again.
186  */
189  acpigen_emit_namestring("ONSK");
190 
191  acpigen_pop_len(); /* Else */
192  }
193  acpigen_pop_len(); /* Method */
194 }
195 
196 static void
199  enum pcie_rp_type rp_type)
200 {
202 
203  /* When this feature is enabled, ONSK is checked to see if the device
204  * wants _OFF to be skipped for once. ONSK is normally incremented in the
205  * device method, such as reset _RST, which is invoked during driver reload.
206  * In such case, _OFF needs to be avoided at the end of driver removal.
207  */
208  if (config->skip_on_off_support)
210 
211  /* Trigger L23 ready entry flow unless disabled by config. */
212  if (!config->disable_l23)
214 
215  /* Assert reset GPIO to place device into reset. */
216  if (config->reset_gpio.pin_count) {
217  acpigen_enable_tx_gpio(&config->reset_gpio);
218  if (config->reset_off_delay_ms)
219  acpigen_write_sleep(config->reset_off_delay_ms);
220  }
221 
222  /* Enable modPHY power gating for PCH RPs */
223  if (rp_type == PCIE_RP_PCH)
225 
226  /* Disable SRCCLK for this root port if pin is defined. */
227  if (config->srcclk_pin >= 0)
228  pmc_ipc_acpi_set_pci_clock(pcie_rp, config->srcclk_pin, false);
229 
230  /* De-assert enable GPIO to turn off device power. */
231  if (config->enable_gpio.pin_count) {
232  acpigen_disable_tx_gpio(&config->enable_gpio);
233  if (config->enable_off_delay_ms)
234  acpigen_write_sleep(config->enable_off_delay_ms);
235  }
236 
237  if (config->skip_on_off_support) {
238  /* If current _OFF is skipped, ONSK is incremented so that the
239  * following _ON will also be skipped. In addition, OFSK is decremented
240  * so that next _OFF will be executed normally until the device method
241  * increments OFSK again.
242  */
244  /* OFSK-- */
246  acpigen_emit_namestring("OFSK");
247  /* ONSK++ */
249  acpigen_emit_namestring("ONSK");
250 
251  acpigen_pop_len(); /* Else */
252  }
253  acpigen_pop_len(); /* Method */
254 }
255 
256 static void
258 {
259  const struct acpi_gpio *gpio;
260 
261  acpigen_write_method("_STA", 0);
262 
263  /* Use enable GPIO for status if provided, otherwise use reset GPIO. */
264  if (config->enable_gpio.pin_count)
265  gpio = &config->enable_gpio;
266  else
267  gpio = &config->reset_gpio;
268 
269  /* Read current GPIO value into Local0. */
271 
272  /* Ensure check works for both active low and active high GPIOs. */
274 
279  acpigen_pop_len(); /* Else */
280 
281  acpigen_pop_len(); /* Method */
282 }
283 
284 static void write_modphy_opregion(unsigned int pcie_rp)
285 {
286  /* The register containing the Power Gate enable sequence bits is at
287  PCH_PWRM_BASE + 0x10D0, and the bits to check for sequence completion are at
288  PCH_PWRM_BASE + 0x10D4. */
289  const struct opregion opregion = OPREGION("PMCP", SYSTEMMEMORY,
290  PCH_PWRM_BASE_ADDRESS + 0x1000, 0xff);
291  const struct fieldlist fieldlist[] = {
292  FIELDLIST_OFFSET(0xD0),
293  FIELDLIST_RESERVED(pcie_rp),
294  FIELDLIST_NAMESTR("EMPG", 1), /* Enable ModPHY Power Gate */
295  FIELDLIST_OFFSET(0xD4),
296  FIELDLIST_RESERVED(pcie_rp),
297  FIELDLIST_NAMESTR("AMPG", 1), /* Is ModPHY Power Gate active? */
298  };
299 
303 }
304 
305 static int get_pcie_rp_pmc_idx(enum pcie_rp_type rp_type, const struct device *dev)
306 {
307  int idx = -1;
308 
309  switch (rp_type) {
310  case PCIE_RP_PCH:
311  /* Read port number of root port that this device is attached to. */
313 
314  /* Port number is 1-based, PMC IPC method expects 0-based. */
315  idx--;
316  break;
317  case PCIE_RP_CPU:
318  /* CPU RPs are indexed by their "virtual wire index" to the PCH */
319  idx = soc_get_cpu_rp_vw_idx(dev);
320  break;
321  default:
322  break;
323  }
324 
325  return idx;
326 }
327 
328 static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
329 {
330  static bool mutex_created = false;
331 
333  static const char *const power_res_states[] = {"_PR0"};
334  const struct device *parent = dev->bus->dev;
335  const char *scope = acpi_device_path(parent);
336  const struct opregion opregion = OPREGION("PXCS", PCI_CONFIG, 0, 0xff);
337  const struct fieldlist fieldlist[] = {
339  FIELDLIST_RESERVED(13),
348  };
349  int pcie_rp;
350  struct acpi_dp *dsd, *pkg;
351 
352  if (!is_dev_enabled(parent)) {
353  printk(BIOS_ERR, "%s: root port not enabled\n", __func__);
354  return;
355  }
356  if (!scope) {
357  printk(BIOS_ERR, "%s: root port scope not found\n", __func__);
358  return;
359  }
360  if (!config->enable_gpio.pin_count && !config->reset_gpio.pin_count) {
361  printk(BIOS_ERR, "%s: Enable and/or Reset GPIO required for %s.\n",
362  __func__, scope);
363  return;
364  }
365  if (config->srcclk_pin > CONFIG_MAX_PCIE_CLOCK_SRC) {
366  printk(BIOS_ERR, "%s: Invalid clock pin %u for %s.\n", __func__,
367  config->srcclk_pin, scope);
368  return;
369  }
370 
371  const enum pcie_rp_type rp_type = soc_get_pcie_rp_type(parent);
372  pcie_rp = get_pcie_rp_pmc_idx(rp_type, parent);
373  if (pcie_rp < 0) {
374  printk(BIOS_ERR, "%s: Unknown PCIe root port\n", __func__);
375  return;
376  }
377  if (config->disable_l23) {
378  if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_L23) {
379  printk(BIOS_ERR, "%s: Can not export L23 methods\n", __func__);
380  return;
381  }
382  }
383  if (rp_type != PCIE_RP_PCH) {
384  if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_PSD0) {
385  printk(BIOS_ERR, "%s: Can not export PSD0 method\n", __func__);
386  return;
387  }
388  }
389  if (config->srcclk_pin == 0) {
390  if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_SRCK) {
391  printk(BIOS_ERR, "%s: Can not export SRCK method\n", __func__);
392  return;
393  }
394  }
395 
396  printk(BIOS_INFO, "%s: Enable RTD3 for %s (%s)\n", scope, dev_path(parent),
397  config->desc ?: dev->chip_ops->name);
398 
399  /* Create a mutex for exclusive access to the PMC registers. */
400  if (rp_type == PCIE_RP_PCH && !mutex_created) {
401  acpigen_write_scope("\\_SB.PCI0");
402  acpigen_write_mutex("R3MX", 0);
404  mutex_created = true;
405  }
406 
407  /* The RTD3 power resource is added to the root port, not the device. */
408  acpigen_write_scope(scope);
409 
410  if (config->desc)
411  acpigen_write_name_string("_DDN", config->desc);
412 
413  /* Create OpRegions for MMIO accesses. */
417 
418  if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_L23) {
421  }
422 
423  /* Create the OpRegion to access the ModPHY PG registers (PCH RPs only) */
424  if (rp_type == PCIE_RP_PCH)
425  write_modphy_opregion(pcie_rp);
426 
427  if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_PSD0)
429 
430  if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_SRCK)
432 
433  /* ACPI Power Resource for controlling the attached device power. */
434  acpigen_write_power_res("RTD3", 0, 0, power_res_states, ARRAY_SIZE(power_res_states));
435 
436  if (config->skip_on_off_support) {
437  /* OFSK: 0 = _OFF Method will be executed normally when called;
438  * >1 = _OFF will be skipped.
439  * _OFF Method to decrement OFSK and increment ONSK if the
440  * current execution is skipped.
441  * ONSK: 0 = _ON Method will be executed normally when called;
442  * >1 = _ONF will be skipped.
443  * _ON Method to decrement ONSK if the current execution is
444  * skipped.
445  */
446  acpigen_write_name_integer("ONSK", 0);
447  acpigen_write_name_integer("OFSK", 0);
448  }
449 
451  pcie_rtd3_acpi_method_on(pcie_rp, config, rp_type);
452  pcie_rtd3_acpi_method_off(pcie_rp, config, rp_type);
453  acpigen_pop_len(); /* PowerResource */
454 
455  /* Indicate to the OS that device supports hotplug in D3. */
456  dsd = acpi_dp_new_table("_DSD");
459  acpi_dp_add_package(dsd, pkg);
460 
461  /* Indicate to the OS if the device provides an External facing port. */
462  if (config->is_external) {
465  acpi_dp_add_package(dsd, pkg);
466  }
467  acpi_dp_write(dsd);
468 
469  /*
470  * Check the sibling device on the root port to see if it is storage class and add the
471  * property for the OS to enable storage D3, or allow it to be enabled by config.
472  */
473  if (config->is_storage
474  || (dev->sibling && (dev->sibling->class >> 16) == PCI_BASE_CLASS_STORAGE)) {
479 
480  dsd = acpi_dp_new_table("_DSD");
483  acpi_dp_add_package(dsd, pkg);
484  acpi_dp_write(dsd);
485 
486  acpigen_pop_len(); /* Device */
487 
488  printk(BIOS_INFO, "%s: Added StorageD3Enable property\n", scope);
489  }
490 
491  acpigen_pop_len(); /* Scope */
492 }
493 
494 static const char *pcie_rtd3_acpi_name(const struct device *dev)
495 {
496  /* Attached device name must be "PXSX" for the Linux Kernel to recognize it. */
497  return "PXSX";
498 }
499 
500 static struct device_operations pcie_rtd3_ops = {
502  .set_resources = noop_set_resources,
503  .acpi_fill_ssdt = pcie_rtd3_acpi_fill_ssdt,
504  .acpi_name = pcie_rtd3_acpi_name,
505 };
506 
507 static void pcie_rtd3_acpi_enable(struct device *dev)
508 {
509  dev->ops = &pcie_rtd3_ops;
510 }
511 
513  CHIP_NAME("Intel PCIe Runtime D3")
514  .enable_dev = pcie_rtd3_acpi_enable
515 };
struct acpi_dp * acpi_dp_add_package(struct acpi_dp *dp, struct acpi_dp *package)
Definition: device.c:1036
const char * acpi_device_path(const struct device *dev)
Definition: device.c:144
struct acpi_dp * acpi_dp_add_integer(struct acpi_dp *dp, const char *name, uint64_t value)
Definition: device.c:977
void acpi_dp_write(struct acpi_dp *table)
Definition: device.c:898
const char * acpi_device_name(const struct device *dev)
Definition: device.c:49
struct acpi_dp * acpi_dp_new_table(const char *name)
Definition: device.c:930
void acpigen_write_ADR(uint64_t adr)
Definition: acpigen.c:2122
void acpigen_emit_namestring(const char *namepath)
Definition: acpigen.c:275
void acpigen_pop_len(void)
Definition: acpigen.c:37
void acpigen_write_scope(const char *name)
Definition: acpigen.c:326
int acpigen_disable_tx_gpio(const struct acpi_gpio *gpio)
Definition: acpigen.c:2023
void acpigen_write_sleep(uint64_t sleep_ms)
Definition: acpigen.c:1327
void acpigen_write_delay_until_namestr_int(uint32_t wait_ms, const char *name, uint64_t value)
Definition: acpigen.c:2230
void acpigen_write_method_serialized(const char *name, int nargs)
Definition: acpigen.c:764
void acpigen_write_power_res(const char *name, uint8_t level, uint16_t order, const char *const dev_states[], size_t dev_states_count)
Definition: acpigen.c:1306
void acpigen_write_name_integer(const char *name, uint64_t val)
Definition: acpigen.c:170
void acpigen_write_STA(uint8_t status)
Definition: acpigen.c:783
void acpigen_emit_byte(unsigned char b)
Definition: acpigen.c:61
void acpigen_write_field(const char *name, const struct fieldlist *l, size_t count, uint8_t flags)
Definition: acpigen.c:569
void acpigen_emit_word(unsigned int data)
Definition: acpigen.c:72
void acpigen_emit_ext_op(uint8_t op)
Definition: acpigen.c:66
void acpigen_write_store_int_to_namestr(uint64_t src, const char *dst)
Definition: acpigen.c:1355
void acpigen_write_device(const char *name)
Definition: acpigen.c:769
int acpigen_enable_tx_gpio(const struct acpi_gpio *gpio)
Definition: acpigen.c:2015
void acpigen_write_mutex(const char *name, const uint8_t flags)
Definition: acpigen.c:465
void acpigen_write_opregion(const struct opregion *opreg)
Definition: acpigen.c:447
void acpigen_write_method(const char *name, int nargs)
Definition: acpigen.c:758
void acpigen_write_else(void)
Definition: acpigen.c:1510
void acpigen_write_return_op(uint8_t arg)
Definition: acpigen.c:1571
void acpigen_write_if_lequal_op_op(uint8_t op1, uint8_t op2)
Definition: acpigen.c:1458
void acpigen_write_store_int_to_op(uint64_t src, uint8_t dst)
Definition: acpigen.c:1363
void acpigen_write_name_string(const char *name, const char *string)
Definition: acpigen.c:176
void acpigen_write_if_lequal_namestr_int(const char *namestr, uint64_t val)
Definition: acpigen.c:1486
void acpigen_get_tx_gpio(const struct acpi_gpio *gpio)
Definition: acpigen.c:2039
enum pcie_rp_type soc_get_pcie_rp_type(const struct device *dev)
Definition: pcie_rp.c:102
int soc_get_cpu_rp_vw_idx(const struct device *dev)
Definition: pcie_rp.c:113
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define printk(level,...)
Definition: stdlib.h:16
bool is_dev_enabled(const struct device *dev)
Definition: device_const.c:369
const char * dev_path(const struct device *dev)
Definition: device_util.c:149
@ ACPI_DEVICE_SLEEP_D3_COLD
Definition: acpi.h:53
#define FIELD_NOLOCK
Definition: acpigen.h:172
#define ACPI_STATUS_DEVICE_ALL_ON
Definition: acpigen.h:20
@ ARG0_OP
Definition: acpigen.h:89
@ LOCAL1_OP
Definition: acpigen.h:82
@ LOCAL0_OP
Definition: acpigen.h:81
@ DECREMENT_OP
Definition: acpigen.h:102
@ ZERO_OP
Definition: acpigen.h:30
@ RELEASE_OP
Definition: acpigen.h:62
@ ACQUIRE_OP
Definition: acpigen.h:58
@ ONE_OP
Definition: acpigen.h:31
@ INCREMENT_OP
Definition: acpigen.h:101
@ PCI_CONFIG
Definition: acpigen.h:200
@ SYSTEMMEMORY
Definition: acpigen.h:198
#define FIELDLIST_RESERVED(X)
Definition: acpigen.h:161
#define FIELDLIST_OFFSET(X)
Definition: acpigen.h:153
void acpigen_write_scope_end(void)
Definition: acpigen.h:343
#define ACPI_MUTEX_NO_TIMEOUT
Definition: acpigen.h:303
#define FIELD_ANYACC
Definition: acpigen.h:166
#define OPREGION(rname, space, offset, len)
Definition: acpigen.h:191
#define FIELD_DWORDACC
Definition: acpigen.h:169
#define FIELDLIST_NAMESTR(X, Y)
Definition: acpigen.h:157
#define FIELD_PRESERVE
Definition: acpigen.h:174
#define CHIP_NAME(X)
Definition: device.h:32
static void noop_read_resources(struct device *dev)
Standard device operations function pointers shims.
Definition: device.h:73
static void noop_set_resources(struct device *dev)
Definition: device.h:74
static DEVTREE_CONST void * config_of(const struct device *dev)
Definition: device.h:382
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
Definition: pci_ops.h:46
#define PCH_PWRM_BASE_ADDRESS
Definition: iomap.h:70
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
enum board_config config
Definition: memory.c:448
state
Definition: raminit.c:1787
#define PCI_BASE_CLASS_STORAGE
Definition: pci_ids.h:16
pcie_rp_type
Definition: pcie_rp.h:135
@ PCIE_RP_PCH
Definition: pcie_rp.h:138
@ PCIE_RP_CPU
Definition: pcie_rp.h:137
void pmc_ipc_acpi_set_pci_clock(unsigned int pcie_rp, unsigned int clock_pin, bool enable)
Definition: pmc_ipc.c:219
#define PCH_PCIE_CFG_LSTS
Definition: rtd3.c:36
static const char * pcie_rtd3_acpi_name(const struct device *dev)
Definition: rtd3.c:494
static void pcie_rtd3_acpi_method_status(const struct soc_intel_common_block_pcie_rtd3_config *config)
Definition: rtd3.c:257
static void pcie_rtd3_acpi_method_srck(unsigned int pcie_rp, const struct soc_intel_common_block_pcie_rtd3_config *config)
Definition: rtd3.c:128
static void pcie_rtd3_acpi_method_l23d(void)
Definition: rtd3.c:112
#define PCIE_HOTPLUG_IN_D3_UUID
Definition: rtd3.c:23
#define PCH_PCIE_CFG_SPR
Definition: rtd3.c:37
#define ACPI_REG_PCI_L23_RDY_ENTRY
Definition: rtd3.c:43
#define ACPI_REG_PCI_LINK_ACTIVE
Definition: rtd3.c:42
static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
Definition: rtd3.c:328
#define ACPI_REG_PCI_L23_RDY_DETECT
Definition: rtd3.c:44
static void pcie_rtd3_acpi_enable(struct device *dev)
Definition: rtd3.c:507
static void pcie_rtd3_acpi_method_dl23(void)
Definition: rtd3.c:104
#define PCIE_EXTERNAL_PORT_UUID
Definition: rtd3.c:20
static void write_modphy_opregion(unsigned int pcie_rp)
Definition: rtd3.c:284
#define PCH_PCIE_CFG_RPPGEN
Definition: rtd3.c:38
static struct device_operations pcie_rtd3_ops
Definition: rtd3.c:500
static void pcie_rtd3_acpi_method_on(unsigned int pcie_rp, const struct soc_intel_common_block_pcie_rtd3_config *config, enum pcie_rp_type rp_type)
Definition: rtd3.c:144
#define ACPI_REG_PCI_L23_SAVE_STATE
Definition: rtd3.c:45
static void pcie_rtd3_acpi_l23_entry(void)
Definition: rtd3.c:76
#define PCIE_HOTPLUG_IN_D3_PROPERTY
Definition: rtd3.c:24
static void pcie_rtd3_acpi_method_off(int pcie_rp, const struct soc_intel_common_block_pcie_rtd3_config *config, enum pcie_rp_type rp_type)
Definition: rtd3.c:197
static void pcie_rtd3_acpi_l23_exit(void)
Definition: rtd3.c:56
#define RTD3_MUTEX_PATH
Definition: rtd3.c:48
modphy_pg_state
Definition: rtd3.c:50
@ PG_DISABLE
Definition: rtd3.c:51
@ PG_ENABLE
Definition: rtd3.c:52
#define PCIE_RTD3_STORAGE_PROPERTY
Definition: rtd3.c:33
static int get_pcie_rp_pmc_idx(enum pcie_rp_type rp_type, const struct device *dev)
Definition: rtd3.c:305
struct chip_operations soc_intel_common_block_pcie_rtd3_ops
Definition: rtd3.c:512
#define PCH_PCIE_CFG_LCAP_PN
Definition: rtd3.c:39
static void pcie_rtd3_enable_modphy_pg(unsigned int pcie_rp, enum modphy_pg_state state)
Definition: rtd3.c:88
static void pcie_rtd3_acpi_method_pds0(unsigned int pcie_rp)
Definition: rtd3.c:120
#define PCIE_EXTERNAL_PORT_PROPERTY
Definition: rtd3.c:21
#define PCIE_RTD3_STORAGE_UUID
Definition: rtd3.c:32
@ ACPI_PCIE_RP_EMIT_PSD0
Definition: chip.h:11
@ ACPI_PCIE_RP_EMIT_L23
Definition: chip.h:10
@ ACPI_PCIE_RP_EMIT_SRCK
Definition: chip.h:12
DEVTREE_CONST struct device * dev
Definition: device.h:78
const char * name
Definition: device.h:29
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107
struct chip_operations * chip_ops
Definition: device.h:144
DEVTREE_CONST struct device * sibling
Definition: device.h:111
struct device_operations * ops
Definition: device.h:143
DEVTREE_CONST struct bus * bus
Definition: device.h:108
unsigned int class
Definition: device.h:120
Definition: pinmux.c:36