162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef __MICROCHIP_ISC_REGS_H
362306a36Sopenharmony_ci#define __MICROCHIP_ISC_REGS_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/bitops.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/* ISC Control Enable Register 0 */
862306a36Sopenharmony_ci#define ISC_CTRLEN      0x00000000
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci/* ISC Control Disable Register 0 */
1162306a36Sopenharmony_ci#define ISC_CTRLDIS     0x00000004
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* ISC Control Status Register 0 */
1462306a36Sopenharmony_ci#define ISC_CTRLSR      0x00000008
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define ISC_CTRL_CAPTURE	BIT(0)
1762306a36Sopenharmony_ci#define ISC_CTRL_UPPRO		BIT(1)
1862306a36Sopenharmony_ci#define ISC_CTRL_HISREQ		BIT(2)
1962306a36Sopenharmony_ci#define ISC_CTRL_HISCLR		BIT(3)
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci/* ISC Parallel Front End Configuration 0 Register */
2262306a36Sopenharmony_ci#define ISC_PFE_CFG0    0x0000000c
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define ISC_PFE_CFG0_HPOL_LOW   BIT(0)
2562306a36Sopenharmony_ci#define ISC_PFE_CFG0_VPOL_LOW   BIT(1)
2662306a36Sopenharmony_ci#define ISC_PFE_CFG0_PPOL_LOW   BIT(2)
2762306a36Sopenharmony_ci#define ISC_PFE_CFG0_CCIR656    BIT(9)
2862306a36Sopenharmony_ci#define ISC_PFE_CFG0_CCIR_CRC   BIT(10)
2962306a36Sopenharmony_ci#define ISC_PFE_CFG0_MIPI	BIT(14)
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci#define ISC_PFE_CFG0_MODE_PROGRESSIVE   (0x0 << 4)
3262306a36Sopenharmony_ci#define ISC_PFE_CFG0_MODE_MASK          GENMASK(6, 4)
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci#define ISC_PFE_CFG0_BPS_EIGHT  (0x4 << 28)
3562306a36Sopenharmony_ci#define ISC_PFG_CFG0_BPS_NINE   (0x3 << 28)
3662306a36Sopenharmony_ci#define ISC_PFG_CFG0_BPS_TEN    (0x2 << 28)
3762306a36Sopenharmony_ci#define ISC_PFG_CFG0_BPS_ELEVEN (0x1 << 28)
3862306a36Sopenharmony_ci#define ISC_PFG_CFG0_BPS_TWELVE (0x0 << 28)
3962306a36Sopenharmony_ci#define ISC_PFE_CFG0_BPS_MASK   GENMASK(30, 28)
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci#define ISC_PFE_CFG0_COLEN	BIT(12)
4262306a36Sopenharmony_ci#define ISC_PFE_CFG0_ROWEN	BIT(13)
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci/* ISC Parallel Front End Configuration 1 Register */
4562306a36Sopenharmony_ci#define ISC_PFE_CFG1    0x00000010
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#define ISC_PFE_CFG1_COLMIN(v)		((v))
4862306a36Sopenharmony_ci#define ISC_PFE_CFG1_COLMIN_MASK	GENMASK(15, 0)
4962306a36Sopenharmony_ci#define ISC_PFE_CFG1_COLMAX(v)		((v) << 16)
5062306a36Sopenharmony_ci#define ISC_PFE_CFG1_COLMAX_MASK	GENMASK(31, 16)
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci/* ISC Parallel Front End Configuration 2 Register */
5362306a36Sopenharmony_ci#define ISC_PFE_CFG2    0x00000014
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci#define ISC_PFE_CFG2_ROWMIN(v)		((v))
5662306a36Sopenharmony_ci#define ISC_PFE_CFG2_ROWMIN_MASK	GENMASK(15, 0)
5762306a36Sopenharmony_ci#define ISC_PFE_CFG2_ROWMAX(v)		((v) << 16)
5862306a36Sopenharmony_ci#define ISC_PFE_CFG2_ROWMAX_MASK	GENMASK(31, 16)
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci/* ISC Clock Enable Register */
6162306a36Sopenharmony_ci#define ISC_CLKEN               0x00000018
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci/* ISC Clock Disable Register */
6462306a36Sopenharmony_ci#define ISC_CLKDIS              0x0000001c
6562306a36Sopenharmony_ci
6662306a36Sopenharmony_ci/* ISC Clock Status Register */
6762306a36Sopenharmony_ci#define ISC_CLKSR               0x00000020
6862306a36Sopenharmony_ci#define ISC_CLKSR_SIP		BIT(31)
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci#define ISC_CLK(n)		BIT(n)
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci/* ISC Clock Configuration Register */
7362306a36Sopenharmony_ci#define ISC_CLKCFG              0x00000024
7462306a36Sopenharmony_ci#define ISC_CLKCFG_DIV_SHIFT(n) ((n) * 16)
7562306a36Sopenharmony_ci#define ISC_CLKCFG_DIV_MASK(n)  GENMASK(((n) * 16 + 7), (n) * 16)
7662306a36Sopenharmony_ci#define ISC_CLKCFG_SEL_SHIFT(n) ((n) * 16 + 8)
7762306a36Sopenharmony_ci#define ISC_CLKCFG_SEL_MASK(n)  GENMASK(((n) * 17 + 8), ((n) * 16 + 8))
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci/* ISC Interrupt Enable Register */
8062306a36Sopenharmony_ci#define ISC_INTEN       0x00000028
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci/* ISC Interrupt Disable Register */
8362306a36Sopenharmony_ci#define ISC_INTDIS      0x0000002c
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci/* ISC Interrupt Mask Register */
8662306a36Sopenharmony_ci#define ISC_INTMASK     0x00000030
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ci/* ISC Interrupt Status Register */
8962306a36Sopenharmony_ci#define ISC_INTSR       0x00000034
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci#define ISC_INT_DDONE		BIT(8)
9262306a36Sopenharmony_ci#define ISC_INT_HISDONE		BIT(12)
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_ci/* ISC DPC Control Register */
9562306a36Sopenharmony_ci#define ISC_DPC_CTRL	0x40
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci#define ISC_DPC_CTRL_DPCEN	BIT(0)
9862306a36Sopenharmony_ci#define ISC_DPC_CTRL_GDCEN	BIT(1)
9962306a36Sopenharmony_ci#define ISC_DPC_CTRL_BLCEN	BIT(2)
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ci/* ISC DPC Config Register */
10262306a36Sopenharmony_ci#define ISC_DPC_CFG	0x44
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci#define ISC_DPC_CFG_BAYSEL_SHIFT	0
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ci#define ISC_DPC_CFG_EITPOL		BIT(4)
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci#define ISC_DPC_CFG_TA_ENABLE		BIT(14)
10962306a36Sopenharmony_ci#define ISC_DPC_CFG_TC_ENABLE		BIT(13)
11062306a36Sopenharmony_ci#define ISC_DPC_CFG_TM_ENABLE		BIT(12)
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci#define ISC_DPC_CFG_RE_MODE		BIT(17)
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci#define ISC_DPC_CFG_GDCCLP_SHIFT	20
11562306a36Sopenharmony_ci#define ISC_DPC_CFG_GDCCLP_MASK		GENMASK(22, 20)
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci#define ISC_DPC_CFG_BLOFF_SHIFT		24
11862306a36Sopenharmony_ci#define ISC_DPC_CFG_BLOFF_MASK		GENMASK(31, 24)
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ci#define ISC_DPC_CFG_BAYCFG_SHIFT	0
12162306a36Sopenharmony_ci#define ISC_DPC_CFG_BAYCFG_MASK		GENMASK(1, 0)
12262306a36Sopenharmony_ci/* ISC DPC Threshold Median Register */
12362306a36Sopenharmony_ci#define ISC_DPC_THRESHM	0x48
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ci/* ISC DPC Threshold Closest Register */
12662306a36Sopenharmony_ci#define ISC_DPC_THRESHC	0x4C
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci/* ISC DPC Threshold Average Register */
12962306a36Sopenharmony_ci#define ISC_DPC_THRESHA	0x50
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ci/* ISC DPC STatus Register */
13262306a36Sopenharmony_ci#define ISC_DPC_SR	0x54
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ci/* ISC White Balance Control Register */
13562306a36Sopenharmony_ci#define ISC_WB_CTRL     0x00000058
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci/* ISC White Balance Configuration Register */
13862306a36Sopenharmony_ci#define ISC_WB_CFG      0x0000005c
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci/* ISC White Balance Offset for R, GR Register */
14162306a36Sopenharmony_ci#define ISC_WB_O_RGR	0x00000060
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ci/* ISC White Balance Offset for B, GB Register */
14462306a36Sopenharmony_ci#define ISC_WB_O_BGB	0x00000064
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci/* ISC White Balance Gain for R, GR Register */
14762306a36Sopenharmony_ci#define ISC_WB_G_RGR	0x00000068
14862306a36Sopenharmony_ci
14962306a36Sopenharmony_ci/* ISC White Balance Gain for B, GB Register */
15062306a36Sopenharmony_ci#define ISC_WB_G_BGB	0x0000006c
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ci/* ISC Color Filter Array Control Register */
15362306a36Sopenharmony_ci#define ISC_CFA_CTRL    0x00000070
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci/* ISC Color Filter Array Configuration Register */
15662306a36Sopenharmony_ci#define ISC_CFA_CFG     0x00000074
15762306a36Sopenharmony_ci#define ISC_CFA_CFG_EITPOL	BIT(4)
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci#define ISC_BAY_CFG_GRGR	0x0
16062306a36Sopenharmony_ci#define ISC_BAY_CFG_RGRG	0x1
16162306a36Sopenharmony_ci#define ISC_BAY_CFG_GBGB	0x2
16262306a36Sopenharmony_ci#define ISC_BAY_CFG_BGBG	0x3
16362306a36Sopenharmony_ci
16462306a36Sopenharmony_ci/* ISC Color Correction Control Register */
16562306a36Sopenharmony_ci#define ISC_CC_CTRL     0x00000078
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ci/* ISC Color Correction RR RG Register */
16862306a36Sopenharmony_ci#define ISC_CC_RR_RG	0x0000007c
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ci/* ISC Color Correction RB OR Register */
17162306a36Sopenharmony_ci#define ISC_CC_RB_OR	0x00000080
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ci/* ISC Color Correction GR GG Register */
17462306a36Sopenharmony_ci#define ISC_CC_GR_GG	0x00000084
17562306a36Sopenharmony_ci
17662306a36Sopenharmony_ci/* ISC Color Correction GB OG Register */
17762306a36Sopenharmony_ci#define ISC_CC_GB_OG	0x00000088
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci/* ISC Color Correction BR BG Register */
18062306a36Sopenharmony_ci#define ISC_CC_BR_BG	0x0000008c
18162306a36Sopenharmony_ci
18262306a36Sopenharmony_ci/* ISC Color Correction BB OB Register */
18362306a36Sopenharmony_ci#define ISC_CC_BB_OB	0x00000090
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ci/* ISC Gamma Correction Control Register */
18662306a36Sopenharmony_ci#define ISC_GAM_CTRL    0x00000094
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ci#define ISC_GAM_CTRL_BIPART	BIT(4)
18962306a36Sopenharmony_ci
19062306a36Sopenharmony_ci/* ISC_Gamma Correction Blue Entry Register */
19162306a36Sopenharmony_ci#define ISC_GAM_BENTRY	0x00000098
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ci/* ISC_Gamma Correction Green Entry Register */
19462306a36Sopenharmony_ci#define ISC_GAM_GENTRY	0x00000198
19562306a36Sopenharmony_ci
19662306a36Sopenharmony_ci/* ISC_Gamma Correction Green Entry Register */
19762306a36Sopenharmony_ci#define ISC_GAM_RENTRY	0x00000298
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_ci/* ISC VHXS Control Register */
20062306a36Sopenharmony_ci#define ISC_VHXS_CTRL	0x398
20162306a36Sopenharmony_ci
20262306a36Sopenharmony_ci/* ISC VHXS Source Size Register */
20362306a36Sopenharmony_ci#define ISC_VHXS_SS	0x39C
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci/* ISC VHXS Destination Size Register */
20662306a36Sopenharmony_ci#define ISC_VHXS_DS	0x3A0
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_ci/* ISC Vertical Factor Register */
20962306a36Sopenharmony_ci#define ISC_VXS_FACT	0x3a4
21062306a36Sopenharmony_ci
21162306a36Sopenharmony_ci/* ISC Horizontal Factor Register */
21262306a36Sopenharmony_ci#define ISC_HXS_FACT	0x3a8
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci/* ISC Vertical Config Register */
21562306a36Sopenharmony_ci#define ISC_VXS_CFG	0x3ac
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ci/* ISC Horizontal Config Register */
21862306a36Sopenharmony_ci#define ISC_HXS_CFG	0x3b0
21962306a36Sopenharmony_ci
22062306a36Sopenharmony_ci/* ISC Vertical Tap Register */
22162306a36Sopenharmony_ci#define ISC_VXS_TAP	0x3b4
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ci/* ISC Horizontal Tap Register */
22462306a36Sopenharmony_ci#define ISC_HXS_TAP	0x434
22562306a36Sopenharmony_ci
22662306a36Sopenharmony_ci/* Offset for CSC register specific to sama5d2 product */
22762306a36Sopenharmony_ci#define ISC_SAMA5D2_CSC_OFFSET	0
22862306a36Sopenharmony_ci/* Offset for CSC register specific to sama7g5 product */
22962306a36Sopenharmony_ci#define ISC_SAMA7G5_CSC_OFFSET	0x11c
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ci/* Color Space Conversion Control Register */
23262306a36Sopenharmony_ci#define ISC_CSC_CTRL    0x00000398
23362306a36Sopenharmony_ci
23462306a36Sopenharmony_ci/* Color Space Conversion YR YG Register */
23562306a36Sopenharmony_ci#define ISC_CSC_YR_YG	0x0000039c
23662306a36Sopenharmony_ci
23762306a36Sopenharmony_ci/* Color Space Conversion YB OY Register */
23862306a36Sopenharmony_ci#define ISC_CSC_YB_OY	0x000003a0
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ci/* Color Space Conversion CBR CBG Register */
24162306a36Sopenharmony_ci#define ISC_CSC_CBR_CBG	0x000003a4
24262306a36Sopenharmony_ci
24362306a36Sopenharmony_ci/* Color Space Conversion CBB OCB Register */
24462306a36Sopenharmony_ci#define ISC_CSC_CBB_OCB	0x000003a8
24562306a36Sopenharmony_ci
24662306a36Sopenharmony_ci/* Color Space Conversion CRR CRG Register */
24762306a36Sopenharmony_ci#define ISC_CSC_CRR_CRG	0x000003ac
24862306a36Sopenharmony_ci
24962306a36Sopenharmony_ci/* Color Space Conversion CRB OCR Register */
25062306a36Sopenharmony_ci#define ISC_CSC_CRB_OCR	0x000003b0
25162306a36Sopenharmony_ci
25262306a36Sopenharmony_ci/* Offset for CBC register specific to sama5d2 product */
25362306a36Sopenharmony_ci#define ISC_SAMA5D2_CBC_OFFSET	0
25462306a36Sopenharmony_ci/* Offset for CBC register specific to sama7g5 product */
25562306a36Sopenharmony_ci#define ISC_SAMA7G5_CBC_OFFSET	0x11c
25662306a36Sopenharmony_ci
25762306a36Sopenharmony_ci/* Contrast And Brightness Control Register */
25862306a36Sopenharmony_ci#define ISC_CBC_CTRL    0x000003b4
25962306a36Sopenharmony_ci
26062306a36Sopenharmony_ci/* Contrast And Brightness Configuration Register */
26162306a36Sopenharmony_ci#define ISC_CBC_CFG	0x000003b8
26262306a36Sopenharmony_ci
26362306a36Sopenharmony_ci/* Brightness Register */
26462306a36Sopenharmony_ci#define ISC_CBC_BRIGHT	0x000003bc
26562306a36Sopenharmony_ci#define ISC_CBC_BRIGHT_MASK	GENMASK(10, 0)
26662306a36Sopenharmony_ci
26762306a36Sopenharmony_ci/* Contrast Register */
26862306a36Sopenharmony_ci#define ISC_CBC_CONTRAST	0x000003c0
26962306a36Sopenharmony_ci#define ISC_CBC_CONTRAST_MASK	GENMASK(11, 0)
27062306a36Sopenharmony_ci
27162306a36Sopenharmony_ci/* Hue Register */
27262306a36Sopenharmony_ci#define ISC_CBCHS_HUE	0x4e0
27362306a36Sopenharmony_ci/* Saturation Register */
27462306a36Sopenharmony_ci#define ISC_CBCHS_SAT	0x4e4
27562306a36Sopenharmony_ci
27662306a36Sopenharmony_ci/* Offset for SUB422 register specific to sama5d2 product */
27762306a36Sopenharmony_ci#define ISC_SAMA5D2_SUB422_OFFSET	0
27862306a36Sopenharmony_ci/* Offset for SUB422 register specific to sama7g5 product */
27962306a36Sopenharmony_ci#define ISC_SAMA7G5_SUB422_OFFSET	0x124
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ci/* Subsampling 4:4:4 to 4:2:2 Control Register */
28262306a36Sopenharmony_ci#define ISC_SUB422_CTRL 0x000003c4
28362306a36Sopenharmony_ci
28462306a36Sopenharmony_ci/* Offset for SUB420 register specific to sama5d2 product */
28562306a36Sopenharmony_ci#define ISC_SAMA5D2_SUB420_OFFSET	0
28662306a36Sopenharmony_ci/* Offset for SUB420 register specific to sama7g5 product */
28762306a36Sopenharmony_ci#define ISC_SAMA7G5_SUB420_OFFSET	0x124
28862306a36Sopenharmony_ci/* Subsampling 4:2:2 to 4:2:0 Control Register */
28962306a36Sopenharmony_ci#define ISC_SUB420_CTRL 0x000003cc
29062306a36Sopenharmony_ci
29162306a36Sopenharmony_ci/* Offset for RLP register specific to sama5d2 product */
29262306a36Sopenharmony_ci#define ISC_SAMA5D2_RLP_OFFSET	0
29362306a36Sopenharmony_ci/* Offset for RLP register specific to sama7g5 product */
29462306a36Sopenharmony_ci#define ISC_SAMA7G5_RLP_OFFSET	0x124
29562306a36Sopenharmony_ci/* Rounding, Limiting and Packing Configuration Register */
29662306a36Sopenharmony_ci#define ISC_RLP_CFG     0x000003d0
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_DAT8           0x0
29962306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_DAT9           0x1
30062306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_DAT10          0x2
30162306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_DAT11          0x3
30262306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_DAT12          0x4
30362306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_DATY8          0x5
30462306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_DATY10         0x6
30562306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_ARGB444        0x7
30662306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_ARGB555        0x8
30762306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_RGB565         0x9
30862306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_ARGB32         0xa
30962306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_YYCC           0xb
31062306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_YYCC_LIMITED   0xc
31162306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_YCYC           0xd
31262306a36Sopenharmony_ci#define ISC_RLP_CFG_MODE_MASK           GENMASK(3, 0)
31362306a36Sopenharmony_ci
31462306a36Sopenharmony_ci#define ISC_RLP_CFG_LSH			BIT(5)
31562306a36Sopenharmony_ci
31662306a36Sopenharmony_ci#define ISC_RLP_CFG_YMODE_YUYV		(3 << 6)
31762306a36Sopenharmony_ci#define ISC_RLP_CFG_YMODE_YVYU		(2 << 6)
31862306a36Sopenharmony_ci#define ISC_RLP_CFG_YMODE_VYUY		(0 << 6)
31962306a36Sopenharmony_ci#define ISC_RLP_CFG_YMODE_UYVY		(1 << 6)
32062306a36Sopenharmony_ci
32162306a36Sopenharmony_ci#define ISC_RLP_CFG_YMODE_MASK		GENMASK(7, 6)
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_ci/* Offset for HIS register specific to sama5d2 product */
32462306a36Sopenharmony_ci#define ISC_SAMA5D2_HIS_OFFSET	0
32562306a36Sopenharmony_ci/* Offset for HIS register specific to sama7g5 product */
32662306a36Sopenharmony_ci#define ISC_SAMA7G5_HIS_OFFSET	0x124
32762306a36Sopenharmony_ci/* Histogram Control Register */
32862306a36Sopenharmony_ci#define ISC_HIS_CTRL	0x000003d4
32962306a36Sopenharmony_ci
33062306a36Sopenharmony_ci#define ISC_HIS_CTRL_EN			BIT(0)
33162306a36Sopenharmony_ci#define ISC_HIS_CTRL_DIS		0x0
33262306a36Sopenharmony_ci
33362306a36Sopenharmony_ci/* Histogram Configuration Register */
33462306a36Sopenharmony_ci#define ISC_HIS_CFG	0x000003d8
33562306a36Sopenharmony_ci
33662306a36Sopenharmony_ci#define ISC_HIS_CFG_MODE_GR		0x0
33762306a36Sopenharmony_ci#define ISC_HIS_CFG_MODE_R		0x1
33862306a36Sopenharmony_ci#define ISC_HIS_CFG_MODE_GB		0x2
33962306a36Sopenharmony_ci#define ISC_HIS_CFG_MODE_B		0x3
34062306a36Sopenharmony_ci#define ISC_HIS_CFG_MODE_Y		0x4
34162306a36Sopenharmony_ci#define ISC_HIS_CFG_MODE_RAW		0x5
34262306a36Sopenharmony_ci#define ISC_HIS_CFG_MODE_YCCIR656	0x6
34362306a36Sopenharmony_ci
34462306a36Sopenharmony_ci#define ISC_HIS_CFG_BAYSEL_SHIFT	4
34562306a36Sopenharmony_ci
34662306a36Sopenharmony_ci#define ISC_HIS_CFG_RAR			BIT(8)
34762306a36Sopenharmony_ci
34862306a36Sopenharmony_ci/* Offset for DMA register specific to sama5d2 product */
34962306a36Sopenharmony_ci#define ISC_SAMA5D2_DMA_OFFSET	0
35062306a36Sopenharmony_ci/* Offset for DMA register specific to sama7g5 product */
35162306a36Sopenharmony_ci#define ISC_SAMA7G5_DMA_OFFSET	0x13c
35262306a36Sopenharmony_ci
35362306a36Sopenharmony_ci/* DMA Configuration Register */
35462306a36Sopenharmony_ci#define ISC_DCFG        0x000003e0
35562306a36Sopenharmony_ci#define ISC_DCFG_IMODE_PACKED8          0x0
35662306a36Sopenharmony_ci#define ISC_DCFG_IMODE_PACKED16         0x1
35762306a36Sopenharmony_ci#define ISC_DCFG_IMODE_PACKED32         0x2
35862306a36Sopenharmony_ci#define ISC_DCFG_IMODE_YC422SP          0x3
35962306a36Sopenharmony_ci#define ISC_DCFG_IMODE_YC422P           0x4
36062306a36Sopenharmony_ci#define ISC_DCFG_IMODE_YC420SP          0x5
36162306a36Sopenharmony_ci#define ISC_DCFG_IMODE_YC420P           0x6
36262306a36Sopenharmony_ci#define ISC_DCFG_IMODE_MASK             GENMASK(2, 0)
36362306a36Sopenharmony_ci
36462306a36Sopenharmony_ci#define ISC_DCFG_YMBSIZE_SINGLE         (0x0 << 4)
36562306a36Sopenharmony_ci#define ISC_DCFG_YMBSIZE_BEATS4         (0x1 << 4)
36662306a36Sopenharmony_ci#define ISC_DCFG_YMBSIZE_BEATS8         (0x2 << 4)
36762306a36Sopenharmony_ci#define ISC_DCFG_YMBSIZE_BEATS16        (0x3 << 4)
36862306a36Sopenharmony_ci#define ISC_DCFG_YMBSIZE_BEATS32        (0x4 << 4)
36962306a36Sopenharmony_ci#define ISC_DCFG_YMBSIZE_MASK           GENMASK(6, 4)
37062306a36Sopenharmony_ci
37162306a36Sopenharmony_ci#define ISC_DCFG_CMBSIZE_SINGLE         (0x0 << 8)
37262306a36Sopenharmony_ci#define ISC_DCFG_CMBSIZE_BEATS4         (0x1 << 8)
37362306a36Sopenharmony_ci#define ISC_DCFG_CMBSIZE_BEATS8         (0x2 << 8)
37462306a36Sopenharmony_ci#define ISC_DCFG_CMBSIZE_BEATS16        (0x3 << 8)
37562306a36Sopenharmony_ci#define ISC_DCFG_CMBSIZE_BEATS32        (0x4 << 8)
37662306a36Sopenharmony_ci#define ISC_DCFG_CMBSIZE_MASK           GENMASK(10, 8)
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ci/* DMA Control Register */
37962306a36Sopenharmony_ci#define ISC_DCTRL       0x000003e4
38062306a36Sopenharmony_ci
38162306a36Sopenharmony_ci#define ISC_DCTRL_DVIEW_PACKED          (0x0 << 1)
38262306a36Sopenharmony_ci#define ISC_DCTRL_DVIEW_SEMIPLANAR      (0x1 << 1)
38362306a36Sopenharmony_ci#define ISC_DCTRL_DVIEW_PLANAR          (0x2 << 1)
38462306a36Sopenharmony_ci#define ISC_DCTRL_DVIEW_MASK            GENMASK(2, 1)
38562306a36Sopenharmony_ci
38662306a36Sopenharmony_ci#define ISC_DCTRL_IE_IS			(0x0 << 4)
38762306a36Sopenharmony_ci
38862306a36Sopenharmony_ci/* DMA Descriptor Address Register */
38962306a36Sopenharmony_ci#define ISC_DNDA        0x000003e8
39062306a36Sopenharmony_ci
39162306a36Sopenharmony_ci/* DMA Address 0 Register */
39262306a36Sopenharmony_ci#define ISC_DAD0        0x000003ec
39362306a36Sopenharmony_ci
39462306a36Sopenharmony_ci/* DMA Address 1 Register */
39562306a36Sopenharmony_ci#define ISC_DAD1        0x000003f4
39662306a36Sopenharmony_ci
39762306a36Sopenharmony_ci/* DMA Address 2 Register */
39862306a36Sopenharmony_ci#define ISC_DAD2        0x000003fc
39962306a36Sopenharmony_ci
40062306a36Sopenharmony_ci/* Offset for version register specific to sama5d2 product */
40162306a36Sopenharmony_ci#define ISC_SAMA5D2_VERSION_OFFSET	0
40262306a36Sopenharmony_ci#define ISC_SAMA7G5_VERSION_OFFSET	0x13c
40362306a36Sopenharmony_ci/* Version Register */
40462306a36Sopenharmony_ci#define ISC_VERSION	0x0000040c
40562306a36Sopenharmony_ci
40662306a36Sopenharmony_ci/* Offset for version register specific to sama5d2 product */
40762306a36Sopenharmony_ci#define ISC_SAMA5D2_HIS_ENTRY_OFFSET	0
40862306a36Sopenharmony_ci/* Offset for version register specific to sama7g5 product */
40962306a36Sopenharmony_ci#define ISC_SAMA7G5_HIS_ENTRY_OFFSET	0x14c
41062306a36Sopenharmony_ci/* Histogram Entry */
41162306a36Sopenharmony_ci#define ISC_HIS_ENTRY	0x00000410
41262306a36Sopenharmony_ci
41362306a36Sopenharmony_ci#endif
414