| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335 | 
							- /* linux/arch/arm/plat-samsung/devs.c
 
-  *
 
-  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
 
-  *		http://www.samsung.com
 
-  *
 
-  * Base SAMSUNG platform device definitions
 
-  *
 
-  * This program is free software; you can redistribute it and/or modify
 
-  * it under the terms of the GNU General Public License version 2 as
 
-  * published by the Free Software Foundation.
 
- */
 
- #include <linux/kernel.h>
 
- #include <linux/types.h>
 
- #include <linux/interrupt.h>
 
- #include <linux/list.h>
 
- #include <linux/timer.h>
 
- #include <linux/init.h>
 
- #include <linux/serial_core.h>
 
- #include <linux/platform_device.h>
 
- #include <linux/io.h>
 
- #include <linux/slab.h>
 
- #include <linux/string.h>
 
- #include <linux/dma-mapping.h>
 
- #include <linux/fb.h>
 
- #include <linux/gfp.h>
 
- #include <linux/mtd/mtd.h>
 
- #include <linux/mtd/onenand.h>
 
- #include <linux/mtd/partitions.h>
 
- #include <linux/mmc/host.h>
 
- #include <linux/ioport.h>
 
- #include <linux/platform_data/s3c-hsudc.h>
 
- #include <linux/platform_data/s3c-hsotg.h>
 
- #include <media/s5p_hdmi.h>
 
- #include <asm/irq.h>
 
- #include <asm/mach/arch.h>
 
- #include <asm/mach/map.h>
 
- #include <asm/mach/irq.h>
 
- #include <mach/hardware.h>
 
- #include <mach/dma.h>
 
- #include <mach/irqs.h>
 
- #include <mach/map.h>
 
- #include <plat/cpu.h>
 
- #include <plat/devs.h>
 
- #include <plat/adc.h>
 
- #include <linux/platform_data/ata-samsung_cf.h>
 
- #include <linux/platform_data/usb-ehci-s5p.h>
 
- #include <plat/fb.h>
 
- #include <plat/fb-s3c2410.h>
 
- #include <plat/hdmi.h>
 
- #include <linux/platform_data/hwmon-s3c.h>
 
- #include <linux/platform_data/i2c-s3c2410.h>
 
- #include <plat/keypad.h>
 
- #include <linux/platform_data/mmc-s3cmci.h>
 
- #include <linux/platform_data/mtd-nand-s3c2410.h>
 
- #include <plat/sdhci.h>
 
- #include <linux/platform_data/touchscreen-s3c2410.h>
 
- #include <linux/platform_data/usb-s3c2410_udc.h>
 
- #include <linux/platform_data/usb-ohci-s3c2410.h>
 
- #include <plat/usb-phy.h>
 
- #include <plat/regs-iic.h>
 
- #include <plat/regs-serial.h>
 
- #include <plat/regs-spi.h>
 
- #include <linux/platform_data/spi-s3c64xx.h>
 
- static u64 samsung_device_dma_mask = DMA_BIT_MASK(32);
 
- /* AC97 */
 
- #ifdef CONFIG_CPU_S3C2440
 
- static struct resource s3c_ac97_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S3C2440_PA_AC97, S3C2440_SZ_AC97),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_S3C244X_AC97),
 
- 	[2] = DEFINE_RES_DMA_NAMED(DMACH_PCM_OUT, "PCM out"),
 
- 	[3] = DEFINE_RES_DMA_NAMED(DMACH_PCM_IN, "PCM in"),
 
- 	[4] = DEFINE_RES_DMA_NAMED(DMACH_MIC_IN, "Mic in"),
 
- };
 
- struct platform_device s3c_device_ac97 = {
 
- 	.name		= "samsung-ac97",
 
- 	.id		= -1,
 
- 	.num_resources	= ARRAY_SIZE(s3c_ac97_resource),
 
- 	.resource	= s3c_ac97_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	}
 
- };
 
- #endif /* CONFIG_CPU_S3C2440 */
 
