• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * include/linux/amlogic/media/vout/lcd/aml_lcd.h
3  *
4  * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  */
17 
18 #ifndef _INC_AML_LCD_COMMON_H_
19 #define _INC_AML_LCD_COMMON_H_
20 
21 
22 #define LCD_EXT_I2C_BUS_0          0  /* A */
23 #define LCD_EXT_I2C_BUS_1          1  /* B */
24 #define LCD_EXT_I2C_BUS_2          2  /* C */
25 #define LCD_EXT_I2C_BUS_3          3  /* D */
26 #define LCD_EXT_I2C_BUS_4          4  /* AO */
27 #define LCD_EXT_I2C_BUS_MAX        0xff
28 
29 #define LCD_EXT_I2C_BUS_INVALID    0xff
30 #define LCD_EXT_I2C_ADDR_INVALID   0xff
31 #define LCD_EXT_GPIO_INVALID       0xff
32 
33 #define LCD_EXT_SPI_CLK_FREQ_DFT   10 /* unit: KHz */
34 
35 /*******************************************/
36 /*        LCD EXT CMD                      */
37 /*******************************************/
38 #define LCD_EXT_CMD_TYPE_CMD_DELAY     0x00
39 #define LCD_EXT_CMD_TYPE_CMD2_DELAY    0x01  /* for i2c device 2nd addr */
40 #define LCD_EXT_CMD_TYPE_CMD3_DELAY    0x02  /* for i2c device 3rd addr */
41 #define LCD_EXT_CMD_TYPE_CMD4_DELAY    0x03  /* for i2c device 4th addr */
42 #define LCD_EXT_CMD_TYPE_NONE          0x10
43 #define LCD_EXT_CMD_TYPE_CMD_BIN       0xb0
44 #define LCD_EXT_CMD_TYPE_CMD2_BIN      0xb1  /* for i2c device 2nd addr */
45 #define LCD_EXT_CMD_TYPE_CMD3_BIN      0xb2  /* for i2c device 3rd addr */
46 #define LCD_EXT_CMD_TYPE_CMD4_BIN      0xb3  /* for i2c device 4th addr */
47 #define LCD_EXT_CMD_TYPE_CMD           0xc0
48 #define LCD_EXT_CMD_TYPE_CMD2          0xc1  /* for i2c device 2nd addr */
49 #define LCD_EXT_CMD_TYPE_CMD3          0xc2  /* for i2c device 3rd addr */
50 #define LCD_EXT_CMD_TYPE_CMD4          0xc3  /* for i2c device 4th addr */
51 #define LCD_EXT_CMD_TYPE_CMD_BIN_DATA  0xd0 /* without auto fill reg addr 0x0 */
52 #define LCD_EXT_CMD_TYPE_CMD2_BIN_DATA 0xd1 /* for i2c device 2nd addr */
53 #define LCD_EXT_CMD_TYPE_CMD3_BIN_DATA 0xd2 /* for i2c device 3rd addr */
54 #define LCD_EXT_CMD_TYPE_CMD4_BIN_DATA 0xd3 /* for i2c device 4th addr */
55 #define LCD_EXT_CMD_TYPE_GPIO          0xf0
56 #define LCD_EXT_CMD_TYPE_CHECK         0xfc
57 #define LCD_EXT_CMD_TYPE_DELAY         0xfd
58 #define LCD_EXT_CMD_TYPE_END           0xff
59 
60 #define LCD_EXT_CMD_SIZE_DYNAMIC       0xff
61 #define LCD_EXT_DYNAMIC_SIZE_INDEX     1
62 
63 
64 #endif
65 
66