From patchwork Wed Oct 26 12:48:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sangwook X-Patchwork-Id: 4833 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CA4D123E06 for ; Wed, 26 Oct 2011 12:50:07 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id B642FA18C8C for ; Wed, 26 Oct 2011 12:50:07 +0000 (UTC) Received: by faan26 with SMTP id n26so2109787faa.11 for ; Wed, 26 Oct 2011 05:50:07 -0700 (PDT) Received: by 10.223.77.71 with SMTP id f7mr58837033fak.33.1319633407521; Wed, 26 Oct 2011 05:50:07 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.1.71 with SMTP id 7cs11439lak; Wed, 26 Oct 2011 05:50:07 -0700 (PDT) Received: by 10.204.41.197 with SMTP id p5mr21175327bke.71.1319633406305; Wed, 26 Oct 2011 05:50:06 -0700 (PDT) Received: from mail-fx0-f50.google.com (mail-fx0-f50.google.com [209.85.161.50]) by mx.google.com with ESMTPS id w8si950547fah.56.2011.10.26.05.50.05 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Oct 2011 05:50:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.161.50 is neither permitted nor denied by best guess record for domain of sangwook.lee@linaro.org) client-ip=209.85.161.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.50 is neither permitted nor denied by best guess record for domain of sangwook.lee@linaro.org) smtp.mail=sangwook.lee@linaro.org Received: by faap19 with SMTP id p19so1782097faa.37 for ; Wed, 26 Oct 2011 05:50:05 -0700 (PDT) Received: by 10.223.7.20 with SMTP id b20mr22857090fab.21.1319633405060; Wed, 26 Oct 2011 05:50:05 -0700 (PDT) Received: from localhost.localdomain (host86-183-253-170.range86-183.btcentralplus.com. [86.183.253.170]) by mx.google.com with ESMTPS id k16sm3978284fab.8.2011.10.26.05.50.03 (version=SSLv3 cipher=OTHER); Wed, 26 Oct 2011 05:50:04 -0700 (PDT) From: Sangwook Lee To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, patches@linaro.org, linaro-dev@lists.linaro.org, Sangwook Lee Subject: [PATCH] ARM: EXYNOS4: Enable Bluetooth on ORIGEN Date: Wed, 26 Oct 2011 13:48:00 +0100 Message-Id: <1319633280-17799-1-git-send-email-sangwook.lee@linaro.org> X-Mailer: git-send-email 1.7.4.1 This patch enables Bluetooth support on ORIGEN board. Signed-off-by: Sangwook --- arch/arm/mach-exynos4/mach-origen.c | 32 ++++++++++++++++++++++++++++++++ 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 f80b563..f8c50d7 100644 --- a/arch/arm/mach-exynos4/mach-origen.c +++ b/arch/arm/mach-exynos4/mach-origen.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -232,6 +233,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, @@ -275,6 +277,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, @@ -290,6 +293,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, @@ -588,6 +592,21 @@ static struct s3c_fb_platdata origen_lcd_pdata __initdata = { .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, }; +/* 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, @@ -615,6 +634,7 @@ static struct platform_device *origen_devices[] __initdata = { &exynos4_device_pd[PD_MFC], &origen_device_gpiokeys, &origen_lcd_hv070wsa, + &origen_device_bluetooth, }; /* LCD Backlight data */ @@ -628,6 +648,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 */ @@ -687,6 +717,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")