1 /* 2 * Copyright (c) 2020-2022 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef ILI9881C_BOE_H 10 #define ILI9881C_BOE_H 11 #include <drm/drm_mipi_dsi.h> 12 #include <linux/backlight.h> 13 #include <linux/of.h> 14 #include <linux/regulator/consumer.h> 15 #include "hdf_disp.h" 16 17 #define AVDD_GPIO 179 18 #define AVEE_GPIO 156 19 #define VGHL_GPIO 155 20 #define TSRST_GPIO 240 21 #define RESET_GPIO 178 22 23 struct GpioTiming { 24 uint16_t level; 25 uint32_t delay; 26 }; 27 28 struct ResetSeq { 29 uint32_t items; 30 struct GpioTiming *timing; 31 }; 32 33 struct Ili9881cBoeDev { 34 struct PanelData panel; 35 struct mipi_dsi_device *dsiDev; 36 struct regulator *supply; 37 uint16_t avddGpio; 38 uint16_t aveeGpio; 39 uint16_t vghlGpio; 40 uint16_t tsrstGpio; 41 uint16_t resetGpio; 42 struct ResetSeq rstOnSeq; 43 struct ResetSeq rstOffSeq; 44 }; 45 46 #endif