- /* ADC */
 
- #ifdef CONFIG_PLAT_S3C24XX
 
- static struct resource s3c_adc_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S3C24XX_PA_ADC, S3C24XX_SZ_ADC),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_TC),
 
- 	[2] = DEFINE_RES_IRQ(IRQ_ADC),
 
- };
 
- struct platform_device s3c_device_adc = {
 
- 	.name		= "s3c24xx-adc",
 
- 	.id		= -1,
 
- 	.num_resources	= ARRAY_SIZE(s3c_adc_resource),
 
- 	.resource	= s3c_adc_resource,
 
- };
 
- #endif /* CONFIG_PLAT_S3C24XX */
 
- #if defined(CONFIG_SAMSUNG_DEV_ADC)
 
- static struct resource s3c_adc_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(SAMSUNG_PA_ADC, SZ_256),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_TC),
 
- 	[2] = DEFINE_RES_IRQ(IRQ_ADC),
 
- };
 
- struct platform_device s3c_device_adc = {
 
- 	.name		= "samsung-adc",
 
- 	.id		= -1,
 
- 	.num_resources	= ARRAY_SIZE(s3c_adc_resource),
 
- 	.resource	= s3c_adc_resource,
 
- };
 
- #endif /* CONFIG_SAMSUNG_DEV_ADC */
 
- /* Camif Controller */
 
- #ifdef CONFIG_CPU_S3C2440
 
- static struct resource s3c_camif_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S3C2440_PA_CAMIF, S3C2440_SZ_CAMIF),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_C),
 
- 	[2] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_P),
 
- };
 
- struct platform_device s3c_device_camif = {
 
- 	.name		= "s3c2440-camif",
 
- 	.id		= -1,
 
- 	.num_resources	= ARRAY_SIZE(s3c_camif_resource),
 
- 	.resource	= s3c_camif_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	}
 
- };
 
- #endif /* CONFIG_CPU_S3C2440 */
 
- /* ASOC DMA */
 
- struct platform_device samsung_asoc_idma = {
 
- 	.name		= "samsung-idma",
 
- 	.id		= -1,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	}
 
- };
 
- /* FB */
 
- #ifdef CONFIG_S3C_DEV_FB
 
- static struct resource s3c_fb_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S3C_PA_FB, SZ_16K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_LCD_VSYNC),
 
- 	[2] = DEFINE_RES_IRQ(IRQ_LCD_FIFO),
 
- 	[3] = DEFINE_RES_IRQ(IRQ_LCD_SYSTEM),
 
- };
 
- struct platform_device s3c_device_fb = {
 
- 	.name		= "s3c-fb",
 
- 	.id		= -1,
 
- 	.num_resources	= ARRAY_SIZE(s3c_fb_resource),
 
- 	.resource	= s3c_fb_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd)
 
- {
 
- 	s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),
 
- 			 &s3c_device_fb);
 
- }
 
- #endif /* CONFIG_S3C_DEV_FB */
 
- /* FIMC */
 
- #ifdef CONFIG_S5P_DEV_FIMC0
 
- static struct resource s5p_fimc0_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S5P_PA_FIMC0, SZ_4K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_FIMC0),
 
- };
 
- struct platform_device s5p_device_fimc0 = {
 
- 	.name		= "s5p-fimc",
 
- 	.id		= 0,
 
- 	.num_resources	= ARRAY_SIZE(s5p_fimc0_resource),
 
- 	.resource	= s5p_fimc0_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- struct platform_device s5p_device_fimc_md = {
 
- 	.name	= "s5p-fimc-md",
 
- 	.id	= -1,
 
- };
 
- #endif /* CONFIG_S5P_DEV_FIMC0 */
 
- #ifdef CONFIG_S5P_DEV_FIMC1
 
- static struct resource s5p_fimc1_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S5P_PA_FIMC1, SZ_4K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_FIMC1),
 
- };
 
