1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2017 Sanechips Technology Co., Ltd.
4 * Copyright 2017 Linaro Ltd.
7 #ifndef __ZX_VGA_REGS_H__
8 #define __ZX_VGA_REGS_H__
10 #define VGA_CMD_CFG 0x04
11 #define VGA_CMD_TRANS BIT(6)
12 #define VGA_CMD_COMBO BIT(5)
13 #define VGA_CMD_RW BIT(4)
14 #define VGA_SUB_ADDR 0x0c
15 #define VGA_DEVICE_ADDR 0x10
16 #define VGA_CLK_DIV_FS 0x14
17 #define VGA_RXF_CTRL 0x20
18 #define VGA_RX_FIFO_CLEAR BIT(7)
20 #define VGA_I2C_STATUS 0x28
21 #define VGA_DEVICE_DISCONNECTED BIT(7)
22 #define VGA_DEVICE_CONNECTED BIT(6)
23 #define VGA_CLEAR_IRQ BIT(4)
24 #define VGA_TRANS_DONE BIT(0)
25 #define VGA_RXF_STATUS 0x30
26 #define VGA_RXF_COUNT_SHIFT 2
27 #define VGA_RXF_COUNT_MASK GENMASK(7, 2)
28 #define VGA_AUTO_DETECT_PARA 0x34
29 #define VGA_AUTO_DETECT_SEL 0x38
30 #define VGA_DETECT_SEL_HAS_DEVICE BIT(1)
31 #define VGA_DETECT_SEL_NO_DEVICE BIT(0)
33 #endif /* __ZX_VGA_REGS_H__ */