soc/amd/genoa: Add USB configuration

Drive board specific USB configuration from the coreboot devicetree into
the opensil input block.

Add USB OC pins to chipset.cb

In the process of scrubbing opensil for public release USB became non
functional.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I506547a7abbb643d3e982e44a92f33b45cd739e9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76517
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
This commit is contained in:
Arthur Heymans 2023-07-14 20:08:12 +02:00 committed by Felix Held
parent 543c1ee314
commit 663c577311
3 changed files with 68 additions and 0 deletions

View File

@ -9,11 +9,65 @@
#include <soc/iomap.h>
#include <types.h>
struct usb31_phy_settings {
uint8_t rx_ana_iq_phase_adjust;
uint8_t rx_eq_delta_iq_ovrd_en;
uint8_t rx_eq_delta_iq_ovrd_val;
uint8_t rx_iq_phase_adjust;
uint8_t tx_vboost_lvl_en;
uint8_t tx_vboost_lvl;
uint8_t rx_vref_ctrl_en;
uint8_t rx_vref_ctrl;
uint8_t tx_vboost_lvl_en_x;
uint8_t tx_vboost_lvl_x;
uint8_t rx_vref_ctrl_en_x;
uint8_t rx_vref_ctrl_x;
};
struct soc_usb_config {
uint8_t xhci0_enable : 1;
uint8_t xhci1_enable : 1;
uint8_t xhci2_enable : 1;
struct {
uint8_t port0 : 4;
uint8_t port1 : 4;
uint8_t port2 : 4;
uint8_t port3 : 4;
uint8_t port4 : 4;
uint8_t port5 : 4;
uint8_t port6 : 4;
uint8_t port7 : 4;
} usb2_oc_pins[2];
struct {
uint8_t port0 : 4;
uint8_t port1 : 4;
uint8_t port2 : 4;
uint8_t port3 : 4;
} usb3_oc_pins[2];
bool polarity_cfg_low;
union {
struct {
uint8_t port0 : 2;
uint8_t port1 : 2;
uint8_t port2 : 2; /* Broken in OpenSIL */
uint8_t port3 : 2; /* Broken in OpenSIL */
};
uint8_t raw;
} usb3_force_gen1;
bool usb31_phy_enable;
struct usb31_phy_settings usb31_phy[8];
bool s1_usb31_phy_enable;
struct usb31_phy_settings s1_usb31_phy[8];
};
struct soc_amd_genoa_config {
struct soc_amd_common_config common_config;
u8 i2c_scl_reset;
struct dw_i2c_bus_config i2c[I2C_CTRLR_COUNT];
struct soc_usb_config usb;
};
#endif

View File

@ -3,6 +3,12 @@
chip soc/amd/genoa
device cpu_cluster 0 on ops amd_cpu_bus_ops end
# OC pins
register "usb.usb2_oc_pins[0]" = "{ 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf }"
register "usb.usb2_oc_pins[1]" = "{ 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf, 0xf }"
register "usb.usb3_oc_pins[0]" = "{ 0xf, 0xf, 0xf, 0xf }"
register "usb.usb3_oc_pins[1]" = "{ 0xf, 0xf, 0xf, 0xf }"
device domain 0 on
ops genoa_pci_domain_ops
device pci 00.0 alias gnb_0 on end

View File

@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _SOC_GENOA_SOC_CHIP_H_
#define _SOC_GENOA_SOC_CHIP_H_
#include "../../chip.h"
#endif