18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright 2016 Linaro Ltd.
48c2ecf20Sopenharmony_ci * Copyright 2016 ZTE Corporation.
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifndef __ZX_HDMI_REGS_H__
88c2ecf20Sopenharmony_ci#define __ZX_HDMI_REGS_H__
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#define FUNC_SEL			0x000b
118c2ecf20Sopenharmony_ci#define FUNC_HDMI_EN			BIT(0)
128c2ecf20Sopenharmony_ci#define CLKPWD				0x000d
138c2ecf20Sopenharmony_ci#define CLKPWD_PDIDCK			BIT(2)
148c2ecf20Sopenharmony_ci#define P2T_CTRL			0x0066
158c2ecf20Sopenharmony_ci#define P2T_DC_PKT_EN			BIT(7)
168c2ecf20Sopenharmony_ci#define L1_INTR_STAT			0x007e
178c2ecf20Sopenharmony_ci#define L1_INTR_STAT_INTR1		BIT(0)
188c2ecf20Sopenharmony_ci#define INTR1_STAT			0x008f
198c2ecf20Sopenharmony_ci#define INTR1_MASK			0x0095
208c2ecf20Sopenharmony_ci#define INTR1_MONITOR_DETECT		(BIT(5) | BIT(6))
218c2ecf20Sopenharmony_ci#define ZX_DDC_ADDR			0x00ed
228c2ecf20Sopenharmony_ci#define ZX_DDC_SEGM			0x00ee
238c2ecf20Sopenharmony_ci#define ZX_DDC_OFFSET			0x00ef
248c2ecf20Sopenharmony_ci#define ZX_DDC_DIN_CNT1			0x00f0
258c2ecf20Sopenharmony_ci#define ZX_DDC_DIN_CNT2			0x00f1
268c2ecf20Sopenharmony_ci#define ZX_DDC_CMD			0x00f3
278c2ecf20Sopenharmony_ci#define DDC_CMD_MASK			0xf
288c2ecf20Sopenharmony_ci#define DDC_CMD_CLEAR_FIFO		0x9
298c2ecf20Sopenharmony_ci#define DDC_CMD_SEQUENTIAL_READ		0x2
308c2ecf20Sopenharmony_ci#define ZX_DDC_DATA			0x00f4
318c2ecf20Sopenharmony_ci#define ZX_DDC_DOUT_CNT			0x00f5
328c2ecf20Sopenharmony_ci#define DDC_DOUT_CNT_MASK		0x1f
338c2ecf20Sopenharmony_ci#define TEST_TXCTRL			0x00f7
348c2ecf20Sopenharmony_ci#define TEST_TXCTRL_HDMI_MODE		BIT(1)
358c2ecf20Sopenharmony_ci#define HDMICTL4			0x0235
368c2ecf20Sopenharmony_ci#define TPI_HPD_RSEN			0x063b
378c2ecf20Sopenharmony_ci#define TPI_HPD_CONNECTION		(BIT(1) | BIT(2))
388c2ecf20Sopenharmony_ci#define TPI_INFO_FSEL			0x06bf
398c2ecf20Sopenharmony_ci#define FSEL_AVI			0
408c2ecf20Sopenharmony_ci#define FSEL_GBD			1
418c2ecf20Sopenharmony_ci#define FSEL_AUDIO			2
428c2ecf20Sopenharmony_ci#define FSEL_SPD			3
438c2ecf20Sopenharmony_ci#define FSEL_MPEG			4
448c2ecf20Sopenharmony_ci#define FSEL_VSIF			5
458c2ecf20Sopenharmony_ci#define TPI_INFO_B0			0x06c0
468c2ecf20Sopenharmony_ci#define TPI_INFO_EN			0x06df
478c2ecf20Sopenharmony_ci#define TPI_INFO_TRANS_EN		BIT(7)
488c2ecf20Sopenharmony_ci#define TPI_INFO_TRANS_RPT		BIT(6)
498c2ecf20Sopenharmony_ci#define TPI_DDC_MASTER_EN		0x06f8
508c2ecf20Sopenharmony_ci#define HW_DDC_MASTER			BIT(7)
518c2ecf20Sopenharmony_ci#define N_SVAL1				0xa03
528c2ecf20Sopenharmony_ci#define N_SVAL2				0xa04
538c2ecf20Sopenharmony_ci#define N_SVAL3				0xa05
548c2ecf20Sopenharmony_ci#define AUD_EN				0xa13
558c2ecf20Sopenharmony_ci#define AUD_IN_EN			BIT(0)
568c2ecf20Sopenharmony_ci#define AUD_MODE			0xa14
578c2ecf20Sopenharmony_ci#define SPDIF_EN			BIT(1)
588c2ecf20Sopenharmony_ci#define TPI_AUD_CONFIG			0xa62
598c2ecf20Sopenharmony_ci#define SPDIF_SAMPLE_SIZE_SHIFT		6
608c2ecf20Sopenharmony_ci#define SPDIF_SAMPLE_SIZE_MASK		(0x3 << SPDIF_SAMPLE_SIZE_SHIFT)
618c2ecf20Sopenharmony_ci#define SPDIF_SAMPLE_SIZE_16BIT		(0x1 << SPDIF_SAMPLE_SIZE_SHIFT)
628c2ecf20Sopenharmony_ci#define SPDIF_SAMPLE_SIZE_20BIT		(0x2 << SPDIF_SAMPLE_SIZE_SHIFT)
638c2ecf20Sopenharmony_ci#define SPDIF_SAMPLE_SIZE_24BIT		(0x3 << SPDIF_SAMPLE_SIZE_SHIFT)
648c2ecf20Sopenharmony_ci#define TPI_AUD_MUTE			BIT(4)
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci#endif /* __ZX_HDMI_REGS_H__ */
67