From f67f2b0d4ca4d1d72fa077d69abef916c8c3a38c Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 28 Sep 2021 14:46:59 -0700 Subject: google/trogdor: Always initialize eDP bridge I2C QUP firmware In CB:52662 when MIPI display support was added, we accidentally changed the code flow for eDP displays such that i2c_init() will no longer be called when display_init_required() is false. This is a problem because on this platform, i2c_init() does not just prepare the I2C controller for firmware use, it also loads firmware to the controller that makes it behave like an I2C device in the first place -- a step that the kernel cannot later do on its own if the firmware didn't already do it. Skipping this initialization means the I2C controller becomes unusable to the kernel. This patch fixes the issue by making the i2c_init() unconditional again. Signed-off-by: Julius Werner Change-Id: Ie4546c31d87d91113eeef7dc7a18599a87e6d6eb Reviewed-on: https://review.coreboot.org/c/coreboot/+/58026 Reviewed-by: Douglas Anderson Tested-by: build bot (Jenkins) --- src/mainboard/google/trogdor/mainboard.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 48949d5a9cbf..2d9dac3ce69e 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -23,7 +23,7 @@ #include "board.h" #include -#define BRIDGE_BUS 0x2 +#define BRIDGE_BUS QUPV3_0_SE2 #define BRIDGE_CHIP 0x2d static struct usb_board_data usb0_board_data = { @@ -177,6 +177,9 @@ static void display_startup(void) struct panel_serializable_data *panel = &edp_panel; enum lb_fb_orientation orientation = LB_FB_ORIENTATION_NORMAL; + /* Always initialize this so QUP firmware is loaded for the kernel. */ + i2c_init(BRIDGE_BUS, I2C_SPEED_FAST); + if (!display_init_required()) { printk(BIOS_INFO, "Skipping display init.\n"); return; @@ -189,7 +192,6 @@ static void display_startup(void) return; } else { enum dp_pll_clk_src ref_clk = SN65_SEL_19MHZ; - i2c_init(QUPV3_0_SE2, I2C_SPEED_FAST); /* EDP Bridge I2C */ power_on_bridge(); mdelay(250); /* Delay for the panel to be up */ sn65dsi86_bridge_init(BRIDGE_BUS, BRIDGE_CHIP, ref_clk); -- cgit v1.2.3