18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Register definitions for Samsung LTV350QV Quarter VGA LCD Panel
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2006, 2007 Atmel Corporation
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci#ifndef __LTV350QV_H
88c2ecf20Sopenharmony_ci#define __LTV350QV_H
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#define LTV_OPC_INDEX	0x74
118c2ecf20Sopenharmony_ci#define LTV_OPC_DATA	0x76
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#define LTV_ID		0x00		/* ID Read */
148c2ecf20Sopenharmony_ci#define LTV_IFCTL	0x01		/* Display Interface Control */
158c2ecf20Sopenharmony_ci#define LTV_DATACTL	0x02		/* Display Data Control */
168c2ecf20Sopenharmony_ci#define LTV_ENTRY_MODE	0x03		/* Entry Mode */
178c2ecf20Sopenharmony_ci#define LTV_GATECTL1	0x04		/* Gate Control 1 */
188c2ecf20Sopenharmony_ci#define LTV_GATECTL2	0x05		/* Gate Control 2 */
198c2ecf20Sopenharmony_ci#define LTV_VBP		0x06		/* Vertical Back Porch */
208c2ecf20Sopenharmony_ci#define LTV_HBP		0x07		/* Horizontal Back Porch */
218c2ecf20Sopenharmony_ci#define LTV_SOTCTL	0x08		/* Source Output Timing Control */
228c2ecf20Sopenharmony_ci#define LTV_PWRCTL1	0x09		/* Power Control 1 */
238c2ecf20Sopenharmony_ci#define LTV_PWRCTL2	0x0a		/* Power Control 2 */
248c2ecf20Sopenharmony_ci#define LTV_GAMMA(x)	(0x10 + (x))	/* Gamma control */
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci/* Bit definitions for LTV_IFCTL */
278c2ecf20Sopenharmony_ci#define LTV_IM			(1 << 15)
288c2ecf20Sopenharmony_ci#define LTV_NMD			(1 << 14)
298c2ecf20Sopenharmony_ci#define LTV_SSMD		(1 << 13)
308c2ecf20Sopenharmony_ci#define LTV_REV			(1 <<  7)
318c2ecf20Sopenharmony_ci#define LTV_NL(x)		(((x) & 0x001f) << 0)
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci/* Bit definitions for LTV_DATACTL */
348c2ecf20Sopenharmony_ci#define LTV_DS_SAME		(0 << 12)
358c2ecf20Sopenharmony_ci#define LTV_DS_D_TO_S		(1 << 12)
368c2ecf20Sopenharmony_ci#define LTV_DS_S_TO_D		(2 << 12)
378c2ecf20Sopenharmony_ci#define LTV_CHS_384		(0 <<  9)
388c2ecf20Sopenharmony_ci#define LTV_CHS_480		(1 <<  9)
398c2ecf20Sopenharmony_ci#define LTV_CHS_492		(2 <<  9)
408c2ecf20Sopenharmony_ci#define LTV_DF_RGB		(0 <<  6)
418c2ecf20Sopenharmony_ci#define LTV_DF_RGBX		(1 <<  6)
428c2ecf20Sopenharmony_ci#define LTV_DF_XRGB		(2 <<  6)
438c2ecf20Sopenharmony_ci#define LTV_RGB_RGB		(0 <<  2)
448c2ecf20Sopenharmony_ci#define LTV_RGB_BGR		(1 <<  2)
458c2ecf20Sopenharmony_ci#define LTV_RGB_GRB		(2 <<  2)
468c2ecf20Sopenharmony_ci#define LTV_RGB_RBG		(3 <<  2)
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/* Bit definitions for LTV_ENTRY_MODE */
498c2ecf20Sopenharmony_ci#define LTV_VSPL_ACTIVE_LOW	(0 << 15)
508c2ecf20Sopenharmony_ci#define LTV_VSPL_ACTIVE_HIGH	(1 << 15)
518c2ecf20Sopenharmony_ci#define LTV_HSPL_ACTIVE_LOW	(0 << 14)
528c2ecf20Sopenharmony_ci#define LTV_HSPL_ACTIVE_HIGH	(1 << 14)
538c2ecf20Sopenharmony_ci#define LTV_DPL_SAMPLE_RISING	(0 << 13)
548c2ecf20Sopenharmony_ci#define LTV_DPL_SAMPLE_FALLING	(1 << 13)
558c2ecf20Sopenharmony_ci#define LTV_EPL_ACTIVE_LOW	(0 << 12)
568c2ecf20Sopenharmony_ci#define LTV_EPL_ACTIVE_HIGH	(1 << 12)
578c2ecf20Sopenharmony_ci#define LTV_SS_LEFT_TO_RIGHT	(0 <<  8)
588c2ecf20Sopenharmony_ci#define LTV_SS_RIGHT_TO_LEFT	(1 <<  8)
598c2ecf20Sopenharmony_ci#define LTV_STB			(1 <<  1)
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci/* Bit definitions for LTV_GATECTL1 */
628c2ecf20Sopenharmony_ci#define LTV_CLW(x)		(((x) & 0x0007) << 12)
638c2ecf20Sopenharmony_ci#define LTV_GAON		(1 <<  5)
648c2ecf20Sopenharmony_ci#define LTV_SDR			(1 <<  3)
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci/* Bit definitions for LTV_GATECTL2 */
678c2ecf20Sopenharmony_ci#define LTV_NW_INV_FRAME	(0 << 14)
688c2ecf20Sopenharmony_ci#define LTV_NW_INV_1LINE	(1 << 14)
698c2ecf20Sopenharmony_ci#define LTV_NW_INV_2LINE	(2 << 14)
708c2ecf20Sopenharmony_ci#define LTV_DSC			(1 << 12)
718c2ecf20Sopenharmony_ci#define LTV_GIF			(1 <<  8)
728c2ecf20Sopenharmony_ci#define LTV_FHN			(1 <<  7)
738c2ecf20Sopenharmony_ci#define LTV_FTI(x)		(((x) & 0x0003) << 4)
748c2ecf20Sopenharmony_ci#define LTV_FWI(x)		(((x) & 0x0003) << 0)
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci/* Bit definitions for LTV_SOTCTL */
778c2ecf20Sopenharmony_ci#define LTV_SDT(x)		(((x) & 0x0007) << 10)
788c2ecf20Sopenharmony_ci#define LTV_EQ(x)		(((x) & 0x0007) <<  2)
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci/* Bit definitions for LTV_PWRCTL1 */
818c2ecf20Sopenharmony_ci#define LTV_VCOM_DISABLE	(1 << 14)
828c2ecf20Sopenharmony_ci#define LTV_VCOMOUT_ENABLE	(1 << 11)
838c2ecf20Sopenharmony_ci#define LTV_POWER_ON		(1 <<  9)
848c2ecf20Sopenharmony_ci#define LTV_DRIVE_CURRENT(x)	(((x) & 0x0007) << 4)	/* 0=off, 5=max */
858c2ecf20Sopenharmony_ci#define LTV_SUPPLY_CURRENT(x)	(((x) & 0x0007) << 0)	/* 0=off, 5=max */
868c2ecf20Sopenharmony_ci
878c2ecf20Sopenharmony_ci/* Bit definitions for LTV_PWRCTL2 */
888c2ecf20Sopenharmony_ci#define LTV_VCOML_ENABLE	(1 << 13)
898c2ecf20Sopenharmony_ci#define LTV_VCOML_VOLTAGE(x)	(((x) & 0x001f) << 8)	/* 0=1V, 31=-1V */
908c2ecf20Sopenharmony_ci#define LTV_VCOMH_VOLTAGE(x)	(((x) & 0x001f) << 0)	/* 0=3V, 31=4.5V */
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci#endif /* __LTV350QV_H */
93