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: 1449961 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 974E8E0000 for ; Thu, 13 Sep 2012 03:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755044Ab2IMDLO (ORCPT ); Wed, 12 Sep 2012 23:11:14 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:55644 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754867Ab2IMDKv (ORCPT ); Wed, 12 Sep 2012 23:10:51 -0400 Received: by pbbrr13 with SMTP id rr13so3269548pbb.19 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=LvYQegFpp/wbWf6TmWs5iYFUwabkEZ4vrSxjZEEYbj8ANXgJBqSrwh8hLZZj2ElsM8 pk31aBBPgM7Dlc7DJ+pyKlfV9jfcR9q14ETzOKmLJKag1Iik9ixf1NLsfRZQu6u91YSA 2/4EHNPD3+ISSMcZ1FWSLFojbXmosdvIUBf3U89mDbtsrVHEnjKsjPlIr0xm2RSJ5AGj xwJcBPmVg+2TtpO8I2AKN2xEfOib4uJthJKxLNmtIq01E7pUBV5f4jZFX2unUF8CO69Y tbwqp1JwBgi9pxu/We+u8nUsQ6l4P+33wMeuUXZDEftfvW0yY5pBpGCSKi10RdfQkBrz 9q1Q== 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 Cc: linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nobuhiro Iwamatsu 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: ALoCoQmIekODp5mozBzXSHk3Ahp268AWWuif/Opolu03kXU19pLRNi+eGGNznoRJFplHTvIvvPrc Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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();