Nyan: turn on the backlight.
These few changes will turn on the backlight. There is a redundant (at present) power on of the panel vdd but we should leave it there, as we are not sure whether to keep it in romstage or not. Note in this mode (at Nvidia's recommendation) we don't run the PWM as a PWM, just a GPIO. That keeps things simple. The backlight, incidentally, is turning out to be a nice, visible, power LED. BUG=None TEST=Build, boot, backlight comes on. BRANCH=None Change-Id: I5def9a0255d82fdd240be7e9097de3889595db2d Signed-off-by: Ronald G. Minnich <rminnich@google.com> Reviewed-on: https://chromium-review.googlesource.com/174533 Commit-Queue: Ronald Minnich <rminnich@chromium.org> Tested-by: Ronald Minnich <rminnich@chromium.org> Reviewed-by: Gabe Black <gabeblack@chromium.org>
This commit is contained in:
parent
fba4ae1080
commit
12649c9611
2 changed files with 35 additions and 2 deletions
|
|
@ -61,9 +61,14 @@ static struct pmic_write pmic_writes[] =
|
|||
* NOTE: We do this early because doing it later seems to hose the CPU
|
||||
* power rail/partition startup. Need to debug.
|
||||
*/
|
||||
{ 0x16, 0x3f }
|
||||
{ 0x16, 0x3f },
|
||||
|
||||
/* Don't write LDCONTROL - it's already 0xFF, i.e. all LDOs enabled. */
|
||||
/* panel power GPIO O4. Set mode for GPIO4 (0x0c to 7), then set
|
||||
* the value (register 0x20 bit 4)
|
||||
*/
|
||||
{ 0x0c, 0x07 },
|
||||
{ 0x20, 0x10 },
|
||||
};
|
||||
|
||||
void pmic_init(unsigned bus)
|
||||
|
|
|
|||
|
|
@ -222,7 +222,36 @@ void display_startup(device_t dev)
|
|||
/* should probably just make it all MiB ... in future */
|
||||
u32 framebuffer_size_mb = config->framebuffer_size / MiB;
|
||||
u32 framebuffer_base_mb= config->framebuffer_base / MiB;
|
||||
/* light it all up */
|
||||
/* This one may have been done in romstage but that's ok for now. */
|
||||
if (config->panel_vdd_gpio){
|
||||
gpio_output(config->panel_vdd_gpio, 1);
|
||||
printk(BIOS_SPEW,"%s: panel_vdd setting gpio %08x to %d\n",
|
||||
__func__, config->panel_vdd_gpio, 1);
|
||||
}
|
||||
delay(1);
|
||||
if (config->backlight_vdd_gpio){
|
||||
gpio_output(config->backlight_vdd_gpio, 1);
|
||||
printk(BIOS_SPEW,"%s: backlight vdd setting gpio %08x to %d\n",
|
||||
__func__, config->backlight_vdd_gpio, 1);
|
||||
}
|
||||
delay(1);
|
||||
if (config->lvds_shutdown_gpio){
|
||||
gpio_output(config->lvds_shutdown_gpio, 0);
|
||||
printk(BIOS_SPEW,"%s: lvds shutdown setting gpio %08x to %d\n",
|
||||
__func__, config->lvds_shutdown_gpio, 0);
|
||||
}
|
||||
if (config->backlight_en_gpio){
|
||||
gpio_output(config->backlight_en_gpio, 1);
|
||||
printk(BIOS_SPEW,"%s: backlight enable setting gpio %08x to %d\n",
|
||||
__func__, config->backlight_en_gpio, 1);
|
||||
}
|
||||
|
||||
if (config->pwm){
|
||||
gpio_output(config->pwm, 1);
|
||||
printk(BIOS_SPEW,"%s: pwm setting gpio %08x to %d\n",
|
||||
__func__, config->pwm, 1);
|
||||
}
|
||||
printk(BIOS_SPEW,
|
||||
"%s: xres %d yres %d framebuffer_bits_per_pixel %d\n",
|
||||
__func__,
|
||||
|
|
@ -299,6 +328,5 @@ void display_startup(device_t dev)
|
|||
|
||||
if (!setup_window(&window, config))
|
||||
update_window(dc, &window, config);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue