1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * techpoint tp9950 regs 4 * 5 * Copyright (C) 2023 Rockchip Electronics Co., Ltd. 6 */ 7 8 #ifndef _TECHPOINT_TP9950_H 9 #define _TECHPOINT_TP9950_H 10 11 #include "techpoint_common.h" 12 13 #define DEBUG 14 15 #define TP9950_DEF_1080P 0 16 #define TP9950_DEF_720P 1 17 #define TP9950_DEF_PAL 0 18 #define TP9950_DEF_NTSC 0 19 20 #define STD_TVI 0 21 #define STD_HDA 1 22 23 #define TP9950_CHIP_ID_H_REG 0xFE 24 #define TP9950_CHIP_ID_H_VALUE 0x28 25 #define TP9950_CHIP_ID_L_REG 0xFF 26 #define TP9950_CHIP_ID_L_VALUE 0x50 27 28 #define TP9950_LINK_FREQ_148M (148500000UL >> 1) 29 #define TP9950_LINK_FREQ_297M (297000000UL >> 1) 30 #define TP9950_LINK_FREQ_594M (594000000UL >> 1) 31 #define TP9950_LANES 2 32 #define TP9950_BITS_PER_SAMPLE 8 33 34 enum tp9950_support_reso { 35 TP9950_CVSTD_720P_60 = 0, 36 TP9950_CVSTD_720P_50, 37 TP9950_CVSTD_1080P_30, 38 TP9950_CVSTD_1080P_25, 39 TP9950_CVSTD_720P_30, 40 TP9950_CVSTD_720P_25, 41 TP9950_CVSTD_SD, 42 TP9950_CVSTD_OTHER, 43 TP9950_CVSTD_PAL, 44 TP9950_CVSTD_NTSC, 45 }; 46 47 int tp9950_initialize(struct techpoint *techpoint); 48 int tp9950_get_channel_input_status(struct i2c_client *client, u8 ch); 49 int tp9950_get_all_input_status(struct i2c_client *client, u8 *detect_status); 50 int tp9950_set_channel_reso(struct i2c_client *client, int ch, 51 enum techpoint_support_reso reso); 52 int tp9950_get_channel_reso(struct i2c_client *client, int ch); 53 int tp9950_set_quick_stream(struct i2c_client *client, u32 stream); 54 55 #endif // _TECHPOINT_TP9950_H 56