2023-08-30 16:21:18 +08:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2023, Artinchip Technology Co., Ltd
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _DISP_CONF_H_
|
|
|
|
|
#define _DISP_CONF_H_
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* LVDS options
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* lvds sync mode enable */
|
|
|
|
|
#define AIC_LVDS_SYNC_MODE_EN 1
|
|
|
|
|
|
2023-11-09 20:19:51 +08:00
|
|
|
/* lvds link swap enable, swap lvds link0 and link1 */
|
|
|
|
|
#define AIC_LVDS_LINK_SWAP_EN 0
|
2023-08-30 16:21:18 +08:00
|
|
|
|
2023-11-09 20:19:51 +08:00
|
|
|
/**
|
|
|
|
|
* lvds channel output order
|
|
|
|
|
*
|
|
|
|
|
* works on both link0 and link1 (if exists)
|
|
|
|
|
*
|
|
|
|
|
* default D3 CK D2 D1 D0
|
|
|
|
|
* 4 3 2 1 0
|
|
|
|
|
*/
|
|
|
|
|
#define AIC_LVDS_LINES 0x43210
|
2023-08-30 16:21:18 +08:00
|
|
|
|
2023-11-09 20:19:51 +08:00
|
|
|
/**
|
|
|
|
|
* lvds channel polarities, works on both link0 and link1 (if exists)
|
|
|
|
|
*/
|
2023-08-30 16:21:18 +08:00
|
|
|
#define AIC_LVDS_POL 0x0
|
|
|
|
|
|
2023-11-09 20:19:51 +08:00
|
|
|
/**
|
|
|
|
|
* lvds channel phy config, works on both link0 and link1 (if exists)
|
|
|
|
|
*/
|
2023-08-30 16:21:18 +08:00
|
|
|
#define AIC_LVDS_PHY 0xFA
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* MIPI-DSI options
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* data line assignments */
|
2024-01-27 08:47:24 +08:00
|
|
|
#define LANE_ASSIGNMENTS 0x3210;
|
2023-08-30 16:21:18 +08:00
|
|
|
|
|
|
|
|
/* data line polarities */
|
2024-01-27 08:47:24 +08:00
|
|
|
#define LANE_POLARITIES 0b0000;
|
2023-08-30 16:21:18 +08:00
|
|
|
|
|
|
|
|
/* data clk inverse */
|
2024-01-27 08:47:24 +08:00
|
|
|
#define CLK_INVERSE 0
|
2023-08-30 16:21:18 +08:00
|
|
|
|
2024-01-27 08:47:24 +08:00
|
|
|
/* virtual channel id */
|
2023-08-30 16:21:18 +08:00
|
|
|
#define VIRTUAL_CHANNEL 0
|
|
|
|
|
|
2024-01-27 08:47:24 +08:00
|
|
|
/* mipi-dsi lp rate, range [10M, 20M], default 10M */
|
|
|
|
|
#define MIPI_DSI_LP_RATE (10 * 1000 * 1000)
|
|
|
|
|
|
|
|
|
|
/* mipi-dsi dcs get display id from screen when panel enable */
|
|
|
|
|
#define DCS_GET_DISPLAY_ID 0
|
|
|
|
|
|
2023-08-30 16:21:18 +08:00
|
|
|
/**
|
|
|
|
|
* FB ROTATION options
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/* drawing buf for GUI, range [1, 2] */
|
|
|
|
|
#define AIC_FB_DRAW_BUF_NUM 2
|
|
|
|
|
|
2023-11-09 20:19:51 +08:00
|
|
|
/**
|
|
|
|
|
* Display Engine options
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Display Engine Mode
|
|
|
|
|
*
|
|
|
|
|
* Continue mode, ignore the TE signal of LCD and the timing signal
|
|
|
|
|
* of display engine is continuous.
|
|
|
|
|
*
|
|
|
|
|
* Single frame mode, the timing signal of display engine needs to be
|
|
|
|
|
* manually updated.
|
|
|
|
|
*
|
|
|
|
|
* Auto mode, need a TE pulse width. The display engine automatically
|
|
|
|
|
* updates timing signal after obtained a TE signal from LCD.
|
|
|
|
|
*
|
|
|
|
|
* If unsure, say continuous mode.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define CONTINUE 0
|
|
|
|
|
#define SINGLE 1
|
|
|
|
|
#define AUTO 2
|
|
|
|
|
|
|
|
|
|
#define DE_MODE CONTINUE
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* AUTO mode options
|
|
|
|
|
*/
|
|
|
|
|
#if ( DE_MODE == 2 )
|
|
|
|
|
# define DE_AUTO_MODE 1
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if DE_AUTO_MODE
|
|
|
|
|
/**
|
|
|
|
|
* TE PIN
|
|
|
|
|
*
|
|
|
|
|
* D12x, just support { "PC.6", "PD.2", "PF.15" }
|
|
|
|
|
* D13x, just support { "PC.6", "PA.1" }
|
|
|
|
|
*/
|
|
|
|
|
# define TE_PIN "PC.6"
|
|
|
|
|
# define TE_PULSE_WIDTH 2
|
|
|
|
|
#endif
|
|
|
|
|
|
2023-08-30 16:21:18 +08:00
|
|
|
#endif /* _DISP_CONF_H_ */
|