diff options
author | Caveh Jalali <caveh@chromium.org> | 2023-05-17 12:50:40 -0700 |
---|---|---|
committer | Eric Lai <eric_lai@quanta.corp-partner.google.com> | 2023-06-17 02:38:21 +0000 |
commit | 4519c0d8105d32f2ede16aa4b0febddd2cd9ecfe (patch) | |
tree | 5c616ffa9c98ffe36001365199541a1bd3ecb19d /src/mainboard | |
parent | 12e0be32f2177f7ef4100f648e5f10993a143370 (diff) |
mb/google/rex: Set AUX orientation at SoC to follow cable for anx7452
This configures the SoC to flip the orientation of the AUX pins to
follow the orientation of the cable when using the anx7452 retimer. This
is necessary when there is no external retimer/mux or the retimer/mux
does not implement the flip. The anx7452 retimer does not appear to
support this feature, so let the SoC do the flip.
BUG=b:267589042,b:281006910
TEST=verified DP-ALT mode works on rex using both cable orientations
Change-Id: Ibb9f442d2afd81fb5dde4bca97c15457837f9f4a
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75827
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/variant.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mainboard/google/rex/variants/rex0/variant.c b/src/mainboard/google/rex/variants/rex0/variant.c index b259636d66..032eef97c6 100644 --- a/src/mainboard/google/rex/variants/rex0/variant.c +++ b/src/mainboard/google/rex/variants/rex0/variant.c @@ -6,6 +6,10 @@ #include <sar.h> #include <variant/gpio.h> +#define TCP2_AUX_SHIFT 4 +#define TCP_AUX_MASK 0x03 +#define TCP_AUX_FOLLOW_CC1 0x01 + const char *get_wifi_sar_cbfs_filename(void) { return "wifi_sar_0.hex"; @@ -26,4 +30,14 @@ void variant_update_soc_chip_config(struct soc_intel_meteorlake_config *config) { config->cnvi_bt_audio_offload = fw_config_probe(FW_CONFIG(AUDIO, MAX98360_ALC5682I_I2S)); + + if (fw_config_probe(FW_CONFIG(DB_USB, USB4_ANX7452)) || + fw_config_probe(FW_CONFIG(DB_USB, USB4_ANX7452_V2))) { + /* + * Configure TCP2 for + * "SBU orientation not handled by external retimer" + */ + config->tcss_aux_ori &= ~(TCP_AUX_MASK << TCP2_AUX_SHIFT); + config->tcss_aux_ori |= TCP_AUX_FOLLOW_CC1 << TCP2_AUX_SHIFT; + } } |