summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorWojciech Bieganski <wbieganski@antmicro.com>2016-04-06 10:37:41 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-11-21 15:05:10 +0100
commit6261e3f9a7a1367fe92cabc7c79cc444a3cca679 (patch)
treeb031731deb3dafb2b61ee382040470b0fb82aa95 /arch
parent0fc1465eef15c2e0704e38238a82017ca06928f5 (diff)
media: support for second single-lane decoder (ADV7280M)
Connected to CSI CIL-E. Cameras doesn't work simultaneously. Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-ardbeg-sensors.c54
1 files changed, 43 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/board-ardbeg-sensors.c b/arch/arm/mach-tegra/board-ardbeg-sensors.c
index da0c4ad5b995..aa241d28c198 100644
--- a/arch/arm/mach-tegra/board-ardbeg-sensors.c
+++ b/arch/arm/mach-tegra/board-ardbeg-sensors.c
@@ -489,18 +489,19 @@ static struct platform_device ardbeg_tc358743_soc_camera_device = {
static int ardbeg_adv7280_power(struct device *dev, int enable)
{
if(enable) {
- tegra_io_dpd_disable(&csia_io);
+ tegra_io_dpd_disable(&csie_io);
} else {
- tegra_io_dpd_enable(&csia_io);
+ tegra_io_dpd_enable(&csie_io);
}
return 0;
}
-static struct i2c_board_info ardbeg_adv7280_camera_i2c_device = {
- I2C_BOARD_INFO("adv7280", 0x21),
+
+static struct i2c_board_info ardbeg_adv7280_camera_i2c_device_a = {
+ I2C_BOARD_INFO("adv7280", 0x20),
};
-static struct tegra_camera_platform_data ardbeg_adv7280_camera_platform_data = {
+static struct tegra_camera_platform_data ardbeg_adv7280_camera_platform_data_a = {
.flip_v = 0,
.flip_h = 0,
.port = TEGRA_CAMERA_PORT_CSI_A,
@@ -508,20 +509,50 @@ static struct tegra_camera_platform_data ardbeg_adv7280_camera_platform_data = {
.continuous_clk = 0,
};
-static struct soc_camera_link adv7280_iclink = {
+static struct soc_camera_link adv7280_iclink_a = {
.bus_id = 0, /* This must match the .id of tegra_vi01_device */
- .board_info = &ardbeg_adv7280_camera_i2c_device,
+ .board_info = &ardbeg_adv7280_camera_i2c_device_a,
.module_name = "adv7280",
.i2c_adapter_id = 2,
.power = ardbeg_adv7280_power,
- .priv = &ardbeg_adv7280_camera_platform_data,
+ .priv = &ardbeg_adv7280_camera_platform_data_a,
};
-static struct platform_device ardbeg_adv7280_soc_camera_device = {
+static struct platform_device ardbeg_adv7280_soc_camera_device_a = {
.name = "soc-camera-pdrv",
.id = 5,
.dev = {
- .platform_data = &adv7280_iclink,
+ .platform_data = &adv7280_iclink_a,
+ },
+};
+
+/* second ADV7280M connected to CSI CIL-E */
+static struct i2c_board_info ardbeg_adv7280_camera_i2c_device_b = {
+ I2C_BOARD_INFO("adv7280", 0x21),
+};
+
+static struct tegra_camera_platform_data ardbeg_adv7280_camera_platform_data_b = {
+ .flip_v = 0,
+ .flip_h = 0,
+ .port = TEGRA_CAMERA_PORT_CSI_C,
+ .lanes = 1,
+ .continuous_clk = 0,
+};
+
+static struct soc_camera_link adv7280_iclink_b = {
+ .bus_id = 0, /* This must match the .id of tegra_vi01_device */
+ .board_info = &ardbeg_adv7280_camera_i2c_device_b,
+ .module_name = "adv7280",
+ .i2c_adapter_id = 2,
+ .power = ardbeg_adv7280_power,
+ .priv = &ardbeg_adv7280_camera_platform_data_b,
+};
+
+static struct platform_device ardbeg_adv7280_soc_camera_device_b = {
+ .name = "soc-camera-pdrv",
+ .id = 6,
+ .dev = {
+ .platform_data = &adv7280_iclink_b,
},
};
#endif
@@ -1738,7 +1769,8 @@ static int ardbeg_camera_init(void)
platform_device_register(&ardbeg_tc358743_soc_camera_device);
#endif
#if IS_ENABLED(CONFIG_SOC_CAMERA_ADV7280)
- platform_device_register(&ardbeg_adv7280_soc_camera_device);
+ platform_device_register(&ardbeg_adv7280_soc_camera_device_a);
+ platform_device_register(&ardbeg_adv7280_soc_camera_device_b);
#endif
return 0;
}