xref: /openbmc/linux/drivers/media/cec/platform/s5p/regs-cec.h (revision 4b4193256c8d3bc3a5397b5cd9494c2ad386317d)
1*4be5e864SMauro Carvalho Chehab /* SPDX-License-Identifier: GPL-2.0-only */
2*4be5e864SMauro Carvalho Chehab /* drivers/media/platform/s5p-cec/regs-cec.h
3*4be5e864SMauro Carvalho Chehab  *
4*4be5e864SMauro Carvalho Chehab  * Copyright (c) 2010 Samsung Electronics
5*4be5e864SMauro Carvalho Chehab  *		http://www.samsung.com/
6*4be5e864SMauro Carvalho Chehab  *
7*4be5e864SMauro Carvalho Chehab  *  register header file for Samsung TVOUT driver
8*4be5e864SMauro Carvalho Chehab  */
9*4be5e864SMauro Carvalho Chehab 
10*4be5e864SMauro Carvalho Chehab #ifndef __EXYNOS_REGS__H
11*4be5e864SMauro Carvalho Chehab #define __EXYNOS_REGS__H
12*4be5e864SMauro Carvalho Chehab 
13*4be5e864SMauro Carvalho Chehab /*
14*4be5e864SMauro Carvalho Chehab  * Register part
15*4be5e864SMauro Carvalho Chehab  */
16*4be5e864SMauro Carvalho Chehab #define S5P_CEC_STATUS_0			(0x0000)
17*4be5e864SMauro Carvalho Chehab #define S5P_CEC_STATUS_1			(0x0004)
18*4be5e864SMauro Carvalho Chehab #define S5P_CEC_STATUS_2			(0x0008)
19*4be5e864SMauro Carvalho Chehab #define S5P_CEC_STATUS_3			(0x000C)
20*4be5e864SMauro Carvalho Chehab #define S5P_CEC_IRQ_MASK			(0x0010)
21*4be5e864SMauro Carvalho Chehab #define S5P_CEC_IRQ_CLEAR			(0x0014)
22*4be5e864SMauro Carvalho Chehab #define S5P_CEC_LOGIC_ADDR			(0x0020)
23*4be5e864SMauro Carvalho Chehab #define S5P_CEC_DIVISOR_0			(0x0030)
24*4be5e864SMauro Carvalho Chehab #define S5P_CEC_DIVISOR_1			(0x0034)
25*4be5e864SMauro Carvalho Chehab #define S5P_CEC_DIVISOR_2			(0x0038)
26*4be5e864SMauro Carvalho Chehab #define S5P_CEC_DIVISOR_3			(0x003C)
27*4be5e864SMauro Carvalho Chehab 
28*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_CTRL				(0x0040)
29*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BYTES			(0x0044)
30*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_STAT0			(0x0060)
31*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_STAT1			(0x0064)
32*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF0			(0x0080)
33*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF1			(0x0084)
34*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF2			(0x0088)
35*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF3			(0x008C)
36*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF4			(0x0090)
37*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF5			(0x0094)
38*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF6			(0x0098)
39*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF7			(0x009C)
40*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF8			(0x00A0)
41*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF9			(0x00A4)
42*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF10			(0x00A8)
43*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF11			(0x00AC)
44*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF12			(0x00B0)
45*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF13			(0x00B4)
46*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF14			(0x00B8)
47*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_BUFF15			(0x00BC)
48*4be5e864SMauro Carvalho Chehab 
49*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_CTRL				(0x00C0)
50*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_STAT0			(0x00E0)
51*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_STAT1			(0x00E4)
52*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF0			(0x0100)
53*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF1			(0x0104)
54*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF2			(0x0108)
55*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF3			(0x010C)
56*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF4			(0x0110)
57*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF5			(0x0114)
58*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF6			(0x0118)
59*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF7			(0x011C)
60*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF8			(0x0120)
61*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF9			(0x0124)
62*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF10			(0x0128)
63*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF11			(0x012C)
64*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF12			(0x0130)
65*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF13			(0x0134)
66*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF14			(0x0138)
67*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_BUFF15			(0x013C)
68*4be5e864SMauro Carvalho Chehab 
69*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_FILTER_CTRL			(0x0180)
70*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_FILTER_TH			(0x0184)
71*4be5e864SMauro Carvalho Chehab 
72*4be5e864SMauro Carvalho Chehab /*
73*4be5e864SMauro Carvalho Chehab  * Bit definition part
74*4be5e864SMauro Carvalho Chehab  */
75*4be5e864SMauro Carvalho Chehab #define S5P_CEC_IRQ_TX_DONE			(1<<0)
76*4be5e864SMauro Carvalho Chehab #define S5P_CEC_IRQ_TX_ERROR			(1<<1)
77*4be5e864SMauro Carvalho Chehab #define S5P_CEC_IRQ_RX_DONE			(1<<4)
78*4be5e864SMauro Carvalho Chehab #define S5P_CEC_IRQ_RX_ERROR			(1<<5)
79*4be5e864SMauro Carvalho Chehab 
80*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_CTRL_START			(1<<0)
81*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_CTRL_BCAST			(1<<1)
82*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_CTRL_RETRY			(0x04<<4)
83*4be5e864SMauro Carvalho Chehab #define S5P_CEC_TX_CTRL_RESET			(1<<7)
84*4be5e864SMauro Carvalho Chehab 
85*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_CTRL_ENABLE			(1<<0)
86*4be5e864SMauro Carvalho Chehab #define S5P_CEC_RX_CTRL_RESET			(1<<7)
87*4be5e864SMauro Carvalho Chehab 
88*4be5e864SMauro Carvalho Chehab #define S5P_CEC_LOGIC_ADDR_MASK			(0xF)
89*4be5e864SMauro Carvalho Chehab 
90*4be5e864SMauro Carvalho Chehab /* PMU Registers for PHY */
91*4be5e864SMauro Carvalho Chehab #define EXYNOS_HDMI_PHY_CONTROL			0x700
92*4be5e864SMauro Carvalho Chehab 
93*4be5e864SMauro Carvalho Chehab #endif	/* __EXYNOS_REGS__H	*/
94