From 0ffe70443b9bb259f9ea36a7e29c02c0d9643b07 Mon Sep 17 00:00:00 2001 From: Bryan Wu Date: Tue, 12 Feb 2013 10:53:29 -0800 Subject: ARM: tegra: cardhu: enable OV5650 sensor Enable OV5650 sensor in Cardhu board file with the help of Tegra V4L2 SoC camera interface. Change-Id: I6ff8456941267c05986760f46f658962a940d07e Signed-off-by: Bryan Wu Reviewed-on: http://git-master/r/200226 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- arch/arm/mach-tegra/board-cardhu-sensors.c | 95 ++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 08ad0d5fb0fc..83ec4fc2f9cb 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -44,6 +44,8 @@ #include #include #include +#include +#include #include #include "gpio-names.h" #include "board.h" @@ -60,12 +62,13 @@ #include "board-cardhu.h" #include "cpu-tegra.h" -static struct regulator *cardhu_1v8_cam1 = NULL; -static struct regulator *cardhu_1v8_cam2 = NULL; -static struct regulator *cardhu_1v8_cam3 = NULL; -static struct regulator *cardhu_vdd_2v8_cam1 = NULL; -static struct regulator *cardhu_vdd_2v8_cam2 = NULL; -static struct regulator *cardhu_vdd_cam3 = NULL; +static struct regulator *cardhu_supply_csi; +static struct regulator *cardhu_1v8_cam1; +static struct regulator *cardhu_1v8_cam2; +static struct regulator *cardhu_1v8_cam3; +static struct regulator *cardhu_vdd_2v8_cam1; +static struct regulator *cardhu_vdd_2v8_cam2; +static struct regulator *cardhu_vdd_cam3; static struct board_info board_info; @@ -81,6 +84,51 @@ static struct pca954x_platform_data cardhu_pca954x_data = { .num_modes = ARRAY_SIZE(cardhu_pca954x_modes), }; +/* OV5650 V4L2 device */ +#ifdef CONFIG_SOC_CAMERA_OV5650 +static int cardhu_left_ov5650_power_on(void); +static int cardhu_left_ov5650_power_off(void); + +static int cardhu_ov5650_camera_power_enable(struct nvhost_device *ndev) +{ + return cardhu_left_ov5650_power_on(); +} + +static void cardhu_ov5650_camera_power_disable(struct nvhost_device *ndev) +{ + cardhu_left_ov5650_power_off(); +} + +static struct i2c_board_info cardhu_ov5650_camera_i2c_device = { + I2C_BOARD_INFO("ov5650", 0x36), +}; + +static struct soc_camera_link ov5650_iclink = { + .bus_id = -1, /* This must match the .id of tegra_vi01_device */ + .board_info = &cardhu_ov5650_camera_i2c_device, + .module_name = "ov5650", + .i2c_adapter_id = PCA954x_I2C_BUS0, +}; + +static struct platform_device cardhu_ov5650_soc_camera_device = { + .name = "soc-camera-pdrv", + .id = 0, + .dev = { + .platform_data = &ov5650_iclink, + }, +}; + +static struct tegra_camera_platform_data cardhu_ov5650_camera_platform_data = { + .enable_camera = cardhu_ov5650_camera_power_enable, + .disable_camera = cardhu_ov5650_camera_power_disable, + .flip_v = 0, + .flip_h = 0, + .port = TEGRA_CAMERA_PORT_CSI_A, + .lanes = 2, + .continuous_clk = 1, +}; +#endif + static int cardhu_camera_init(void) { int ret; @@ -135,6 +183,17 @@ static int cardhu_camera_init(void) static int cardhu_left_ov5650_power_on(void) { + + if (cardhu_supply_csi == NULL) { + cardhu_supply_csi = regulator_get(NULL, "avdd_dsi_csi"); + if (WARN_ON(IS_ERR(cardhu_supply_csi))) { + pr_err("%s: couldn't get regulator avdd_dsi_csi: %ld\n", + __func__, PTR_ERR(cardhu_supply_csi)); + goto reg_alloc_fail; + } + } + regulator_enable(cardhu_supply_csi); + /* Boards E1198 and E1291 are of Cardhu personality * and donot have TCA6416 exp for camera */ if ((board_info.board_id == BOARD_E1198) || @@ -192,6 +251,10 @@ reg_alloc_fail: regulator_put(cardhu_vdd_2v8_cam1); cardhu_vdd_2v8_cam1 = NULL; } + if (cardhu_supply_csi) { + regulator_put(cardhu_supply_csi); + cardhu_supply_csi = NULL; + } return -ENODEV; @@ -212,14 +275,18 @@ static int cardhu_left_ov5650_power_off(void) regulator_disable(cardhu_1v8_cam1); if (cardhu_vdd_2v8_cam1) regulator_disable(cardhu_vdd_2v8_cam1); + if (cardhu_supply_csi) + regulator_disable(cardhu_supply_csi); return 0; } +#if defined(CONFIG_VIDEO_OV5650) || defined(CONFIG_VIDEO_OV5650_MODULE) struct ov5650_platform_data cardhu_left_ov5650_data = { .power_on = cardhu_left_ov5650_power_on, .power_off = cardhu_left_ov5650_power_off, }; +#endif #ifdef CONFIG_VIDEO_OV14810 static int cardhu_ov14810_power_on(void) @@ -678,10 +745,12 @@ static const struct i2c_board_info cardhu_i2c_board_info_tps61050[] = { }; static struct i2c_board_info cardhu_i2c6_board_info[] = { +#if defined(CONFIG_VIDEO_OV5650) || defined(CONFIG_VIDEO_OV5650_MODULE) { I2C_BOARD_INFO("ov5650L", 0x36), .platform_data = &cardhu_left_ov5650_data, }, +#endif { I2C_BOARD_INFO("sh532u", 0x72), .platform_data = &sh532u_left_pdata, @@ -693,10 +762,12 @@ static struct i2c_board_info cardhu_i2c6_board_info[] = { }; static struct i2c_board_info cardhu_i2c7_board_info[] = { +#if defined(CONFIG_VIDEO_OV5650) || defined(CONFIG_VIDEO_OV5650_MODULE) { I2C_BOARD_INFO("ov5650R", 0x36), .platform_data = &cardhu_right_ov5650_data, }, +#endif { I2C_BOARD_INFO("sh532u", 0x72), .platform_data = &sh532u_right_pdata, @@ -708,10 +779,12 @@ static struct i2c_board_info cardhu_i2c7_board_info[] = { }; static struct i2c_board_info pm269_i2c6_board_info[] = { +#if defined(CONFIG_VIDEO_OV5650) || defined(CONFIG_VIDEO_OV5650_MODULE) { I2C_BOARD_INFO("ov5650L", 0x36), .platform_data = &cardhu_left_ov5650_data, }, +#endif { I2C_BOARD_INFO("sh532u", 0x72), .platform_data = &pm269_sh532u_left_pdata, @@ -723,10 +796,12 @@ static struct i2c_board_info pm269_i2c6_board_info[] = { }; static struct i2c_board_info pm269_i2c7_board_info[] = { +#if defined(CONFIG_VIDEO_OV5650) || defined(CONFIG_VIDEO_OV5650_MODULE) { I2C_BOARD_INFO("ov5650R", 0x36), .platform_data = &cardhu_right_ov5650_data, }, +#endif { I2C_BOARD_INFO("sh532u", 0x72), .platform_data = &pm269_sh532u_right_pdata, @@ -1133,10 +1208,17 @@ int __init cardhu_sensors_init(void) if (board_info.board_id != BOARD_PM315) mpuirq_init(); + +#ifdef CONFIG_SOC_CAMERA_OV5650 + t30_get_tegra_vi01_device()->dev.platform_data = + &cardhu_ov5650_camera_platform_data; + platform_device_register(&cardhu_ov5650_soc_camera_device); +#endif return 0; } #if defined(CONFIG_GPIO_PCA953X) +#if defined(CONFIG_VIDEO_OV5650) || defined(CONFIG_VIDEO_OV5650_MODULE) struct ov5650_gpios { const char *name; int gpio; @@ -1206,3 +1288,4 @@ fail: late_initcall(cardhu_ov5650_late_init); #endif +#endif -- cgit v1.2.3 From 25b80bc8abcc36fc4053534749faf9d9221a4ebf Mon Sep 17 00:00:00 2001 From: Naveen Kumar S Date: Mon, 31 Dec 2012 20:21:33 +0530 Subject: ARM: Config: Tegra2: Disabled CONFIG_INPUT_MOUSEDEV Disabled CONFIG_INPUT_MOUSEDEV to avoid kernel registering PS/2 mouse devices, which are mostly not in use now. Bug 1162832 Change-Id: If47e654063934d3b60d033a0d2523b8caf97825b Signed-off-by: Naveen Kumar S Reviewed-on: http://git-master/r/187808 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Winnie Hsu Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- arch/arm/configs/tegra_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index e7b72881f054..6878abd433f6 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -399,3 +399,4 @@ CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_TWOFISH=y # CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_DEV_TEGRA_AES=y +# CONFIG_INPUT_MOUSEDEV is not set -- cgit v1.2.3 From 00d87897aab16dc387bfbb21f53e8db391e78a78 Mon Sep 17 00:00:00 2001 From: Naveen Kumar S Date: Thu, 7 Mar 2013 12:41:22 +0530 Subject: ARM: Config: Tegra3:Disabled CONFIG_INPUT_MOUSEDEV Disabled CONFIG_INPUT_MOUSEDEV to avoid kernel registering PS/2 mouse devices, which are mostly not in use now. Bug 1162832 Change-Id: I0b44af668fa94ffc589e646a842259afa837731e Signed-off-by: Naveen Kumar S Reviewed-on: http://git-master/r/187807 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- arch/arm/configs/tegra3_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/configs/tegra3_defconfig b/arch/arm/configs/tegra3_defconfig index d8ba44fc373e..2fce137fc291 100644 --- a/arch/arm/configs/tegra3_defconfig +++ b/arch/arm/configs/tegra3_defconfig @@ -467,3 +467,4 @@ CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_TWOFISH=y # CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_DEV_TEGRA_SE=y +# CONFIG_INPUT_MOUSEDEV is not set -- cgit v1.2.3 From f07c2859fab5ca4dc1f833b3879cbbae32ce13fb Mon Sep 17 00:00:00 2001 From: Darbha Sriharsha Date: Thu, 24 Jan 2013 13:04:32 +0530 Subject: arm: tegra: cardhu: additions to cardhu board file This change is intended to add modifications to cardhu board file (which is also used for beaver) to get rid of NACK errors occuring due to the absence of certain hardware components on beaver Bug 1217572 Change-Id: I36dfcda1b133c983ce25d56729505bce8b99fdf1 Signed-off-by: Darbha Sriharsha Reviewed-on: http://git-master/r/193667 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- arch/arm/mach-tegra/board-cardhu-sensors.c | 14 +++++++++----- arch/arm/mach-tegra/board-cardhu.c | 9 +++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 83ec4fc2f9cb..59e1fa392801 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/board-cardhu-sensors.c * - * Copyright (c) 2010-2012, NVIDIA CORPORATION, All rights reserved. + * Copyright (c) 2010-2013, NVIDIA CORPORATION, All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -995,7 +995,8 @@ static const struct i2c_board_info cardhu_i2c2_board_info_tca6416[] = { static int __init pmu_tca6416_init(void) { if ((board_info.board_id == BOARD_E1198) || - (board_info.board_id == BOARD_E1291)) + (board_info.board_id == BOARD_E1291) || + (board_info.board_id == BOARD_PM315)) return 0; pr_info("Registering pmu pca6416\n"); @@ -1009,7 +1010,8 @@ static int __init cam_tca6416_init(void) /* Boards E1198 and E1291 are of Cardhu personality * and donot have TCA6416 exp for camera */ if ((board_info.board_id == BOARD_E1198) || - (board_info.board_id == BOARD_E1291)) + (board_info.board_id == BOARD_E1291) || + (board_info.board_id == BOARD_PM315)) return 0; pr_info("Registering cam pca6416\n"); @@ -1148,8 +1150,10 @@ int __init cardhu_sensors_init(void) cardhu_camera_init(); cam_tca6416_init(); - i2c_register_board_info(2, cardhu_i2c3_board_info, - ARRAY_SIZE(cardhu_i2c3_board_info)); + if (board_info.board_id != BOARD_PM315) { + i2c_register_board_info(2, cardhu_i2c3_board_info, + ARRAY_SIZE(cardhu_i2c3_board_info)); + } i2c_register_board_info(2, cardhu_i2c_board_info_tps61050, ARRAY_SIZE(cardhu_i2c_board_info_tps61050)); diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index 4b03ddc03b7b..b6799dc5bc91 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -1,8 +1,8 @@ /* * arch/arm/mach-tegra/board-cardhu.c * - * Copyright (c) 2011-2012, NVIDIA Corporation. All rights reserved. - * Copyright (c) 2011-2012, NVIDIA Corporation. + * Copyright (c) 2011-2013, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2011-2013, NVIDIA Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1057,6 +1057,11 @@ static int __init cardhu_touch_init(void) struct board_info BoardInfo, DisplayBoardInfo; tegra_get_board_info(&BoardInfo); + + /* Beaver board does not have any touch hardware*/ + if (BoardInfo.board_id == BOARD_PM315) + return 0; + tegra_get_display_board_info(&DisplayBoardInfo); if (DisplayBoardInfo.board_id == BOARD_DISPLAY_PM313) { tegra_clk_init_from_table(spi_clk_init_table); -- cgit v1.2.3 From 0358875560c6a93898708e341461ae62b687d80a Mon Sep 17 00:00:00 2001 From: Ramalingam C Date: Mon, 18 Mar 2013 12:13:00 +0530 Subject: arch: tegra: Ventana: vdd_ldo4 regulator handling Cleaning up of the vdd_ldo4 regulator handling and also control the multiple calls for regulator_get call for vdd_ldo4 Bug 1241274 Change-Id: I0f62d5059212302956bfe7e48d24eb7f45ff2dda Signed-off-by: Ramalingam C Reviewed-on: http://git-master/r/207516 GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- arch/arm/mach-tegra/board-ventana-panel.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c index d2d89392e1c5..d507dea88813 100644 --- a/arch/arm/mach-tegra/board-ventana-panel.c +++ b/arch/arm/mach-tegra/board-ventana-panel.c @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/board-ventana-panel.c * - * Copyright (c) 2010-2012 NVIDIA Corporation. + * Copyright (c) 2010-2013 NVIDIA Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,6 +48,7 @@ #define ventana_lvds_to_bl_ms 200 static struct regulator *pnl_pwr; +static struct regulator *vdd_ldo4; #ifdef CONFIG_TEGRA_DC static struct regulator *ventana_hdmi_reg = NULL; @@ -104,11 +105,17 @@ static struct platform_device ventana_backlight_device = { #ifdef CONFIG_TEGRA_DC static int ventana_panel_enable(void) { - struct regulator *reg = regulator_get(NULL, "vdd_ldo4"); - - if (!reg) { - regulator_enable(reg); - regulator_put(reg); + if (vdd_ldo4 == NULL) { + vdd_ldo4 = regulator_get(NULL, "vdd_ldo4"); + + if (IS_ERR(vdd_ldo4)) { + pr_err("%s: couldn't get regulator vdd_ldo4: %ld\n", + __func__, PTR_ERR(vdd_ldo4)); + } else { + regulator_enable(vdd_ldo4); + regulator_disable(vdd_ldo4); + regulator_put(vdd_ldo4); + } } if (pnl_pwr == NULL) { -- cgit v1.2.3 From 32ef1c46e812807ff555b9a8bcf362fc814e14fc Mon Sep 17 00:00:00 2001 From: Darbha Sriharsha Date: Wed, 3 Apr 2013 10:01:59 +0530 Subject: arm: tegra: cardhu: modify cardhu board files This change is intended to add a few modifications to cardhu board file (which is also used for beaver) to get rid of NACK errors occuring due to the absence of certain hardware components on beaver Bug 1217572 Change-Id: I1df7b7f777014610e4d64695d89324808ea4f266 Signed-off-by: Darbha Sriharsha Reviewed-on: http://git-master/r/215983 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro Reviewed-by: Ramalingam C Reviewed-by: Laxman Dewangan --- arch/arm/mach-tegra/board-cardhu-powermon.c | 4 ++-- arch/arm/mach-tegra/board-cardhu-sensors.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-cardhu-powermon.c b/arch/arm/mach-tegra/board-cardhu-powermon.c index 823cddbabeb3..bffd51b1ea84 100644 --- a/arch/arm/mach-tegra/board-cardhu-powermon.c +++ b/arch/arm/mach-tegra/board-cardhu-powermon.c @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/board-cardhu-powermon.c * - * Copyright (c) 2011, NVIDIA, All Rights Reserved. + * Copyright (c) 2011-2013, NVIDIA, All Rights Reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -249,7 +249,7 @@ int __init cardhu_pmon_init(void) &power_mon_info[VDD_CORE_IN]; } - if (bi.board_id != BOARD_PM269) { + if (bi.board_id != BOARD_PM269 && bi.board_id != BOARD_PM315) { i2c_register_board_info(0, cardhu_i2c0_ina219_board_info, ARRAY_SIZE(cardhu_i2c0_ina219_board_info)); } diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 59e1fa392801..d9c569bf3104 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -1153,10 +1153,10 @@ int __init cardhu_sensors_init(void) if (board_info.board_id != BOARD_PM315) { i2c_register_board_info(2, cardhu_i2c3_board_info, ARRAY_SIZE(cardhu_i2c3_board_info)); - } - i2c_register_board_info(2, cardhu_i2c_board_info_tps61050, - ARRAY_SIZE(cardhu_i2c_board_info_tps61050)); + i2c_register_board_info(2, cardhu_i2c_board_info_tps61050, + ARRAY_SIZE(cardhu_i2c_board_info_tps61050)); + } #ifdef CONFIG_VIDEO_OV14810 /* This is disabled by default; To enable this change Kconfig; -- cgit v1.2.3 From 7892df38fdc1c535e625f93c1fef47709e735c68 Mon Sep 17 00:00:00 2001 From: Mursalin Akon Date: Thu, 11 Apr 2013 11:00:35 -0700 Subject: config: tegra3: Turn off R8169 firmware loading The firmware is not being in use currently. So, turn the loading code off. Bug 1236060 Bug 991551 Change-Id: Id41cf762b59502d0ece470e315ac75d93e3b6b39 Signed-off-by: Mursalin Akon Reviewed-on: http://git-master/r/218613 (cherry picked from commit f15976bdfb32d6c5e20057f6d4d57646c15a5591) Reviewed-on: http://git-master/r/258354 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro --- arch/arm/configs/tegra3_defconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/configs/tegra3_defconfig b/arch/arm/configs/tegra3_defconfig index 2fce137fc291..9f212bbad50b 100644 --- a/arch/arm/configs/tegra3_defconfig +++ b/arch/arm/configs/tegra3_defconfig @@ -226,6 +226,7 @@ CONFIG_DM_UEVENT=y CONFIG_NETDEVICES=y CONFIG_DUMMY=y CONFIG_R8169=y +# CONFIG_R8169_FW_LOAD is not set # CONFIG_NETDEV_10000 is not set CONFIG_BCM4329=m CONFIG_BCM4329_FIRST_SCAN=y -- cgit v1.2.3 From e8b20893e1f9641f5bb3e8e215f84b93420a4a6d Mon Sep 17 00:00:00 2001 From: Bibek Basu Date: Tue, 19 Mar 2013 14:13:34 +0530 Subject: ARM: tegra: beaver: updated DVFS table DVFS entry is fixed for Hynix_2GB_H5TC4G83MFR-PBA to support all emc frequencies. Bug 1218885 Change-Id: Id9d578499e495f43db1a072cbcee25a353fa78f5 Signed-off-by: Bibek Basu Reviewed-on: http://git-master/r/210653 (cherry picked from commit 688bf04ff67e2c1ff22762f4f578b925ff3b9f3c) Reviewed-on: http://git-master/r/273530 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Kiran Adduri GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro Tested-by: Matthew Pedro --- arch/arm/mach-tegra/board-cardhu-memory.c | 68 +++++++++++++++---------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-cardhu-memory.c b/arch/arm/mach-tegra/board-cardhu-memory.c index 1ea30fe74a6d..535f9ef75b5a 100644 --- a/arch/arm/mach-tegra/board-cardhu-memory.c +++ b/arch/arm/mach-tegra/board-cardhu-memory.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 NVIDIA Corporation. All rights reserved. + * Copyright (c) 2011-2013, NVIDIA CORPORATION. All rights reserved. * * 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 @@ -30,12 +30,12 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 51000, /* SDRAM frequency */ { 0x00000002, /* EMC_RC */ - 0x0000000d, /* EMC_RFC */ + 0x0000000f, /* EMC_RFC */ 0x00000001, /* EMC_RAS */ 0x00000000, /* EMC_RP */ 0x00000002, /* EMC_R2W */ 0x0000000a, /* EMC_W2R */ - 0x00000003, /* EMC_R2P */ + 0x00000005, /* EMC_R2P */ 0x0000000b, /* EMC_W2P */ 0x00000000, /* EMC_RD_RCD */ 0x00000000, /* EMC_WR_RCD */ @@ -56,8 +56,8 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_ACT2PDEN */ 0x00000007, /* EMC_AR2PDEN */ 0x0000000f, /* EMC_RW2PDEN */ - 0x0000000e, /* EMC_TXSR */ - 0x0000000e, /* EMC_TXSRDLL */ + 0x00000010, /* EMC_TXSR */ + 0x00000010, /* EMC_TXSRDLL */ 0x00000004, /* EMC_TCKE */ 0x00000002, /* EMC_TFAW */ 0x00000000, /* EMC_TRPAB */ @@ -117,22 +117,22 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_CTT_DURATION */ 0x8000040b, /* EMC_DYN_SELF_REF_CONTROL */ 0x00010003, /* MC_EMEM_ARB_CFG */ - 0xc000000a, /* MC_EMEM_ARB_OUTSTANDING_REQ */ + 0xc0000010, /* MC_EMEM_ARB_OUTSTANDING_REQ */ 0x00000001, /* MC_EMEM_ARB_TIMING_RCD */ 0x00000001, /* MC_EMEM_ARB_TIMING_RP */ 0x00000002, /* MC_EMEM_ARB_TIMING_RC */ 0x00000000, /* MC_EMEM_ARB_TIMING_RAS */ 0x00000001, /* MC_EMEM_ARB_TIMING_FAW */ 0x00000001, /* MC_EMEM_ARB_TIMING_RRD */ - 0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */ + 0x00000003, /* MC_EMEM_ARB_TIMING_RAP2PRE */ 0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */ 0x00000002, /* MC_EMEM_ARB_TIMING_R2R */ 0x00000001, /* MC_EMEM_ARB_TIMING_W2W */ 0x00000002, /* MC_EMEM_ARB_TIMING_R2W */ 0x00000006, /* MC_EMEM_ARB_TIMING_W2R */ 0x06020102, /* MC_EMEM_ARB_DA_TURNS */ - 0x000a0402, /* MC_EMEM_ARB_DA_COVERS */ - 0x74630303, /* MC_EMEM_ARB_MISC0 */ + 0x000a0502, /* MC_EMEM_ARB_DA_COVERS */ + 0x74e30303, /* MC_EMEM_ARB_MISC0 */ 0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */ 0xe8000000, /* EMC_FBIO_SPARE */ 0xff00ff00, /* EMC_CFG_RSV */ @@ -150,12 +150,12 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 102000, /* SDRAM frequency */ { 0x00000004, /* EMC_RC */ - 0x0000001a, /* EMC_RFC */ + 0x0000001e, /* EMC_RFC */ 0x00000003, /* EMC_RAS */ 0x00000001, /* EMC_RP */ 0x00000002, /* EMC_R2W */ 0x0000000a, /* EMC_W2R */ - 0x00000003, /* EMC_R2P */ + 0x00000005, /* EMC_R2P */ 0x0000000b, /* EMC_W2P */ 0x00000001, /* EMC_RD_RCD */ 0x00000001, /* EMC_WR_RCD */ @@ -176,8 +176,8 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_ACT2PDEN */ 0x00000007, /* EMC_AR2PDEN */ 0x0000000f, /* EMC_RW2PDEN */ - 0x0000001c, /* EMC_TXSR */ - 0x0000001c, /* EMC_TXSRDLL */ + 0x00000020, /* EMC_TXSR */ + 0x00000020, /* EMC_TXSRDLL */ 0x00000004, /* EMC_TCKE */ 0x00000004, /* EMC_TFAW */ 0x00000000, /* EMC_TRPAB */ @@ -236,23 +236,23 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_CTT */ 0x00000000, /* EMC_CTT_DURATION */ 0x80000713, /* EMC_DYN_SELF_REF_CONTROL */ - 0x00000001, /* MC_EMEM_ARB_CFG */ - 0xc0000013, /* MC_EMEM_ARB_OUTSTANDING_REQ */ + 0x00000003, /* MC_EMEM_ARB_CFG */ + 0xc0000018, /* MC_EMEM_ARB_OUTSTANDING_REQ */ 0x00000001, /* MC_EMEM_ARB_TIMING_RCD */ 0x00000001, /* MC_EMEM_ARB_TIMING_RP */ 0x00000003, /* MC_EMEM_ARB_TIMING_RC */ 0x00000000, /* MC_EMEM_ARB_TIMING_RAS */ 0x00000001, /* MC_EMEM_ARB_TIMING_FAW */ 0x00000001, /* MC_EMEM_ARB_TIMING_RRD */ - 0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */ + 0x00000003, /* MC_EMEM_ARB_TIMING_RAP2PRE */ 0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */ 0x00000002, /* MC_EMEM_ARB_TIMING_R2R */ 0x00000001, /* MC_EMEM_ARB_TIMING_W2W */ 0x00000002, /* MC_EMEM_ARB_TIMING_R2W */ 0x00000006, /* MC_EMEM_ARB_TIMING_W2R */ 0x06020102, /* MC_EMEM_ARB_DA_TURNS */ - 0x000a0403, /* MC_EMEM_ARB_DA_COVERS */ - 0x73c30504, /* MC_EMEM_ARB_MISC0 */ + 0x000a0503, /* MC_EMEM_ARB_DA_COVERS */ + 0x74430504, /* MC_EMEM_ARB_MISC0 */ 0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */ 0xe8000000, /* EMC_FBIO_SPARE */ 0xff00ff00, /* EMC_CFG_RSV */ @@ -270,12 +270,12 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 204000, /* SDRAM frequency */ { 0x00000009, /* EMC_RC */ - 0x00000035, /* EMC_RFC */ + 0x0000003d, /* EMC_RFC */ 0x00000007, /* EMC_RAS */ 0x00000002, /* EMC_RP */ 0x00000002, /* EMC_R2W */ 0x0000000a, /* EMC_W2R */ - 0x00000003, /* EMC_R2P */ + 0x00000005, /* EMC_R2P */ 0x0000000b, /* EMC_W2P */ 0x00000002, /* EMC_RD_RCD */ 0x00000002, /* EMC_WR_RCD */ @@ -296,8 +296,8 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_ACT2PDEN */ 0x00000007, /* EMC_AR2PDEN */ 0x0000000f, /* EMC_RW2PDEN */ - 0x00000038, /* EMC_TXSR */ - 0x00000038, /* EMC_TXSRDLL */ + 0x00000040, /* EMC_TXSR */ + 0x00000040, /* EMC_TXSRDLL */ 0x00000004, /* EMC_TCKE */ 0x00000007, /* EMC_TFAW */ 0x00000000, /* EMC_TRPAB */ @@ -356,7 +356,7 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_CTT */ 0x00000000, /* EMC_CTT_DURATION */ 0x80000d22, /* EMC_DYN_SELF_REF_CONTROL */ - 0x00000003, /* MC_EMEM_ARB_CFG */ + 0x00000006, /* MC_EMEM_ARB_CFG */ 0xc0000025, /* MC_EMEM_ARB_OUTSTANDING_REQ */ 0x00000001, /* MC_EMEM_ARB_TIMING_RCD */ 0x00000001, /* MC_EMEM_ARB_TIMING_RP */ @@ -364,15 +364,15 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000002, /* MC_EMEM_ARB_TIMING_RAS */ 0x00000003, /* MC_EMEM_ARB_TIMING_FAW */ 0x00000001, /* MC_EMEM_ARB_TIMING_RRD */ - 0x00000002, /* MC_EMEM_ARB_TIMING_RAP2PRE */ + 0x00000003, /* MC_EMEM_ARB_TIMING_RAP2PRE */ 0x00000008, /* MC_EMEM_ARB_TIMING_WAP2PRE */ 0x00000002, /* MC_EMEM_ARB_TIMING_R2R */ 0x00000001, /* MC_EMEM_ARB_TIMING_W2W */ 0x00000002, /* MC_EMEM_ARB_TIMING_R2W */ 0x00000006, /* MC_EMEM_ARB_TIMING_W2R */ 0x06020102, /* MC_EMEM_ARB_DA_TURNS */ - 0x000a0405, /* MC_EMEM_ARB_DA_COVERS */ - 0x73840a06, /* MC_EMEM_ARB_MISC0 */ + 0x000a0505, /* MC_EMEM_ARB_DA_COVERS */ + 0x74040a06, /* MC_EMEM_ARB_MISC0 */ 0x001f0000, /* MC_EMEM_ARB_RING1_THROTTLE */ 0xe8000000, /* EMC_FBIO_SPARE */ 0xff00ff00, /* EMC_CFG_RSV */ @@ -390,7 +390,7 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 400000, /* SDRAM frequency */ { 0x00000012, /* EMC_RC */ - 0x00000066, /* EMC_RFC */ + 0x00000076, /* EMC_RFC */ 0x0000000c, /* EMC_RAS */ 0x00000004, /* EMC_RP */ 0x00000003, /* EMC_R2W */ @@ -416,7 +416,7 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_ACT2PDEN */ 0x00000008, /* EMC_AR2PDEN */ 0x0000000f, /* EMC_RW2PDEN */ - 0x0000006c, /* EMC_TXSR */ + 0x0000007c, /* EMC_TXSR */ 0x00000200, /* EMC_TXSRDLL */ 0x00000004, /* EMC_TCKE */ 0x0000000c, /* EMC_TFAW */ @@ -471,13 +471,13 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000802, /* EMC_CTT_TERM_CTRL */ 0x00020000, /* EMC_ZCAL_INTERVAL */ 0x00000100, /* EMC_ZCAL_WAIT_CNT */ - 0x0158000c, /* EMC_MRS_WAIT_CNT */ + 0x0148000c, /* EMC_MRS_WAIT_CNT */ 0xa0f10000, /* EMC_AUTO_CAL_CONFIG */ 0x00000000, /* EMC_CTT */ 0x00000000, /* EMC_CTT_DURATION */ 0x800018c8, /* EMC_DYN_SELF_REF_CONTROL */ - 0x00000006, /* MC_EMEM_ARB_CFG */ - 0x80000048, /* MC_EMEM_ARB_OUTSTANDING_REQ */ + 0x0000000c, /* MC_EMEM_ARB_CFG */ + 0xc0000048, /* MC_EMEM_ARB_OUTSTANDING_REQ */ 0x00000001, /* MC_EMEM_ARB_TIMING_RCD */ 0x00000002, /* MC_EMEM_ARB_TIMING_RP */ 0x00000009, /* MC_EMEM_ARB_TIMING_RC */ @@ -596,8 +596,8 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x00000000, /* EMC_CTT */ 0x00000000, /* EMC_CTT_DURATION */ 0x8000308c, /* EMC_DYN_SELF_REF_CONTROL */ - 0x0000000c, /* MC_EMEM_ARB_CFG */ - 0x80000090, /* MC_EMEM_ARB_OUTSTANDING_REQ */ + 0x00000018, /* MC_EMEM_ARB_CFG */ + 0xc0000090, /* MC_EMEM_ARB_OUTSTANDING_REQ */ 0x00000004, /* MC_EMEM_ARB_TIMING_RCD */ 0x00000005, /* MC_EMEM_ARB_TIMING_RP */ 0x00000013, /* MC_EMEM_ARB_TIMING_RC */ @@ -624,7 +624,7 @@ static const struct tegra_emc_table cardhu_emc_tables_h5tc4g83mfr[] = { 0x80100002, /* Mode Register 1 */ 0x80200018, /* Mode Register 2 */ 0x00000000, /* EMC_CFG.DYN_SELF_REF */ - } + }, }; static const struct tegra_emc_table cardhu_emc_tables_h5tc2g[] = { -- cgit v1.2.3 From 02f9e545e98b68c134de8a0040130fe9aa8fdd72 Mon Sep 17 00:00:00 2001 From: Bibek Basu Date: Fri, 30 Aug 2013 12:20:05 +0530 Subject: ARM: tegra3: initialize pll_a during boot Configure pll_a during boot so that locking to pll_a does not fail Bug 1330751 Change-Id: I188f0be211379f43770b24c5b382dec2788aefda Signed-off-by: Bibek Basu Reviewed-on: http://git-master/r/269469 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Kiran Adduri GVS: Gerrit_Virtual_Submit Reviewed-by: Jong Kim Reviewed-by: Winnie Hsu --- arch/arm/mach-tegra/board-cardhu.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-cardhu.c b/arch/arm/mach-tegra/board-cardhu.c index b6799dc5bc91..809dfd2b4970 100644 --- a/arch/arm/mach-tegra/board-cardhu.c +++ b/arch/arm/mach-tegra/board-cardhu.c @@ -218,6 +218,7 @@ static noinline void __init cardhu_setup_bluesleep(void) static __initdata struct tegra_clk_init_table cardhu_clk_init_table[] = { /* name parent rate enabled */ { "pll_m", NULL, 0, false}, + { "pll_a", NULL, 564480000, true}, { "hda", "pll_p", 108000000, false}, { "hda2codec_2x","pll_p", 48000000, false}, { "pwm", "pll_p", 3187500, false}, -- cgit v1.2.3 From 936120ccdc70b17fe1e58fa26081b0862cce16f2 Mon Sep 17 00:00:00 2001 From: Bryan Wu Date: Fri, 27 Sep 2013 14:00:02 -0700 Subject: ARM: tegra: cardhu: enable OV5650/OV5640 sensor Enable OV5650 and OV5640 sensor in Cardhu board file with the help of Tegra V4L2 SoC camera interface. To use V4L2 driver, we need to disable old camera HAL driver. Bug 1240806 Bug 1369083 Change-Id: I0dc529d44fba4d80b45690e384e8bf81b29f69e5 Signed-off-by: Bryan Wu Reviewed-on: http://git-master/r/246266 (cherry picked from commit 6b2f7cc4117208dc992478f27d5873ea38071fdc) Reviewed-on: http://git-master/r/279988 Reviewed-by: Matthew Pedro Tested-by: Matthew Pedro --- arch/arm/mach-tegra/board-cardhu-sensors.c | 126 +++++++++++++++++++---------- 1 file changed, 85 insertions(+), 41 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index d9c569bf3104..af66e1f571c6 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -37,6 +37,8 @@ #include #include #include +#include + #include #include #include @@ -62,11 +64,15 @@ #include "board-cardhu.h" #include "cpu-tegra.h" -static struct regulator *cardhu_supply_csi; +#if defined(CONFIG_VIDEO_OV5650) || \ + defined(CONFIG_VIDEO_OV5650_MODULE) || \ + defined(CONFIG_SOC_CAMERA_OV5650) || \ + defined(CONFIG_SOC_CAMERA_OV5650_MODULE) static struct regulator *cardhu_1v8_cam1; +static struct regulator *cardhu_vdd_2v8_cam1; +#endif static struct regulator *cardhu_1v8_cam2; static struct regulator *cardhu_1v8_cam3; -static struct regulator *cardhu_vdd_2v8_cam1; static struct regulator *cardhu_vdd_2v8_cam2; static struct regulator *cardhu_vdd_cam3; @@ -84,30 +90,86 @@ static struct pca954x_platform_data cardhu_pca954x_data = { .num_modes = ARRAY_SIZE(cardhu_pca954x_modes), }; +#if defined(CONFIG_SOC_CAMERA_OV5640) \ + || defined(CONFIG_SOC_CAMERA_OV5640_MODULE) +static int cardhu_ov5640_power_on(void); +static int cardhu_ov5640_power_off(void); + +static int cardhu_ov5640_power(struct device *dev, int enable) +{ + if (enable) + return cardhu_ov5640_power_on(); + else + cardhu_ov5640_power_off(); + + return 0; +} + +static struct i2c_board_info cardhu_ov5640_camera_i2c_device = { + I2C_BOARD_INFO("ov5640", 0x3C), +}; + +static struct tegra_camera_platform_data cardhu_ov5640_camera_platform_data = { + .flip_v = 0, + .flip_h = 0, + .port = TEGRA_CAMERA_PORT_CSI_B, + .lanes = 2, + .continuous_clk = 0, +}; + +static struct soc_camera_link ov5640_iclink = { + .bus_id = -1, /* This must match the .id of tegra_vi01_device */ + .board_info = &cardhu_ov5640_camera_i2c_device, + .module_name = "ov5640", + .i2c_adapter_id = PCA954x_I2C_BUS2, + .power = cardhu_ov5640_power, + .priv = &cardhu_ov5640_camera_platform_data, +}; + +static struct platform_device cardhu_ov5640_soc_camera_device = { + .name = "soc-camera-pdrv", + .id = 1, + .dev = { + .platform_data = &ov5640_iclink, + }, +}; +#endif + /* OV5650 V4L2 device */ -#ifdef CONFIG_SOC_CAMERA_OV5650 +#if defined(CONFIG_SOC_CAMERA_OV5650) \ + || defined(CONFIG_SOC_CAMERA_OV5650_MODULE) static int cardhu_left_ov5650_power_on(void); static int cardhu_left_ov5650_power_off(void); -static int cardhu_ov5650_camera_power_enable(struct nvhost_device *ndev) +static int cardhu_ov5650_power(struct device *dev, int enable) { - return cardhu_left_ov5650_power_on(); -} + if (enable) + return cardhu_left_ov5650_power_on(); + else + cardhu_left_ov5650_power_off(); -static void cardhu_ov5650_camera_power_disable(struct nvhost_device *ndev) -{ - cardhu_left_ov5650_power_off(); + return 0; } static struct i2c_board_info cardhu_ov5650_camera_i2c_device = { I2C_BOARD_INFO("ov5650", 0x36), }; +static struct tegra_camera_platform_data cardhu_ov5650_camera_platform_data = { + .flip_v = 0, + .flip_h = 0, + .port = TEGRA_CAMERA_PORT_CSI_A, + .lanes = 2, + .continuous_clk = 1, +}; + static struct soc_camera_link ov5650_iclink = { .bus_id = -1, /* This must match the .id of tegra_vi01_device */ .board_info = &cardhu_ov5650_camera_i2c_device, .module_name = "ov5650", .i2c_adapter_id = PCA954x_I2C_BUS0, + .power = cardhu_ov5650_power, + .priv = &cardhu_ov5650_camera_platform_data, }; static struct platform_device cardhu_ov5650_soc_camera_device = { @@ -117,16 +179,6 @@ static struct platform_device cardhu_ov5650_soc_camera_device = { .platform_data = &ov5650_iclink, }, }; - -static struct tegra_camera_platform_data cardhu_ov5650_camera_platform_data = { - .enable_camera = cardhu_ov5650_camera_power_enable, - .disable_camera = cardhu_ov5650_camera_power_disable, - .flip_v = 0, - .flip_h = 0, - .port = TEGRA_CAMERA_PORT_CSI_A, - .lanes = 2, - .continuous_clk = 1, -}; #endif static int cardhu_camera_init(void) @@ -181,19 +233,12 @@ static int cardhu_camera_init(void) return 0; } +#if defined(CONFIG_VIDEO_OV5650) || \ + defined(CONFIG_VIDEO_OV5650_MODULE) || \ + defined(CONFIG_SOC_CAMERA_OV5650) || \ + defined(CONFIG_SOC_CAMERA_OV5650_MODULE) static int cardhu_left_ov5650_power_on(void) { - - if (cardhu_supply_csi == NULL) { - cardhu_supply_csi = regulator_get(NULL, "avdd_dsi_csi"); - if (WARN_ON(IS_ERR(cardhu_supply_csi))) { - pr_err("%s: couldn't get regulator avdd_dsi_csi: %ld\n", - __func__, PTR_ERR(cardhu_supply_csi)); - goto reg_alloc_fail; - } - } - regulator_enable(cardhu_supply_csi); - /* Boards E1198 and E1291 are of Cardhu personality * and donot have TCA6416 exp for camera */ if ((board_info.board_id == BOARD_E1198) || @@ -251,10 +296,6 @@ reg_alloc_fail: regulator_put(cardhu_vdd_2v8_cam1); cardhu_vdd_2v8_cam1 = NULL; } - if (cardhu_supply_csi) { - regulator_put(cardhu_supply_csi); - cardhu_supply_csi = NULL; - } return -ENODEV; @@ -275,11 +316,10 @@ static int cardhu_left_ov5650_power_off(void) regulator_disable(cardhu_1v8_cam1); if (cardhu_vdd_2v8_cam1) regulator_disable(cardhu_vdd_2v8_cam1); - if (cardhu_supply_csi) - regulator_disable(cardhu_supply_csi); return 0; } +#endif #if defined(CONFIG_VIDEO_OV5650) || defined(CONFIG_VIDEO_OV5650_MODULE) struct ov5650_platform_data cardhu_left_ov5650_data = { @@ -551,7 +591,6 @@ static int cardhu_ov5640_power_on(void) (board_info.board_id == BOARD_E1291) || (board_info.board_id == BOARD_PM315)) { - gpio_direction_output(CAM1_POWER_DWN_GPIO, 0); gpio_direction_output(CAM2_POWER_DWN_GPIO, 0); gpio_direction_output(CAM3_POWER_DWN_GPIO, 0); mdelay(10); @@ -604,7 +643,6 @@ static int cardhu_ov5640_power_off(void) if ((board_info.board_id == BOARD_E1198) || (board_info.board_id == BOARD_E1291) || (board_info.board_id == BOARD_PM315)) { - gpio_direction_output(CAM1_POWER_DWN_GPIO, 1); gpio_direction_output(CAM2_POWER_DWN_GPIO, 1); gpio_direction_output(CAM3_POWER_DWN_GPIO, 1); } @@ -817,10 +855,12 @@ static struct i2c_board_info cardhu_i2c8_board_info[] = { I2C_BOARD_INFO("ov2710", 0x36), .platform_data = &cardhu_ov2710_data, }, +#if defined(CONFIG_VIDEO_OV5640) || defined(CONFIG_VIDEO_OV5640_MODULE) { I2C_BOARD_INFO("ov5640", 0x3C), .platform_data = &cardhu_ov5640_data, }, +#endif }; static int nct_get_temp(void *_data, long *temp) @@ -1213,11 +1253,15 @@ int __init cardhu_sensors_init(void) if (board_info.board_id != BOARD_PM315) mpuirq_init(); -#ifdef CONFIG_SOC_CAMERA_OV5650 - t30_get_tegra_vi01_device()->dev.platform_data = - &cardhu_ov5650_camera_platform_data; +#if defined(CONFIG_SOC_CAMERA_OV5650) \ + || defined(CONFIG_SOC_CAMERA_OV5650_MODULE) platform_device_register(&cardhu_ov5650_soc_camera_device); #endif +#if defined(CONFIG_SOC_CAMERA_OV5640) \ + || defined(CONFIG_SOC_CAMERA_OV5640_MODULE) + platform_device_register(&cardhu_ov5640_soc_camera_device); +#endif + return 0; } -- cgit v1.2.3 From dd9a841da571a41d43f1eeaac1785b2adb1d80f3 Mon Sep 17 00:00:00 2001 From: Vikram Fugro Date: Wed, 30 Oct 2013 13:23:40 +0530 Subject: media: camera config changes - Disables TEGRA_CAMERA - Enables SOC_CAMERA and OV5640 sensor support Bug 1369083 Change-Id: I073c226e9f04a6f4f4699051f624a755dceb36cb Signed-off-by: Vikram Fugro Reviewed-on: http://git-master/r/309491 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro --- arch/arm/configs/tegra3_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/configs/tegra3_defconfig b/arch/arm/configs/tegra3_defconfig index 9f212bbad50b..207c5e5771dc 100644 --- a/arch/arm/configs/tegra3_defconfig +++ b/arch/arm/configs/tegra3_defconfig @@ -324,7 +324,10 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y # CONFIG_TEGRA_AVP is not set # CONFIG_TEGRA_MEDIASERVER is not set CONFIG_TEGRA_NVAVP=y -CONFIG_VIDEO_OV5650=m +#CONFIG_VIDEO_OV5650 is not set +CONFIG_SOC_CAMERA=y +CONFIG_VIDEO_TEGRA=y +CONFIG_SOC_CAMERA_OV5640=y CONFIG_VIDEO_OV2710=m CONFIG_TORCH_SSL3250A=m CONFIG_TORCH_TPS61050=m -- cgit v1.2.3 From 2cfae82f4f11691c291c85f9d4ff2ec73ea74e57 Mon Sep 17 00:00:00 2001 From: Vikram Fugro Date: Thu, 7 Nov 2013 01:44:29 -0800 Subject: Revert "media: camera config changes" This reverts commit dd9a841da571a41d43f1eeaac1785b2adb1d80f3. The config changes (for V4L2) can be done manually as per need basis for V4L2, followed by compiling the kernel. Change-Id: I9174bce0f3da2974ab703b238dfb8fb3bbf607c5 Signed-off-by: Vikram Fugro Reviewed-on: http://git-master/r/327607 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Kaustubh Purandare Reviewed-by: Winnie Hsu Reviewed-by: Matthew Pedro --- arch/arm/configs/tegra3_defconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/configs/tegra3_defconfig b/arch/arm/configs/tegra3_defconfig index 207c5e5771dc..9f212bbad50b 100644 --- a/arch/arm/configs/tegra3_defconfig +++ b/arch/arm/configs/tegra3_defconfig @@ -324,10 +324,7 @@ CONFIG_VIDEO_HELPER_CHIPS_AUTO=y # CONFIG_TEGRA_AVP is not set # CONFIG_TEGRA_MEDIASERVER is not set CONFIG_TEGRA_NVAVP=y -#CONFIG_VIDEO_OV5650 is not set -CONFIG_SOC_CAMERA=y -CONFIG_VIDEO_TEGRA=y -CONFIG_SOC_CAMERA_OV5640=y +CONFIG_VIDEO_OV5650=m CONFIG_VIDEO_OV2710=m CONFIG_TORCH_SSL3250A=m CONFIG_TORCH_TPS61050=m -- cgit v1.2.3 From 82685ba23c803d10f678f25e92ca62aa575d24d9 Mon Sep 17 00:00:00 2001 From: Shreshtha Sahu Date: Fri, 22 Nov 2013 12:11:10 +0530 Subject: ARM: tegra: make SKU 0x81 same as 0xB1 for tegra3 SKU 0x81 is identical to 0xB1 so same can be used for sku to speedo ID conversion. Bug 1313434 Change-Id: I63f08522878524a05c2a6fb0a82fee90a59a99bd Signed-off-by: Shreshtha Sahu Reviewed-on: http://git-master/r/334396 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty Reviewed-by: Matthew Pedro --- arch/arm/mach-tegra/tegra3_speedo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/tegra3_speedo.c b/arch/arm/mach-tegra/tegra3_speedo.c index 2889f656f47a..b91135c5634d 100644 --- a/arch/arm/mach-tegra/tegra3_speedo.c +++ b/arch/arm/mach-tegra/tegra3_speedo.c @@ -1,7 +1,7 @@ /* * arch/arm/mach-tegra/tegra3_speedo.c * - * Copyright (c) 2011-2012, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2011-2013, NVIDIA Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -198,6 +198,7 @@ static void rev_sku_to_speedo_ids(int rev, int sku) break; case 0x81: /* T30 */ + case 0xb1: switch (package_id) { case 1: /* MID => T30 */ cpu_speedo_id = 2; @@ -303,7 +304,6 @@ static void rev_sku_to_speedo_ids(int rev, int sku) case 0x91: /* T30AGS-Ax */ case 0xb0: /* T30IQS-Ax */ - case 0xb1: /* T30MQS-Ax */ case 0x90: /* T30AQS-Ax */ soc_speedo_id = 3; threshold_index = 12; @@ -473,7 +473,6 @@ void tegra_init_speedo_data(void) if (cpu_process_id <= 2) { switch(fuse_sku) { case 0xb0: - case 0xb1: cpu_speedo_id = 9; break; case 0x90: @@ -485,7 +484,6 @@ void tegra_init_speedo_data(void) } else if (cpu_process_id >= 3 && cpu_process_id < 6) { switch(fuse_sku) { case 0xb0: - case 0xb1: cpu_speedo_id = 10; break; case 0x90: -- cgit v1.2.3