From patchwork Thu Sep 13 03:10:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nobuhiro Iwamatsu X-Patchwork-Id: 1450031 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (unknown [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 672E23FE79 for ; Thu, 13 Sep 2012 03:38:13 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TBzpQ-00012V-U6; Thu, 13 Sep 2012 03:10:57 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TBzpM-00012I-Ou for linux-arm-kernel@lists.infradead.org; Thu, 13 Sep 2012 03:10:53 +0000 Received: by pbbrq8 with SMTP id rq8so3496268pbb.36 for ; Wed, 12 Sep 2012 20:10:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=pmwREB6NBhVVijrTACAkziBA5wnjL9fk9r+lcVqyVvM=; b=idC/VkyjLWluPzBb2hTOTJvnvMwx7lPgS6x4YqL1ilO7uPUKuXrje6RUqYEXTSdRGc iIU9TfOPmEthvyXwEtPuqoGQZtiXOrEhSGhlvHuddR9lKLirmBz9fv86SHeoEgSXNCRV ZkZWZFWA0tX3dnGTX8EMWbC1Up8YjdXeKaPzM/ClmEBcnMMa+jmTe7I5wqyiVvOPxg+3 mIxNv33tocBnCBCIf5Gmz1C0cuwYl3NUSCFQWKteg3/w4Ree6maX+EqM1H1bYrv2lyRT R1+1TuSBEn/PvlsUxfeC2EIQWLrXYAYeufvq3riRqpcwvDh/yrbGXNmf3dW/lQRVaAbV fxCw== Received: by 10.68.213.138 with SMTP id ns10mr2308379pbc.157.1347505851318; Wed, 12 Sep 2012 20:10:51 -0700 (PDT) Received: from xps-iwamatsu.renesas.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id pj10sm12383513pbb.46.2012.09.12.20.10.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 20:10:49 -0700 (PDT) From: Nobuhiro Iwamatsu To: horms@verge.net.au Subject: [PATCH] ARM: shmobile: armadillo800eva: Add support RTC Date: Thu, 13 Sep 2012 12:10:41 +0900 Message-Id: <1347505841-8594-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkv6BfaRICefOK1UwHhABrhya4Jsq5s+FZHjpzawVEq+BJCTiFkrE0Jnt8dPQljtiiU3nQI X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Nobuhiro Iwamatsu , linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The armadillo800eva has S35390A which is RTC. This is controlled using I2C of GPIO. This commit supports RTC of armadillo800eva. Signed-off-by: Nobuhiro Iwamatsu --- arch/arm/mach-shmobile/board-armadillo800eva.c | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index cf10f92..81dfb88 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -876,6 +877,21 @@ static struct platform_device fsi_hdmi_device = { }, }; +/* RTC: RTC connects i2c-gpio. */ +static struct i2c_gpio_platform_data i2c_gpio_data = { + .sda_pin = GPIO_PORT208, + .scl_pin = GPIO_PORT91, + .udelay = 5, /* 100 kHz */ +}; + +static struct platform_device i2c_gpio_device = { + .name = "i2c-gpio", + .id = 2, + .dev = { + .platform_data = &i2c_gpio_data, + }, +}; + /* I2C */ static struct i2c_board_info i2c0_devices[] = { { @@ -887,6 +903,13 @@ static struct i2c_board_info i2c0_devices[] = { }, }; +static struct i2c_board_info i2c2_devices[] = { + { + I2C_BOARD_INFO("s35390a", 0x30), + .type = "s35390a", + }, +}; + /* * board devices */ @@ -903,6 +926,7 @@ static struct platform_device *eva_devices[] __initdata = { &fsi_device, &fsi_hdmi_device, &fsi_wm8978_device, + &i2c_gpio_device, }; static void __init eva_clock_init(void) @@ -1173,6 +1197,7 @@ static void __init eva_init(void) #endif i2c_register_board_info(0, i2c0_devices, ARRAY_SIZE(i2c0_devices)); + i2c_register_board_info(2, i2c2_devices, ARRAY_SIZE(i2c2_devices)); r8a7740_add_standard_devices();