summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos5-is/fimc-is-regs.h
diff options
context:
space:
mode:
authorArun Kumar K <arun.kk@samsung.com>2013-11-05 17:43:19 +0530
committerSylwester Nawrocki <s.nawrocki@samsung.com>2014-11-27 03:35:09 -0800
commitc28f5dd0b9b73130a4c93f33a7d1fd6296b2d8be (patch)
tree7a6915e2ac266af746558462d7f6bba41d81aeb8 /drivers/media/platform/exynos5-is/fimc-is-regs.h
parent16c9bfd617dace172315cb0d50cfe8c075824586 (diff)
downloadlinux-3.10-c28f5dd0b9b73130a4c93f33a7d1fd6296b2d8be.tar.gz
linux-3.10-c28f5dd0b9b73130a4c93f33a7d1fd6296b2d8be.tar.bz2
linux-3.10-c28f5dd0b9b73130a4c93f33a7d1fd6296b2d8be.zip
[media] Add driver for exynos5 FIMC-IS subsystem
This driver is for the FIMC-IS IP available in Samsung Exynos5 SoC onwards. exynos5-fimc-is: Add common driver header files This patch adds all the common header files used by the fimc-is driver. It includes the commands for interfacing with the firmware and error codes from IS firmware, metadata and command parameter definitions. exynos5-fimc-is: Add register definition and context header This patch adds the register definition file for the fimc-is driver and also the header file containing the main context for the driver. exynos5-fimc-is: Add isp subdev fimc-is driver takes video data input from the ISP video node which is added in this patch. This node accepts Bayer input buffers which is given from the IS sensors. exynos5-fimc-is: Add scaler subdev FIMC-IS has two hardware scalers named as scaler-codec and scaler-preview. This patch adds the common code handling the video nodes and subdevs of both the scalers. exynos5-fimc-is: Add sensor interface Some sensors to be used with fimc-is are exclusively controlled by the fimc-is firmware. This minimal sensor driver provides the required info for the firmware to configure the sensors sitting on I2C bus. exynos5-fimc-is: Add the hardware pipeline control This patch adds the crucial hardware pipeline control for the fimc-is driver. All the subdev nodes will call this pipeline interfaces to reach the hardware. Responsibilities of this module involves configuring and maintaining the hardware pipeline involving multiple sub-ips like ISP, DRC, Scalers, ODC, 3DNR, FD etc. exynos5-fimc-is: Add the hardware interface module The hardware interface module finally sends the commands to the FIMC-IS firmware and runs the interrupt handler for getting the responses. Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Signed-off-by: Kilyeon Im <kilyeon.im@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> exynos5-is: Add Kconfig and Makefile Adds Kconfig and Makefile for exynos5-is driver files. [b.michalska@samsung.com: Implementation adjusted to current version of V4L2 framework: - updated prototype for stop_streaming v4l2 capture ops - vb2_queue struct's field tiemstamp_type updated to timestamp_flags] Change-Id: I066a86151048b4b5871bd3732773b87219f04fd1 Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'drivers/media/platform/exynos5-is/fimc-is-regs.h')
-rw-r--r--drivers/media/platform/exynos5-is/fimc-is-regs.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/drivers/media/platform/exynos5-is/fimc-is-regs.h b/drivers/media/platform/exynos5-is/fimc-is-regs.h
new file mode 100644
index 00000000000..06aa466624f
--- /dev/null
+++ b/drivers/media/platform/exynos5-is/fimc-is-regs.h
@@ -0,0 +1,105 @@
+/*
+ * Samsung Exynos5 SoC series FIMC-IS driver
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd
+ * Arun Kumar K <arun.kk@samsung.com>
+ * Kil-yeon Lim <kilyeon.im@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef FIMC_IS_REGS_H
+#define FIMC_IS_REGS_H
+
+/* WDT_ISP register */
+#define WDT 0x00170000
+/* MCUCTL register */
+#define MCUCTL 0x00180000
+/* MCU Controller Register */
+#define MCUCTLR (MCUCTL+0x00)
+#define MCUCTLR_AXI_ISPX_AWCACHE(x) ((x) << 16)
+#define MCUCTLR_AXI_ISPX_ARCACHE(x) ((x) << 12)
+#define MCUCTLR_MSWRST (1 << 0)
+/* Boot Base OFfset Address Register */
+#define BBOAR (MCUCTL+0x04)
+#define BBOAR_BBOA(x) ((x) << 0)
+
+/* Interrupt Generation Register 0 from Host CPU to VIC */
+#define INTGR0 (MCUCTL+0x08)
+#define INTGR0_INTGC(n) (1 << ((n) + 16))
+#define INTGR0_INTGD(n) (1 << (n))
+
+/* Interrupt Clear Register 0 from Host CPU to VIC */
+#define INTCR0 (MCUCTL+0x0c)
+#define INTCR0_INTCC(n) (1 << ((n) + 16))
+#define INTCR0_INTCD(n) (1 << (n))
+
+/* Interrupt Mask Register 0 from Host CPU to VIC */
+#define INTMR0 (MCUCTL+0x10)
+#define INTMR0_INTMC(n) (1 << ((n) + 16))
+#define INTMR0_INTMD(n) (1 << (n))
+
+/* Interrupt Status Register 0 from Host CPU to VIC */
+#define INTSR0 (MCUCTL+0x14)
+#define INTSR0_GET_INTSD(n, x) (((x) >> (n)) & 0x1)
+#define INTSR0_GET_INTSC(n, x) (((x) >> ((n) + 16)) & 0x1)
+
+/* Interrupt Mask Status Register 0 from Host CPU to VIC */
+#define INTMSR0 (MCUCTL+0x18)
+#define INTMSR0_GET_INTMSD(n, x) (((x) >> (n)) & 0x1)
+#define INTMSR0_GET_INTMSC(n, x) (((x) >> ((n) + 16)) & 0x1)
+
+/* Interrupt Generation Register 1 from ISP CPU to Host IC */
+#define INTGR1 (MCUCTL+0x1c)
+#define INTGR1_INTGC(n) (1 << (n))
+
+/* Interrupt Clear Register 1 from ISP CPU to Host IC */
+#define INTCR1 (MCUCTL+0x20)
+#define INTCR1_INTCC(n) (1 << (n))
+
+/* Interrupt Mask Register 1 from ISP CPU to Host IC */
+#define INTMR1 (MCUCTL+0x24)
+#define INTMR1_INTMC(n) (1 << (n))
+
+/* Interrupt Status Register 1 from ISP CPU to Host IC */
+#define INTSR1 (MCUCTL+0x28)
+/* Interrupt Mask Status Register 1 from ISP CPU to Host IC */
+#define INTMSR1 (MCUCTL+0x2c)
+/* Interrupt Clear Register 2 from ISP BLK's interrupts to Host IC */
+#define INTCR2 (MCUCTL+0x30)
+#define INTCR2_INTCC(n) (1 << (n))
+
+/* Interrupt Mask Register 2 from ISP BLK's interrupts to Host IC */
+#define INTMR2 (MCUCTL+0x34)
+#define INTMR2_INTMCIS(n) (1 << (n))
+
+/* Interrupt Status Register 2 from ISP BLK's interrupts to Host IC */
+#define INTSR2 (MCUCTL+0x38)
+/* Interrupt Mask Status Register 2 from ISP BLK's interrupts to Host IC */
+#define INTMSR2 (MCUCTL+0x3c)
+/* General Purpose Output Control Register (0~17) */
+#define GPOCTLR (MCUCTL+0x40)
+#define GPOCTLR_GPOG(n, x) ((x) << (n))
+
+/* General Purpose Pad Output Enable Register (0~17) */
+#define GPOENCTLR (MCUCTL+0x44)
+#define GPOENCTLR_GPOEN0(n, x) ((x) << (n))
+
+/* General Purpose Input Control Register (0~17) */
+#define GPICTLR (MCUCTL+0x48)
+
+/* IS Shared Registers between ISP CPU and HOST CPU */
+#define ISSR(n) (MCUCTL + 0x80 + (n))
+
+/* PMU for FIMC-IS*/
+#define PMUREG_CMU_RESET_ISP_SYS_PWR_REG 0x1584
+#define PMUREG_ISP_ARM_CONFIGURATION 0x2280
+#define PMUREG_ISP_ARM_STATUS 0x2284
+#define PMUREG_ISP_ARM_OPTION 0x2288
+#define PMUREG_ISP_LOW_POWER_OFF 0x0004
+#define PMUREG_ISP_CONFIGURATION 0x4020
+#define PMUREG_ISP_STATUS 0x4024
+
+#endif