xref: /rk3399_rockchip-uboot/drivers/video/drm/display-serdes/maxim/maxim-max96772.h (revision fb0c3269ba4cd093780cb50afda01fe0d30baa4b)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * include/linux/mfd/serdes/gpio.h -- GPIO for different serdes 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_MAX96772_H__
12 #define __MFD_SERDES_MAXIM_MAX96772_H__
13 
14 #define GPIO_A_REG(gpio)	(0x02b0 + ((gpio) * 3))
15 #define GPIO_B_REG(gpio)	(0x02b1 + ((gpio) * 3))
16 #define GPIO_C_REG(gpio)	(0x02b2 + ((gpio) * 3))
17 
18 /* 02b0h */
19 #define RES_CFG			BIT(7)
20 #define RSVD			BIT(6)
21 #define TX_COMP_EN		BIT(5)
22 #define GPIO_OUT		BIT(4)
23 #define GPIO_IN			BIT(3)
24 #define GPIO_RX_EN		BIT(2)
25 #define GPIO_TX_EN		BIT(1)
26 #define GPIO_OUT_DIS		BIT(0)
27 
28 /* 02b1h */
29 #define PULL_UPDN_SEL		GENMASK(7, 6)
30 #define OUT_TYPE		BIT(5)
31 #define GPIO_TX_ID		GENMASK(4, 0)
32 
33 /* 02b2h */
34 #define OVR_RES_CFG		BIT(7)
35 #define GPIO_RX_ID		GENMASK(4, 0)
36 
37 #endif
38