From patchwork Fri Jun 8 18:56:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 163842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-lpp01m010-f56.google.com (mail-lpp01m010-f56.google.com [209.85.215.56]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 5648CB6FC2 for ; Sat, 9 Jun 2012 04:57:01 +1000 (EST) Received: by lagp5 with SMTP id p5sf874305lag.11 for ; Fri, 08 Jun 2012 11:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:x-virus-scanned:from:to:cc :subject:date:message-id:x-mailer:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=BY2pXqa45WGOfl33d8QavJJPyD5G4lOVwTh2UVi9Sp8=; b=rPVh8W/PlYb4mkYUhHJ6EG5M/yJzWnryDE+tSowd35mxtv2qUG9r9I95p/q0SkxDdv 7O6o8GW/sY5kPb9XOxSqvwbanXYqNnKRV8dFnDVzqUVsgMf/pJdp5Cjfs7txw4XvV7H2 XdRToXlJg55ASnws1SvhhN0coKuAE95oxjbIY= Received: by 10.216.133.229 with SMTP id q79mr190170wei.88.1339181818252; Fri, 08 Jun 2012 11:56:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.180.8.42 with SMTP id o10ls1252566wia.3.canary; Fri, 08 Jun 2012 11:56:56 -0700 (PDT) Received: by 10.216.196.220 with SMTP id r70mr772177wen.11.1339181816872; Fri, 08 Jun 2012 11:56:56 -0700 (PDT) Received: by 10.216.196.220 with SMTP id r70mr772176wen.11.1339181816857; Fri, 08 Jun 2012 11:56:56 -0700 (PDT) Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id e10si575063wiz.3.2012.06.08.11.56.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jun 2012 11:56:56 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of marex@denx.de) client-ip=212.18.0.10; Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3W8CXR1pQXz3hhTp; Fri, 8 Jun 2012 20:56:55 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 3W8CXQ4tq1z4KK2h; Fri, 8 Jun 2012 20:56:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from smtp-auth.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id aH9HJJKMneSh; Fri, 8 Jun 2012 20:56:54 +0200 (CEST) Received: from mashiro.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA; Fri, 8 Jun 2012 20:56:53 +0200 (CEST) From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Alessandro Zummo , devicetree-discuss@lists.ozlabs.org, Grant Likely , Rob Herring , rtc-linux@googlegroups.com, Shawn Guo Subject: [rtc-linux] [PATCH V2] MXS: Add DT binding support into stmp3xxx-rtc Date: Fri, 8 Jun 2012 20:56:44 +0200 Message-Id: <1339181804-22822-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.10 X-Original-Sender: marex@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of marex@denx.de) smtp.mail=marex@denx.de Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Add simple binding for the stmp3xxx-rtc. Signed-off-by: Marek Vasut Cc: Alessandro Zummo Cc: devicetree-discuss@lists.ozlabs.org Cc: Grant Likely Cc: Rob Herring Cc: rtc-linux@googlegroups.com Cc: Shawn Guo Acked-by: Rob Herring Acked-by: Shawn Guo --- .../devicetree/bindings/rtc/stmp3xxx-rtc.txt | 19 +++++++++++++++++++ arch/arm/boot/dts/imx28.dtsi | 1 + drivers/rtc/rtc-stmp3xxx.c | 7 +++++++ 3 files changed, 27 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt V2: Fix typos, remove fsl,imx28-rtc diff --git a/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt new file mode 100644 index 0000000..a7a7de5 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/stmp3xxx-rtc.txt @@ -0,0 +1,19 @@ +* STMP3xxx/i.MX28 Time Clock controller + +Required properties: +- compatible: should be one of the following. + * "fsl,stmp3xxx-rtc" +- reg: physical base address of the controller and length of memory mapped + region. +- interrupts: Two interrupt numbers to the cpu should be specified. First + interrupt number is the rtc tick interrupt and second interrupt number + is the rtc alarm interrupt. The number of cells representing a interrupt + depends on the parent interrupt controller. + +Example: + + rtc@80056000 { + compatible = "fsl,stmp3xxx-rtc"; + reg = <0x80056000 2000>; + interrupts = <28 29>; + }; diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index cabcce8..5053019 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -387,6 +387,7 @@ }; rtc@80056000 { + compatible = "fsl,imx28-rtc", "fsl,stmp3xxx-rtc"; reg = <0x80056000 2000>; interrupts = <28 29>; status = "disabled"; diff --git a/drivers/rtc/rtc-stmp3xxx.c b/drivers/rtc/rtc-stmp3xxx.c index 1028786..3aadb58 100644 --- a/drivers/rtc/rtc-stmp3xxx.c +++ b/drivers/rtc/rtc-stmp3xxx.c @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -265,6 +266,11 @@ static int stmp3xxx_rtc_resume(struct platform_device *dev) #define stmp3xxx_rtc_resume NULL #endif +static const struct of_device_id rtc_dt_ids[] = { + { .compatible = "fsl,stmp3xxx-rtc", }, + { /* sentinel */ } +}; + static struct platform_driver stmp3xxx_rtcdrv = { .probe = stmp3xxx_rtc_probe, .remove = stmp3xxx_rtc_remove, @@ -273,6 +279,7 @@ static struct platform_driver stmp3xxx_rtcdrv = { .driver = { .name = "stmp3xxx-rtc", .owner = THIS_MODULE, + .of_match_table = rtc_dt_ids, }, };