xref: /rk3399_rockchip-uboot/drivers/video/drm/display-serdes/maxim/maxim-max96752.h (revision fb0c3269ba4cd093780cb50afda01fe0d30baa4b)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * maxim-max96752.h -- register define for max96752 chip
4  *
5  * Copyright (c) 2023-2028 Rockchip Electronics Co. Ltd.
6  *
7  * Author: luowei <lw@rock-chips.com>
8  *
9  */
10 
11 #ifndef __MFD_SERDES_MAXIM_MAX96752_H__
12 #define __MFD_SERDES_MAXIM_MAX96752_H__
13 
14 #include <linux/bitfield.h>
15 
16 #define GPIO_A_REG(gpio)	(0x0200 + ((gpio) * 3))
17 #define GPIO_B_REG(gpio)	(0x0201 + ((gpio) * 3))
18 #define GPIO_C_REG(gpio)	(0x0202 + ((gpio) * 3))
19 
20 /* 0200h */
21 #define RES_CFG			BIT(7)
22 #define RSVD			BIT(6)
23 #define TX_COMP_EN		BIT(5)
24 #define GPIO_OUT		BIT(4)
25 #define GPIO_IN			BIT(3)
26 #define GPIO_RX_EN		BIT(2)
27 #define GPIO_TX_EN		BIT(1)
28 #define GPIO_OUT_DIS		BIT(0)
29 
30 /* 0201h */
31 #define PULL_UPDN_SEL		GENMASK(7, 6)
32 #define OUT_TYPE		BIT(5)
33 #define GPIO_TX_ID		GENMASK(4, 0)
34 
35 /* 0202h */
36 #define OVR_RES_CFG		BIT(7)
37 #define GPIO_RX_ID		GENMASK(4, 0)
38 
39 enum link_mode {
40 	DUAL_LINK,
41 	LINKA,
42 	LINKB,
43 	SPLITTER_MODE,
44 };
45 
46 #endif
47