diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2010-12-17 01:08:07 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-12-29 19:37:49 -0500 |
commit | 3bbef1b912df64a86a86e402d7686a8ed38abaf4 (patch) | |
tree | 03a2392d95e4de2e67d155d056136c62a5f66652 /arch/arm/plat-s5p | |
parent | 7db8cb2ad5042696ccc735b669ca33fa875e2d21 (diff) |
ARM: S5P: Add platform support for MIPI CSIS devices
There may be up to two MIPI CSI slave interfaces depending on the SoC version.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-s5p')
-rw-r--r-- | arch/arm/plat-s5p/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/plat-s5p/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/plat-s5p/dev-csis0.c | 34 | ||||
-rw-r--r-- | arch/arm/plat-s5p/dev-csis1.c | 34 | ||||
-rw-r--r-- | arch/arm/plat-s5p/include/plat/csis.h | 28 |
5 files changed, 108 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index 65dbfa8e0a8..6a161f317a7 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -56,3 +56,13 @@ config S5P_DEV_ONENAND | |||
56 | bool | 56 | bool |
57 | help | 57 | help |
58 | Compile in platform device definition for OneNAND controller | 58 | Compile in platform device definition for OneNAND controller |
59 | |||
60 | config S5P_DEV_CSIS0 | ||
61 | bool | ||
62 | help | ||
63 | Compile in platform device definitions for MIPI-CSIS channel 0 | ||
64 | |||
65 | config S5P_DEV_CSIS1 | ||
66 | bool | ||
67 | help | ||
68 | Compile in platform device definitions for MIPI-CSIS channel 1 | ||
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile index de65238a7ae..2b731737810 100644 --- a/arch/arm/plat-s5p/Makefile +++ b/arch/arm/plat-s5p/Makefile | |||
@@ -28,3 +28,5 @@ obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o | |||
28 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o | 28 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o |
29 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o | 29 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o |
30 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o | 30 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o |
31 | obj-$(CONFIG_S5P_DEV_CSIS0) += dev-csis0.o | ||
32 | obj-$(CONFIG_S5P_DEV_CSIS1) += dev-csis1.o | ||
diff --git a/arch/arm/plat-s5p/dev-csis0.c b/arch/arm/plat-s5p/dev-csis0.c new file mode 100644 index 00000000000..dfab1c85f54 --- /dev/null +++ b/arch/arm/plat-s5p/dev-csis0.c | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics | ||
3 | * | ||
4 | * S5P series device definition for MIPI-CSIS channel 0 | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <mach/map.h> | ||
15 | |||
16 | static struct resource s5p_mipi_csis0_resource[] = { | ||
17 | [0] = { | ||
18 | .start = S5P_PA_MIPI_CSIS0, | ||
19 | .end = S5P_PA_MIPI_CSIS0 + SZ_4K - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, | ||
22 | [1] = { | ||
23 | .start = IRQ_MIPI_CSIS0, | ||
24 | .end = IRQ_MIPI_CSIS0, | ||
25 | .flags = IORESOURCE_IRQ, | ||
26 | } | ||
27 | }; | ||
28 | |||
29 | struct platform_device s5p_device_mipi_csis0 = { | ||
30 | .name = "s5p-mipi-csis", | ||
31 | .id = 0, | ||
32 | .num_resources = ARRAY_SIZE(s5p_mipi_csis0_resource), | ||
33 | .resource = s5p_mipi_csis0_resource, | ||
34 | }; | ||
diff --git a/arch/arm/plat-s5p/dev-csis1.c b/arch/arm/plat-s5p/dev-csis1.c new file mode 100644 index 00000000000..e3053f27fbb --- /dev/null +++ b/arch/arm/plat-s5p/dev-csis1.c | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics | ||
3 | * | ||
4 | * S5P series device definition for MIPI-CSIS channel 1 | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <mach/map.h> | ||
15 | |||
16 | static struct resource s5p_mipi_csis1_resource[] = { | ||
17 | [0] = { | ||
18 | .start = S5P_PA_MIPI_CSIS1, | ||
19 | .end = S5P_PA_MIPI_CSIS1 + SZ_4K - 1, | ||
20 | .flags = IORESOURCE_MEM, | ||
21 | }, | ||
22 | [1] = { | ||
23 | .start = IRQ_MIPI_CSIS1, | ||
24 | .end = IRQ_MIPI_CSIS1, | ||
25 | .flags = IORESOURCE_IRQ, | ||
26 | }, | ||
27 | }; | ||
28 | |||
29 | struct platform_device s5p_device_mipi_csis1 = { | ||
30 | .name = "s5p-mipi-csis", | ||
31 | .id = 1, | ||
32 | .num_resources = ARRAY_SIZE(s5p_mipi_csis1_resource), | ||
33 | .resource = s5p_mipi_csis1_resource, | ||
34 | }; | ||
diff --git a/arch/arm/plat-s5p/include/plat/csis.h b/arch/arm/plat-s5p/include/plat/csis.h new file mode 100644 index 00000000000..51e308c7981 --- /dev/null +++ b/arch/arm/plat-s5p/include/plat/csis.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics | ||
3 | * | ||
4 | * S5P series MIPI CSI slave device support | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef PLAT_S5P_CSIS_H_ | ||
12 | #define PLAT_S5P_CSIS_H_ __FILE__ | ||
13 | |||
14 | /** | ||
15 | * struct s5p_platform_mipi_csis - platform data for MIPI-CSIS | ||
16 | * @clk_rate: bus clock frequency | ||
17 | * @lanes: number of data lanes used | ||
18 | * @alignment: data alignment in bits | ||
19 | * @hs_settle: HS-RX settle time | ||
20 | */ | ||
21 | struct s5p_platform_mipi_csis { | ||
22 | unsigned long clk_rate; | ||
23 | u8 lanes; | ||
24 | u8 alignment; | ||
25 | u8 hs_settle; | ||
26 | }; | ||
27 | |||
28 | #endif /* PLAT_S5P_CSIS_H_ */ | ||