mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-06-07 11:20:45 +00:00
linux-davinci: remove obsolete patches
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
-345
@@ -1,345 +0,0 @@
|
||||
From a04a493ead5afb10aafe2c0cf57bf9e3bf7aa844 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@openembedded.org>
|
||||
Date: Thu, 12 Mar 2009 14:15:42 -0300
|
||||
Subject: [PATCH] dm355-leopard: add board file based on board-dm355-evm.c
|
||||
|
||||
---
|
||||
arch/arm/mach-davinci/Kconfig | 8 +
|
||||
arch/arm/mach-davinci/Makefile | 2 +
|
||||
arch/arm/mach-davinci/board-dm355-leopard.c | 295 +++++++++++++++++++++++++++
|
||||
3 files changed, 305 insertions(+), 0 deletions(-)
|
||||
create mode 100644 arch/arm/mach-davinci/board-dm355-leopard.c
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
|
||||
index 0010f2d..85424b8 100644
|
||||
--- a/arch/arm/mach-davinci/Kconfig
|
||||
+++ b/arch/arm/mach-davinci/Kconfig
|
||||
@@ -50,6 +50,14 @@ config MACH_SFFSDR
|
||||
Say Y here to select the Lyrtech Small Form Factor
|
||||
Software Defined Radio (SFFSDR) board.
|
||||
|
||||
+config MACH_DM355_LEOPARD
|
||||
+ bool "TI DM355 Leopard board"
|
||||
+ default n
|
||||
+ depends on ARCH_DAVINCI_DM355
|
||||
+ help
|
||||
+ Configure this option to specify the whether the board used
|
||||
+ for development is a DM355 Leopard board.
|
||||
+
|
||||
config DAVINCI_MUX
|
||||
bool "DAVINCI multiplexing support"
|
||||
depends on ARCH_DAVINCI
|
||||
diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
|
||||
index 6783681..96ef484 100644
|
||||
--- a/arch/arm/mach-davinci/Makefile
|
||||
+++ b/arch/arm/mach-davinci/Makefile
|
||||
@@ -19,3 +19,5 @@ obj-$(CONFIG_MACH_DAVINCI_EVM) += board-dm644x-evm.o
|
||||
obj-$(CONFIG_MACH_DAVINCI_DM646X_EVM) += board-dm646x-evm.o
|
||||
obj-$(CONFIG_MACH_DAVINCI_DM355_EVM) += board-dm355-evm.o
|
||||
obj-$(CONFIG_MACH_SFFSDR) += board-sffsdr.o
|
||||
+obj-$(CONFIG_MACH_DM355_LEOPARD) += board-dm355-leopard.o
|
||||
+
|
||||
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
|
||||
new file mode 100644
|
||||
index 0000000..a1e97e8
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
|
||||
@@ -0,0 +1,295 @@
|
||||
+/*
|
||||
+ * TI DM355 leopard board support
|
||||
+ *
|
||||
+ * Based on board-dm355-evm.c
|
||||
+ *
|
||||
+ * This file is licensed under the terms of the GNU General Public
|
||||
+ * License version 2. This program is licensed "as is" without any
|
||||
+ * warranty of any kind, whether express or implied.
|
||||
+ */
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/dma-mapping.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#include <linux/mtd/nand.h>
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/gpio.h>
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+#include <linux/spi/eeprom.h>
|
||||
+
|
||||
+#include <asm/setup.h>
|
||||
+#include <asm/mach-types.h>
|
||||
+#include <asm/mach/arch.h>
|
||||
+#include <asm/mach/map.h>
|
||||
+#include <asm/mach/flash.h>
|
||||
+
|
||||
+#include <mach/hardware.h>
|
||||
+#include <mach/dm355.h>
|
||||
+#include <mach/psc.h>
|
||||
+#include <mach/common.h>
|
||||
+#include <mach/emac.h>
|
||||
+#include <mach/i2c.h>
|
||||
+#include <mach/serial.h>
|
||||
+#include <mach/nand.h>
|
||||
+#include <mach/mmc.h>
|
||||
+
|
||||
+#define DAVINCI_ASYNC_EMIF_CONTROL_BASE 0x01e10000
|
||||
+#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
||||
+
|
||||
+/* NOTE: this is geared for the standard config, with a socketed
|
||||
+ * 2 GByte Micron NAND (MT29F16G08FAA) using 128KB sectors. If you
|
||||
+ * swap chips, maybe with a different block size, partitioning may
|
||||
+ * need to be changed.
|
||||
+ */
|
||||
+#define NAND_BLOCK_SIZE SZ_128K
|
||||
+
|
||||
+static struct mtd_partition davinci_nand_partitions[] = {
|
||||
+ {
|
||||
+ /* UBL (a few copies) plus U-Boot */
|
||||
+ .name = "bootloader",
|
||||
+ .offset = 0,
|
||||
+ .size = 15 * NAND_BLOCK_SIZE,
|
||||
+ .mask_flags = MTD_WRITEABLE, /* force read-only */
|
||||
+ }, {
|
||||
+ /* U-Boot environment */
|
||||
+ .name = "params",
|
||||
+ .offset = MTDPART_OFS_APPEND,
|
||||
+ .size = 1 * NAND_BLOCK_SIZE,
|
||||
+ .mask_flags = 0,
|
||||
+ }, {
|
||||
+ .name = "kernel",
|
||||
+ .offset = MTDPART_OFS_APPEND,
|
||||
+ .size = SZ_4M,
|
||||
+ .mask_flags = 0,
|
||||
+ }, {
|
||||
+ .name = "filesystem1",
|
||||
+ .offset = MTDPART_OFS_APPEND,
|
||||
+ .size = SZ_512M,
|
||||
+ .mask_flags = 0,
|
||||
+ }, {
|
||||
+ .name = "filesystem2",
|
||||
+ .offset = MTDPART_OFS_APPEND,
|
||||
+ .size = MTDPART_SIZ_FULL,
|
||||
+ .mask_flags = 0,
|
||||
+ }
|
||||
+ /* two blocks with bad block table (and mirror) at the end */
|
||||
+};
|
||||
+
|
||||
+static struct davinci_nand_pdata davinci_nand_data = {
|
||||
+ .mask_chipsel = BIT(14),
|
||||
+ .parts = davinci_nand_partitions,
|
||||
+ .nr_parts = ARRAY_SIZE(davinci_nand_partitions),
|
||||
+ .ecc_mode = NAND_ECC_HW_SYNDROME,
|
||||
+ .options = NAND_USE_FLASH_BBT,
|
||||
+};
|
||||
+
|
||||
+static struct resource davinci_nand_resources[] = {
|
||||
+ {
|
||||
+ .start = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
|
||||
+ .end = DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_32M - 1,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ }, {
|
||||
+ .start = DAVINCI_ASYNC_EMIF_CONTROL_BASE,
|
||||
+ .end = DAVINCI_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct platform_device davinci_nand_device = {
|
||||
+ .name = "davinci_nand",
|
||||
+ .id = 0,
|
||||
+
|
||||
+ .num_resources = ARRAY_SIZE(davinci_nand_resources),
|
||||
+ .resource = davinci_nand_resources,
|
||||
+
|
||||
+ .dev = {
|
||||
+ .platform_data = &davinci_nand_data,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct davinci_i2c_platform_data i2c_pdata = {
|
||||
+ .bus_freq = 400 /* kHz */,
|
||||
+ .bus_delay = 0 /* usec */,
|
||||
+};
|
||||
+
|
||||
+static int dm355leopard_mmc_gpios = -EINVAL;
|
||||
+
|
||||
+static void dm355leopard_mmcsd_gpios(unsigned gpio)
|
||||
+{
|
||||
+ gpio_request(gpio + 0, "mmc0_ro");
|
||||
+ gpio_request(gpio + 1, "mmc0_cd");
|
||||
+ gpio_request(gpio + 2, "mmc1_ro");
|
||||
+ gpio_request(gpio + 3, "mmc1_cd");
|
||||
+
|
||||
+ /* we "know" these are input-only so we don't
|
||||
+ * need to call gpio_direction_input()
|
||||
+ */
|
||||
+
|
||||
+ dm355leopard_mmc_gpios = gpio;
|
||||
+}
|
||||
+
|
||||
+static struct i2c_board_info dm355leopard_i2c_info[] = {
|
||||
+ { I2C_BOARD_INFO("dm355leopard_msp", 0x25),
|
||||
+ .platform_data = dm355leopard_mmcsd_gpios,
|
||||
+ /* plus irq */ },
|
||||
+ /* { I2C_BOARD_INFO("tlv320aic3x", 0x1b), }, */
|
||||
+ /* { I2C_BOARD_INFO("tvp5146", 0x5d), }, */
|
||||
+};
|
||||
+
|
||||
+static void __init leopard_init_i2c(void)
|
||||
+{
|
||||
+ davinci_init_i2c(&i2c_pdata);
|
||||
+
|
||||
+ gpio_request(5, "dm355leopard_msp");
|
||||
+ gpio_direction_input(5);
|
||||
+ dm355leopard_i2c_info[0].irq = gpio_to_irq(5);
|
||||
+
|
||||
+ i2c_register_board_info(1, dm355leopard_i2c_info,
|
||||
+ ARRAY_SIZE(dm355leopard_i2c_info));
|
||||
+}
|
||||
+
|
||||
+static struct resource dm355leopard_dm9000_rsrc[] = {
|
||||
+ {
|
||||
+ /* addr */
|
||||
+ .start = 0x04000000,
|
||||
+ .end = 0x04000001,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ }, {
|
||||
+ /* data */
|
||||
+ .start = 0x04000016,
|
||||
+ .end = 0x04000017,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ }, {
|
||||
+ .flags = IORESOURCE_IRQ
|
||||
+ | IORESOURCE_IRQ_HIGHEDGE /* rising (active high) */,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct platform_device dm355leopard_dm9000 = {
|
||||
+ .name = "dm9000",
|
||||
+ .id = -1,
|
||||
+ .resource = dm355leopard_dm9000_rsrc,
|
||||
+ .num_resources = ARRAY_SIZE(dm355leopard_dm9000_rsrc),
|
||||
+};
|
||||
+
|
||||
+static struct platform_device *davinci_leopard_devices[] __initdata = {
|
||||
+ &dm355leopard_dm9000,
|
||||
+ &davinci_nand_device,
|
||||
+};
|
||||
+
|
||||
+static struct davinci_uart_config uart_config __initdata = {
|
||||
+ .enabled_uarts = (1 << 0),
|
||||
+};
|
||||
+
|
||||
+static void __init dm355_leopard_map_io(void)
|
||||
+{
|
||||
+ davinci_map_common_io();
|
||||
+ dm355_init();
|
||||
+}
|
||||
+
|
||||
+static int dm355leopard_mmc_get_cd(int module)
|
||||
+{
|
||||
+ if (!gpio_is_valid(dm355leopard_mmc_gpios))
|
||||
+ return -ENXIO;
|
||||
+ /* low == card present */
|
||||
+ return !gpio_get_value_cansleep(dm355leopard_mmc_gpios + 2 * module + 1);
|
||||
+}
|
||||
+
|
||||
+static int dm355leopard_mmc_get_ro(int module)
|
||||
+{
|
||||
+ if (!gpio_is_valid(dm355leopard_mmc_gpios))
|
||||
+ return -ENXIO;
|
||||
+ /* high == card's write protect switch active */
|
||||
+ return gpio_get_value_cansleep(dm355leopard_mmc_gpios + 2 * module + 0);
|
||||
+}
|
||||
+
|
||||
+static struct davinci_mmc_config dm355leopard_mmc_config = {
|
||||
+ .get_cd = dm355leopard_mmc_get_cd,
|
||||
+ .get_ro = dm355leopard_mmc_get_ro,
|
||||
+ .wires = 4,
|
||||
+ .max_freq = 50000000,
|
||||
+ .caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
|
||||
+};
|
||||
+
|
||||
+/* Don't connect anything to J10 unless you're only using USB host
|
||||
+ * mode *and* have to do so with some kind of gender-bender. If
|
||||
+ * you have proper Mini-B or Mini-A cables (or Mini-A adapters)
|
||||
+ * the ID pin won't need any help.
|
||||
+ */
|
||||
+#ifdef CONFIG_USB_MUSB_PERIPHERAL
|
||||
+#define USB_ID_VALUE 0 /* ID pulled high; *should* float */
|
||||
+#else
|
||||
+#define USB_ID_VALUE 1 /* ID pulled low */
|
||||
+#endif
|
||||
+
|
||||
+static struct spi_eeprom at25640a = {
|
||||
+ .byte_len = SZ_64K / 8,
|
||||
+ .name = "at25640a",
|
||||
+ .page_size = 32,
|
||||
+ .flags = EE_ADDR2,
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info dm355_leopard_spi_info[] __initconst = {
|
||||
+ {
|
||||
+ .modalias = "at25",
|
||||
+ .platform_data = &at25640a,
|
||||
+ .max_speed_hz = 10 * 1000 * 1000, /* at 3v3 */
|
||||
+ .bus_num = 0,
|
||||
+ .chip_select = 0,
|
||||
+ .mode = SPI_MODE_0,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static __init void dm355_leopard_init(void)
|
||||
+{
|
||||
+ struct clk *aemif;
|
||||
+
|
||||
+ gpio_request(9, "dm9000");
|
||||
+ gpio_direction_input(9);
|
||||
+ dm355leopard_dm9000_rsrc[2].start = gpio_to_irq(9);
|
||||
+
|
||||
+ aemif = clk_get(&dm355leopard_dm9000.dev, "aemif");
|
||||
+ clk_enable(aemif);
|
||||
+ clk_put(aemif);
|
||||
+
|
||||
+ platform_add_devices(davinci_leopard_devices,
|
||||
+ ARRAY_SIZE(davinci_leopard_devices));
|
||||
+ leopard_init_i2c();
|
||||
+ davinci_serial_init(&uart_config);
|
||||
+
|
||||
+ /* NOTE: NAND flash timings set by the UBL are slower than
|
||||
+ * needed by MT29F16G08FAA chips ... EMIF.A1CR is 0x40400204
|
||||
+ * but could be 0x0400008c for about 25% faster page reads.
|
||||
+ */
|
||||
+
|
||||
+ gpio_request(2, "usb_id_toggle");
|
||||
+ gpio_direction_output(2, USB_ID_VALUE);
|
||||
+ /* irlml6401 switches over 1A in under 8 msec */
|
||||
+ setup_usb(500, 8);
|
||||
+
|
||||
+ davinci_setup_mmc(0, &dm355leopard_mmc_config);
|
||||
+ davinci_setup_mmc(1, &dm355leopard_mmc_config);
|
||||
+
|
||||
+ dm355_init_spi0(BIT(0), dm355_leopard_spi_info,
|
||||
+ ARRAY_SIZE(dm355_leopard_spi_info));
|
||||
+}
|
||||
+
|
||||
+static __init void dm355_leopard_irq_init(void)
|
||||
+{
|
||||
+ davinci_irq_init();
|
||||
+}
|
||||
+
|
||||
+MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard")
|
||||
+ .phys_io = IO_PHYS,
|
||||
+ .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
|
||||
+ .boot_params = (0x80000100),
|
||||
+ .map_io = dm355_leopard_map_io,
|
||||
+ .init_irq = dm355_leopard_irq_init,
|
||||
+ .timer = &davinci_timer,
|
||||
+ .init_machine = dm355_leopard_init,
|
||||
+MACHINE_END
|
||||
--
|
||||
1.6.1.2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,143 +0,0 @@
|
||||
Subject:
|
||||
[PATCH 7/7] DM355 platform related changes for vpfe capture driver
|
||||
From:
|
||||
m-karicheri2-l0cyMroinI0@public.gmane.org
|
||||
Date:
|
||||
Fri, 13 Mar 2009 17:24:34 -0400
|
||||
To:
|
||||
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org, davinci_opensource_ccb-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org, psp_video-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org
|
||||
Newsgroups:
|
||||
gmane.linux.davinci
|
||||
|
||||
Add platform related changes for vpfe capture driver on DM355
|
||||
|
||||
Signed-off-by: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
|
||||
---
|
||||
arch/arm/mach-davinci/board-dm355-leopard.c | 91 +++++++++++++++++++++++++++-
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
|
||||
index e104650..aaa58ba 100644
|
||||
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
|
||||
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/clk.h>
|
||||
+#include <media/v4l2-int-device.h>
|
||||
+#include <media/tvp514x.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/eeprom.h>
|
||||
|
||||
@@ -134,12 +136,58 @@ static void dm355leopard_mmcsd_gpios(unsigned gpio)
|
||||
dm355leopard_mmc_gpios = gpio;
|
||||
}
|
||||
|
||||
+#define TVP5146_I2C_ADDR 0x5D
|
||||
+static struct v4l2_ifparm tvp5146_ifparm = {
|
||||
+ .if_type = V4L2_IF_TYPE_BT656,
|
||||
+ .u = {
|
||||
+ .bt656 = {
|
||||
+ .frame_start_on_rising_vs = 1,
|
||||
+ .bt_sync_correct = 0,
|
||||
+ .swap = 0,
|
||||
+ .latch_clk_inv = 0,
|
||||
+ .nobt_hs_inv = 0, /* active high */
|
||||
+ .nobt_vs_inv = 0, /* active high */
|
||||
+ .mode = V4L2_IF_TYPE_BT656_MODE_BT_8BIT,
|
||||
+ .clock_min = TVP514X_XCLK_BT656,
|
||||
+ .clock_max = TVP514X_XCLK_BT656,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * @brief tvp5146_g_ifparm - Returns the TVP5146 decoder interface parameters
|
||||
+ *
|
||||
+ * @param p - pointer to v4l2_ifparm structure
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+static int tvp5146_g_ifparm(struct v4l2_ifparm *p)
|
||||
+{
|
||||
+ if (p == NULL)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ *p = tvp5146_ifparm;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define TVP5146_NUM_INPUTS ARRAY_SIZE(tvp5146_input_list)
|
||||
+
|
||||
+static struct tvp514x_platform_data tvp5146_pdata = {
|
||||
+ .master = CAPTURE_DRV_NAME,
|
||||
+ .ifparm = tvp5146_g_ifparm,
|
||||
+ .hs_polarity = 1,
|
||||
+ .vs_polarity = 1
|
||||
+};
|
||||
+
|
||||
static struct i2c_board_info dm355leopard_i2c_info[] = {
|
||||
- { I2C_BOARD_INFO("dm355leopard_msp", 0x25),
|
||||
+ { I2C_BOARD_INFO("dm355leopard_msp", 0x25),
|
||||
.platform_data = dm355leopard_mmcsd_gpios,
|
||||
- /* plus irq */ },
|
||||
+ },
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("tvp5146", TVP5146_I2C_ADDR),
|
||||
+ .platform_data = &tvp5146_pdata,
|
||||
+ },
|
||||
+ /* { plus irq }, */
|
||||
/* { I2C_BOARD_INFO("tlv320aic3x", 0x1b), }, */
|
||||
- /* { I2C_BOARD_INFO("tvp5146", 0x5d), }, */
|
||||
};
|
||||
|
||||
static void __init leopard_init_i2c(void)
|
||||
@@ -178,6 +226,41 @@ static struct platform_device dm355leopard_dm9000 = {
|
||||
.num_resources = ARRAY_SIZE(dm355leopard_dm9000_rsrc),
|
||||
};
|
||||
|
||||
+#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
|
||||
+
|
||||
+static struct vpfe_capture_input vpfe_capture_inputs = {
|
||||
+ .num_inputs = VPFE_MAX_DEC_INPUTS,
|
||||
+ .current_input = 0,
|
||||
+ .inputs[0] = {
|
||||
+ .dec_name = TVP514X_MODULE_NAME,
|
||||
+ .input = {
|
||||
+ .index = 0,
|
||||
+ .name = "COMPOSITE",
|
||||
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
||||
+ .std = TVP514X_STD_ALL,
|
||||
+ },
|
||||
+ .route = {
|
||||
+ .input = INPUT_CVBS_VI2B,
|
||||
+ .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
||||
+ },
|
||||
+ .routing_supported = 1,
|
||||
+ },
|
||||
+ .inputs[1] = {
|
||||
+ .dec_name = TVP514X_MODULE_NAME,
|
||||
+ .input = {
|
||||
+ .index = 1,
|
||||
+ .name = "SVIDEO",
|
||||
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
||||
+ .std = TVP514X_STD_ALL,
|
||||
+ },
|
||||
+ .route = {
|
||||
+ .input = INPUT_SVIDEO_VI2C_VI1C,
|
||||
+ .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
||||
+ },
|
||||
+ .routing_supported = 1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct platform_device *davinci_leopard_devices[] __initdata = {
|
||||
&dm355leopard_dm9000,
|
||||
&davinci_nand_device,
|
||||
@@ -190,6 +273,8 @@ static struct davinci_uart_config uart_config __initdata = {
|
||||
static void __init dm355_leopard_map_io(void)
|
||||
{
|
||||
davinci_map_common_io();
|
||||
+ /* setup input configuration for VPFE input devices */
|
||||
+ setup_vpfe_input_config(&vpfe_capture_inputs);
|
||||
dm355_init();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,200 +0,0 @@
|
||||
Subject:
|
||||
[PATCH 2/7] interface for configuring CCDC and common ccdc types
|
||||
From:
|
||||
m-karicheri2-l0cyMroinI0@public.gmane.org
|
||||
Date:
|
||||
Fri, 13 Mar 2009 17:22:39 -0400
|
||||
To:
|
||||
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org, davinci_opensource_ccb-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org, psp_video-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org
|
||||
Newsgroups:
|
||||
gmane.linux.davinci
|
||||
|
||||
Adding an interface for configuring ccdc as per data format of decoder
|
||||
output. Also adds a header file for common ccdc data types.
|
||||
|
||||
Signed-off-by: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
|
||||
---
|
||||
include/media/davinci/ccdc_common.h | 48 +++++++++++++
|
||||
include/media/davinci/ccdc_hw_device.h | 117 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 165 insertions(+), 0 deletions(-)
|
||||
create mode 100644 include/media/davinci/ccdc_common.h
|
||||
create mode 100644 include/media/davinci/ccdc_hw_device.h
|
||||
|
||||
diff --git a/include/media/davinci/ccdc_common.h b/include/media/davinci/ccdc_common.h
|
||||
new file mode 100644
|
||||
index 0000000..0992af5
|
||||
--- /dev/null
|
||||
+++ b/include/media/davinci/ccdc_common.h
|
||||
@@ -0,0 +1,48 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2008-2009 Texas Instruments Inc
|
||||
+ *
|
||||
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ *
|
||||
+ **************************************************************************/
|
||||
+#ifndef _CCDC_COMMON_H
|
||||
+#define _CCDC_COMMON_H
|
||||
+enum ccdc_pixfmt {
|
||||
+ CCDC_PIXFMT_RAW = 0,
|
||||
+ CCDC_PIXFMT_YCBCR_16BIT = 1,
|
||||
+ CCDC_PIXFMT_YCBCR_8BIT = 2
|
||||
+};
|
||||
+
|
||||
+enum ccdc_frmfmt {
|
||||
+ CCDC_FRMFMT_PROGRESSIVE = 0,
|
||||
+ CCDC_FRMFMT_INTERLACED = 1
|
||||
+};
|
||||
+
|
||||
+/* PIXEL ORDER IN MEMORY from LSB to MSB */
|
||||
+/* only applicable for 8-bit input mode */
|
||||
+enum ccdc_pixorder {
|
||||
+ CCDC_PIXORDER_CBYCRY = 1,
|
||||
+ CCDC_PIXORDER_YCBYCR = 0
|
||||
+};
|
||||
+
|
||||
+enum ccdc_buftype {
|
||||
+ CCDC_BUFTYPE_FLD_INTERLEAVED,
|
||||
+ CCDC_BUFTYPE_FLD_SEPARATED
|
||||
+};
|
||||
+
|
||||
+enum ccdc_pinpol {
|
||||
+ CCDC_PINPOL_POSITIVE = 0,
|
||||
+ CCDC_PINPOL_NEGATIVE = 1
|
||||
+};
|
||||
+#endif
|
||||
diff --git a/include/media/davinci/ccdc_hw_device.h b/include/media/davinci/ccdc_hw_device.h
|
||||
new file mode 100644
|
||||
index 0000000..4ae9876
|
||||
--- /dev/null
|
||||
+++ b/include/media/davinci/ccdc_hw_device.h
|
||||
@@ -0,0 +1,117 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2008 Texas Instruments Inc
|
||||
+ *
|
||||
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ *
|
||||
+ * ccdc device API
|
||||
+ */
|
||||
+#ifndef _CCDC_HW_DEVICE_H
|
||||
+#define _CCDC_HW_DEVICE_H
|
||||
+
|
||||
+#ifdef __KERNEL__
|
||||
+#include <linux/videodev2.h>
|
||||
+#include <linux/device.h>
|
||||
+#include <media/davinci/vpfe_types.h>
|
||||
+#include <media/davinci/ccdc_common.h>
|
||||
+/*
|
||||
+ * Maximum number of capture channels supported by VPFE
|
||||
+ */
|
||||
+#define CCDC_CAPTURE_NUM_CHANNELS 1
|
||||
+/*
|
||||
+ * vpfe hw interface
|
||||
+ */
|
||||
+struct ccdc_hw_device {
|
||||
+
|
||||
+ /* vpfe device name */
|
||||
+ char name[30];
|
||||
+
|
||||
+ /* Pointer to initialize function to initialize ccdc device */
|
||||
+ int (*open) (struct device *dev);
|
||||
+ /* Set of functions pointers for control related functions.
|
||||
+ * Use queryctrl of decoder interface to check if it is a decoder
|
||||
+ * control id. If not passed to ccdc to process it
|
||||
+ */
|
||||
+ /* set ccdc base address */
|
||||
+ void (*set_ccdc_base)(void *base, int size);
|
||||
+
|
||||
+ /* set vpss base address */
|
||||
+ void (*set_vpss_base)(void *base, int size);
|
||||
+
|
||||
+ /* get ccdc base */
|
||||
+ void * (*get_ccdc_base)(void);
|
||||
+
|
||||
+ /* get vpss base */
|
||||
+ void * (*get_vpss_base)(void);
|
||||
+
|
||||
+ void (*enable) (int en);
|
||||
+ /*
|
||||
+ * Pointer to function to enable or disable ccdc
|
||||
+ */
|
||||
+ u32 (*reset) (void);
|
||||
+ /* reset sbl. only for 6446 */
|
||||
+ void (*enable_out_to_sdram) (int en);
|
||||
+ /* Pointer to function to set hw frame type */
|
||||
+ int (*set_hw_if_type) (enum vpfe_hw_if_type iface);
|
||||
+ /* get interface parameters */
|
||||
+ int (*get_hw_if_params) (struct vpfe_hw_if_param *param);
|
||||
+ /* Pointer to function to set parameters. Used
|
||||
+ * for implementing VPFE_S_CCDC_PARAMS
|
||||
+ */
|
||||
+ int (*setparams) (void *params);
|
||||
+ /* Pointer to function to get parameter. Used
|
||||
+ * for implementing VPFE_G_CCDC_PARAMS
|
||||
+ */
|
||||
+ int (*getparams) (void *params);
|
||||
+ /* Pointer to function to configure ccdc */
|
||||
+ int (*configure) (void);
|
||||
+
|
||||
+ /* enumerate hw pix formats */
|
||||
+ int (*enum_pix)(enum vpfe_hw_pix_format *hw_pix, int i);
|
||||
+ /* Pointer to function to set buffer type */
|
||||
+ int (*set_buftype) (enum ccdc_buftype buf_type);
|
||||
+ /* Pointer to function to get buffer type */
|
||||
+ int (*get_buftype) (enum ccdc_buftype *buf_type);
|
||||
+ /* Pointer to function to set frame format */
|
||||
+ int (*set_frame_format) (enum ccdc_frmfmt frm_fmt);
|
||||
+ /* Pointer to function to get frame format */
|
||||
+ int (*get_frame_format) (enum ccdc_frmfmt *frm_fmt);
|
||||
+ /* Pointer to function to set buffer type */
|
||||
+ int (*get_pixelformat) (enum vpfe_hw_pix_format *pixfmt);
|
||||
+ /* Pointer to function to get pixel format. Uses V4L2 type */
|
||||
+ int (*set_pixelformat) (enum vpfe_hw_pix_format pixfmt);
|
||||
+ /* Pointer to function to set image window */
|
||||
+ int (*set_image_window) (struct v4l2_rect *win);
|
||||
+ /* Pointer to function to set image window */
|
||||
+ int (*get_image_window) (struct v4l2_rect *win);
|
||||
+ /* Pointer to function to get line length */
|
||||
+ int (*get_line_length) (unsigned int *len);
|
||||
+
|
||||
+ /* Query SoC control IDs */
|
||||
+ int (*queryctrl)(struct v4l2_queryctrl *qctrl);
|
||||
+ /* Set SoC control */
|
||||
+ int (*setcontrol)(struct v4l2_control *ctrl);
|
||||
+ /* Get SoC control */
|
||||
+ int (*getcontrol)(struct v4l2_control *ctrl);
|
||||
+ /* Pointer to function to set current standard info */
|
||||
+ /* Pointer to function to set frame buffer address */
|
||||
+ void (*setfbaddr) (unsigned long addr);
|
||||
+ /* Pointer to function to get field id */
|
||||
+ int (*getfid) (void);
|
||||
+ /* Pointer to deinitialize function */
|
||||
+ int (*close) (struct device *dev);
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
+#endif
|
||||
-- 1.6.0.4
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,132 +0,0 @@
|
||||
Subject:
|
||||
[PATCH 5/7] Kconfig and Makefile changes for vpfe capture driver
|
||||
From:
|
||||
m-karicheri2-l0cyMroinI0@public.gmane.org
|
||||
Date:
|
||||
Fri, 13 Mar 2009 17:23:32 -0400
|
||||
To:
|
||||
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org, davinci_opensource_ccb-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org, psp_video-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org
|
||||
Newsgroups:
|
||||
gmane.linux.davinci
|
||||
|
||||
Adding updates to video Kconfig and Makefile and adding
|
||||
Makefile for building vpfe-capture files
|
||||
|
||||
Signed-off-by: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
|
||||
---
|
||||
drivers/media/video/Kconfig | 48 ++++++++++++++++++++++++----------
|
||||
drivers/media/video/Makefile | 6 +---
|
||||
drivers/media/video/davinci/Makefile | 8 +++++
|
||||
3 files changed, 43 insertions(+), 19 deletions(-)
|
||||
create mode 100644 drivers/media/video/davinci/Makefile
|
||||
|
||||
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
|
||||
index 1dd98d8..ea3a526 100644
|
||||
--- a/drivers/media/video/Kconfig
|
||||
+++ b/drivers/media/video/Kconfig
|
||||
@@ -485,25 +485,45 @@ config VIDEO_VIVI
|
||||
Say Y here if you want to test video apps or debug V4L devices.
|
||||
In doubt, say N.
|
||||
|
||||
-config VIDEO_TVP5146
|
||||
- tristate "TVP5146 video decoder"
|
||||
- depends on I2C && ARCH_DAVINCI
|
||||
+config VIDEO_VPFE_CAPTURE
|
||||
+ tristate "VPFE Video Capture Driver"
|
||||
+ depends on VIDEO_V4L2 && ARCH_DAVINCI
|
||||
+ select VIDEOBUF_DMA_CONTIG
|
||||
help
|
||||
- Support for I2C bus based TVP5146 configuration.
|
||||
+ Support for DMXXXX VPFE based frame grabber. This is the
|
||||
+ common V4L2 module for following DMXXX SoCs from Texas
|
||||
+ Instruments:- DM6446 & DM355.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
- module will be called tvp5146.
|
||||
+ module will be called vpfe-capture.
|
||||
|
||||
-config VIDEO_DAVINCI
|
||||
- tristate "Davinci Video Capture"
|
||||
- depends on VIDEO_DEV && VIDEO_TVP5146 && ARCH_DAVINCI
|
||||
- select VIDEOBUF_GEN
|
||||
- select VIDEOBUF_DMA_SG
|
||||
+config VIDEO_DAVINCI_CCDC
|
||||
+ tristate "DM6446 CCDC HW module"
|
||||
+ depends on ARCH_DAVINCI_DM644x && VIDEO_VPFE_CAPTURE
|
||||
+ default y
|
||||
help
|
||||
- Support for Davinci based frame grabber through CCDC.
|
||||
-
|
||||
- To compile this driver as a module, choose M here: the
|
||||
- module will be called vpfe.
|
||||
+ Enables DaVinci CCD hw module. DaVinci CCDC hw interfaces
|
||||
+ with decoder modules such as TVP5146 over BT656 or
|
||||
+ sensor module such as MT9T001 over a raw interface. This
|
||||
+ module configures the interface and CCDC/ISIF to do
|
||||
+ video frame capture from slave decoders.
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the
|
||||
+ module will be called vpfe.
|
||||
+
|
||||
+config VIDEO_DM355_CCDC
|
||||
+ tristate "DM355 CCDC HW module"
|
||||
+ depends on ARCH_DAVINCI_DM355 && VIDEO_VPFE_CAPTURE
|
||||
+ default y
|
||||
+ help
|
||||
+ Enables DM355 CCD hw module. DM355 CCDC hw interfaces
|
||||
+ with decoder modules such as TVP5146 over BT656 or
|
||||
+ sensor module such as MT9T001 over a raw interface. This
|
||||
+ module configures the interface and CCDC/ISIF to do
|
||||
+ video frame capture from a slave decoders
|
||||
+
|
||||
+ To compile this driver as a module, choose M here: the
|
||||
+ module will be called vpfe.
|
||||
|
||||
source "drivers/media/video/bt8xx/Kconfig"
|
||||
|
||||
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
|
||||
index 863b5c8..f8b6c0c 100644
|
||||
--- a/drivers/media/video/Makefile
|
||||
+++ b/drivers/media/video/Makefile
|
||||
@@ -10,8 +10,6 @@ stkwebcam-objs := stk-webcam.o stk-sensor.o
|
||||
|
||||
omap2cam-objs := omap24xxcam.o omap24xxcam-dma.o
|
||||
|
||||
-davinci-vpfe-objs := ccdc_davinci.o davinci_vpfe.o
|
||||
-
|
||||
videodev-objs := v4l2-dev.o v4l2-ioctl.o
|
||||
|
||||
videodev-objs := v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-subdev.o
|
||||
@@ -29,6 +27,7 @@ endif
|
||||
|
||||
obj-$(CONFIG_VIDEO_TUNER) += tuner.o
|
||||
|
||||
+obj-$(CONFIG_ARCH_DAVINCI) += davinci/
|
||||
obj-$(CONFIG_VIDEO_BT848) += bt8xx/
|
||||
obj-$(CONFIG_VIDEO_IR_I2C) += ir-kbd-i2c.o
|
||||
obj-$(CONFIG_VIDEO_TVAUDIO) += tvaudio.o
|
||||
@@ -135,9 +134,6 @@ obj-$(CONFIG_USB_S2255) += s2255drv.o
|
||||
obj-$(CONFIG_VIDEO_IVTV) += ivtv/
|
||||
obj-$(CONFIG_VIDEO_CX18) += cx18/
|
||||
|
||||
-obj-$(CONFIG_VIDEO_DAVINCI) += davinci-vpfe.o
|
||||
-obj-$(CONFIG_VIDEO_TVP5146) += tvp5146.o
|
||||
-
|
||||
obj-$(CONFIG_VIDEO_VIVI) += vivi.o
|
||||
obj-$(CONFIG_VIDEO_CX23885) += cx23885/
|
||||
|
||||
diff --git a/drivers/media/video/davinci/Makefile b/drivers/media/video/davinci/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..77fe038
|
||||
--- /dev/null
|
||||
+++ b/drivers/media/video/davinci/Makefile
|
||||
@@ -0,0 +1,8 @@
|
||||
+#
|
||||
+# Makefile for the davinci video device drivers.
|
||||
+#
|
||||
+
|
||||
+# Capture: DaVinci and DM355
|
||||
+obj-$(CONFIG_VIDEO_DAVINCI_CCDC) += ccdc_davinci.o
|
||||
+obj-$(CONFIG_VIDEO_DM355_CCDC) += ccdc_dm355.o
|
||||
+obj-$(CONFIG_VIDEO_VPFE_CAPTURE) += vpfe_capture.o
|
||||
-- 1.6.0.4
|
||||
@@ -1,224 +0,0 @@
|
||||
Subject:
|
||||
[PATCH 6/7] platform-related-updates for vpfe capture driver on DM6446
|
||||
From:
|
||||
m-karicheri2-l0cyMroinI0@public.gmane.org
|
||||
Date:
|
||||
Fri, 13 Mar 2009 17:24:04 -0400
|
||||
To:
|
||||
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org, davinci_opensource_ccb-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org, psp_video-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org
|
||||
Newsgroups:
|
||||
gmane.linux.davinci
|
||||
|
||||
Add platform related changes for vpfe capture driver on DM6446
|
||||
|
||||
Signed-off-by: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
|
||||
---
|
||||
arch/arm/mach-davinci/board-dm644x-evm.c | 88 ++++++++++++++++++++++++++-
|
||||
arch/arm/mach-davinci/dm644x.c | 42 +++++++++++++
|
||||
arch/arm/mach-davinci/include/mach/dm644x.h | 2 +
|
||||
3 files changed, 130 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
|
||||
index 20ec961..5f4d9a8 100644
|
||||
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
|
||||
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
|
||||
@@ -27,7 +27,9 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/phy.h>
|
||||
#include <linux/clk.h>
|
||||
-
|
||||
+#include <linux/videodev2.h>
|
||||
+#include <media/v4l2-int-device.h>
|
||||
+#include <media/tvp514x.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
@@ -161,6 +163,41 @@ static struct platform_device davinci_fb_device = {
|
||||
.num_resources = 0,
|
||||
};
|
||||
|
||||
+
|
||||
+#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
|
||||
+static struct vpfe_capture_input vpfe_capture_inputs = {
|
||||
+ .num_inputs = VPFE_MAX_DEC_INPUTS,
|
||||
+ .current_input = 0,
|
||||
+ .inputs[0] = {
|
||||
+ .dec_name = TVP514X_MODULE_NAME,
|
||||
+ .input = {
|
||||
+ .index = 0,
|
||||
+ .name = "COMPOSITE",
|
||||
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
||||
+ .std = TVP514X_STD_ALL,
|
||||
+ },
|
||||
+ .route = {
|
||||
+ .input = INPUT_CVBS_VI2B,
|
||||
+ .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
||||
+ },
|
||||
+ .routing_supported = 1,
|
||||
+ },
|
||||
+ .inputs[1] = {
|
||||
+ .dec_name = TVP514X_MODULE_NAME,
|
||||
+ .input = {
|
||||
+ .index = 1,
|
||||
+ .name = "SVIDEO",
|
||||
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
||||
+ .std = TVP514X_STD_ALL,
|
||||
+ },
|
||||
+ .route = {
|
||||
+ .input = INPUT_SVIDEO_VI2C_VI1C,
|
||||
+ .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
||||
+ },
|
||||
+ .routing_supported = 1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct platform_device rtc_dev = {
|
||||
.name = "rtc_davinci_evm",
|
||||
.id = -1,
|
||||
@@ -447,6 +484,48 @@ int dm6446evm_eeprom_write(void *buf, off_t off, size_t count)
|
||||
}
|
||||
EXPORT_SYMBOL(dm6446evm_eeprom_write);
|
||||
|
||||
+#define TVP5146_I2C_ADDR (0x5D)
|
||||
+static struct v4l2_ifparm tvp5146_ifparm = {
|
||||
+ .if_type = V4L2_IF_TYPE_BT656,
|
||||
+ .u = {
|
||||
+ .bt656 = {
|
||||
+ .frame_start_on_rising_vs = 1,
|
||||
+ .bt_sync_correct = 0,
|
||||
+ .swap = 0,
|
||||
+ .latch_clk_inv = 0,
|
||||
+ .nobt_hs_inv = 0, /* active high */
|
||||
+ .nobt_vs_inv = 0, /* active high */
|
||||
+ .mode = V4L2_IF_TYPE_BT656_MODE_BT_8BIT,
|
||||
+ .clock_min = TVP514X_XCLK_BT656,
|
||||
+ .clock_max = TVP514X_XCLK_BT656,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * @brief tvp5146_g_ifparm - Returns the TVP5146 decoder interface parameters
|
||||
+ *
|
||||
+ * @param p - pointer to v4l2_ifparm structure
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+static int tvp5146_g_ifparm(struct v4l2_ifparm *p)
|
||||
+{
|
||||
+ if (p == NULL)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ *p = tvp5146_ifparm;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define TVP5146_NUM_INPUTS ARRAY_SIZE(tvp5146_input_list)
|
||||
+
|
||||
+static struct tvp514x_platform_data tvp5146_pdata = {
|
||||
+ .master = CAPTURE_DRV_NAME,
|
||||
+ .ifparm = tvp5146_g_ifparm,
|
||||
+ .hs_polarity = 1,
|
||||
+ .vs_polarity = 1
|
||||
+};
|
||||
+
|
||||
/*
|
||||
* MSP430 supports RTC, card detection, input from IR remote, and
|
||||
* a bit more. It triggers interrupts on GPIO(7) from pressing
|
||||
@@ -557,9 +636,12 @@ static struct i2c_board_info __initdata i2c_info[] = {
|
||||
I2C_BOARD_INFO("24c256", 0x50),
|
||||
.platform_data = &eeprom_info,
|
||||
},
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("tvp5146", TVP5146_I2C_ADDR),
|
||||
+ .platform_data = &tvp5146_pdata,
|
||||
+ },
|
||||
/* ALSO:
|
||||
* - tvl320aic33 audio codec (0x1b)
|
||||
- * - tvp5146 video decoder (0x5d)
|
||||
*/
|
||||
};
|
||||
|
||||
@@ -591,6 +673,8 @@ static void __init
|
||||
davinci_evm_map_io(void)
|
||||
{
|
||||
davinci_map_common_io();
|
||||
+ /* setup input configuration for VPFE input devices */
|
||||
+ setup_vpfe_input_config(&vpfe_capture_inputs);
|
||||
dm644x_init();
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
|
||||
index 03946fd..f46095e 100644
|
||||
--- a/arch/arm/mach-davinci/dm644x.c
|
||||
+++ b/arch/arm/mach-davinci/dm644x.c
|
||||
@@ -419,6 +419,46 @@ static struct platform_device dm644x_edma_device = {
|
||||
.resource = edma_resources,
|
||||
};
|
||||
|
||||
+static struct resource vpfe_resources[] = {
|
||||
+ {
|
||||
+ .start = IRQ_VDINT0,
|
||||
+ .end = IRQ_VDINT0,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ {
|
||||
+ .start = IRQ_VDINT1,
|
||||
+ .end = IRQ_VDINT1,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ {
|
||||
+ .start = 0x01c70400,
|
||||
+ .end = 0x01c70400 + 0xff,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+ {
|
||||
+ .start = 0x01c73400,
|
||||
+ .end = 0x01c73400 + 0xff,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static u64 vpfe_capture_dma_mask = DMA_32BIT_MASK;
|
||||
+static struct platform_device vpfe_capture_dev = {
|
||||
+ .name = CAPTURE_DRV_NAME,
|
||||
+ .id = -1,
|
||||
+ .num_resources = ARRAY_SIZE(vpfe_resources),
|
||||
+ .resource = vpfe_resources,
|
||||
+ .dev = {
|
||||
+ .dma_mask = &vpfe_capture_dma_mask,
|
||||
+ .coherent_dma_mask = DMA_32BIT_MASK,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+void setup_vpfe_input_config(struct vpfe_capture_input *input_config)
|
||||
+{
|
||||
+ vpfe_capture_dev.dev.platform_data = input_config;
|
||||
+}
|
||||
+
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
void __init dm644x_init(void)
|
||||
@@ -433,6 +473,8 @@ static int __init dm644x_init_devices(void)
|
||||
return 0;
|
||||
|
||||
platform_device_register(&dm644x_edma_device);
|
||||
+ /* Register VPFE capture device */
|
||||
+ platform_device_register(&vpfe_capture_dev);
|
||||
return 0;
|
||||
}
|
||||
postcore_initcall(dm644x_init_devices);
|
||||
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h
|
||||
index 5b3d512..14f9a8a 100644
|
||||
--- a/arch/arm/mach-davinci/include/mach/dm644x.h
|
||||
+++ b/arch/arm/mach-davinci/include/mach/dm644x.h
|
||||
@@ -23,7 +23,9 @@
|
||||
#define __ASM_ARCH_DM644X_H
|
||||
|
||||
#include <mach/hardware.h>
|
||||
+#include <media/davinci/vpfe_capture.h>
|
||||
|
||||
void __init dm644x_init(void);
|
||||
+void setup_vpfe_input_config(struct vpfe_capture_input *input_config);
|
||||
|
||||
#endif /* __ASM_ARCH_DM644X_H */
|
||||
-- 1.6.0.4
|
||||
@@ -1,283 +0,0 @@
|
||||
Subject:
|
||||
[PATCH 7/7] DM355 platform related changes for vpfe capture driver
|
||||
From:
|
||||
m-karicheri2-l0cyMroinI0@public.gmane.org
|
||||
Date:
|
||||
Fri, 13 Mar 2009 17:24:34 -0400
|
||||
To:
|
||||
davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org, davinci_opensource_ccb-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org, psp_video-uAqBSO/uNfhBDgjK7y7TUQ@public.gmane.org
|
||||
Newsgroups:
|
||||
gmane.linux.davinci
|
||||
|
||||
Add platform related changes for vpfe capture driver on DM355
|
||||
|
||||
Signed-off-by: Murali Karicheri <m-karicheri2-l0cyMroinI0@public.gmane.org>
|
||||
---
|
||||
arch/arm/mach-davinci/board-dm355-evm.c | 91 +++++++++++++++++++++++++++-
|
||||
arch/arm/mach-davinci/dm355.c | 64 +++++++++++++++++++
|
||||
arch/arm/mach-davinci/include/mach/dm355.h | 2 +
|
||||
arch/arm/mach-davinci/include/mach/mux.h | 9 +++
|
||||
4 files changed, 163 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
|
||||
index e104650..aaa58ba 100644
|
||||
--- a/arch/arm/mach-davinci/board-dm355-evm.c
|
||||
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/clk.h>
|
||||
+#include <media/v4l2-int-device.h>
|
||||
+#include <media/tvp514x.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/eeprom.h>
|
||||
|
||||
@@ -134,12 +136,58 @@ static void dm355evm_mmcsd_gpios(unsigned gpio)
|
||||
dm355evm_mmc_gpios = gpio;
|
||||
}
|
||||
|
||||
+#define TVP5146_I2C_ADDR 0x5D
|
||||
+static struct v4l2_ifparm tvp5146_ifparm = {
|
||||
+ .if_type = V4L2_IF_TYPE_BT656,
|
||||
+ .u = {
|
||||
+ .bt656 = {
|
||||
+ .frame_start_on_rising_vs = 1,
|
||||
+ .bt_sync_correct = 0,
|
||||
+ .swap = 0,
|
||||
+ .latch_clk_inv = 0,
|
||||
+ .nobt_hs_inv = 0, /* active high */
|
||||
+ .nobt_vs_inv = 0, /* active high */
|
||||
+ .mode = V4L2_IF_TYPE_BT656_MODE_BT_8BIT,
|
||||
+ .clock_min = TVP514X_XCLK_BT656,
|
||||
+ .clock_max = TVP514X_XCLK_BT656,
|
||||
+ },
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+/**
|
||||
+ * @brief tvp5146_g_ifparm - Returns the TVP5146 decoder interface parameters
|
||||
+ *
|
||||
+ * @param p - pointer to v4l2_ifparm structure
|
||||
+ * @return result of operation - 0 is success
|
||||
+ */
|
||||
+static int tvp5146_g_ifparm(struct v4l2_ifparm *p)
|
||||
+{
|
||||
+ if (p == NULL)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ *p = tvp5146_ifparm;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define TVP5146_NUM_INPUTS ARRAY_SIZE(tvp5146_input_list)
|
||||
+
|
||||
+static struct tvp514x_platform_data tvp5146_pdata = {
|
||||
+ .master = CAPTURE_DRV_NAME,
|
||||
+ .ifparm = tvp5146_g_ifparm,
|
||||
+ .hs_polarity = 1,
|
||||
+ .vs_polarity = 1
|
||||
+};
|
||||
+
|
||||
static struct i2c_board_info dm355evm_i2c_info[] = {
|
||||
- { I2C_BOARD_INFO("dm355evm_msp", 0x25),
|
||||
+ { I2C_BOARD_INFO("dm355evm_msp", 0x25),
|
||||
.platform_data = dm355evm_mmcsd_gpios,
|
||||
- /* plus irq */ },
|
||||
+ },
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("tvp5146", TVP5146_I2C_ADDR),
|
||||
+ .platform_data = &tvp5146_pdata,
|
||||
+ },
|
||||
+ /* { plus irq }, */
|
||||
/* { I2C_BOARD_INFO("tlv320aic3x", 0x1b), }, */
|
||||
- /* { I2C_BOARD_INFO("tvp5146", 0x5d), }, */
|
||||
};
|
||||
|
||||
static void __init evm_init_i2c(void)
|
||||
@@ -178,6 +226,41 @@ static struct platform_device dm355evm_dm9000 = {
|
||||
.num_resources = ARRAY_SIZE(dm355evm_dm9000_rsrc),
|
||||
};
|
||||
|
||||
+#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
|
||||
+
|
||||
+static struct vpfe_capture_input vpfe_capture_inputs = {
|
||||
+ .num_inputs = VPFE_MAX_DEC_INPUTS,
|
||||
+ .current_input = 0,
|
||||
+ .inputs[0] = {
|
||||
+ .dec_name = TVP514X_MODULE_NAME,
|
||||
+ .input = {
|
||||
+ .index = 0,
|
||||
+ .name = "COMPOSITE",
|
||||
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
||||
+ .std = TVP514X_STD_ALL,
|
||||
+ },
|
||||
+ .route = {
|
||||
+ .input = INPUT_CVBS_VI2B,
|
||||
+ .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
||||
+ },
|
||||
+ .routing_supported = 1,
|
||||
+ },
|
||||
+ .inputs[1] = {
|
||||
+ .dec_name = TVP514X_MODULE_NAME,
|
||||
+ .input = {
|
||||
+ .index = 1,
|
||||
+ .name = "SVIDEO",
|
||||
+ .type = V4L2_INPUT_TYPE_CAMERA,
|
||||
+ .std = TVP514X_STD_ALL,
|
||||
+ },
|
||||
+ .route = {
|
||||
+ .input = INPUT_SVIDEO_VI2C_VI1C,
|
||||
+ .output = OUTPUT_10BIT_422_EMBEDDED_SYNC,
|
||||
+ },
|
||||
+ .routing_supported = 1,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static struct platform_device *davinci_evm_devices[] __initdata = {
|
||||
&dm355evm_dm9000,
|
||||
&davinci_nand_device,
|
||||
@@ -190,6 +273,8 @@ static struct davinci_uart_config uart_config __initdata = {
|
||||
static void __init dm355_evm_map_io(void)
|
||||
{
|
||||
davinci_map_common_io();
|
||||
+ /* setup input configuration for VPFE input devices */
|
||||
+ setup_vpfe_input_config(&vpfe_capture_inputs);
|
||||
dm355_init();
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
|
||||
index 5f31649..e2612dd 100644
|
||||
--- a/arch/arm/mach-davinci/dm355.c
|
||||
+++ b/arch/arm/mach-davinci/dm355.c
|
||||
@@ -463,6 +463,14 @@ INT_CFG(DM355, INT_EDMA_TC1_ERR, 4, 1, 1, false)
|
||||
EVT_CFG(DM355, EVT8_ASP1_TX, 0, 1, 0, false)
|
||||
EVT_CFG(DM355, EVT9_ASP1_RX, 1, 1, 0, false)
|
||||
EVT_CFG(DM355, EVT26_MMC0_RX, 2, 1, 0, false)
|
||||
+
|
||||
+MUX_CFG(DM355, VIN_PCLK, 0, 14, 1, 1, false)
|
||||
+MUX_CFG(DM355, VIN_CAM_WEN, 0, 13, 1, 1, false)
|
||||
+MUX_CFG(DM355, VIN_CAM_VD, 0, 12, 1, 1, false)
|
||||
+MUX_CFG(DM355, VIN_CAM_HD, 0, 11, 1, 1, false)
|
||||
+MUX_CFG(DM355, VIN_YIN_EN, 0, 10, 1, 1, false)
|
||||
+MUX_CFG(DM355, VIN_CINL_EN, 0, 0, 0xff, 0x55, false)
|
||||
+MUX_CFG(DM355, VIN_CINH_EN, 0, 8, 3, 3, false)
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -520,6 +528,47 @@ static struct platform_device dm355_edma_device = {
|
||||
.resource = edma_resources,
|
||||
};
|
||||
|
||||
+static struct resource vpfe_resources[] = {
|
||||
+ {
|
||||
+ .start = IRQ_VDINT0,
|
||||
+ .end = IRQ_VDINT0,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ {
|
||||
+ .start = IRQ_VDINT1,
|
||||
+ .end = IRQ_VDINT1,
|
||||
+ .flags = IORESOURCE_IRQ,
|
||||
+ },
|
||||
+ /* CCDC Base address */
|
||||
+ {
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ .start = 0x01c70600,
|
||||
+ .end = 0x01c70600 + 0x1ff,
|
||||
+ },
|
||||
+ /* VPSS Base address */
|
||||
+ {
|
||||
+ .start = 0x01c70800,
|
||||
+ .end = 0x01c70800 + 0xff,
|
||||
+ .flags = IORESOURCE_MEM,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static u64 vpfe_capture_dma_mask = DMA_32BIT_MASK;
|
||||
+static struct platform_device vpfe_capture_dev = {
|
||||
+ .name = CAPTURE_DRV_NAME,
|
||||
+ .id = -1,
|
||||
+ .num_resources = ARRAY_SIZE(vpfe_resources),
|
||||
+ .resource = vpfe_resources,
|
||||
+ .dev = {
|
||||
+ .dma_mask = &vpfe_capture_dma_mask,
|
||||
+ .coherent_dma_mask = DMA_32BIT_MASK,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+void setup_vpfe_input_config(struct vpfe_capture_input *input_config)
|
||||
+{
|
||||
+ vpfe_capture_dev.dev.platform_data = input_config;
|
||||
+}
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
void __init dm355_init(void)
|
||||
@@ -528,13 +577,28 @@ void __init dm355_init(void)
|
||||
davinci_mux_register(dm355_pins, ARRAY_SIZE(dm355_pins));;
|
||||
}
|
||||
|
||||
+#define DM355_VPSSCLK_CLKCTRL_REG 0x1c70004
|
||||
static int __init dm355_init_devices(void)
|
||||
{
|
||||
+ void __iomem *base = IO_ADDRESS(DM355_VPSSCLK_CLKCTRL_REG);
|
||||
if (!cpu_is_davinci_dm355())
|
||||
return 0;
|
||||
|
||||
davinci_cfg_reg(DM355_INT_EDMA_CC);
|
||||
platform_device_register(&dm355_edma_device);
|
||||
+ /* setup clock for vpss modules */
|
||||
+ __raw_writel(0x79, base);
|
||||
+ /* setup Mux configuration for vpfe input and register
|
||||
+ * vpfe capture platform device
|
||||
+ */
|
||||
+ davinci_cfg_reg(DM355_VIN_PCLK);
|
||||
+ davinci_cfg_reg(DM355_VIN_CAM_WEN);
|
||||
+ davinci_cfg_reg(DM355_VIN_CAM_VD);
|
||||
+ davinci_cfg_reg(DM355_VIN_CAM_HD);
|
||||
+ davinci_cfg_reg(DM355_VIN_YIN_EN);
|
||||
+ davinci_cfg_reg(DM355_VIN_CINL_EN);
|
||||
+ davinci_cfg_reg(DM355_VIN_CINH_EN);
|
||||
+ platform_device_register(&vpfe_capture_dev);
|
||||
return 0;
|
||||
}
|
||||
postcore_initcall(dm355_init_devices);
|
||||
diff --git a/arch/arm/mach-davinci/include/mach/dm355.h b/arch/arm/mach-davinci/include/mach/dm355.h
|
||||
index f7100b6..0b3bd76 100644
|
||||
--- a/arch/arm/mach-davinci/include/mach/dm355.h
|
||||
+++ b/arch/arm/mach-davinci/include/mach/dm355.h
|
||||
@@ -12,6 +12,7 @@
|
||||
#define __ASM_ARCH_DM355_H
|
||||
|
||||
#include <mach/hardware.h>
|
||||
+#include <media/davinci/vpfe_capture.h>
|
||||
|
||||
void __init dm355_init(void);
|
||||
|
||||
@@ -19,5 +20,6 @@ struct spi_board_info;
|
||||
|
||||
void dm355_init_spi0(unsigned chipselect_mask,
|
||||
struct spi_board_info *info, unsigned len);
|
||||
+void setup_vpfe_input_config(struct vpfe_capture_input *input_config);
|
||||
|
||||
#endif /* __ASM_ARCH_DM355_H */
|
||||
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h
|
||||
index cd95629..4c135b0 100644
|
||||
--- a/arch/arm/mach-davinci/include/mach/mux.h
|
||||
+++ b/arch/arm/mach-davinci/include/mach/mux.h
|
||||
@@ -149,6 +149,15 @@ enum davinci_dm355_index {
|
||||
DM355_EVT8_ASP1_TX,
|
||||
DM355_EVT9_ASP1_RX,
|
||||
DM355_EVT26_MMC0_RX,
|
||||
+
|
||||
+ /* Video In Pin Mux */
|
||||
+ DM355_VIN_PCLK,
|
||||
+ DM355_VIN_CAM_WEN,
|
||||
+ DM355_VIN_CAM_VD,
|
||||
+ DM355_VIN_CAM_HD,
|
||||
+ DM355_VIN_YIN_EN,
|
||||
+ DM355_VIN_CINL_EN,
|
||||
+ DM355_VIN_CINH_EN,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_DAVINCI_MUX
|
||||
-- 1.6.0.4
|
||||
Reference in New Issue
Block a user