From: James Wylder Date: Thu, 8 Jul 2010 21:05:36 +0000 (-0700) Subject: [ARM] tegra: stingray: Add mdm6600-ctrl to boardfile X-Git-Tag: firefly_0821_release~9834^2~795 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=70726928d8a6151e74f4e0b7809b100bc630687d;p=firefly-linux-kernel-4.4.55.git [ARM] tegra: stingray: Add mdm6600-ctrl to boardfile Update board-stingray-power.c to nitialize the mdm6600 control driver. Change-Id: I6abb2268dc8138e9f92ee05b7e8ab377d45163ed Signed-off-by: James Wylder --- diff --git a/arch/arm/mach-tegra/board-stingray-pinmux.c b/arch/arm/mach-tegra/board-stingray-pinmux.c index e8ae308aa80a..96fa48b44725 100644 --- a/arch/arm/mach-tegra/board-stingray-pinmux.c +++ b/arch/arm/mach-tegra/board-stingray-pinmux.c @@ -91,8 +91,8 @@ static __initdata struct tegra_pingroup_config stingray_pinmux[] = { {TEGRA_PINGROUP_LM1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_LPP, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_DOWN, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_LPW0, TEGRA_MUX_SPI3, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, - {TEGRA_PINGROUP_LPW1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, - {TEGRA_PINGROUP_LPW2, TEGRA_MUX_SPI3, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, + {TEGRA_PINGROUP_LPW1, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, + {TEGRA_PINGROUP_LPW2, TEGRA_MUX_SPI3, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_LSC0, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_NORMAL}, {TEGRA_PINGROUP_LSC1, TEGRA_MUX_SPI3, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, {TEGRA_PINGROUP_LSCK, TEGRA_MUX_DISPLAYA, TEGRA_PUPD_PULL_UP, TEGRA_TRI_TRISTATE}, diff --git a/arch/arm/mach-tegra/board-stingray-power.c b/arch/arm/mach-tegra/board-stingray-power.c index 746205f97ec4..48a2e36312b6 100644 --- a/arch/arm/mach-tegra/board-stingray-power.c +++ b/arch/arm/mach-tegra/board-stingray-power.c @@ -15,13 +15,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307, USA */ - #include #include #include #include #include #include +#include #include #include #include @@ -33,6 +33,7 @@ #include #include +#include #include #include "board-stingray.h" @@ -634,6 +635,35 @@ static struct i2c_board_info __initdata stingray_i2c_bus4_power_info[] = { }, }; +static struct mdm_ctrl_platform_data mdm_ctrl_platform_data = { + .gpios[MDM_CTRL_GPIO_AP_STATUS_0] = { + TEGRA_GPIO_PC1, MDM_GPIO_DIRECTION_OUT, 0, 0}, + .gpios[MDM_CTRL_GPIO_AP_STATUS_1] = { TEGRA_GPIO_PC6, + MDM_GPIO_DIRECTION_OUT, 0, 0}, + .gpios[MDM_CTRL_GPIO_AP_STATUS_2] = { + TEGRA_GPIO_PQ3, MDM_GPIO_DIRECTION_OUT, 0, 0}, + .gpios[MDM_CTRL_GPIO_BP_STATUS_0] = { + TEGRA_GPIO_PK3, MDM_GPIO_DIRECTION_IN, 0, 0}, + .gpios[MDM_CTRL_GPIO_BP_STATUS_1] = { + TEGRA_GPIO_PK4, MDM_GPIO_DIRECTION_IN, 0, 0}, + .gpios[MDM_CTRL_GPIO_BP_STATUS_2] = { + TEGRA_GPIO_PK2, MDM_GPIO_DIRECTION_IN, 0, 0}, + .gpios[MDM_CTRL_GPIO_BP_RESOUT] = { + TEGRA_GPIO_PS4, MDM_GPIO_DIRECTION_IN, 0, 0}, + .gpios[MDM_CTRL_GPIO_BP_RESIN] = { + TEGRA_GPIO_PZ1, MDM_GPIO_DIRECTION_OUT_NO_DEFAULT, 0, 0}, + .gpios[MDM_CTRL_GPIO_BP_PWRON] = { + TEGRA_GPIO_PS6, MDM_GPIO_DIRECTION_OUT_NO_DEFAULT, 0, 0}, +}; + +static struct platform_device mdm_ctrl_platform_device = { + .name = MDM_CTRL_MODULE_NAME, + .id = -1, + .dev = { + .platform_data = &mdm_ctrl_platform_data, + }, +}; + int __init stingray_power_init(void) { int i; @@ -661,5 +691,10 @@ int __init stingray_power_init(void) i2c_register_board_info(3, stingray_i2c_bus4_power_info, ARRAY_SIZE(stingray_i2c_bus4_power_info)); + for (i = 0; i < MDM_CTRL_NUM_GPIOS; i++) + tegra_gpio_enable(mdm_ctrl_platform_data.gpios[i].number); + + platform_device_register(&mdm_ctrl_platform_device); + return 0; }