coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpigen_usb.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef ACPI_ACPIGEN_USB_H
4 #define ACPI_ACPIGEN_USB_H
5 
6 #include <acpi/acpi_pld.h>
7 
12 };
13 
18 };
19 
24 };
25 
26 /**
27  * Configuration required to write out a Type-C Connector ACPI object.
28  *
29  * @power_role: DUAL if device supports being both a source and a sink, otherwise choose
30  * the device's default power role
31  * @try_power_role: SINK if device supports Try.SNK, SOURCE if device supports Try.SRC,
32  * otherwise choose NONE
33  * @data_role: Choose DUAL if device can alternate between UFP (host) & DFP (device),
34  * otherwise specify UFP or DFP.
35  * @usb2_port: Reference to the ACPI device that represents the USB2 signals
36  * @usb3_port: Reference to the ACPI device that represents the USB3 signals
37  * @usb4_port: Reference to the ACPI device that represents the USB4 signals
38  * @orientation_switch: Reference to the ACPI device that controls the switching of
39  * the orientation/polarity for Data and SBU lines.
40  * @usb_role_switch: Reference to the ACPI device that can select the USB role,
41  * host or device, for the USB port
42  * @mode_switch: Reference to the ACPI device that controls routing of data lines to
43  * various endpoints (xHCI, DP, etc.) on the SoC.
44  * @pld: Reference to PLD information.
45  */
50  const struct device *usb2_port;
51  const struct device *usb3_port;
52  const struct device *usb4_port;
53  const struct device *orientation_switch;
54  const struct device *usb_role_switch;
55  const struct device *mode_switch;
56  const struct acpi_pld *pld;
57 };
58 
59 typedef void (*add_custom_dsd_property_cb)(struct acpi_dp *dsd, int port_number);
60 
62  int port_number,
63  add_custom_dsd_property_cb add_custom_dsd_property);
64 
65 #endif /* ACPI_ACPIGEN_USB_H */
usb_typec_data_role
Definition: acpigen_usb.h:20
@ TYPEC_DATA_ROLE_DFP
Definition: acpigen_usb.h:21
@ TYPEC_DATA_ROLE_DUAL
Definition: acpigen_usb.h:23
@ TYPEC_DATA_ROLE_UFP
Definition: acpigen_usb.h:22
void acpigen_write_typec_connector(const struct typec_connector_class_config *config, int port_number, add_custom_dsd_property_cb add_custom_dsd_property)
Definition: acpigen_usb.c:111
void(* add_custom_dsd_property_cb)(struct acpi_dp *dsd, int port_number)
Definition: acpigen_usb.h:59
usb_typec_power_role
Definition: acpigen_usb.h:8
@ TYPEC_POWER_ROLE_DUAL
Definition: acpigen_usb.h:11
@ TYPEC_POWER_ROLE_SINK
Definition: acpigen_usb.h:10
@ TYPEC_POWER_ROLE_SOURCE
Definition: acpigen_usb.h:9
usb_typec_try_power_role
Definition: acpigen_usb.h:14
@ TYPEC_TRY_POWER_ROLE_NONE
Definition: acpigen_usb.h:15
@ TYPEC_TRY_POWER_ROLE_SOURCE
Definition: acpigen_usb.h:17
@ TYPEC_TRY_POWER_ROLE_SINK
Definition: acpigen_usb.h:16
enum board_config config
Definition: memory.c:448
Definition: device.h:107
Configuration required to write out a Type-C Connector ACPI object.
Definition: acpigen_usb.h:46
const struct acpi_pld * pld
Definition: acpigen_usb.h:56
const struct device * usb_role_switch
Definition: acpigen_usb.h:54
enum usb_typec_data_role data_role
Definition: acpigen_usb.h:49
const struct device * usb2_port
Definition: acpigen_usb.h:50
const struct device * usb3_port
Definition: acpigen_usb.h:51
enum usb_typec_try_power_role try_power_role
Definition: acpigen_usb.h:48
const struct device * usb4_port
Definition: acpigen_usb.h:52
enum usb_typec_power_role power_role
Definition: acpigen_usb.h:47
const struct device * orientation_switch
Definition: acpigen_usb.h:53
const struct device * mode_switch
Definition: acpigen_usb.h:55
typedef void(X86APIP X86EMU_intrFuncs)(int num)