Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63529 )
Change subject: drivers/lenovo/hybrid: Add GPIO settings for DDC mux ......................................................................
drivers/lenovo/hybrid: Add GPIO settings for DDC mux
T410 (Nozomi-1) has another GPIO to control DDC muxes independently.
Change-Id: Ib92d07a07e895d325bcd1106184f71106f2ea515 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/drivers/lenovo/hybrid_graphics/chip.h M src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c 2 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/63529/1
diff --git a/src/drivers/lenovo/hybrid_graphics/chip.h b/src/drivers/lenovo/hybrid_graphics/chip.h index b3ea2b6..32922f0 100644 --- a/src/drivers/lenovo/hybrid_graphics/chip.h +++ b/src/drivers/lenovo/hybrid_graphics/chip.h @@ -23,6 +23,10 @@ struct drivers_lenovo_hybrid_graphics_config { unsigned int detect_gpio;
+ unsigned int has_ddc_mux_gpio; + unsigned int ddc_mux_gpio; + unsigned int ddc_integrated_lvl; + unsigned int has_panel_hybrid_gpio; unsigned int panel_hybrid_gpio; unsigned int panel_integrated_lvl; diff --git a/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c b/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c index 7a5e20d..f71d2ad 100644 --- a/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c +++ b/src/drivers/lenovo/hybrid_graphics/hybrid_graphics.c @@ -31,6 +31,10 @@ printk(BIOS_DEBUG, "Hybrid graphics:" " Switching panel to discrete GPU.\n");
+ if (config->has_ddc_mux_gpio) + set_gpio(config->ddc_mux_gpio, + !config->ddc_integrated_lvl); + if (config->has_panel_hybrid_gpio) set_gpio(config->panel_hybrid_gpio, !config->panel_integrated_lvl); @@ -42,6 +46,10 @@ printk(BIOS_DEBUG, "Hybrid graphics:" " Switching panel to integrated GPU.\n");
+ if (config->has_ddc_mux_gpio) + set_gpio(config->ddc_mux_gpio, + config->ddc_integrated_lvl); + if (config->has_panel_hybrid_gpio) set_gpio(config->panel_hybrid_gpio, config->panel_integrated_lvl);