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