A DSI write is issued in st7701_prepare even when the probed panel
runs on SPI. In practice, this results in a panic with the
vc4-kms-dpi-hyperpixel2r overlay active.
Perform the equivalent write over SPI in this case.
Signed-off-by: Jack Andersen <jackoalan@gmail.com>
st7701->desc->gip_sequence(st7701);
/* Disable Command2 */
- st7701_switch_cmd_bkx(st7701, false, 0);
+ switch (st7701->desc->interface) {
+ case ST7701_CTRL_DSI:
+ st7701_switch_cmd_bkx(st7701, false, 0);
+ break;
+ case ST7701_CTRL_SPI:
+ ST7701_SPI(st7701, DSI_CMD2BKX_SEL,
+ 0x177, 0x101, 0x100, 0x100, SPI_CMD2BKX_SEL_NONE);
+ break;
+ }
return 0;
}