1*d2912cb1SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 216102edbSEunchul Kim /* drivers/gpu/drm/exynos/regs-fimc.h 316102edbSEunchul Kim * 416102edbSEunchul Kim * Copyright (c) 2012 Samsung Electronics Co., Ltd. 516102edbSEunchul Kim * http://www.samsung.com/ 616102edbSEunchul Kim * 716102edbSEunchul Kim * Register definition file for Samsung Camera Interface (FIMC) driver 816102edbSEunchul Kim */ 916102edbSEunchul Kim 1016102edbSEunchul Kim #ifndef EXYNOS_REGS_FIMC_H 1116102edbSEunchul Kim #define EXYNOS_REGS_FIMC_H 1216102edbSEunchul Kim 1316102edbSEunchul Kim /* 1416102edbSEunchul Kim * Register part 1516102edbSEunchul Kim */ 1616102edbSEunchul Kim /* Input source format */ 1716102edbSEunchul Kim #define EXYNOS_CISRCFMT (0x00) 1816102edbSEunchul Kim /* Window offset */ 1916102edbSEunchul Kim #define EXYNOS_CIWDOFST (0x04) 2016102edbSEunchul Kim /* Global control */ 2116102edbSEunchul Kim #define EXYNOS_CIGCTRL (0x08) 2216102edbSEunchul Kim /* Window offset 2 */ 2316102edbSEunchul Kim #define EXYNOS_CIWDOFST2 (0x14) 2416102edbSEunchul Kim /* Y 1st frame start address for output DMA */ 2516102edbSEunchul Kim #define EXYNOS_CIOYSA1 (0x18) 2616102edbSEunchul Kim /* Y 2nd frame start address for output DMA */ 2716102edbSEunchul Kim #define EXYNOS_CIOYSA2 (0x1c) 2816102edbSEunchul Kim /* Y 3rd frame start address for output DMA */ 2916102edbSEunchul Kim #define EXYNOS_CIOYSA3 (0x20) 3016102edbSEunchul Kim /* Y 4th frame start address for output DMA */ 3116102edbSEunchul Kim #define EXYNOS_CIOYSA4 (0x24) 3216102edbSEunchul Kim /* Cb 1st frame start address for output DMA */ 3316102edbSEunchul Kim #define EXYNOS_CIOCBSA1 (0x28) 3416102edbSEunchul Kim /* Cb 2nd frame start address for output DMA */ 3516102edbSEunchul Kim #define EXYNOS_CIOCBSA2 (0x2c) 3616102edbSEunchul Kim /* Cb 3rd frame start address for output DMA */ 3716102edbSEunchul Kim #define EXYNOS_CIOCBSA3 (0x30) 3816102edbSEunchul Kim /* Cb 4th frame start address for output DMA */ 3916102edbSEunchul Kim #define EXYNOS_CIOCBSA4 (0x34) 4016102edbSEunchul Kim /* Cr 1st frame start address for output DMA */ 4116102edbSEunchul Kim #define EXYNOS_CIOCRSA1 (0x38) 4216102edbSEunchul Kim /* Cr 2nd frame start address for output DMA */ 4316102edbSEunchul Kim #define EXYNOS_CIOCRSA2 (0x3c) 4416102edbSEunchul Kim /* Cr 3rd frame start address for output DMA */ 4516102edbSEunchul Kim #define EXYNOS_CIOCRSA3 (0x40) 4616102edbSEunchul Kim /* Cr 4th frame start address for output DMA */ 4716102edbSEunchul Kim #define EXYNOS_CIOCRSA4 (0x44) 4816102edbSEunchul Kim /* Target image format */ 4916102edbSEunchul Kim #define EXYNOS_CITRGFMT (0x48) 5016102edbSEunchul Kim /* Output DMA control */ 5116102edbSEunchul Kim #define EXYNOS_CIOCTRL (0x4c) 5216102edbSEunchul Kim /* Pre-scaler control 1 */ 5316102edbSEunchul Kim #define EXYNOS_CISCPRERATIO (0x50) 5416102edbSEunchul Kim /* Pre-scaler control 2 */ 5516102edbSEunchul Kim #define EXYNOS_CISCPREDST (0x54) 5616102edbSEunchul Kim /* Main scaler control */ 5716102edbSEunchul Kim #define EXYNOS_CISCCTRL (0x58) 5816102edbSEunchul Kim /* Target area */ 5916102edbSEunchul Kim #define EXYNOS_CITAREA (0x5c) 6016102edbSEunchul Kim /* Status */ 6116102edbSEunchul Kim #define EXYNOS_CISTATUS (0x64) 6216102edbSEunchul Kim /* Status2 */ 6316102edbSEunchul Kim #define EXYNOS_CISTATUS2 (0x68) 6416102edbSEunchul Kim /* Image capture enable command */ 6516102edbSEunchul Kim #define EXYNOS_CIIMGCPT (0xc0) 6616102edbSEunchul Kim /* Capture sequence */ 6716102edbSEunchul Kim #define EXYNOS_CICPTSEQ (0xc4) 6816102edbSEunchul Kim /* Image effects */ 6916102edbSEunchul Kim #define EXYNOS_CIIMGEFF (0xd0) 7016102edbSEunchul Kim /* Y frame start address for input DMA */ 7116102edbSEunchul Kim #define EXYNOS_CIIYSA0 (0xd4) 7216102edbSEunchul Kim /* Cb frame start address for input DMA */ 7316102edbSEunchul Kim #define EXYNOS_CIICBSA0 (0xd8) 7416102edbSEunchul Kim /* Cr frame start address for input DMA */ 7516102edbSEunchul Kim #define EXYNOS_CIICRSA0 (0xdc) 7616102edbSEunchul Kim /* Input DMA Y Line Skip */ 7716102edbSEunchul Kim #define EXYNOS_CIILINESKIP_Y (0xec) 7816102edbSEunchul Kim /* Input DMA Cb Line Skip */ 7916102edbSEunchul Kim #define EXYNOS_CIILINESKIP_CB (0xf0) 8016102edbSEunchul Kim /* Input DMA Cr Line Skip */ 8116102edbSEunchul Kim #define EXYNOS_CIILINESKIP_CR (0xf4) 8216102edbSEunchul Kim /* Real input DMA image size */ 8316102edbSEunchul Kim #define EXYNOS_CIREAL_ISIZE (0xf8) 8416102edbSEunchul Kim /* Input DMA control */ 8516102edbSEunchul Kim #define EXYNOS_MSCTRL (0xfc) 8616102edbSEunchul Kim /* Y frame start address for input DMA */ 8716102edbSEunchul Kim #define EXYNOS_CIIYSA1 (0x144) 8816102edbSEunchul Kim /* Cb frame start address for input DMA */ 8916102edbSEunchul Kim #define EXYNOS_CIICBSA1 (0x148) 9016102edbSEunchul Kim /* Cr frame start address for input DMA */ 9116102edbSEunchul Kim #define EXYNOS_CIICRSA1 (0x14c) 9216102edbSEunchul Kim /* Output DMA Y offset */ 9316102edbSEunchul Kim #define EXYNOS_CIOYOFF (0x168) 9416102edbSEunchul Kim /* Output DMA CB offset */ 9516102edbSEunchul Kim #define EXYNOS_CIOCBOFF (0x16c) 9616102edbSEunchul Kim /* Output DMA CR offset */ 9716102edbSEunchul Kim #define EXYNOS_CIOCROFF (0x170) 9816102edbSEunchul Kim /* Input DMA Y offset */ 9916102edbSEunchul Kim #define EXYNOS_CIIYOFF (0x174) 10016102edbSEunchul Kim /* Input DMA CB offset */ 10116102edbSEunchul Kim #define EXYNOS_CIICBOFF (0x178) 10216102edbSEunchul Kim /* Input DMA CR offset */ 10316102edbSEunchul Kim #define EXYNOS_CIICROFF (0x17c) 10416102edbSEunchul Kim /* Input DMA original image size */ 10516102edbSEunchul Kim #define EXYNOS_ORGISIZE (0x180) 10616102edbSEunchul Kim /* Output DMA original image size */ 10716102edbSEunchul Kim #define EXYNOS_ORGOSIZE (0x184) 10816102edbSEunchul Kim /* Real output DMA image size */ 10916102edbSEunchul Kim #define EXYNOS_CIEXTEN (0x188) 11016102edbSEunchul Kim /* DMA parameter */ 11116102edbSEunchul Kim #define EXYNOS_CIDMAPARAM (0x18c) 11216102edbSEunchul Kim /* MIPI CSI image format */ 11316102edbSEunchul Kim #define EXYNOS_CSIIMGFMT (0x194) 11416102edbSEunchul Kim /* FIMC Clock Source Select */ 11516102edbSEunchul Kim #define EXYNOS_MISC_FIMC (0x198) 11616102edbSEunchul Kim 11716102edbSEunchul Kim /* Add for FIMC v5.1 */ 11816102edbSEunchul Kim /* Output Frame Buffer Sequence */ 11916102edbSEunchul Kim #define EXYNOS_CIFCNTSEQ (0x1fc) 12016102edbSEunchul Kim /* Y 5th frame start address for output DMA */ 12116102edbSEunchul Kim #define EXYNOS_CIOYSA5 (0x200) 12216102edbSEunchul Kim /* Y 6th frame start address for output DMA */ 12316102edbSEunchul Kim #define EXYNOS_CIOYSA6 (0x204) 12416102edbSEunchul Kim /* Y 7th frame start address for output DMA */ 12516102edbSEunchul Kim #define EXYNOS_CIOYSA7 (0x208) 12616102edbSEunchul Kim /* Y 8th frame start address for output DMA */ 12716102edbSEunchul Kim #define EXYNOS_CIOYSA8 (0x20c) 12816102edbSEunchul Kim /* Y 9th frame start address for output DMA */ 12916102edbSEunchul Kim #define EXYNOS_CIOYSA9 (0x210) 13016102edbSEunchul Kim /* Y 10th frame start address for output DMA */ 13116102edbSEunchul Kim #define EXYNOS_CIOYSA10 (0x214) 13216102edbSEunchul Kim /* Y 11th frame start address for output DMA */ 13316102edbSEunchul Kim #define EXYNOS_CIOYSA11 (0x218) 13416102edbSEunchul Kim /* Y 12th frame start address for output DMA */ 13516102edbSEunchul Kim #define EXYNOS_CIOYSA12 (0x21c) 13616102edbSEunchul Kim /* Y 13th frame start address for output DMA */ 13716102edbSEunchul Kim #define EXYNOS_CIOYSA13 (0x220) 13816102edbSEunchul Kim /* Y 14th frame start address for output DMA */ 13916102edbSEunchul Kim #define EXYNOS_CIOYSA14 (0x224) 14016102edbSEunchul Kim /* Y 15th frame start address for output DMA */ 14116102edbSEunchul Kim #define EXYNOS_CIOYSA15 (0x228) 14216102edbSEunchul Kim /* Y 16th frame start address for output DMA */ 14316102edbSEunchul Kim #define EXYNOS_CIOYSA16 (0x22c) 14416102edbSEunchul Kim /* Y 17th frame start address for output DMA */ 14516102edbSEunchul Kim #define EXYNOS_CIOYSA17 (0x230) 14616102edbSEunchul Kim /* Y 18th frame start address for output DMA */ 14716102edbSEunchul Kim #define EXYNOS_CIOYSA18 (0x234) 14816102edbSEunchul Kim /* Y 19th frame start address for output DMA */ 14916102edbSEunchul Kim #define EXYNOS_CIOYSA19 (0x238) 15016102edbSEunchul Kim /* Y 20th frame start address for output DMA */ 15116102edbSEunchul Kim #define EXYNOS_CIOYSA20 (0x23c) 15216102edbSEunchul Kim /* Y 21th frame start address for output DMA */ 15316102edbSEunchul Kim #define EXYNOS_CIOYSA21 (0x240) 15416102edbSEunchul Kim /* Y 22th frame start address for output DMA */ 15516102edbSEunchul Kim #define EXYNOS_CIOYSA22 (0x244) 15616102edbSEunchul Kim /* Y 23th frame start address for output DMA */ 15716102edbSEunchul Kim #define EXYNOS_CIOYSA23 (0x248) 15816102edbSEunchul Kim /* Y 24th frame start address for output DMA */ 15916102edbSEunchul Kim #define EXYNOS_CIOYSA24 (0x24c) 16016102edbSEunchul Kim /* Y 25th frame start address for output DMA */ 16116102edbSEunchul Kim #define EXYNOS_CIOYSA25 (0x250) 16216102edbSEunchul Kim /* Y 26th frame start address for output DMA */ 16316102edbSEunchul Kim #define EXYNOS_CIOYSA26 (0x254) 16416102edbSEunchul Kim /* Y 27th frame start address for output DMA */ 16516102edbSEunchul Kim #define EXYNOS_CIOYSA27 (0x258) 16616102edbSEunchul Kim /* Y 28th frame start address for output DMA */ 16716102edbSEunchul Kim #define EXYNOS_CIOYSA28 (0x25c) 16816102edbSEunchul Kim /* Y 29th frame start address for output DMA */ 16916102edbSEunchul Kim #define EXYNOS_CIOYSA29 (0x260) 17016102edbSEunchul Kim /* Y 30th frame start address for output DMA */ 17116102edbSEunchul Kim #define EXYNOS_CIOYSA30 (0x264) 17216102edbSEunchul Kim /* Y 31th frame start address for output DMA */ 17316102edbSEunchul Kim #define EXYNOS_CIOYSA31 (0x268) 17416102edbSEunchul Kim /* Y 32th frame start address for output DMA */ 17516102edbSEunchul Kim #define EXYNOS_CIOYSA32 (0x26c) 17616102edbSEunchul Kim 17716102edbSEunchul Kim /* CB 5th frame start address for output DMA */ 17816102edbSEunchul Kim #define EXYNOS_CIOCBSA5 (0x270) 17916102edbSEunchul Kim /* CB 6th frame start address for output DMA */ 18016102edbSEunchul Kim #define EXYNOS_CIOCBSA6 (0x274) 18116102edbSEunchul Kim /* CB 7th frame start address for output DMA */ 18216102edbSEunchul Kim #define EXYNOS_CIOCBSA7 (0x278) 18316102edbSEunchul Kim /* CB 8th frame start address for output DMA */ 18416102edbSEunchul Kim #define EXYNOS_CIOCBSA8 (0x27c) 18516102edbSEunchul Kim /* CB 9th frame start address for output DMA */ 18616102edbSEunchul Kim #define EXYNOS_CIOCBSA9 (0x280) 18716102edbSEunchul Kim /* CB 10th frame start address for output DMA */ 18816102edbSEunchul Kim #define EXYNOS_CIOCBSA10 (0x284) 18916102edbSEunchul Kim /* CB 11th frame start address for output DMA */ 19016102edbSEunchul Kim #define EXYNOS_CIOCBSA11 (0x288) 19116102edbSEunchul Kim /* CB 12th frame start address for output DMA */ 19216102edbSEunchul Kim #define EXYNOS_CIOCBSA12 (0x28c) 19316102edbSEunchul Kim /* CB 13th frame start address for output DMA */ 19416102edbSEunchul Kim #define EXYNOS_CIOCBSA13 (0x290) 19516102edbSEunchul Kim /* CB 14th frame start address for output DMA */ 19616102edbSEunchul Kim #define EXYNOS_CIOCBSA14 (0x294) 19716102edbSEunchul Kim /* CB 15th frame start address for output DMA */ 19816102edbSEunchul Kim #define EXYNOS_CIOCBSA15 (0x298) 19916102edbSEunchul Kim /* CB 16th frame start address for output DMA */ 20016102edbSEunchul Kim #define EXYNOS_CIOCBSA16 (0x29c) 20116102edbSEunchul Kim /* CB 17th frame start address for output DMA */ 20216102edbSEunchul Kim #define EXYNOS_CIOCBSA17 (0x2a0) 20316102edbSEunchul Kim /* CB 18th frame start address for output DMA */ 20416102edbSEunchul Kim #define EXYNOS_CIOCBSA18 (0x2a4) 20516102edbSEunchul Kim /* CB 19th frame start address for output DMA */ 20616102edbSEunchul Kim #define EXYNOS_CIOCBSA19 (0x2a8) 20716102edbSEunchul Kim /* CB 20th frame start address for output DMA */ 20816102edbSEunchul Kim #define EXYNOS_CIOCBSA20 (0x2ac) 20916102edbSEunchul Kim /* CB 21th frame start address for output DMA */ 21016102edbSEunchul Kim #define EXYNOS_CIOCBSA21 (0x2b0) 21116102edbSEunchul Kim /* CB 22th frame start address for output DMA */ 21216102edbSEunchul Kim #define EXYNOS_CIOCBSA22 (0x2b4) 21316102edbSEunchul Kim /* CB 23th frame start address for output DMA */ 21416102edbSEunchul Kim #define EXYNOS_CIOCBSA23 (0x2b8) 21516102edbSEunchul Kim /* CB 24th frame start address for output DMA */ 21616102edbSEunchul Kim #define EXYNOS_CIOCBSA24 (0x2bc) 21716102edbSEunchul Kim /* CB 25th frame start address for output DMA */ 21816102edbSEunchul Kim #define EXYNOS_CIOCBSA25 (0x2c0) 21916102edbSEunchul Kim /* CB 26th frame start address for output DMA */ 22016102edbSEunchul Kim #define EXYNOS_CIOCBSA26 (0x2c4) 22116102edbSEunchul Kim /* CB 27th frame start address for output DMA */ 22216102edbSEunchul Kim #define EXYNOS_CIOCBSA27 (0x2c8) 22316102edbSEunchul Kim /* CB 28th frame start address for output DMA */ 22416102edbSEunchul Kim #define EXYNOS_CIOCBSA28 (0x2cc) 22516102edbSEunchul Kim /* CB 29th frame start address for output DMA */ 22616102edbSEunchul Kim #define EXYNOS_CIOCBSA29 (0x2d0) 22716102edbSEunchul Kim /* CB 30th frame start address for output DMA */ 22816102edbSEunchul Kim #define EXYNOS_CIOCBSA30 (0x2d4) 22916102edbSEunchul Kim /* CB 31th frame start address for output DMA */ 23016102edbSEunchul Kim #define EXYNOS_CIOCBSA31 (0x2d8) 23116102edbSEunchul Kim /* CB 32th frame start address for output DMA */ 23216102edbSEunchul Kim #define EXYNOS_CIOCBSA32 (0x2dc) 23316102edbSEunchul Kim 23416102edbSEunchul Kim /* CR 5th frame start address for output DMA */ 23516102edbSEunchul Kim #define EXYNOS_CIOCRSA5 (0x2e0) 23616102edbSEunchul Kim /* CR 6th frame start address for output DMA */ 23716102edbSEunchul Kim #define EXYNOS_CIOCRSA6 (0x2e4) 23816102edbSEunchul Kim /* CR 7th frame start address for output DMA */ 23916102edbSEunchul Kim #define EXYNOS_CIOCRSA7 (0x2e8) 24016102edbSEunchul Kim /* CR 8th frame start address for output DMA */ 24116102edbSEunchul Kim #define EXYNOS_CIOCRSA8 (0x2ec) 24216102edbSEunchul Kim /* CR 9th frame start address for output DMA */ 24316102edbSEunchul Kim #define EXYNOS_CIOCRSA9 (0x2f0) 24416102edbSEunchul Kim /* CR 10th frame start address for output DMA */ 24516102edbSEunchul Kim #define EXYNOS_CIOCRSA10 (0x2f4) 24616102edbSEunchul Kim /* CR 11th frame start address for output DMA */ 24716102edbSEunchul Kim #define EXYNOS_CIOCRSA11 (0x2f8) 24816102edbSEunchul Kim /* CR 12th frame start address for output DMA */ 24916102edbSEunchul Kim #define EXYNOS_CIOCRSA12 (0x2fc) 25016102edbSEunchul Kim /* CR 13th frame start address for output DMA */ 25116102edbSEunchul Kim #define EXYNOS_CIOCRSA13 (0x300) 25216102edbSEunchul Kim /* CR 14th frame start address for output DMA */ 25316102edbSEunchul Kim #define EXYNOS_CIOCRSA14 (0x304) 25416102edbSEunchul Kim /* CR 15th frame start address for output DMA */ 25516102edbSEunchul Kim #define EXYNOS_CIOCRSA15 (0x308) 25616102edbSEunchul Kim /* CR 16th frame start address for output DMA */ 25716102edbSEunchul Kim #define EXYNOS_CIOCRSA16 (0x30c) 25816102edbSEunchul Kim /* CR 17th frame start address for output DMA */ 25916102edbSEunchul Kim #define EXYNOS_CIOCRSA17 (0x310) 26016102edbSEunchul Kim /* CR 18th frame start address for output DMA */ 26116102edbSEunchul Kim #define EXYNOS_CIOCRSA18 (0x314) 26216102edbSEunchul Kim /* CR 19th frame start address for output DMA */ 26316102edbSEunchul Kim #define EXYNOS_CIOCRSA19 (0x318) 26416102edbSEunchul Kim /* CR 20th frame start address for output DMA */ 26516102edbSEunchul Kim #define EXYNOS_CIOCRSA20 (0x31c) 26616102edbSEunchul Kim /* CR 21th frame start address for output DMA */ 26716102edbSEunchul Kim #define EXYNOS_CIOCRSA21 (0x320) 26816102edbSEunchul Kim /* CR 22th frame start address for output DMA */ 26916102edbSEunchul Kim #define EXYNOS_CIOCRSA22 (0x324) 27016102edbSEunchul Kim /* CR 23th frame start address for output DMA */ 27116102edbSEunchul Kim #define EXYNOS_CIOCRSA23 (0x328) 27216102edbSEunchul Kim /* CR 24th frame start address for output DMA */ 27316102edbSEunchul Kim #define EXYNOS_CIOCRSA24 (0x32c) 27416102edbSEunchul Kim /* CR 25th frame start address for output DMA */ 27516102edbSEunchul Kim #define EXYNOS_CIOCRSA25 (0x330) 27616102edbSEunchul Kim /* CR 26th frame start address for output DMA */ 27716102edbSEunchul Kim #define EXYNOS_CIOCRSA26 (0x334) 27816102edbSEunchul Kim /* CR 27th frame start address for output DMA */ 27916102edbSEunchul Kim #define EXYNOS_CIOCRSA27 (0x338) 28016102edbSEunchul Kim /* CR 28th frame start address for output DMA */ 28116102edbSEunchul Kim #define EXYNOS_CIOCRSA28 (0x33c) 28216102edbSEunchul Kim /* CR 29th frame start address for output DMA */ 28316102edbSEunchul Kim #define EXYNOS_CIOCRSA29 (0x340) 28416102edbSEunchul Kim /* CR 30th frame start address for output DMA */ 28516102edbSEunchul Kim #define EXYNOS_CIOCRSA30 (0x344) 28616102edbSEunchul Kim /* CR 31th frame start address for output DMA */ 28716102edbSEunchul Kim #define EXYNOS_CIOCRSA31 (0x348) 28816102edbSEunchul Kim /* CR 32th frame start address for output DMA */ 28916102edbSEunchul Kim #define EXYNOS_CIOCRSA32 (0x34c) 29016102edbSEunchul Kim 29116102edbSEunchul Kim /* 29216102edbSEunchul Kim * Macro part 29316102edbSEunchul Kim */ 29416102edbSEunchul Kim /* frame start address 1 ~ 4, 5 ~ 32 */ 29516102edbSEunchul Kim /* Number of Default PingPong Memory */ 29616102edbSEunchul Kim #define DEF_PP 4 29716102edbSEunchul Kim #define EXYNOS_CIOYSA(__x) \ 29816102edbSEunchul Kim (((__x) < DEF_PP) ? \ 29916102edbSEunchul Kim (EXYNOS_CIOYSA1 + (__x) * 4) : \ 30016102edbSEunchul Kim (EXYNOS_CIOYSA5 + ((__x) - DEF_PP) * 4)) 30116102edbSEunchul Kim #define EXYNOS_CIOCBSA(__x) \ 30216102edbSEunchul Kim (((__x) < DEF_PP) ? \ 30316102edbSEunchul Kim (EXYNOS_CIOCBSA1 + (__x) * 4) : \ 30416102edbSEunchul Kim (EXYNOS_CIOCBSA5 + ((__x) - DEF_PP) * 4)) 30516102edbSEunchul Kim #define EXYNOS_CIOCRSA(__x) \ 30616102edbSEunchul Kim (((__x) < DEF_PP) ? \ 30716102edbSEunchul Kim (EXYNOS_CIOCRSA1 + (__x) * 4) : \ 30816102edbSEunchul Kim (EXYNOS_CIOCRSA5 + ((__x) - DEF_PP) * 4)) 30916102edbSEunchul Kim /* Number of Default PingPong Memory */ 31016102edbSEunchul Kim #define DEF_IPP 1 31116102edbSEunchul Kim #define EXYNOS_CIIYSA(__x) \ 31216102edbSEunchul Kim (((__x) < DEF_IPP) ? \ 31316102edbSEunchul Kim (EXYNOS_CIIYSA0) : (EXYNOS_CIIYSA1)) 31416102edbSEunchul Kim #define EXYNOS_CIICBSA(__x) \ 31516102edbSEunchul Kim (((__x) < DEF_IPP) ? \ 31616102edbSEunchul Kim (EXYNOS_CIICBSA0) : (EXYNOS_CIICBSA1)) 31716102edbSEunchul Kim #define EXYNOS_CIICRSA(__x) \ 31816102edbSEunchul Kim (((__x) < DEF_IPP) ? \ 31916102edbSEunchul Kim (EXYNOS_CIICRSA0) : (EXYNOS_CIICRSA1)) 32016102edbSEunchul Kim 32116102edbSEunchul Kim #define EXYNOS_CISRCFMT_SOURCEHSIZE(x) ((x) << 16) 32216102edbSEunchul Kim #define EXYNOS_CISRCFMT_SOURCEVSIZE(x) ((x) << 0) 32316102edbSEunchul Kim 32416102edbSEunchul Kim #define EXYNOS_CIWDOFST_WINHOROFST(x) ((x) << 16) 32516102edbSEunchul Kim #define EXYNOS_CIWDOFST_WINVEROFST(x) ((x) << 0) 32616102edbSEunchul Kim 32716102edbSEunchul Kim #define EXYNOS_CIWDOFST2_WINHOROFST2(x) ((x) << 16) 32816102edbSEunchul Kim #define EXYNOS_CIWDOFST2_WINVEROFST2(x) ((x) << 0) 32916102edbSEunchul Kim 33016102edbSEunchul Kim #define EXYNOS_CITRGFMT_TARGETHSIZE(x) (((x) & 0x1fff) << 16) 33116102edbSEunchul Kim #define EXYNOS_CITRGFMT_TARGETVSIZE(x) (((x) & 0x1fff) << 0) 33216102edbSEunchul Kim 33316102edbSEunchul Kim #define EXYNOS_CISCPRERATIO_SHFACTOR(x) ((x) << 28) 33416102edbSEunchul Kim #define EXYNOS_CISCPRERATIO_PREHORRATIO(x) ((x) << 16) 33516102edbSEunchul Kim #define EXYNOS_CISCPRERATIO_PREVERRATIO(x) ((x) << 0) 33616102edbSEunchul Kim 33716102edbSEunchul Kim #define EXYNOS_CISCPREDST_PREDSTWIDTH(x) ((x) << 16) 33816102edbSEunchul Kim #define EXYNOS_CISCPREDST_PREDSTHEIGHT(x) ((x) << 0) 33916102edbSEunchul Kim 34016102edbSEunchul Kim #define EXYNOS_CISCCTRL_MAINHORRATIO(x) ((x) << 16) 34116102edbSEunchul Kim #define EXYNOS_CISCCTRL_MAINVERRATIO(x) ((x) << 0) 34216102edbSEunchul Kim 34316102edbSEunchul Kim #define EXYNOS_CITAREA_TARGET_AREA(x) ((x) << 0) 34416102edbSEunchul Kim 34516102edbSEunchul Kim #define EXYNOS_CISTATUS_GET_FRAME_COUNT(x) (((x) >> 26) & 0x3) 34616102edbSEunchul Kim #define EXYNOS_CISTATUS_GET_FRAME_END(x) (((x) >> 17) & 0x1) 34716102edbSEunchul Kim #define EXYNOS_CISTATUS_GET_LAST_CAPTURE_END(x) (((x) >> 16) & 0x1) 34816102edbSEunchul Kim #define EXYNOS_CISTATUS_GET_LCD_STATUS(x) (((x) >> 9) & 0x1) 34916102edbSEunchul Kim #define EXYNOS_CISTATUS_GET_ENVID_STATUS(x) (((x) >> 8) & 0x1) 35016102edbSEunchul Kim 35116102edbSEunchul Kim #define EXYNOS_CISTATUS2_GET_FRAMECOUNT_BEFORE(x) (((x) >> 7) & 0x3f) 35216102edbSEunchul Kim #define EXYNOS_CISTATUS2_GET_FRAMECOUNT_PRESENT(x) ((x) & 0x3f) 35316102edbSEunchul Kim 35416102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN(x) ((x & 0x7) << 26) 35516102edbSEunchul Kim #define EXYNOS_CIIMGEFF_PAT_CB(x) ((x) << 13) 35616102edbSEunchul Kim #define EXYNOS_CIIMGEFF_PAT_CR(x) ((x) << 0) 35716102edbSEunchul Kim 35816102edbSEunchul Kim #define EXYNOS_CIILINESKIP(x) (((x) & 0xf) << 24) 35916102edbSEunchul Kim 36016102edbSEunchul Kim #define EXYNOS_CIREAL_ISIZE_HEIGHT(x) ((x) << 16) 36116102edbSEunchul Kim #define EXYNOS_CIREAL_ISIZE_WIDTH(x) ((x) << 0) 36216102edbSEunchul Kim 36316102edbSEunchul Kim #define EXYNOS_MSCTRL_SUCCESSIVE_COUNT(x) ((x) << 24) 36416102edbSEunchul Kim #define EXYNOS_MSCTRL_GET_INDMA_STATUS(x) ((x) & 0x1) 36516102edbSEunchul Kim 36616102edbSEunchul Kim #define EXYNOS_CIOYOFF_VERTICAL(x) ((x) << 16) 36716102edbSEunchul Kim #define EXYNOS_CIOYOFF_HORIZONTAL(x) ((x) << 0) 36816102edbSEunchul Kim 36916102edbSEunchul Kim #define EXYNOS_CIOCBOFF_VERTICAL(x) ((x) << 16) 37016102edbSEunchul Kim #define EXYNOS_CIOCBOFF_HORIZONTAL(x) ((x) << 0) 37116102edbSEunchul Kim 37216102edbSEunchul Kim #define EXYNOS_CIOCROFF_VERTICAL(x) ((x) << 16) 37316102edbSEunchul Kim #define EXYNOS_CIOCROFF_HORIZONTAL(x) ((x) << 0) 37416102edbSEunchul Kim 37516102edbSEunchul Kim #define EXYNOS_CIIYOFF_VERTICAL(x) ((x) << 16) 37616102edbSEunchul Kim #define EXYNOS_CIIYOFF_HORIZONTAL(x) ((x) << 0) 37716102edbSEunchul Kim 37816102edbSEunchul Kim #define EXYNOS_CIICBOFF_VERTICAL(x) ((x) << 16) 37916102edbSEunchul Kim #define EXYNOS_CIICBOFF_HORIZONTAL(x) ((x) << 0) 38016102edbSEunchul Kim 38116102edbSEunchul Kim #define EXYNOS_CIICROFF_VERTICAL(x) ((x) << 16) 38216102edbSEunchul Kim #define EXYNOS_CIICROFF_HORIZONTAL(x) ((x) << 0) 38316102edbSEunchul Kim 38416102edbSEunchul Kim #define EXYNOS_ORGISIZE_VERTICAL(x) ((x) << 16) 38516102edbSEunchul Kim #define EXYNOS_ORGISIZE_HORIZONTAL(x) ((x) << 0) 38616102edbSEunchul Kim 38716102edbSEunchul Kim #define EXYNOS_ORGOSIZE_VERTICAL(x) ((x) << 16) 38816102edbSEunchul Kim #define EXYNOS_ORGOSIZE_HORIZONTAL(x) ((x) << 0) 38916102edbSEunchul Kim 39016102edbSEunchul Kim #define EXYNOS_CIEXTEN_TARGETH_EXT(x) ((((x) & 0x2000) >> 13) << 26) 39116102edbSEunchul Kim #define EXYNOS_CIEXTEN_TARGETV_EXT(x) ((((x) & 0x2000) >> 13) << 24) 39216102edbSEunchul Kim #define EXYNOS_CIEXTEN_MAINHORRATIO_EXT(x) (((x) & 0x3F) << 10) 39316102edbSEunchul Kim #define EXYNOS_CIEXTEN_MAINVERRATIO_EXT(x) ((x) & 0x3F) 39416102edbSEunchul Kim 39516102edbSEunchul Kim /* 39616102edbSEunchul Kim * Bit definition part 39716102edbSEunchul Kim */ 39816102edbSEunchul Kim /* Source format register */ 39916102edbSEunchul Kim #define EXYNOS_CISRCFMT_ITU601_8BIT (1 << 31) 40016102edbSEunchul Kim #define EXYNOS_CISRCFMT_ITU656_8BIT (0 << 31) 40116102edbSEunchul Kim #define EXYNOS_CISRCFMT_ITU601_16BIT (1 << 29) 40216102edbSEunchul Kim #define EXYNOS_CISRCFMT_ORDER422_YCBYCR (0 << 14) 40316102edbSEunchul Kim #define EXYNOS_CISRCFMT_ORDER422_YCRYCB (1 << 14) 40416102edbSEunchul Kim #define EXYNOS_CISRCFMT_ORDER422_CBYCRY (2 << 14) 40516102edbSEunchul Kim #define EXYNOS_CISRCFMT_ORDER422_CRYCBY (3 << 14) 40616102edbSEunchul Kim /* ITU601 16bit only */ 40716102edbSEunchul Kim #define EXYNOS_CISRCFMT_ORDER422_Y4CBCRCBCR (0 << 14) 40816102edbSEunchul Kim /* ITU601 16bit only */ 40916102edbSEunchul Kim #define EXYNOS_CISRCFMT_ORDER422_Y4CRCBCRCB (1 << 14) 41016102edbSEunchul Kim 41116102edbSEunchul Kim /* Window offset register */ 41216102edbSEunchul Kim #define EXYNOS_CIWDOFST_WINOFSEN (1 << 31) 41316102edbSEunchul Kim #define EXYNOS_CIWDOFST_CLROVFIY (1 << 30) 41416102edbSEunchul Kim #define EXYNOS_CIWDOFST_CLROVRLB (1 << 29) 41516102edbSEunchul Kim #define EXYNOS_CIWDOFST_WINHOROFST_MASK (0x7ff << 16) 41616102edbSEunchul Kim #define EXYNOS_CIWDOFST_CLROVFICB (1 << 15) 41716102edbSEunchul Kim #define EXYNOS_CIWDOFST_CLROVFICR (1 << 14) 41816102edbSEunchul Kim #define EXYNOS_CIWDOFST_WINVEROFST_MASK (0xfff << 0) 41916102edbSEunchul Kim 42016102edbSEunchul Kim /* Global control register */ 42116102edbSEunchul Kim #define EXYNOS_CIGCTRL_SWRST (1 << 31) 42216102edbSEunchul Kim #define EXYNOS_CIGCTRL_CAMRST_A (1 << 30) 42316102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_ITU_B (0 << 29) 42416102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_ITU_A (1 << 29) 42516102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_ITU_MASK (1 << 29) 42616102edbSEunchul Kim #define EXYNOS_CIGCTRL_TESTPATTERN_NORMAL (0 << 27) 42716102edbSEunchul Kim #define EXYNOS_CIGCTRL_TESTPATTERN_COLOR_BAR (1 << 27) 42816102edbSEunchul Kim #define EXYNOS_CIGCTRL_TESTPATTERN_HOR_INC (2 << 27) 42916102edbSEunchul Kim #define EXYNOS_CIGCTRL_TESTPATTERN_VER_INC (3 << 27) 43016102edbSEunchul Kim #define EXYNOS_CIGCTRL_TESTPATTERN_MASK (3 << 27) 43116102edbSEunchul Kim #define EXYNOS_CIGCTRL_TESTPATTERN_SHIFT (27) 43216102edbSEunchul Kim #define EXYNOS_CIGCTRL_INVPOLPCLK (1 << 26) 43316102edbSEunchul Kim #define EXYNOS_CIGCTRL_INVPOLVSYNC (1 << 25) 43416102edbSEunchul Kim #define EXYNOS_CIGCTRL_INVPOLHREF (1 << 24) 43516102edbSEunchul Kim #define EXYNOS_CIGCTRL_IRQ_OVFEN (1 << 22) 43616102edbSEunchul Kim #define EXYNOS_CIGCTRL_HREF_MASK (1 << 21) 43716102edbSEunchul Kim #define EXYNOS_CIGCTRL_IRQ_EDGE (0 << 20) 43816102edbSEunchul Kim #define EXYNOS_CIGCTRL_IRQ_LEVEL (1 << 20) 43916102edbSEunchul Kim #define EXYNOS_CIGCTRL_IRQ_CLR (1 << 19) 44016102edbSEunchul Kim #define EXYNOS_CIGCTRL_IRQ_END_DISABLE (1 << 18) 44116102edbSEunchul Kim #define EXYNOS_CIGCTRL_IRQ_DISABLE (0 << 16) 44216102edbSEunchul Kim #define EXYNOS_CIGCTRL_IRQ_ENABLE (1 << 16) 44316102edbSEunchul Kim #define EXYNOS_CIGCTRL_SHADOW_DISABLE (1 << 12) 44416102edbSEunchul Kim #define EXYNOS_CIGCTRL_CAM_JPEG (1 << 8) 44516102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_MIPI_B (0 << 7) 44616102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_MIPI_A (1 << 7) 44716102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_MIPI_MASK (1 << 7) 44816102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELWB_CAMIF_CAMERA (0 << 6) 44916102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELWB_CAMIF_WRITEBACK (1 << 6) 45016102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELWRITEBACK_MASK (1 << 10) 45116102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELWRITEBACK_A (1 << 10) 45216102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELWRITEBACK_B (0 << 10) 45316102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELWB_CAMIF_MASK (1 << 6) 45416102edbSEunchul Kim #define EXYNOS_CIGCTRL_CSC_ITU601 (0 << 5) 45516102edbSEunchul Kim #define EXYNOS_CIGCTRL_CSC_ITU709 (1 << 5) 45616102edbSEunchul Kim #define EXYNOS_CIGCTRL_CSC_MASK (1 << 5) 45716102edbSEunchul Kim #define EXYNOS_CIGCTRL_INVPOLHSYNC (1 << 4) 45816102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_FIMC_ITU (0 << 3) 45916102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_FIMC_MIPI (1 << 3) 46016102edbSEunchul Kim #define EXYNOS_CIGCTRL_SELCAM_FIMC_MASK (1 << 3) 46116102edbSEunchul Kim #define EXYNOS_CIGCTRL_PROGRESSIVE (0 << 0) 46216102edbSEunchul Kim #define EXYNOS_CIGCTRL_INTERLACE (1 << 0) 46316102edbSEunchul Kim 46416102edbSEunchul Kim /* Window offset2 register */ 46516102edbSEunchul Kim #define EXYNOS_CIWDOFST_WINHOROFST2_MASK (0xfff << 16) 46616102edbSEunchul Kim #define EXYNOS_CIWDOFST_WINVEROFST2_MASK (0xfff << 16) 46716102edbSEunchul Kim 46816102edbSEunchul Kim /* Target format register */ 46916102edbSEunchul Kim #define EXYNOS_CITRGFMT_INROT90_CLOCKWISE (1 << 31) 47016102edbSEunchul Kim #define EXYNOS_CITRGFMT_OUTFORMAT_YCBCR420 (0 << 29) 47116102edbSEunchul Kim #define EXYNOS_CITRGFMT_OUTFORMAT_YCBCR422 (1 << 29) 47216102edbSEunchul Kim #define EXYNOS_CITRGFMT_OUTFORMAT_YCBCR422_1PLANE (2 << 29) 47316102edbSEunchul Kim #define EXYNOS_CITRGFMT_OUTFORMAT_RGB (3 << 29) 47416102edbSEunchul Kim #define EXYNOS_CITRGFMT_OUTFORMAT_MASK (3 << 29) 47516102edbSEunchul Kim #define EXYNOS_CITRGFMT_FLIP_SHIFT (14) 47616102edbSEunchul Kim #define EXYNOS_CITRGFMT_FLIP_NORMAL (0 << 14) 47716102edbSEunchul Kim #define EXYNOS_CITRGFMT_FLIP_X_MIRROR (1 << 14) 47816102edbSEunchul Kim #define EXYNOS_CITRGFMT_FLIP_Y_MIRROR (2 << 14) 47916102edbSEunchul Kim #define EXYNOS_CITRGFMT_FLIP_180 (3 << 14) 48016102edbSEunchul Kim #define EXYNOS_CITRGFMT_FLIP_MASK (3 << 14) 48116102edbSEunchul Kim #define EXYNOS_CITRGFMT_OUTROT90_CLOCKWISE (1 << 13) 48216102edbSEunchul Kim #define EXYNOS_CITRGFMT_TARGETV_MASK (0x1fff << 0) 48316102edbSEunchul Kim #define EXYNOS_CITRGFMT_TARGETH_MASK (0x1fff << 16) 48416102edbSEunchul Kim 48516102edbSEunchul Kim /* Output DMA control register */ 48616102edbSEunchul Kim #define EXYNOS_CIOCTRL_WEAVE_OUT (1 << 31) 48716102edbSEunchul Kim #define EXYNOS_CIOCTRL_WEAVE_MASK (1 << 31) 48816102edbSEunchul Kim #define EXYNOS_CIOCTRL_LASTENDEN (1 << 30) 48916102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER2P_LSB_CBCR (0 << 24) 49016102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER2P_LSB_CRCB (1 << 24) 49116102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER2P_MSB_CRCB (2 << 24) 49216102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER2P_MSB_CBCR (3 << 24) 49316102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER2P_SHIFT (24) 49416102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER2P_MASK (3 << 24) 49516102edbSEunchul Kim #define EXYNOS_CIOCTRL_YCBCR_3PLANE (0 << 3) 49616102edbSEunchul Kim #define EXYNOS_CIOCTRL_YCBCR_2PLANE (1 << 3) 49716102edbSEunchul Kim #define EXYNOS_CIOCTRL_YCBCR_PLANE_MASK (1 << 3) 49816102edbSEunchul Kim #define EXYNOS_CIOCTRL_LASTIRQ_ENABLE (1 << 2) 49916102edbSEunchul Kim #define EXYNOS_CIOCTRL_ALPHA_OUT (0xff << 4) 50016102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER422_YCBYCR (0 << 0) 50116102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER422_YCRYCB (1 << 0) 50216102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER422_CBYCRY (2 << 0) 50316102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER422_CRYCBY (3 << 0) 50416102edbSEunchul Kim #define EXYNOS_CIOCTRL_ORDER422_MASK (3 << 0) 50516102edbSEunchul Kim 50616102edbSEunchul Kim /* Main scaler control register */ 50716102edbSEunchul Kim #define EXYNOS_CISCCTRL_SCALERBYPASS (1 << 31) 50816102edbSEunchul Kim #define EXYNOS_CISCCTRL_SCALEUP_H (1 << 30) 50916102edbSEunchul Kim #define EXYNOS_CISCCTRL_SCALEUP_V (1 << 29) 51016102edbSEunchul Kim #define EXYNOS_CISCCTRL_CSCR2Y_NARROW (0 << 28) 51116102edbSEunchul Kim #define EXYNOS_CISCCTRL_CSCR2Y_WIDE (1 << 28) 51216102edbSEunchul Kim #define EXYNOS_CISCCTRL_CSCY2R_NARROW (0 << 27) 51316102edbSEunchul Kim #define EXYNOS_CISCCTRL_CSCY2R_WIDE (1 << 27) 51416102edbSEunchul Kim #define EXYNOS_CISCCTRL_LCDPATHEN_FIFO (1 << 26) 51516102edbSEunchul Kim #define EXYNOS_CISCCTRL_PROGRESSIVE (0 << 25) 51616102edbSEunchul Kim #define EXYNOS_CISCCTRL_INTERLACE (1 << 25) 51716102edbSEunchul Kim #define EXYNOS_CISCCTRL_SCAN_MASK (1 << 25) 51816102edbSEunchul Kim #define EXYNOS_CISCCTRL_SCALERSTART (1 << 15) 51916102edbSEunchul Kim #define EXYNOS_CISCCTRL_INRGB_FMT_RGB565 (0 << 13) 52016102edbSEunchul Kim #define EXYNOS_CISCCTRL_INRGB_FMT_RGB666 (1 << 13) 52116102edbSEunchul Kim #define EXYNOS_CISCCTRL_INRGB_FMT_RGB888 (2 << 13) 52216102edbSEunchul Kim #define EXYNOS_CISCCTRL_INRGB_FMT_RGB_MASK (3 << 13) 52316102edbSEunchul Kim #define EXYNOS_CISCCTRL_OUTRGB_FMT_RGB565 (0 << 11) 52416102edbSEunchul Kim #define EXYNOS_CISCCTRL_OUTRGB_FMT_RGB666 (1 << 11) 52516102edbSEunchul Kim #define EXYNOS_CISCCTRL_OUTRGB_FMT_RGB888 (2 << 11) 52616102edbSEunchul Kim #define EXYNOS_CISCCTRL_OUTRGB_FMT_RGB_MASK (3 << 11) 52716102edbSEunchul Kim #define EXYNOS_CISCCTRL_EXTRGB_NORMAL (0 << 10) 52816102edbSEunchul Kim #define EXYNOS_CISCCTRL_EXTRGB_EXTENSION (1 << 10) 52916102edbSEunchul Kim #define EXYNOS_CISCCTRL_ONE2ONE (1 << 9) 53016102edbSEunchul Kim #define EXYNOS_CISCCTRL_MAIN_V_RATIO_MASK (0x1ff << 0) 53116102edbSEunchul Kim #define EXYNOS_CISCCTRL_MAIN_H_RATIO_MASK (0x1ff << 16) 53216102edbSEunchul Kim 53316102edbSEunchul Kim /* Status register */ 53416102edbSEunchul Kim #define EXYNOS_CISTATUS_OVFIY (1 << 31) 53516102edbSEunchul Kim #define EXYNOS_CISTATUS_OVFICB (1 << 30) 53616102edbSEunchul Kim #define EXYNOS_CISTATUS_OVFICR (1 << 29) 53716102edbSEunchul Kim #define EXYNOS_CISTATUS_VSYNC (1 << 28) 53816102edbSEunchul Kim #define EXYNOS_CISTATUS_SCALERSTART (1 << 26) 53916102edbSEunchul Kim #define EXYNOS_CISTATUS_WINOFSTEN (1 << 25) 54016102edbSEunchul Kim #define EXYNOS_CISTATUS_IMGCPTEN (1 << 22) 54116102edbSEunchul Kim #define EXYNOS_CISTATUS_IMGCPTENSC (1 << 21) 54216102edbSEunchul Kim #define EXYNOS_CISTATUS_VSYNC_A (1 << 20) 54316102edbSEunchul Kim #define EXYNOS_CISTATUS_VSYNC_B (1 << 19) 54416102edbSEunchul Kim #define EXYNOS_CISTATUS_OVRLB (1 << 18) 54516102edbSEunchul Kim #define EXYNOS_CISTATUS_FRAMEEND (1 << 17) 54616102edbSEunchul Kim #define EXYNOS_CISTATUS_LASTCAPTUREEND (1 << 16) 54716102edbSEunchul Kim #define EXYNOS_CISTATUS_VVALID_A (1 << 15) 54816102edbSEunchul Kim #define EXYNOS_CISTATUS_VVALID_B (1 << 14) 54916102edbSEunchul Kim 55016102edbSEunchul Kim /* Image capture enable register */ 55116102edbSEunchul Kim #define EXYNOS_CIIMGCPT_IMGCPTEN (1 << 31) 55216102edbSEunchul Kim #define EXYNOS_CIIMGCPT_IMGCPTEN_SC (1 << 30) 55316102edbSEunchul Kim #define EXYNOS_CIIMGCPT_CPT_FREN_ENABLE (1 << 25) 55416102edbSEunchul Kim #define EXYNOS_CIIMGCPT_CPT_FRMOD_EN (0 << 18) 55516102edbSEunchul Kim #define EXYNOS_CIIMGCPT_CPT_FRMOD_CNT (1 << 18) 55616102edbSEunchul Kim 55716102edbSEunchul Kim /* Image effects register */ 55816102edbSEunchul Kim #define EXYNOS_CIIMGEFF_IE_DISABLE (0 << 30) 55916102edbSEunchul Kim #define EXYNOS_CIIMGEFF_IE_ENABLE (1 << 30) 56016102edbSEunchul Kim #define EXYNOS_CIIMGEFF_IE_SC_BEFORE (0 << 29) 56116102edbSEunchul Kim #define EXYNOS_CIIMGEFF_IE_SC_AFTER (1 << 29) 56216102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN_BYPASS (0 << 26) 56316102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN_ARBITRARY (1 << 26) 56416102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN_NEGATIVE (2 << 26) 56516102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN_ARTFREEZE (3 << 26) 56616102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN_EMBOSSING (4 << 26) 56716102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN_SILHOUETTE (5 << 26) 56816102edbSEunchul Kim #define EXYNOS_CIIMGEFF_FIN_MASK (7 << 26) 5691293b619SWolfram Sang #define EXYNOS_CIIMGEFF_PAT_CBCR_MASK ((0xff << 13) | (0xff << 0)) 57016102edbSEunchul Kim 57116102edbSEunchul Kim /* Real input DMA size register */ 57216102edbSEunchul Kim #define EXYNOS_CIREAL_ISIZE_AUTOLOAD_ENABLE (1 << 31) 57316102edbSEunchul Kim #define EXYNOS_CIREAL_ISIZE_ADDR_CH_DISABLE (1 << 30) 57416102edbSEunchul Kim #define EXYNOS_CIREAL_ISIZE_HEIGHT_MASK (0x3FFF << 16) 57516102edbSEunchul Kim #define EXYNOS_CIREAL_ISIZE_WIDTH_MASK (0x3FFF << 0) 57616102edbSEunchul Kim 57716102edbSEunchul Kim /* Input DMA control register */ 57816102edbSEunchul Kim #define EXYNOS_MSCTRL_FIELD_MASK (1 << 31) 57916102edbSEunchul Kim #define EXYNOS_MSCTRL_FIELD_WEAVE (1 << 31) 58016102edbSEunchul Kim #define EXYNOS_MSCTRL_FIELD_NORMAL (0 << 31) 58116102edbSEunchul Kim #define EXYNOS_MSCTRL_BURST_CNT (24) 58216102edbSEunchul Kim #define EXYNOS_MSCTRL_BURST_CNT_MASK (0xf << 24) 58316102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER2P_LSB_CBCR (0 << 16) 58416102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER2P_LSB_CRCB (1 << 16) 58516102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER2P_MSB_CRCB (2 << 16) 58616102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER2P_MSB_CBCR (3 << 16) 58716102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER2P_SHIFT (16) 58816102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER2P_SHIFT_MASK (0x3 << 16) 58916102edbSEunchul Kim #define EXYNOS_MSCTRL_C_INT_IN_3PLANE (0 << 15) 59016102edbSEunchul Kim #define EXYNOS_MSCTRL_C_INT_IN_2PLANE (1 << 15) 59116102edbSEunchul Kim #define EXYNOS_MSCTRL_FLIP_SHIFT (13) 59216102edbSEunchul Kim #define EXYNOS_MSCTRL_FLIP_NORMAL (0 << 13) 59316102edbSEunchul Kim #define EXYNOS_MSCTRL_FLIP_X_MIRROR (1 << 13) 59416102edbSEunchul Kim #define EXYNOS_MSCTRL_FLIP_Y_MIRROR (2 << 13) 59516102edbSEunchul Kim #define EXYNOS_MSCTRL_FLIP_180 (3 << 13) 59616102edbSEunchul Kim #define EXYNOS_MSCTRL_FLIP_MASK (3 << 13) 59716102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER422_CRYCBY (0 << 4) 59816102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER422_YCRYCB (1 << 4) 59916102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER422_CBYCRY (2 << 4) 60016102edbSEunchul Kim #define EXYNOS_MSCTRL_ORDER422_YCBYCR (3 << 4) 60116102edbSEunchul Kim #define EXYNOS_MSCTRL_INPUT_EXTCAM (0 << 3) 60216102edbSEunchul Kim #define EXYNOS_MSCTRL_INPUT_MEMORY (1 << 3) 60316102edbSEunchul Kim #define EXYNOS_MSCTRL_INPUT_MASK (1 << 3) 60416102edbSEunchul Kim #define EXYNOS_MSCTRL_INFORMAT_YCBCR420 (0 << 1) 60516102edbSEunchul Kim #define EXYNOS_MSCTRL_INFORMAT_YCBCR422 (1 << 1) 60616102edbSEunchul Kim #define EXYNOS_MSCTRL_INFORMAT_YCBCR422_1PLANE (2 << 1) 60716102edbSEunchul Kim #define EXYNOS_MSCTRL_INFORMAT_RGB (3 << 1) 60816102edbSEunchul Kim #define EXYNOS_MSCTRL_ENVID (1 << 0) 60916102edbSEunchul Kim 61016102edbSEunchul Kim /* DMA parameter register */ 61116102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_MODE_LINEAR (0 << 29) 61216102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_MODE_CONFTILE (1 << 29) 61316102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_MODE_16X16 (2 << 29) 61416102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_MODE_64X32 (3 << 29) 61516102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_MODE_MASK (3 << 29) 61616102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_HSIZE_64 (0 << 24) 61716102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_HSIZE_128 (1 << 24) 61816102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_HSIZE_256 (2 << 24) 61916102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_HSIZE_512 (3 << 24) 62016102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_HSIZE_1024 (4 << 24) 62116102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_HSIZE_2048 (5 << 24) 62216102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_HSIZE_4096 (6 << 24) 62316102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_VSIZE_1 (0 << 20) 62416102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_VSIZE_2 (1 << 20) 62516102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_VSIZE_4 (2 << 20) 62616102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_VSIZE_8 (3 << 20) 62716102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_VSIZE_16 (4 << 20) 62816102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_R_TILE_VSIZE_32 (5 << 20) 62916102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_MODE_LINEAR (0 << 13) 63016102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_MODE_CONFTILE (1 << 13) 63116102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_MODE_16X16 (2 << 13) 63216102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_MODE_64X32 (3 << 13) 63316102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_MODE_MASK (3 << 13) 63416102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_HSIZE_64 (0 << 8) 63516102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_HSIZE_128 (1 << 8) 63616102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_HSIZE_256 (2 << 8) 63716102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_HSIZE_512 (3 << 8) 63816102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_HSIZE_1024 (4 << 8) 63916102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_HSIZE_2048 (5 << 8) 64016102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_HSIZE_4096 (6 << 8) 64116102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_VSIZE_1 (0 << 4) 64216102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_VSIZE_2 (1 << 4) 64316102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_VSIZE_4 (2 << 4) 64416102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_VSIZE_8 (3 << 4) 64516102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_VSIZE_16 (4 << 4) 64616102edbSEunchul Kim #define EXYNOS_CIDMAPARAM_W_TILE_VSIZE_32 (5 << 4) 64716102edbSEunchul Kim 64816102edbSEunchul Kim /* Gathering Extension register */ 64916102edbSEunchul Kim #define EXYNOS_CIEXTEN_TARGETH_EXT_MASK (1 << 26) 65016102edbSEunchul Kim #define EXYNOS_CIEXTEN_TARGETV_EXT_MASK (1 << 24) 65116102edbSEunchul Kim #define EXYNOS_CIEXTEN_MAINHORRATIO_EXT_MASK (0x3F << 10) 65216102edbSEunchul Kim #define EXYNOS_CIEXTEN_MAINVERRATIO_EXT_MASK (0x3F) 65316102edbSEunchul Kim #define EXYNOS_CIEXTEN_YUV444_OUT (1 << 22) 65416102edbSEunchul Kim 65516102edbSEunchul Kim /* FIMC Clock Source Select register */ 65616102edbSEunchul Kim #define EXYNOS_CLKSRC_HCLK (0 << 1) 65716102edbSEunchul Kim #define EXYNOS_CLKSRC_HCLK_MASK (1 << 1) 65816102edbSEunchul Kim #define EXYNOS_CLKSRC_SCLK (1 << 1) 65916102edbSEunchul Kim 66016102edbSEunchul Kim /* SYSREG for FIMC writeback */ 6615186fc5eSSylwester Nawrocki #define SYSREG_CAMERA_BLK (0x0218) 66216102edbSEunchul Kim #define SYSREG_FIMD0WB_DEST_MASK (0x3 << 23) 66316102edbSEunchul Kim #define SYSREG_FIMD0WB_DEST_SHIFT 23 66416102edbSEunchul Kim 66516102edbSEunchul Kim #endif /* EXYNOS_REGS_FIMC_H */ 666