From e78fd115e6b7ad3b35dde1ba8d6228ed0162a843 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 12 Aug 2021 23:26:25 -0700 Subject: qualcomm/sc7180: Switch to common MIPI panel library This patch changes the sc7180 boards to use the new common MIPI panel framework, which allows more flexible initialization command packing and sharing panel definitions between boards. (I'm taking the lane count control back out again for now, since it seems we only ever want 4 for now anyway, and if we ever have a need for a different lane count it's not clear whether that should be a property of the board or the panel or both. Better to leave that decision until we have a real use case.) Also, the code was not written to deal with DCS commands that were not a length divisible by 4 (it would read over the end of the command buffer). The corresponding kernel driver seems to pad the command with 0xff instead, let's do the same here. (Also increase the maximum allowed command length to 256 bytes, as per Qualcomm's recommendation.) Signed-off-by: Julius Werner Change-Id: I78f6efbaa9da88a3574d5c6a51061e308412340e Reviewed-on: https://review.coreboot.org/c/coreboot/+/56966 Reviewed-by: Shelley Chen Tested-by: build bot (Jenkins) --- src/device/mipi/Kconfig | 3 +++ src/device/mipi/Makefile.inc | 2 ++ src/device/mipi/panel-VIS_RM69299.c | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 src/device/mipi/panel-VIS_RM69299.c (limited to 'src/device') diff --git a/src/device/mipi/Kconfig b/src/device/mipi/Kconfig index 0b05e463ba..72105e4cd4 100644 --- a/src/device/mipi/Kconfig +++ b/src/device/mipi/Kconfig @@ -35,3 +35,6 @@ config MIPI_PANEL_INX_OTA7290D10P config MIPI_PANEL_STA_2081101QFH032011_53G bool + +config MIPI_PANEL_VIS_RM69299 + bool diff --git a/src/device/mipi/Makefile.inc b/src/device/mipi/Makefile.inc index cea7c3afc0..d58e838774 100644 --- a/src/device/mipi/Makefile.inc +++ b/src/device/mipi/Makefile.inc @@ -20,6 +20,8 @@ panel-params-$(CONFIG_MIPI_PANEL_INX_OTA7290D10P) += panel-INX_OTA7290D10P panel-params-$(CONFIG_MIPI_PANEL_STA_2081101QFH032011_53G) += panel-STA_2081101QFH032011_53G +panel-params-$(CONFIG_MIPI_PANEL_VIS_RM69299) += panel-VIS_RM69299 + $(foreach params,$(panel-params-y), \ $(eval cbfs-files-y += $(params)) \ $(eval $(params)-file := $(params).c:struct) \ diff --git a/src/device/mipi/panel-VIS_RM69299.c b/src/device/mipi/panel-VIS_RM69299.c new file mode 100644 index 0000000000..5fdea6039d --- /dev/null +++ b/src/device/mipi/panel-VIS_RM69299.c @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +struct panel_serializable_data VIS_RM69299 = { + .edid = { + .ascii_string = "RM69299", + .manufacturer_name = "RM", + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .pixel_clock = 158695, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 1080, .hbl = 64, .hso = 26, .hspw = 2, + .va = 2248, .vbl = 64, .vso = 56, .vspw = 4, + .phsync = '-', .pvsync = '-', + .x_mm = 74, .y_mm = 131, + }, + }, + .orientation = LB_FB_ORIENTATION_NORMAL, + .init = { + PANEL_DCS(0xFE, 0x00, 0x15, 0x80), + PANEL_DCS(0xc2, 0x08, 0x15, 0x80), + PANEL_DCS(0x35, 0x00, 0x15, 0x80), + PANEL_DCS(0x51, 0xff, 0x15, 0x80), + PANEL_DCS(0x11, 0x00, 0x05, 0x80), + PANEL_DELAY(150), + PANEL_DCS(0x29, 0x00, 0x05, 0x80), + PANEL_DELAY(50), + PANEL_END, + }, +}; -- cgit v1.2.3