drivers: display: st7789v: move PORCTRL setup to after CMD2EN

The PORCTRL setting command is in 'bank2' and so might not be changed on
the controller unless bank2 is enabled first.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
This commit is contained in:
Marc Reilly 2020-04-06 08:32:51 +10:00 committed by Kumar Gala
commit de2f2cd14f

View file

@ -265,12 +265,12 @@ static void st7789v_lcd_init(struct st7789v_data *p_st7789v)
st7789v_set_lcd_margins(p_st7789v, 0, 0);
st7789v_transmit(p_st7789v, ST7789V_CMD_PORCTRL, st7789v_porch_param,
sizeof(st7789v_porch_param));
st7789v_transmit(p_st7789v, ST7789V_CMD_CMD2EN, st7789v_cmd2en_param,
sizeof(st7789v_cmd2en_param));
st7789v_transmit(p_st7789v, ST7789V_CMD_PORCTRL, st7789v_porch_param,
sizeof(st7789v_porch_param));
/* Digital Gamma Enable, default disabled */
tmp = 0x00;
st7789v_transmit(p_st7789v, ST7789V_CMD_DGMEN, &tmp, 1);