aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso/chip.h
diff options
context:
space:
mode:
authorChris Wang <chris.wang@amd.corp-partner.google.com>2021-01-26 20:09:34 +0800
committerMartin Roth <martinroth@google.com>2021-01-28 20:44:27 +0000
commitad4f6d7c6e10027d420d3bae722b734674643873 (patch)
treec019d327f3932e3dc30881e3ed9080c39799a31b /src/soc/amd/picasso/chip.h
parent15e379aaf334e7931710b4208ccedf2f9ee44b0d (diff)
soc/amd/picasso: allow USB_PD port setting override
Allow to override the RFMUX setting if the board does not use PD chip. BUG=b:177389383 BRANCH=none TEST=Build; Check the USB_PD port been override. Change-Id: Idd559b67668846805005a6e00f5a84655310f348 Signed-off-by: Chris Wang <chris.wang@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49932 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/picasso/chip.h')
-rw-r--r--src/soc/amd/picasso/chip.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/chip.h b/src/soc/amd/picasso/chip.h
index be30efa87c..244d7831ec 100644
--- a/src/soc/amd/picasso/chip.h
+++ b/src/soc/amd/picasso/chip.h
@@ -48,7 +48,25 @@ union __packed usb3_force_gen1 {
uint8_t usb3_port_force_gen1_en;
};
+enum rfmux_configuration_setting {
+ USB_PD_RFMUX_SAFE_STATE = 0x0,
+ USB_PD_RFMUX_USB31_MODE = 0x1,
+ USB_PD_RFMUX_USB31_MODE_FLIP = 0x2,
+ USB_PD_RFMUX_ATE_MODE = 0x3,
+ USB_PD_RFMUX_DP_X2_MODE = 0x4,
+ USB_PD_RFMUX_MF_MODE_ALT_D_F = 0x6,
+ USB_PD_RFMUX_DP_X2_MODE_FLIP = 0x8,
+ USB_PD_RFMUX_MF_MODE_ALT_D_F_FLIP = 0x9,
+ USB_PD_RFMUX_DP_X4_MODE = 0xc,
+};
+
+struct usb_pd_control {
+ uint8_t rfmux_override_en;
+ uint32_t rfmux_config;
+};
+
#define USB_PORT_COUNT 6
+#define USB_PD_PORT_COUNT 2
enum sd_emmc_driver_strength {
SD_EMMC_DRIVE_STRENGTH_B,
@@ -257,6 +275,9 @@ struct soc_amd_picasso_config {
uint8_t pwron_varybl_to_blon;
uint8_t pwrdown_bloff_to_varybloff;
uint8_t min_allowed_bl_level;
+
+ /* allow USB PD port setting override */
+ struct usb_pd_control usb_pd_config_override[USB_PD_PORT_COUNT];
};
#endif /* __PICASSO_CHIP_H__ */