162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * zr36057.h - zr36057 register offsets 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 1998 Dave Perks <dperks@ibm.net> 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef _ZR36057_H_ 962306a36Sopenharmony_ci#define _ZR36057_H_ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* Zoran ZR36057 registers */ 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#define ZR36057_VFEHCR 0x000 /* Video Front End, Horizontal Configuration Register */ 1462306a36Sopenharmony_ci#define ZR36057_VFEHCR_HS_POL BIT(30) 1562306a36Sopenharmony_ci#define ZR36057_VFEHCR_H_START 10 1662306a36Sopenharmony_ci#define ZR36057_VFEHCR_H_END 0 1762306a36Sopenharmony_ci#define ZR36057_VFEHCR_HMASK 0x3ff 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#define ZR36057_VFEVCR 0x004 /* Video Front End, Vertical Configuration Register */ 2062306a36Sopenharmony_ci#define ZR36057_VFEVCR_VS_POL BIT(30) 2162306a36Sopenharmony_ci#define ZR36057_VFEVCR_V_START 10 2262306a36Sopenharmony_ci#define ZR36057_VFEVCR_V_END 0 2362306a36Sopenharmony_ci#define ZR36057_VFEVCR_VMASK 0x3ff 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define ZR36057_VFESPFR 0x008 /* Video Front End, Scaler and Pixel Format Register */ 2662306a36Sopenharmony_ci#define ZR36057_VFESPFR_EXT_FL BIT(26) 2762306a36Sopenharmony_ci#define ZR36057_VFESPFR_TOP_FIELD BIT(25) 2862306a36Sopenharmony_ci#define ZR36057_VFESPFR_VCLK_POL BIT(24) 2962306a36Sopenharmony_ci#define ZR36057_VFESPFR_H_FILTER 21 3062306a36Sopenharmony_ci#define ZR36057_VFESPFR_HOR_DCM 14 3162306a36Sopenharmony_ci#define ZR36057_VFESPFR_VER_DCM 8 3262306a36Sopenharmony_ci#define ZR36057_VFESPFR_DISP_MODE 6 3362306a36Sopenharmony_ci#define ZR36057_VFESPFR_YUV422 (0 << 3) 3462306a36Sopenharmony_ci#define ZR36057_VFESPFR_RGB888 (1 << 3) 3562306a36Sopenharmony_ci#define ZR36057_VFESPFR_RGB565 (2 << 3) 3662306a36Sopenharmony_ci#define ZR36057_VFESPFR_RGB555 (3 << 3) 3762306a36Sopenharmony_ci#define ZR36057_VFESPFR_ERR_DIF BIT(2) 3862306a36Sopenharmony_ci#define ZR36057_VFESPFR_PACK24 BIT(1) 3962306a36Sopenharmony_ci#define ZR36057_VFESPFR_LITTLE_ENDIAN BIT(0) 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci#define ZR36057_VDTR 0x00c /* Video Display "Top" Register */ 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#define ZR36057_VDBR 0x010 /* Video Display "Bottom" Register */ 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#define ZR36057_VSSFGR 0x014 /* Video Stride, Status, and Frame Grab Register */ 4662306a36Sopenharmony_ci#define ZR36057_VSSFGR_DISP_STRIDE 16 4762306a36Sopenharmony_ci#define ZR36057_VSSFGR_VID_OVF BIT(8) 4862306a36Sopenharmony_ci#define ZR36057_VSSFGR_SNAP_SHOT BIT(1) 4962306a36Sopenharmony_ci#define ZR36057_VSSFGR_FRAME_GRAB BIT(0) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define ZR36057_VDCR 0x018 /* Video Display Configuration Register */ 5262306a36Sopenharmony_ci#define ZR36057_VDCR_VID_EN BIT(31) 5362306a36Sopenharmony_ci#define ZR36057_VDCR_MIN_PIX 24 5462306a36Sopenharmony_ci#define ZR36057_VDCR_TRITON BIT(24) 5562306a36Sopenharmony_ci#define ZR36057_VDCR_VID_WIN_HT 12 5662306a36Sopenharmony_ci#define ZR36057_VDCR_VID_WIN_WID 0 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#define ZR36057_MMTR 0x01c /* Masking Map "Top" Register */ 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci#define ZR36057_MMBR 0x020 /* Masking Map "Bottom" Register */ 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#define ZR36057_OCR 0x024 /* Overlay Control Register */ 6362306a36Sopenharmony_ci#define ZR36057_OCR_OVL_ENABLE BIT(15) 6462306a36Sopenharmony_ci#define ZR36057_OCR_MASK_STRIDE 0 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci#define ZR36057_SPGPPCR 0x028 /* System, PCI, and General Purpose Pins Control Register */ 6762306a36Sopenharmony_ci#define ZR36057_SPGPPCR_SOFT_RESET BIT(24) 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci#define ZR36057_GPPGCR1 0x02c /* General Purpose Pins and GuestBus Control Register (1) */ 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci#define ZR36057_MCSAR 0x030 /* MPEG Code Source Address Register */ 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci#define ZR36057_MCTCR 0x034 /* MPEG Code Transfer Control Register */ 7462306a36Sopenharmony_ci#define ZR36057_MCTCR_COD_TIME BIT(30) 7562306a36Sopenharmony_ci#define ZR36057_MCTCR_C_EMPTY BIT(29) 7662306a36Sopenharmony_ci#define ZR36057_MCTCR_C_FLUSH BIT(28) 7762306a36Sopenharmony_ci#define ZR36057_MCTCR_COD_GUEST_ID 20 7862306a36Sopenharmony_ci#define ZR36057_MCTCR_COD_GUEST_REG 16 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci#define ZR36057_MCMPR 0x038 /* MPEG Code Memory Pointer Register */ 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci#define ZR36057_ISR 0x03c /* Interrupt Status Register */ 8362306a36Sopenharmony_ci#define ZR36057_ISR_GIRQ1 BIT(30) 8462306a36Sopenharmony_ci#define ZR36057_ISR_GIRQ0 BIT(29) 8562306a36Sopenharmony_ci#define ZR36057_ISR_COD_REP_IRQ BIT(28) 8662306a36Sopenharmony_ci#define ZR36057_ISR_JPEG_REP_IRQ BIT(27) 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#define ZR36057_ICR 0x040 /* Interrupt Control Register */ 8962306a36Sopenharmony_ci#define ZR36057_ICR_GIRQ1 BIT(30) 9062306a36Sopenharmony_ci#define ZR36057_ICR_GIRQ0 BIT(29) 9162306a36Sopenharmony_ci#define ZR36057_ICR_COD_REP_IRQ BIT(28) 9262306a36Sopenharmony_ci#define ZR36057_ICR_JPEG_REP_IRQ BIT(27) 9362306a36Sopenharmony_ci#define ZR36057_ICR_INT_PIN_EN BIT(24) 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_ci#define ZR36057_I2CBR 0x044 /* I2C Bus Register */ 9662306a36Sopenharmony_ci#define ZR36057_I2CBR_SDA BIT(1) 9762306a36Sopenharmony_ci#define ZR36057_I2CBR_SCL BIT(0) 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci#define ZR36057_JMC 0x100 /* JPEG Mode and Control */ 10062306a36Sopenharmony_ci#define ZR36057_JMC_JPG BIT(31) 10162306a36Sopenharmony_ci#define ZR36057_JMC_JPG_EXP_MODE (0 << 29) 10262306a36Sopenharmony_ci#define ZR36057_JMC_JPG_CMP_MODE BIT(29) 10362306a36Sopenharmony_ci#define ZR36057_JMC_MJPG_EXP_MODE (2 << 29) 10462306a36Sopenharmony_ci#define ZR36057_JMC_MJPG_CMP_MODE (3 << 29) 10562306a36Sopenharmony_ci#define ZR36057_JMC_RTBUSY_FB BIT(6) 10662306a36Sopenharmony_ci#define ZR36057_JMC_GO_EN BIT(5) 10762306a36Sopenharmony_ci#define ZR36057_JMC_SYNC_MSTR BIT(4) 10862306a36Sopenharmony_ci#define ZR36057_JMC_FLD_PER_BUFF BIT(3) 10962306a36Sopenharmony_ci#define ZR36057_JMC_VFIFO_FB BIT(2) 11062306a36Sopenharmony_ci#define ZR36057_JMC_CFIFO_FB BIT(1) 11162306a36Sopenharmony_ci#define ZR36057_JMC_STLL_LIT_ENDIAN BIT(0) 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci#define ZR36057_JPC 0x104 /* JPEG Process Control */ 11462306a36Sopenharmony_ci#define ZR36057_JPC_P_RESET BIT(7) 11562306a36Sopenharmony_ci#define ZR36057_JPC_COD_TRNS_EN BIT(5) 11662306a36Sopenharmony_ci#define ZR36057_JPC_ACTIVE BIT(0) 11762306a36Sopenharmony_ci 11862306a36Sopenharmony_ci#define ZR36057_VSP 0x108 /* Vertical Sync Parameters */ 11962306a36Sopenharmony_ci#define ZR36057_VSP_VSYNC_SIZE 16 12062306a36Sopenharmony_ci#define ZR36057_VSP_FRM_TOT 0 12162306a36Sopenharmony_ci 12262306a36Sopenharmony_ci#define ZR36057_HSP 0x10c /* Horizontal Sync Parameters */ 12362306a36Sopenharmony_ci#define ZR36057_HSP_HSYNC_START 16 12462306a36Sopenharmony_ci#define ZR36057_HSP_LINE_TOT 0 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci#define ZR36057_FHAP 0x110 /* Field Horizontal Active Portion */ 12762306a36Sopenharmony_ci#define ZR36057_FHAP_NAX 16 12862306a36Sopenharmony_ci#define ZR36057_FHAP_PAX 0 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci#define ZR36057_FVAP 0x114 /* Field Vertical Active Portion */ 13162306a36Sopenharmony_ci#define ZR36057_FVAP_NAY 16 13262306a36Sopenharmony_ci#define ZR36057_FVAP_PAY 0 13362306a36Sopenharmony_ci 13462306a36Sopenharmony_ci#define ZR36057_FPP 0x118 /* Field Process Parameters */ 13562306a36Sopenharmony_ci#define ZR36057_FPP_ODD_EVEN BIT(0) 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci#define ZR36057_JCBA 0x11c /* JPEG Code Base Address */ 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci#define ZR36057_JCFT 0x120 /* JPEG Code FIFO Threshold */ 14062306a36Sopenharmony_ci 14162306a36Sopenharmony_ci#define ZR36057_JCGI 0x124 /* JPEG Codec Guest ID */ 14262306a36Sopenharmony_ci#define ZR36057_JCGI_JPE_GUEST_ID 4 14362306a36Sopenharmony_ci#define ZR36057_JCGI_JPE_GUEST_REG 0 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_ci#define ZR36057_GCR2 0x12c /* GuestBus Control Register (2) */ 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci#define ZR36057_POR 0x200 /* Post Office Register */ 14862306a36Sopenharmony_ci#define ZR36057_POR_PO_PEN BIT(25) 14962306a36Sopenharmony_ci#define ZR36057_POR_PO_TIME BIT(24) 15062306a36Sopenharmony_ci#define ZR36057_POR_PO_DIR BIT(23) 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ci#define ZR36057_STR 0x300 /* "Still" Transfer Register */ 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci#endif 155