![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <acpi/acpigen.h>
#include <acpi/acpi_device.h>
#include <acpi/acpi_pld.h>
#include <console/console.h>
#include <device/device.h>
#include <device/path.h>
#include <drivers/usb/acpi/chip.h>
#include <gpio.h>
#include <string.h>
#include "chip.h"
#include "retimer.h"
Go to the source code of this file.
Macros | |
#define | INTEL_USB4_RETIMER_DSM_UUID "E0053122-795B-4122-8A5E-57BE1D26ACB3" |
#define | USB4_RETIMER_ITERATION_NUM 12 |
#define | USB4_RETIMER_POLL_CYCLE_MS 25 |
Functions | |
static const char * | usb4_retimer_path_arg (const char *arg) |
static void | usb4_retimer_execute_ec_cmd (uint8_t port, uint8_t cmd, uint8_t expected_value) |
static void | enable_retimer_online_state (uint8_t port, struct acpi_gpio *power_gpio) |
static void | disable_retimer_online_state (uint8_t port, struct acpi_gpio *power_gpio) |
static void | usb4_retimer_cb_standard_query (uint8_t port, void *arg) |
static void | usb4_retimer_cb_get_power_state (uint8_t port, void *arg) |
static void | usb4_retimer_cb_set_power_state (uint8_t port, void *arg) |
static void | usb4_retimer_write_dsm (uint8_t port, const char *uuid, void(**callbacks)(uint8_t port, void *), size_t count, void *arg) |
static void | usb4_retimer_fill_ssdt (const struct device *dev) |
static void | usb4_retimer_enable (struct device *dev) |
__weak const char * | ec_retimer_fw_update_path (void) |
__weak void | ec_retimer_fw_update (uint8_t data) |
__weak int | retimer_get_index_for_typec (uint8_t typec_port) |
Variables | |
static const char * | usb4_retimer_scope |
static void(* | usb4_retimer_callbacks [3])(uint8_t port, void *) |
static struct device_operations | usb4_retimer_dev_ops |
struct chip_operations | drivers_intel_usb4_retimer_ops |
#define INTEL_USB4_RETIMER_DSM_UUID "E0053122-795B-4122-8A5E-57BE1D26ACB3" |
Definition at line 135 of file retimer.c.
References acpigen_disable_tx_gpio(), usb4_retimer_execute_ec_cmd(), USB_RETIMER_FW_UPDATE_DISCONNECT, and USB_RETIMER_FW_UPDATE_RESUME_PD.
Referenced by usb4_retimer_cb_set_power_state().
Definition at line 443 of file retimer.c.
Referenced by usb4_retimer_execute_ec_cmd().
Definition at line 438 of file retimer.c.
References NULL.
Referenced by usb4_retimer_execute_ec_cmd().
Definition at line 77 of file retimer.c.
References acpigen_enable_tx_gpio(), usb4_retimer_execute_ec_cmd(), USB_PD_MUX_NONE, USB_PD_MUX_SAFE_MODE, USB_PD_MUX_USB4_ENABLED, USB_PD_MUX_USB_ENABLED, USB_RETIMER_FW_UPDATE_GET_MUX, USB_RETIMER_FW_UPDATE_SET_SAFE, USB_RETIMER_FW_UPDATE_SET_TBT, USB_RETIMER_FW_UPDATE_SET_USB, and USB_RETIMER_FW_UPDATE_SUSPEND_PD.
Referenced by usb4_retimer_cb_set_power_state().
Definition at line 196 of file retimer.c.
References acpigen_emit_byte(), acpigen_emit_namestring(), acpigen_pop_len(), acpigen_write_else(), acpigen_write_if(), acpigen_write_return_integer(), DEVICE_PATH_MAX, LGREATER_OP, snprintf(), and usb4_retimer_path_arg().
Definition at line 225 of file retimer.c.
References acpigen_emit_byte(), acpigen_emit_namestring(), acpigen_get_package_op_element(), acpigen_pop_len(), acpigen_write_else(), acpigen_write_if(), acpigen_write_if_lequal_namestr_int(), acpigen_write_return_integer(), arg, ARG3_OP, DECREMENT_OP, DEVICE_PATH_MAX, disable_retimer_online_state(), enable_retimer_online_state(), INCREMENT_OP, LAND_OP, LEQUAL_OP, LGREATER_OP, LOCAL1_OP, snprintf(), and usb4_retimer_path_arg().
Definition at line 176 of file retimer.c.
References acpigen_pop_len(), acpigen_write_if_lequal_op_int(), acpigen_write_return_singleton_buffer(), acpigen_write_to_integer(), ARG1_OP, and LOCAL1_OP.
|
static |
Definition at line 30 of file retimer.c.
References acpigen_emit_byte(), acpigen_pop_len(), acpigen_write_if_lequal_namestr_int(), acpigen_write_if_lequal_op_int(), acpigen_write_len_f(), acpigen_write_return_integer(), acpigen_write_sleep(), acpigen_write_store_int_to_op(), BREAK_OP, DECREMENT_OP, ec_retimer_fw_update(), ec_retimer_fw_update_path(), LGREATER_OP, LOCAL2_OP, USB4_RETIMER_ITERATION_NUM, USB4_RETIMER_POLL_CYCLE_MS, USB_PD_MUX_TBT_COMPAT_ENABLED, USB_RETIMER_FW_UPDATE_ERROR, USB_RETIMER_FW_UPDATE_OP_SHIFT, USB_RETIMER_FW_UPDATE_SET_TBT, WHILE_OP, and ZERO_OP.
Referenced by disable_retimer_online_state(), and enable_retimer_online_state().
|
static |
Definition at line 19 of file retimer.c.
References arg, DEVICE_PATH_MAX, name, snprintf(), and usb4_retimer_scope.
Referenced by usb4_retimer_cb_get_power_state(), and usb4_retimer_cb_set_power_state().
|
static |
Definition at line 317 of file retimer.c.
References acpigen_pop_len(), acpigen_write_if_lequal_op_int(), acpigen_write_to_integer(), arg, ARG2_OP, usb4_retimer_dsm_uuid::callbacks, count, DSM_UUID, LOCAL0_OP, and usb4_retimer_dsm_uuid::uuid.
struct chip_operations drivers_intel_usb4_retimer_ops |
|
static |
|
static |
Definition at line 18 of file retimer.c.
Referenced by usb4_retimer_path_arg().