2011-12-21 17:43:35 +04: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 17:26:41 +04:00
# include <linux/platform_data/davinci_asp.h>
2013-03-06 20:15:31 +04:00
# include <linux/platform_data/edma.h>
2012-08-24 17:11:34 +04:00
# include <linux/platform_data/keyscan-davinci.h>
2011-12-21 17:43:36 +04:00
# include <mach/hardware.h>
2011-12-21 17:43:35 +04:00
# include <media/davinci/vpfe_capture.h>
# include <media/davinci/vpif_types.h>
2012-02-23 13:47:45 +04: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 17:43:35 +04:00
2011-12-21 17:43:36 +04:00
# define DAVINCI_SYSTEM_MODULE_BASE 0x01c40000
2013-03-19 14:34:36 +04:00
# define SYSMOD_VDAC_CONFIG 0x2c
2011-12-21 17:43:36 +04:00
# define SYSMOD_VIDCLKCTL 0x38
2012-02-23 13:47:45 +04:00
# define SYSMOD_VPSS_CLKCTL 0x44
2011-12-21 17:43:36 +04:00
# define SYSMOD_VDD3P3VPWDN 0x48
# define SYSMOD_VSCLKDIS 0x6c
# define SYSMOD_PUPDCTL1 0x7c
2013-03-19 14:34:36 +04:00
/* VPSS CLKCTL bit definitions */
2013-04-09 17:35:05 +04:00
# define VPSS_MUXSEL_EXTCLK_ENABLE BIT(1)
2013-03-19 14:34:36 +04:00
# define VPSS_VENCCLKEN_ENABLE BIT(3)
# define VPSS_DACCLKEN_ENABLE BIT(4)
# define VPSS_PLLC2SYSCLK5_ENABLE BIT(5)
2011-12-21 17:43:36 +04:00
extern void __iomem * davinci_sysmod_base ;
# define DAVINCI_SYSMOD_VIRT(x) (davinci_sysmod_base + (x))
void davinci_map_sysmod ( void ) ;
2013-08-18 09:19:00 +04:00
# define DAVINCI_GPIO_BASE 0x01C67000
int davinci_gpio_register ( struct resource * res , int size , void * pdata ) ;
2011-12-21 17:43:35 +04: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
/* DM355 function declarations */
2013-04-01 15:33:36 +04:00
void dm355_init ( void ) ;
2011-12-21 17:43:35 +04:00
void dm355_init_spi0 ( unsigned chipselect_mask ,
2012-03-31 00:13:53 +04:00
const struct spi_board_info * info , unsigned len ) ;
2013-04-01 15:33:36 +04:00
void dm355_init_asp1 ( u32 evt_enable , struct snd_platform_data * pdata ) ;
2013-04-09 17:35:05 +04:00
int dm355_init_video ( struct vpfe_config * , struct vpbe_config * ) ;
2013-08-18 09:19:00 +04:00
int dm355_gpio_register ( void ) ;
2011-12-21 17:43:35 +04:00
/* DM365 function declarations */
2013-04-01 15:33:36 +04: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 17:43:35 +04:00
void dm365_init_spi0 ( unsigned chipselect_mask ,
2012-03-31 00:13:53 +04:00
const struct spi_board_info * info , unsigned len ) ;
2013-03-19 14:34:36 +04:00
int dm365_init_video ( struct vpfe_config * , struct vpbe_config * ) ;
2013-08-18 09:19:00 +04:00
int dm365_gpio_register ( void ) ;
2011-12-21 17:43:35 +04:00
/* DM644x function declarations */
2013-04-01 15:33:36 +04: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 09:19:00 +04:00
int dm644x_gpio_register ( void ) ;
2011-12-21 17:43:35 +04:00
/* DM646x function declarations */
2013-04-01 15:33:36 +04: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 17:43:35 +04:00
void dm646x_video_init ( void ) ;
void dm646x_setup_vpif ( struct vpif_display_config * ,
struct vpif_capture_config * ) ;
2013-08-18 09:19:00 +04:00
int dm646x_gpio_register ( void ) ;
2013-06-19 13:15:42 +04: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 17:43:35 +04:00
# endif /*__DAVINCI_H */