diff options
author | Robby Cai <R63905@freescale.com> | 2012-09-27 23:50:08 +0800 |
---|---|---|
committer | Robby Cai <R63905@freescale.com> | 2012-09-29 18:52:41 +0800 |
commit | 60dc693e6744258ba2b198ee339f5442cbf1b93d (patch) | |
tree | 5942459cfcd328464edbfb98d244db3f58742418 /arch/arm/plat-mxc/devices | |
parent | 55d8abfd8bbdd4b3bc622bf4a24135ddb6461bf9 (diff) | |
download | linux-60dc693e6744258ba2b198ee339f5442cbf1b93d.tar.gz |
ENGR00225981-8 csi/imx6sl: add the platform-related setting
- add platform data for csi driver
- change the regulator name to reflect the voltage really used
- select OSC as csi parent clock to get 24MHz
- add an boot option to use csi feature while filter out the EPDC/SPDC, since
there are pin conflicts with xPDC.
- both ov5640 and ov5642 are verified okay, ov5640 is used by default.
- remove IPU from update_defconfig
Signed-off-by: Robby Cai <R63905@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc/devices')
-rwxr-xr-x | arch/arm/plat-mxc/devices/Kconfig | 3 | ||||
-rwxr-xr-x | arch/arm/plat-mxc/devices/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c | 55 |
3 files changed, 59 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index bdea66b7a1f4..2e666bac3afd 100755 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig @@ -185,3 +185,6 @@ config IMX_HAVE_PLATFORM_IMX_VDOA config IMX_HAVE_PLATFORM_IMX_PCIE bool + +config IMX_HAVE_PLATFORM_IMX_FSL_CSI + bool diff --git a/arch/arm/plat-mxc/devices/Makefile b/arch/arm/plat-mxc/devices/Makefile index 41287783cb80..102eeaaff38b 100755 --- a/arch/arm/plat-mxc/devices/Makefile +++ b/arch/arm/plat-mxc/devices/Makefile @@ -66,4 +66,5 @@ obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_DSI) += platform-imx-mipi_dsi.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_CSI2) += platform-imx-mipi_csi2.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_VDOA) += platform-imx-vdoa.o obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_PCIE) += platform-imx-pcie.o +obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX_FSL_CSI) += platform-imx-fsl-csi.o obj-y += platform-imx-pmu.o diff --git a/arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c b/arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c new file mode 100644 index 000000000000..8b6601ccc5a0 --- /dev/null +++ b/arch/arm/plat-mxc/devices/platform-imx-fsl-csi.c @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved. + */ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include <asm/sizes.h> +#include <mach/hardware.h> +#include <mach/devices-common.h> + +#define imx_fsl_csi_data_entry_single(soc, size) \ + { \ + .iobase = soc ## _CSI_BASE_ADDR, \ + .irq = soc ## _INT_CSI, \ + .iosize = size, \ + } + +#ifdef CONFIG_SOC_IMX6SL +const struct imx_fsl_csi_data imx6sl_csi_data __initconst = + imx_fsl_csi_data_entry_single(MX6SL, SZ_16K); +#endif + +struct platform_device *__init imx_add_fsl_csi( + const struct imx_fsl_csi_data *data) +{ + struct resource res[] = { + { + .start = data->iobase, + .end = data->iobase + data->iosize - 1, + .flags = IORESOURCE_MEM, + }, { + .start = data->irq, + .end = data->irq, + .flags = IORESOURCE_IRQ, + }, + }; + + return imx_add_platform_device("fsl_csi", -1, + res, ARRAY_SIZE(res), NULL, 0); +} + |