- struct platform_device s5p_device_fimc1 = {
 
- 	.name		= "s5p-fimc",
 
- 	.id		= 1,
 
- 	.num_resources	= ARRAY_SIZE(s5p_fimc1_resource),
 
- 	.resource	= s5p_fimc1_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- #endif /* CONFIG_S5P_DEV_FIMC1 */
 
- #ifdef CONFIG_S5P_DEV_FIMC2
 
- static struct resource s5p_fimc2_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S5P_PA_FIMC2, SZ_4K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_FIMC2),
 
- };
 
- struct platform_device s5p_device_fimc2 = {
 
- 	.name		= "s5p-fimc",
 
- 	.id		= 2,
 
- 	.num_resources	= ARRAY_SIZE(s5p_fimc2_resource),
 
- 	.resource	= s5p_fimc2_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- #endif /* CONFIG_S5P_DEV_FIMC2 */
 
- #ifdef CONFIG_S5P_DEV_FIMC3
 
- static struct resource s5p_fimc3_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S5P_PA_FIMC3, SZ_4K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_FIMC3),
 
- };
 
- struct platform_device s5p_device_fimc3 = {
 
- 	.name		= "s5p-fimc",
 
- 	.id		= 3,
 
- 	.num_resources	= ARRAY_SIZE(s5p_fimc3_resource),
 
- 	.resource	= s5p_fimc3_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- #endif /* CONFIG_S5P_DEV_FIMC3 */
 
- /* G2D */
 
- #ifdef CONFIG_S5P_DEV_G2D
 
- static struct resource s5p_g2d_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S5P_PA_G2D, SZ_4K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_2D),
 
- };
 
- struct platform_device s5p_device_g2d = {
 
- 	.name		= "s5p-g2d",
 
- 	.id		= 0,
 
- 	.num_resources	= ARRAY_SIZE(s5p_g2d_resource),
 
- 	.resource	= s5p_g2d_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- #endif /* CONFIG_S5P_DEV_G2D */
 
- #ifdef CONFIG_S5P_DEV_JPEG
 
- static struct resource s5p_jpeg_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S5P_PA_JPEG, SZ_4K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_JPEG),
 
- };
 
- struct platform_device s5p_device_jpeg = {
 
- 	.name		= "s5p-jpeg",
 
- 	.id		= 0,
 
- 	.num_resources	= ARRAY_SIZE(s5p_jpeg_resource),
 
- 	.resource	= s5p_jpeg_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- #endif /*  CONFIG_S5P_DEV_JPEG */
 
- /* FIMD0 */
 
- #ifdef CONFIG_S5P_DEV_FIMD0
 
- static struct resource s5p_fimd0_resource[] = {
 
- 	[0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K),
 
- 	[1] = DEFINE_RES_IRQ(IRQ_FIMD0_VSYNC),
 
- 	[2] = DEFINE_RES_IRQ(IRQ_FIMD0_FIFO),
 
- 	[3] = DEFINE_RES_IRQ(IRQ_FIMD0_SYSTEM),
 
- };
 
- struct platform_device s5p_device_fimd0 = {
 
- 	.name		= "s5p-fb",
 
- 	.id		= 0,
 
- 	.num_resources	= ARRAY_SIZE(s5p_fimd0_resource),
 
- 	.resource	= s5p_fimd0_resource,
 
- 	.dev		= {
 
- 		.dma_mask		= &samsung_device_dma_mask,
 
- 		.coherent_dma_mask	= DMA_BIT_MASK(32),
 
- 	},
 
- };
 
- void __init s5p_fimd0_set_platdata(struct s3c_fb_platdata *pd)
 
- {
 
- 	s3c_set_platdata(pd, sizeof(struct s3c_fb_platdata),
 
- 			 &s5p_device_fimd0);
 
- }
 
- #endif /* CONFIG_S5P_DEV_FIMD0 */
 
- /* HWMON */
 
- #ifdef CONFIG_S3C_DEV_HWMON
 
- struct platform_device s3c_device_hwmon = {
 
- 	.name		= "s3c-hwmon",
 
 
  |