Attention is currently required from: Shelley Chen, Philip Chen, Douglas Anderson. Hello Shelley Chen, Philip Chen, Douglas Anderson,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/58026
to review the following change.
Change subject: google/trogdor: Always initialize eDP bridge I2C QUP firmware ......................................................................
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 jwerner@chromium.org Change-Id: Ie4546c31d87d91113eeef7dc7a18599a87e6d6eb --- M src/mainboard/google/trogdor/mainboard.c 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/58026/1
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 48949d5..2d9dac3 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -23,7 +23,7 @@ #include "board.h" #include <soc/addressmap.h>
-#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 @@ 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 @@ 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);