Attention is currently required from: Chiranjeevi Rapolu, Tim Wawrzynczak, John Zhao, Duncan Laurie, Brandon Breitenstein. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51194 )
Change subject: soc/intel/tigerlake: Enable TCSS Muxes to disconnect mode during boot ......................................................................
Patch Set 1:
(1 comment)
File src/soc/intel/tigerlake/early_tcss.c:
https://review.coreboot.org/c/coreboot/+/51194/comment/b685bded_225c2ec2 PS1, Line 322: mainboard_tcss_get_port_info
The reason it was done this way was to avoid any calling to EC/other FWs to get the information for […]
Aah that intent was definitely not clear from the callbacks. What do you think about splitting the structure into two as well:
instead of
struct tcss_mux { bool dp; /* DP connected */ bool usb; /* USB connected */ bool cable; /* Activ/Passive Cable */ bool polarity; /* polarity of connected device */ bool hpd_lvl; /* HPD Level assert */ bool hpd_irq; /* HPD IRQ assert */ bool ufp; bool acc; uint8_t dp_mode; /* DP Operation Mode */ uint8_t usb3_port; /* USB2 Port Number */ uint8_t usb2_port; /* USB3 Port Number */ };
define:
struct tcss_port_map { uint8_t usb3_port; /* USB2 Port Number */ uint8_t usb2_port; /* USB3 Port Number */ };
struct tcss_port_mux_config { bool dp; /* DP connected */ bool usb; /* USB connected */ bool cable; /* Activ/Passive Cable */ bool polarity; /* polarity of connected device */ bool hpd_lvl; /* HPD Level assert */ bool hpd_irq; /* HPD IRQ assert */ bool ufp; bool acc; uint8_t dp_mode; /* DP Operation Mode */ };
and then the callbacks can be named:
mainboard_get_tcss_port_map() mainboard_get_tcss_mux_config()
Current function can do this:
Step 1: Get MUX port map using mainboard_get_tcss_port_map() Step 2: Reset MUX to disconnected state and set up USB2/3 port mapping Step 3: If display init is not required, return. Step 4: For each port, in the above map, request MUX config using mainboard_get_tcss_mux_config and call tcss_configure_dp_mode for it.
I am not sure if there is a better way to get USB2/3 port mapping from the devicetree directly. Tim might have some pointers since he has looked closely at that.