From ad4f6d7c6e10027d420d3bae722b734674643873 Mon Sep 17 00:00:00 2001 From: Chris Wang Date: Tue, 26 Jan 2021 20:09:34 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49932 Reviewed-by: Felix Held Reviewed-by: Raul Rangel Tested-by: build bot (Jenkins) --- src/soc/amd/picasso/chip.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/soc/amd/picasso/chip.h') 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__ */ -- cgit v1.2.3