| 
					
				 | 
			
			
				@@ -161,3 +161,115 @@ static struct resource davinci_evm_nandflash_resource[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		.start		= DM644X_ASYNC_EMIF_DATA_CE0_BASE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		.end		= DM644X_ASYNC_EMIF_DATA_CE0_BASE + SZ_16M - 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags		= IORESOURCE_MEM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start		= DM644X_ASYNC_EMIF_CONTROL_BASE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end		= DM644X_ASYNC_EMIF_CONTROL_BASE + SZ_4K - 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags		= IORESOURCE_MEM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device davinci_evm_nandflash_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name		= "davinci_nand", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id		= 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev		= { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data	= &davinci_evm_nandflash_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources	= ARRAY_SIZE(davinci_evm_nandflash_resource), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.resource	= davinci_evm_nandflash_resource, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static u64 davinci_fb_dma_mask = DMA_BIT_MASK(32); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device davinci_fb_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name		= "davincifb", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id		= -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.dma_mask		= &davinci_fb_dma_mask, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.coherent_dma_mask      = DMA_BIT_MASK(32), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct tvp514x_platform_data dm644xevm_tvp5146_pdata = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.clk_polarity = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.hs_polarity = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.vs_polarity = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define TVP514X_STD_ALL	(V4L2_STD_NTSC | V4L2_STD_PAL) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* Inputs available at the TVP5146 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct v4l2_input dm644xevm_tvp5146_inputs[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.index = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.name = "Composite", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.type = V4L2_INPUT_TYPE_CAMERA, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.std = TVP514X_STD_ALL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.index = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.name = "S-Video", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.type = V4L2_INPUT_TYPE_CAMERA, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.std = TVP514X_STD_ALL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * this is the route info for connecting each input to decoder 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * ouput that goes to vpfe. There is a one to one correspondence 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * with tvp5146_inputs 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct vpfe_route dm644xevm_tvp5146_routes[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.input = INPUT_CVBS_VI2B, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.input = INPUT_SVIDEO_VI2C_VI1C, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.output = OUTPUT_10BIT_422_EMBEDDED_SYNC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct vpfe_subdev_info dm644xevm_vpfe_sub_devs[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.name = "tvp5146", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.grp_id = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.num_inputs = ARRAY_SIZE(dm644xevm_tvp5146_inputs), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.inputs = dm644xevm_tvp5146_inputs, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.routes = dm644xevm_tvp5146_routes, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.can_route = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.ccdc_if_params = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.if_type = VPFE_BT656, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.hdpol = VPFE_PINPOL_POSITIVE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.vdpol = VPFE_PINPOL_POSITIVE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.board_info = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			I2C_BOARD_INFO("tvp5146", 0x5d), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			.platform_data = &dm644xevm_tvp5146_pdata, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct vpfe_config dm644xevm_capture_cfg = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_subdevs = ARRAY_SIZE(dm644xevm_vpfe_sub_devs), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.i2c_adapter_id = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.sub_devs = dm644xevm_vpfe_sub_devs, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.card_name = "DM6446 EVM", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.ccdc = "DM6446 CCDC", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device rtc_dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name           = "rtc_davinci_evm", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id             = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct snd_platform_data dm644x_evm_snd_data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/*----------------------------------------------------------------------*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * I2C GPIO expanders 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#define PCF_Uxx_BASE(x)	(DAVINCI_N_GPIO + ((x) * 8)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 |