xref: /linux/drivers/gpu/drm/tidss/tidss_oldi.h (revision 8d2b0853add1d7534dc0794e3c8e0b9e8c4ec640)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Copyright (C) 2025 - Texas Instruments Incorporated
4  *
5  * Aradhya Bhatia <a-bhatia1@ti.com>
6  */
7 
8 #ifndef __TIDSS_OLDI_H__
9 #define __TIDSS_OLDI_H__
10 
11 #include "tidss_drv.h"
12 
13 struct tidss_oldi;
14 
15 /* OLDI PORTS */
16 #define OLDI_INPUT_PORT		0
17 #define OLDI_OUTPUT_PORT	1
18 
19 /* Control MMR Registers */
20 
21 /* Register offsets */
22 #define OLDI_PD_CTRL            0x100
23 #define OLDI_LB_CTRL            0x104
24 
25 /* Power control bits */
26 #define OLDI_PWRDOWN_TX(n)	BIT(n)
27 
28 /* LVDS Bandgap reference Enable/Disable */
29 #define OLDI_PWRDN_BG		BIT(8)
30 
31 enum tidss_oldi_link_type {
32 	OLDI_MODE_UNSUPPORTED,
33 	OLDI_MODE_SINGLE_LINK,
34 	OLDI_MODE_CLONE_SINGLE_LINK,
35 	OLDI_MODE_SECONDARY_CLONE_SINGLE_LINK,
36 	OLDI_MODE_DUAL_LINK,
37 	OLDI_MODE_SECONDARY_DUAL_LINK,
38 };
39 
40 int tidss_oldi_init(struct tidss_device *tidss);
41 void tidss_oldi_deinit(struct tidss_device *tidss);
42 
43 #endif /* __TIDSS_OLDI_H__ */
44