Commit 494edadd authored by Seungwhan Youn's avatar Seungwhan Youn Committed by Kukjin Kim

ARM: S5PV210: Add S/PDIF platform device

This patch add S/PDIF platform device to support S/PDIF PCM audio
on S5PV210.
Signed-off-by: default avatarSeungwhan Youn <sw.youn@samsung.com>
Acked-by: default avatarJassi Brar <jassi.brar@samsung.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 04a4fd0a
...@@ -293,3 +293,43 @@ struct platform_device s5pv210_device_ac97 = { ...@@ -293,3 +293,43 @@ struct platform_device s5pv210_device_ac97 = {
.coherent_dma_mask = DMA_BIT_MASK(32), .coherent_dma_mask = DMA_BIT_MASK(32),
}, },
}; };
/* S/PDIF Controller platform_device */
static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev)
{
s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 2, S3C_GPIO_SFN(3));
return 0;
}
static struct resource s5pv210_spdif_resource[] = {
[0] = {
.start = S5PV210_PA_SPDIF,
.end = S5PV210_PA_SPDIF + 0x100 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = DMACH_SPDIF,
.end = DMACH_SPDIF,
.flags = IORESOURCE_DMA,
},
};
static struct s3c_audio_pdata samsung_spdif_pdata = {
.cfg_gpio = s5pv210_spdif_cfg_gpio,
};
static u64 s5pv210_spdif_dmamask = DMA_BIT_MASK(32);
struct platform_device s5pv210_device_spdif = {
.name = "samsung-spdif",
.id = -1,
.num_resources = ARRAY_SIZE(s5pv210_spdif_resource),
.resource = s5pv210_spdif_resource,
.dev = {
.platform_data = &samsung_spdif_pdata,
.dma_mask = &s5pv210_spdif_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
...@@ -86,6 +86,9 @@ ...@@ -86,6 +86,9 @@
#define S5PV210_PA_SDRAM (0x20000000) #define S5PV210_PA_SDRAM (0x20000000)
#define S5P_PA_SDRAM S5PV210_PA_SDRAM #define S5P_PA_SDRAM S5PV210_PA_SDRAM
/* S/PDIF */
#define S5PV210_PA_SPDIF 0xE1100000
/* I2S */ /* I2S */
#define S5PV210_PA_IIS0 0xEEE30000 #define S5PV210_PA_IIS0 0xEEE30000
#define S5PV210_PA_IIS1 0xE2100000 #define S5PV210_PA_IIS1 0xE2100000
......
...@@ -82,6 +82,7 @@ static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = { ...@@ -82,6 +82,7 @@ static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = {
static struct platform_device *smdkc110_devices[] __initdata = { static struct platform_device *smdkc110_devices[] __initdata = {
&s5pv210_device_iis0, &s5pv210_device_iis0,
&s5pv210_device_ac97, &s5pv210_device_ac97,
&s5pv210_device_spdif,
&s3c_device_cfcon, &s3c_device_cfcon,
&s3c_device_i2c0, &s3c_device_i2c0,
&s3c_device_i2c1, &s3c_device_i2c1,
......
...@@ -104,6 +104,7 @@ static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = { ...@@ -104,6 +104,7 @@ static struct samsung_keypad_platdata smdkv210_keypad_data __initdata = {
static struct platform_device *smdkv210_devices[] __initdata = { static struct platform_device *smdkv210_devices[] __initdata = {
&s5pv210_device_iis0, &s5pv210_device_iis0,
&s5pv210_device_ac97, &s5pv210_device_ac97,
&s5pv210_device_spdif,
&s3c_device_adc, &s3c_device_adc,
&s3c_device_cfcon, &s3c_device_cfcon,
&s3c_device_hsmmc0, &s3c_device_hsmmc0,
......
...@@ -92,6 +92,7 @@ extern struct platform_device s5pv210_device_pcm2; ...@@ -92,6 +92,7 @@ extern struct platform_device s5pv210_device_pcm2;
extern struct platform_device s5pv210_device_iis0; extern struct platform_device s5pv210_device_iis0;
extern struct platform_device s5pv210_device_iis1; extern struct platform_device s5pv210_device_iis1;
extern struct platform_device s5pv210_device_iis2; extern struct platform_device s5pv210_device_iis2;
extern struct platform_device s5pv210_device_spdif;
extern struct platform_device s5p6442_device_pcm0; extern struct platform_device s5p6442_device_pcm0;
extern struct platform_device s5p6442_device_pcm1; extern struct platform_device s5p6442_device_pcm1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment