diff options
author | Keith Short <keithshort@chromium.org> | 2022-10-20 11:35:45 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-11-04 22:51:13 +0000 |
commit | 13c68a3e7a85119367ddbcd130518163e4dcd619 (patch) | |
tree | 08736bb29c15afc4ca68f1958f6c34ec248640f3 /zephyr/program/corsola/include | |
parent | fba4956a5c7c7df15822a721310bc46b93ded47c (diff) | |
download | chrome-ec-13c68a3e7a85119367ddbcd130518163e4dcd619.tar.gz |
zephyr: rename projects folder to program
Renme the projects folder to program for consistency with the name
scheme used by the boxster configuration.
BUG=b:254097139
BRANCH=none
TEST=zmake compare-builds -a
TEST=twister
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ib56a57f1e5942e6dd0460e3be81722896eed72af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3968444
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'zephyr/program/corsola/include')
-rw-r--r-- | zephyr/program/corsola/include/baseboard_usbc_config.h | 42 | ||||
-rw-r--r-- | zephyr/program/corsola/include/variant_db_detection.h | 37 |
2 files changed, 79 insertions, 0 deletions
diff --git a/zephyr/program/corsola/include/baseboard_usbc_config.h b/zephyr/program/corsola/include/baseboard_usbc_config.h new file mode 100644 index 0000000000..a80aa10446 --- /dev/null +++ b/zephyr/program/corsola/include/baseboard_usbc_config.h @@ -0,0 +1,42 @@ +/* Copyright 2021 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Corsola daughter board detection */ + +#ifndef __CROS_EC_BASEBOARD_USBC_CONFIG_H +#define __CROS_EC_BASEBOARD_USBC_CONFIG_H + +#include "gpio.h" + +#ifdef CONFIG_PLATFORM_EC_USB_PD_TCPM_RT1718S +#define GPIO_EN_USB_C1_SINK RT1718S_GPIO1 +#define GPIO_EN_USB_C1_SOURCE RT1718S_GPIO2 +#define GPIO_EN_USB_C1_FRS RT1718S_GPIO3 +#endif + +void ppc_interrupt(enum gpio_signal signal); +void ccd_interrupt(enum gpio_signal signal); +void hdmi_hpd_interrupt(enum gpio_signal signal); +void ps185_hdmi_hpd_mux_set(void); +int corsola_is_dp_muxable(int port); + +/* USB-A ports */ +enum usba_port { USBA_PORT_A0 = 0, USBA_PORT_COUNT }; + +/* USB-C ports */ +enum usbc_port { USBC_PORT_C0 = 0, USBC_PORT_C1, USBC_PORT_COUNT }; +BUILD_ASSERT(USBC_PORT_COUNT == CONFIG_USB_PD_PORT_MAX_COUNT); + +/** + * Is the port fine to be muxed its DisplayPort lines? + * + * Only one port can be muxed to DisplayPort at a time. + * + * @param port Port number of TCPC. + * @return 1 is fine; 0 is bad as other port is already muxed; + */ +int corsola_is_dp_muxable(int port); + +#endif /* __CROS_EC_BASEBOARD_USBC_CONFIG_H */ diff --git a/zephyr/program/corsola/include/variant_db_detection.h b/zephyr/program/corsola/include/variant_db_detection.h new file mode 100644 index 0000000000..e98ba3067d --- /dev/null +++ b/zephyr/program/corsola/include/variant_db_detection.h @@ -0,0 +1,37 @@ +/* Copyright 2021 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Corsola daughter board detection */ + +#ifndef __CROS_EC_CORSOLA_DB_DETECTION_H +#define __CROS_EC_CORSOLA_DB_DETECTION_H + +enum corsola_db_type { + CORSOLA_DB_UNINIT = -1, + CORSOLA_DB_NONE, + CORSOLA_DB_TYPEC, + CORSOLA_DB_HDMI, + CORSOLA_DB_COUNT, +}; + +#ifdef CONFIG_VARIANT_CORSOLA_DB_DETECTION +/* + * Get the connected daughterboard type. + * + * @return The daughterboard type. + */ +enum corsola_db_type corsola_get_db_type(void); +#else +inline enum corsola_db_type corsola_get_db_type(void) +{ + return CORSOLA_DB_NONE; +}; +#endif /* CONFIG_VARIANT_CORSOLA_DB_DETECTION */ + +/* return the adjusted port count for board overridden usbc/charger functions. + */ +uint8_t board_get_adjusted_usb_pd_port_count(void); + +#endif /* __CROS_EC_CORSOLA_DB_DETECTION_H */ |