summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangwook Lee <sangwook.lee@linaro.org>2011-10-26 12:06:23 +0100
committerAngus Ainslie <angus.ainslie@linaro.org>2011-11-28 15:17:39 -0700
commite4888c82d3a32e3a73059f029509c99ff07f7e38 (patch)
treea12bd2e59456b27bc3b6db452aef2b4c541b5faa
parent5203344bb9dc558e2170283a8ecb3ad9782ab66e (diff)
ARM: EXYNOS4: Enable Bluetooth on ORIGEN3.1-samsung2
This patch enables Bluetooth support on ORIGEN board. Signed-off-by: Sangwook <sangwook.lee@linaro.org>
-rw-r--r--arch/arm/mach-exynos4/mach-origen.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c
index 11796643ea0c..6251dbfffe8b 100644
--- a/arch/arm/mach-exynos4/mach-origen.c
+++ b/arch/arm/mach-exynos4/mach-origen.c
@@ -23,6 +23,7 @@
#if defined(CONFIG_S5P_MEM_CMA)
#include <linux/cma.h>
#endif
+#include <linux/rfkill-gpio.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -240,6 +241,7 @@ static struct regulator_init_data __initdata max8997_ldo9_data = {
.min_uV = 2800000,
.max_uV = 2800000,
.apply_uV = 1,
+ .always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = {
.disabled = 1,
@@ -284,6 +286,7 @@ static struct regulator_init_data __initdata max8997_ldo14_data = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = 1,
+ .always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = {
.disabled = 1,
@@ -299,6 +302,7 @@ static struct regulator_init_data __initdata max8997_ldo17_data = {
.min_uV = 3300000,
.max_uV = 3300000,
.apply_uV = 1,
+ .always_on = 1,
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
.state_mem = {
.disabled = 1,
@@ -640,6 +644,21 @@ static struct fimg2d_platdata fimg2d_data __initdata = {
};
#endif
+/* Bluetooth rfkill gpio platform data */
+struct rfkill_gpio_platform_data origen_bt_pdata = {
+ .reset_gpio = EXYNOS4_GPX2(2),
+ .shutdown_gpio = -1,
+ .type = RFKILL_TYPE_BLUETOOTH,
+ .name = "origen-bt",
+};
+
+/* Bluetooth Platform device */
+static struct platform_device origen_device_bluetooth = {
+ .name = "rfkill_gpio",
+ .id = -1,
+ .dev.platform_data = &origen_bt_pdata,
+};
+
static struct platform_device *origen_devices[] __initdata = {
&s3c_device_hsmmc2,
&s3c_device_hsmmc0,
@@ -675,6 +694,7 @@ static struct platform_device *origen_devices[] __initdata = {
&origen_lcd_hv070wsa,
&exynos4_device_i2s0,
&samsung_asoc_dma,
+ &origen_device_bluetooth,
};
/* LCD Backlight data */
@@ -688,6 +708,16 @@ static struct platform_pwm_backlight_data origen_bl_data = {
.pwm_period_ns = 1000,
};
+static void __init origen_bt_setup(void)
+{
+ gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
+ /* 4 UART Pins configuration */
+ s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
+ /* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
+ s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
+ s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
+}
+
static void s5p_tv_setup(void)
{
/* Direct HPD to HDMI chip */
@@ -797,6 +827,8 @@ static void __init origen_machine_init(void)
s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
+
+ origen_bt_setup();
}
MACHINE_START(ORIGEN, "ORIGEN")