2011-12-21 14:43:35 +01:00
|
|
|
/*
|
|
|
|
* This file contains the processor specific definitions
|
|
|
|
* of the TI DM644x, DM355, DM365, and DM646x.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2011 Texas Instruments Incorporated
|
|
|
|
* Copyright (c) 2007 Deep Root Systems, LLC
|
|
|
|
*
|
|
|
|
* 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 version 2.
|
|
|
|
*
|
|
|
|
* This program is distributed "as is" WITHOUT ANY WARRANTY of any
|
|
|
|
* kind, whether express or implied; without even the implied warranty
|
|
|
|
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
#ifndef __DAVINCI_H
|
|
|
|
#define __DAVINCI_H
|
|
|
|
|
|
|
|
#include <linux/clk.h>
|
|
|
|
#include <linux/videodev2.h>
|
|
|
|
#include <linux/davinci_emac.h>
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/spi/spi.h>
|
2012-08-27 15:26:41 +02:00
|
|
|
#include <linux/platform_data/davinci_asp.h>
|
2013-03-06 17:15:31 +01:00
|
|
|
#include <linux/platform_data/edma.h>
|
2012-08-24 15:11:34 +02:00
|
|
|
#include <linux/platform_data/keyscan-davinci.h>
|
2011-12-21 14:43:36 +01:00
|
|
|
#include <mach/hardware.h>
|
2011-12-21 14:43:35 +01:00
|
|
|
|
|
|
|
#include <media/davinci/vpfe_capture.h>
|
|
|
|
#include <media/davinci/vpif_types.h>
|
2012-02-23 10:47:45 +01:00
|
|
|
#include <media/davinci/vpss.h>
|
|
|
|
#include <media/davinci/vpbe_types.h>
|
|
|
|
#include <media/davinci/vpbe_venc.h>
|
|
|
|
#include <media/davinci/vpbe.h>
|
|
|
|
#include <media/davinci/vpbe_osd.h>
|
2011-12-21 14:43:35 +01:00
|
|
|
|
2011-12-21 14:43:36 +01:00
|
|
|
#define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000
|
2013-03-19 11:34:36 +01:00
|
|
|
#define SYSMOD_VDAC_CONFIG 0x2c
|
2011-12-21 14:43:36 +01:00
|
|
|
#define SYSMOD_VIDCLKCTL 0x38
|
2012-02-23 10:47:45 +01:00
|
|
|
#define SYSMOD_VPSS_CLKCTL 0x44
|
2011-12-21 14:43:36 +01:00
|
|
|
#define SYSMOD_VDD3P3VPWDN 0x48
|
|
|
|
#define SYSMOD_VSCLKDIS 0x6c
|
|
|
|
#define SYSMOD_PUPDCTL1 0x7c
|
|
|
|
|
2013-03-19 11:34:36 +01:00
|
|
|
/* VPSS CLKCTL bit definitions */
|
2013-04-09 15:35:05 +02:00
|
|
|
#define VPSS_MUXSEL_EXTCLK_ENABLE BIT(1)
|
2013-03-19 11:34:36 +01:00
|
|
|
#define VPSS_VENCCLKEN_ENABLE BIT(3)
|
|
|
|
#define VPSS_DACCLKEN_ENABLE BIT(4)
|
|
|
|
#define VPSS_PLLC2SYSCLK5_ENABLE BIT(5)
|
|
|
|
|
2011-12-21 14:43:36 +01:00
|
|
|
extern void __iomem *davinci_sysmod_base;
|
|
|
|
#define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
|
|
|
|
void davinci_map_sysmod(void);
|
|
|
|
|
2013-08-18 07:19:00 +02:00
|
|
|
#define DAVINCI_GPIO_BASE 0x01C67000
|
|
|
|
int davinci_gpio_register(struct resource *res, int size, void *pdata);
|
|
|
|
|
2011-12-21 14:43:35 +01:00
|
|
|
/* DM355 base addresses */
|
|
|
|
#define DM355_ASYNC_EMIF_CONTROL_BASE 0x01e10000
|
|
|
|
#define DM355_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
|
|
|
|
|
|
|
#define ASP1_TX_EVT_EN 1
|
|
|
|
#define ASP1_RX_EVT_EN 2
|
|
|
|
|
|
|
|
/* DM365 base addresses */
|
|
|
|
#define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
|
|
|
|
#define DM365_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
|
|
|
#define DM365_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
|
|
|
|
|
|
|
|
/* DM644x base addresses */
|
|
|
|
#define DM644X_ASYNC_EMIF_CONTROL_BASE 0x01e00000
|
|
|
|
#define DM644X_ASYNC_EMIF_DATA_CE0_BASE 0x02000000
|
|
|
|
#define DM644X_ASYNC_EMIF_DATA_CE1_BASE 0x04000000
|
|
|
|
#define DM644X_ASYNC_EMIF_DATA_CE2_BASE 0x06000000
|
|
|
|
#define DM644X_ASYNC_EMIF_DATA_CE3_BASE 0x08000000
|
|
|
|
|
|
|
|
/* DM646x base addresses */
|
|
|
|
#define DM646X_ASYNC_EMIF_CONTROL_BASE 0x20008000
|
|
|
|
#define DM646X_ASYNC_EMIF_CS2_SPACE_BASE 0x42000000
|
|
|
|
|
2014-02-26 05:59:43 +01:00
|
|
|
int davinci_init_wdt(void);
|
|
|
|
|
2011-12-21 14:43:35 +01:00
|
|
|
/* DM355 function declarations */
|
2013-04-01 13:33:36 +02:00
|
|
|
void dm355_init(void);
|
2011-12-21 14:43:35 +01:00
|
|
|
void dm355_init_spi0(unsigned chipselect_mask,
|
2012-03-30 22:13:53 +02:00
|
|
|
const struct spi_board_info *info, unsigned len);
|
2013-04-01 13:33:36 +02:00
|
|
|
void dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata);
|
2013-04-09 15:35:05 +02:00
|
|
|
int dm355_init_video(struct vpfe_config *, struct vpbe_config *);
|
2013-08-18 07:19:00 +02:00
|
|
|
int dm355_gpio_register(void);
|
2011-12-21 14:43:35 +01:00
|
|
|
|
|
|
|
/* DM365 function declarations */
|
2013-04-01 13:33:36 +02:00
|
|
|
void dm365_init(void);
|
|
|
|
void dm365_init_asp(struct snd_platform_data *pdata);
|
|
|
|
void dm365_init_vc(struct snd_platform_data *pdata);
|
|
|
|
void dm365_init_ks(struct davinci_ks_platform_data *pdata);
|
|
|
|
void dm365_init_rtc(void);
|
2011-12-21 14:43:35 +01:00
|
|
|
void dm365_init_spi0(unsigned chipselect_mask,
|
2012-03-30 22:13:53 +02:00
|
|
|
const struct spi_board_info *info, unsigned len);
|
2013-03-19 11:34:36 +01:00
|
|
|
int dm365_init_video(struct vpfe_config *, struct vpbe_config *);
|
2013-08-18 07:19:00 +02:00
|
|
|
int dm365_gpio_register(void);
|
2011-12-21 14:43:35 +01:00
|
|
|
|
|
|
|
/* DM644x function declarations */
|
2013-04-01 13:33:36 +02:00
|
|
|
void dm644x_init(void);
|
|
|
|
void dm644x_init_asp(struct snd_platform_data *pdata);
|
|
|
|
int dm644x_init_video(struct vpfe_config *, struct vpbe_config *);
|
2013-08-18 07:19:00 +02:00
|
|
|
int dm644x_gpio_register(void);
|
2011-12-21 14:43:35 +01:00
|
|
|
|
|
|
|
/* DM646x function declarations */
|
2013-04-01 13:33:36 +02:00
|
|
|
void dm646x_init(void);
|
|
|
|
void dm646x_init_mcasp0(struct snd_platform_data *pdata);
|
|
|
|
void dm646x_init_mcasp1(struct snd_platform_data *pdata);
|
|
|
|
int dm646x_init_edma(struct edma_rsv_info *rsv);
|
2011-12-21 14:43:35 +01:00
|
|
|
void dm646x_video_init(void);
|
|
|
|
void dm646x_setup_vpif(struct vpif_display_config *,
|
|
|
|
struct vpif_capture_config *);
|
2013-08-18 07:19:00 +02:00
|
|
|
int dm646x_gpio_register(void);
|
2013-06-19 11:15:42 +02:00
|
|
|
|
|
|
|
extern struct platform_device dm365_serial_device[];
|
|
|
|
extern struct platform_device dm355_serial_device[];
|
|
|
|
extern struct platform_device dm644x_serial_device[];
|
|
|
|
extern struct platform_device dm646x_serial_device[];
|
2011-12-21 14:43:35 +01:00
|
|
|
#endif /*__DAVINCI_H */
|