drivers/media/platform/nuvoton/npcm-regs.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/nuvoton/npcm-regs.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/nuvoton/npcm-regs.h
Extension
.h
Size
3876 bytes
Lines
153
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _NPCM_REGS_H
#define _NPCM_REGS_H

/* VCD Registers */
#define VCD_DIFF_TBL			0x0000
#define VCD_FBA_ADR			0x8000
#define VCD_FBB_ADR			0x8004

#define VCD_FB_LP			0x8008
#define  VCD_FBA_LP			GENMASK(15, 0)
#define  VCD_FBB_LP			GENMASK(31, 16)

#define VCD_CAP_RES			0x800c
#define  VCD_CAP_RES_VERT_RES		GENMASK(10, 0)
#define  VCD_CAP_RES_HOR_RES		GENMASK(26, 16)

#define VCD_MODE			0x8014
#define  VCD_MODE_VCDE			BIT(0)
#define  VCD_MODE_CM565			BIT(1)
#define  VCD_MODE_IDBC			BIT(3)
#define  VCD_MODE_KVM_BW_SET		BIT(16)

#define VCD_CMD				0x8018
#define  VCD_CMD_GO			BIT(0)
#define  VCD_CMD_RST			BIT(1)
#define  VCD_CMD_OPERATION		GENMASK(6, 4)
#define   VCD_CMD_OPERATION_CAPTURE	0
#define   VCD_CMD_OPERATION_COMPARE	2

#define	VCD_STAT			0x801c
#define	 VCD_STAT_DONE			BIT(0)
#define	 VCD_STAT_IFOT			BIT(2)
#define	 VCD_STAT_IFOR			BIT(3)
#define	 VCD_STAT_VHT_CHG		BIT(5)
#define	 VCD_STAT_HAC_CHG		BIT(8)
#define	 VCD_STAT_BUSY			BIT(30)
#define	VCD_STAT_CLEAR			0x3fff

#define VCD_INTE			0x8020
#define  VCD_INTE_DONE_IE		BIT(0)
#define  VCD_INTE_IFOT_IE		BIT(2)
#define  VCD_INTE_IFOR_IE		BIT(3)
#define  VCD_INTE_VHT_IE		BIT(5)
#define  VCD_INTE_HAC_IE		BIT(8)

#define VCD_RCHG			0x8028
#define  VCD_RCHG_IG_CHG0		GENMASK(2, 0)
#define  VCD_RCHG_TIM_PRSCL		GENMASK(12, 9)

#define VCD_VER_HI_TIM			0x8044
#define  VCD_VER_HI_TIME		GENMASK(23, 0)

#define VCD_VER_HI_LST			0x8048
#define  VCD_VER_HI_LAST		GENMASK(23, 0)

#define VCD_HOR_AC_TIM			0x804c
#define  VCD_HOR_AC_TIME		GENMASK(13, 0)

#define VCD_HOR_AC_LST			0x8050
#define  VCD_HOR_AC_LAST		GENMASK(13, 0)

#define VCD_FIFO			0x805c
#define  VCD_FIFO_TH			0x100350ff

#define VCD_FB_SIZE			0x500000 /* support up to 1920 x 1200 */
#define VCD_KVM_BW_PCLK			120000000UL
#define VCD_TIMEOUT_US			300000

/* ECE Registers */
#define ECE_DDA_CTRL			0x0000
#define  ECE_DDA_CTRL_ECEEN		BIT(0)
#define  ECE_DDA_CTRL_INTEN		BIT(8)

#define ECE_DDA_STS			0x0004
#define  ECE_DDA_STS_CDREADY		BIT(8)
#define  ECE_DDA_STS_ACDRDY		BIT(10)

#define ECE_FBR_BA			0x0008
#define ECE_ED_BA			0x000c
#define ECE_RECT_XY			0x0010

#define ECE_RECT_DIMEN			0x0014
#define  ECE_RECT_DIMEN_WR		GENMASK(10, 0)
#define  ECE_RECT_DIMEN_WLTR		GENMASK(14, 11)
#define  ECE_RECT_DIMEN_HR		GENMASK(26, 16)
#define  ECE_RECT_DIMEN_HLTR		GENMASK(30, 27)

#define ECE_RESOL			0x001c
#define  ECE_RESOL_FB_LP_512		0
#define  ECE_RESOL_FB_LP_1024		1

Annotation

Implementation Notes