xref: /OK3568_Linux_fs/kernel/drivers/media/i2c/techpoint/techpoint_tp2855.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * techpoint tp2855 regs
4  *
5  * Copyright (C) 2023 Rockchip Electronics Co., Ltd.
6  */
7 
8 #ifndef _TECHPOINT_TP2855_H
9 #define _TECHPOINT_TP2855_H
10 
11 #include "techpoint_common.h"
12 
13 #define TP2855_CHIP_ID_H_REG      0xFE
14 #define TP2855_CHIP_ID_H_VALUE    0x28
15 #define TP2855_CHIP_ID_L_REG      0xFF
16 #define TP2855_CHIP_ID_L_VALUE    0x55
17 
18 #define TP2855_LINK_FREQ_297M		(297000000UL >> 1)
19 #define TP2855_LINK_FREQ_594M		(594000000UL >> 1)
20 #define TP2855_LANES				4
21 #define TP2855_BITS_PER_SAMPLE		8
22 
23 enum tp2855_support_reso {
24 	TP2855_CVSTD_720P_60 = 0,
25 	TP2855_CVSTD_720P_50,
26 	TP2855_CVSTD_1080P_30,
27 	TP2855_CVSTD_1080P_25,
28 	TP2855_CVSTD_720P_30,
29 	TP2855_CVSTD_720P_25,
30 	TP2855_CVSTD_SD,
31 	TP2855_CVSTD_OTHER,
32 };
33 
34 int tp2855_initialize(struct techpoint *techpoint);
35 int tp2855_get_channel_input_status(struct techpoint *techpoint, u8 ch);
36 int tp2855_get_all_input_status(struct techpoint *techpoint, u8 *detect_status);
37 int tp2855_set_decoder_mode(struct i2c_client *client, int ch, int status);
38 int tp2855_set_channel_reso(struct i2c_client *client, int ch,
39 			    enum techpoint_support_reso reso);
40 int tp2855_get_channel_reso(struct i2c_client *client, int ch);
41 int tp2855_set_quick_stream(struct techpoint *techpoint, u32 stream);
42 
43 #endif // _TECHPOINT_TP2855_H
44