# Copyright (c) 2023 Gunar Schorcht # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. # if MODULE_ST77XX config MODULE_ST7789 bool "ST7789 display" default y if HAVE_ST7789 help ST7789 display controller is used if MODULE_ST7789 menuconfig ST7789_CUSTOM_CONFIG bool "ST7789 Custom Configuration" help Enable if customized configuration of voltages are needed. Otherwise reset default values are used. if ST7789_CUSTOM_CONFIG config ST7789_AVDD int "AVDD voltage (in millivolts)" default 6600 range 6400 6800 help Configure the AVDD voltage for analog circuits in millivolts. Valid values must be in the range of 6400 (6.4V) to 6800 (6.8V) in steps of 200. config ST7789_AVCL int "AVDD voltage (in millivolts)" default -4400 range -5000 -4400 help Configure the AVCL voltage in millivolts. Valid values must be in the range of -5000 (-5V) to -4400 (-4.4V) in steps of 200. config ST7789_VCOM int "VCOM voltage (in millivolts)" default 900 range 100 1675 help Configure the VCOM voltage level. VCOM needs to be adjusted to match the capacitance and performance specifications of the TFT panel to maximize contrast and minimize flickering. VCOM is used to derive the GVDD (gamma reference positive voltage) and the GVCL (gamma reference negative voltage) as follows: GDDV = +VRH + VCOM + VCOM_OFFSET + (0.5 * VDV) GVCL = -VRH + VCOM + VCOM_OFFSET - (0.5 * VDV) Valid values must be in the range of 100 (0.1V) to 1675 (1.675V) in steps of 25. config ST7789_VCOM_OFFSET int "VCOM voltage offset (in millivolts)" default 0 range -800 775 help Configure the VCOM voltage offset (VCOM_OFFSET). VCOM_OFFSET is used to derive the GVDD (gamma reference positive voltage) and the GVCL (gamma reference negative voltage) as follows: GDDV = +VRH + VCOM + VCOM_OFFSET + (0.5 * VDV) GVCL = -VRH + VCOM + VCOM_OFFSET - (0.5 * VDV) Valid values must be in the range of -800 (-0.8V) to 775 (0.775V) in steps of 25. config ST7789_VDV int "VDV voltage offset factor (in millivolts)" default 0 range -800 775 help Configure the VDV voltage offset factor. VDV is used to derive the GVDD (gamma reference positive voltage) and the GVCL (gamma reference negative voltage) as follows: GDDV = +VRH + VCOM + VCOM_OFFSET + (0.5 * VDV) GVCL = -VRH + VCOM + VCOM_OFFSET - (0.5 * VDV) Valid values must be in the range of -800 (-0.8V) to 775 (0.775V) in steps of 25. config ST7789_VRH int "VRH voltage range (in millivolts)" default 4100 range 3550 5500 help Configure the VRH voltage range. VRH is used to derive the GVDD (gamma reference positive voltage) and the GVCL (gamma reference negative voltage) as follows: GDDV = +VRH + VCOM + VCOM_OFFSET + (0.5 * VDV) GVCL = -VRH + VCOM + VCOM_OFFSET - (0.5 * VDV) Valid values must be in the range of 3350 (3.35V) to 5500 (5.5V) in steps of 50. # TODO ST7789_VGH and ST7789_VGL (non linear values) endif # ST7789_CUSTOM_CONFIG endif # MODULE_ST7789 endif # MODULE_ST77XX