1 /* 2 * Allwinner SoCs display driver. 3 * 4 * Copyright (C) 2017 Allwinner. 5 * 6 * This file is licensed under the terms of the GNU General Public 7 * License version 2. This program is licensed "as is" without any 8 * warranty of any kind, whether express or implied. 9 */ 10 11 #ifndef _TCON_FEAT_H_ 12 #define _TCON_FEAT_H_ 13 14 #define DE_OUTPUT_TYPE_LCD 1 15 #define DE_OUTPUT_TYPE_TV 2 16 #define DE_OUTPUT_TYPE_HDMI 4 17 #define DE_OUTPUT_TYPE_VGA 8 18 #define DE_OUTPUT_TYPE_VDPO 16 19 #define DE_OUTPUT_TYPE_EDP 32 20 #define DE_OUTPUT_TYPE_RTWB 64 21 22 #define CVBS_PAL_WIDTH 720 23 #define CVBS_PAL_HEIGHT 576 24 #define CVBS_NTSC_WIDTH 720 25 #define CVBS_NTSC_HEIGHT 480 26 27 #if defined(CONFIG_ARCH_SUN50IW5T) 28 #define DEVICE_NUM 2 29 #define SUPPORT_HDMI 30 #define SUPPORT_TV 31 /*#define SUPPORT_LVDS*/ 32 #define HAVE_DEVICE_COMMON_MODULE 33 #define DEVICE_COMMON_VERSION2 34 /*#define SUPPORT_DSI*/ 35 #define DSI_VERSION_28 36 #define CLK_NUM_PER_DSI 2 37 #define DEVICE_DSI_NUM 1 38 /*#define SUPPORT_EDP*/ 39 #elif defined(CONFIG_ARCH_SUN50IW9) 40 #define DEVICE_NUM 4 41 #define SUPPORT_HDMI 42 #define SUPPORT_TV 43 #define TV_UGLY_CLK_RATE 216000000 44 #define SUPPORT_LVDS 45 #define HAVE_DEVICE_COMMON_MODULE 46 #define DEVICE_COMMON_VERSION2 47 #define USE_CEC_DDC_PAD 48 /*#define SUPPORT_DSI*/ 49 #define DSI_VERSION_28 50 #define CLK_NUM_PER_DSI 2 51 #define DEVICE_DSI_NUM 1 52 #if defined(CONFIG_FPGA_V7_PLATFORM) || defined(CONFIG_FPGA_V4_PLATFORM) 53 #define LVDS_REVERT 54 #endif 55 /*#define SUPPORT_EDP*/ 56 #endif 57 58 #ifndef CLK_NUM_PER_DSI 59 #define CLK_NUM_PER_DSI 1 60 #endif 61 62 #ifndef DEVICE_DSI_NUM 63 #define DEVICE_DSI_NUM 1 64 #endif /*endif DEVICE_DSI_NUM */ 65 66 #ifndef DEVICE_LVDS_NUM 67 #define DEVICE_LVDS_NUM 1 68 #endif 69 70 #if defined(TV_UGLY_CLK_RATE) 71 #define TV_COMPOSITE_CLK_RATE 27000000 72 #endif 73 74 /* total number of DSI clk */ 75 #define CLK_DSI_NUM (CLK_NUM_PER_DSI * DEVICE_DSI_NUM) 76 77 int de_feat_get_num_devices(void); 78 int de_feat_get_num_dsi(void); 79 int de_feat_is_supported_output_types(unsigned int disp, 80 unsigned int output_type); 81 #if IS_ENABLED(CONFIG_AW_DRM) 82 int de_feat_get_supported_output_types(unsigned int tcon_id); 83 #endif 84 #endif /* #ifndef _TCON_FEAT_H_ */ 85