From patchwork Tue Aug 22 21:05:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brandon Martin X-Patchwork-Id: 804664 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xcNZc08Blz9sRq for ; Wed, 23 Aug 2017 07:13:28 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751613AbdHVVN0 (ORCPT ); Tue, 22 Aug 2017 17:13:26 -0400 Received: from mxord1.mothictech.com ([99.198.117.115]:41487 "EHLO mxord1.mothictech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbdHVVN0 (ORCPT ); Tue, 22 Aug 2017 17:13:26 -0400 X-Greylist: delayed 456 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Aug 2017 17:13:25 EDT Received: from wish.monmotha.net (ipv6-alt.wish.monmotha.net [IPv6:2001:470:c5f2:1::1]) by mxord1.mothictech.com (Postfix) with ESMTPS id A2FA140096 for ; Tue, 22 Aug 2017 16:05:48 -0500 (CDT) Received: from [IPv6:2001:470:c5f2:131:225:90ff:fed8:6d9e] (unknown [IPv6:2001:470:c5f2:131:225:90ff:fed8:6d9e]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by wish.monmotha.net (Postfix) with ESMTPSA id E384A254477 for ; Tue, 22 Aug 2017 17:05:47 -0400 (EDT) Subject: [PATCH 1/2] rtc: v3020: Add documentation for DT bindings From: Brandon Martin To: devicetree@vger.kernel.org References: Organization: Mothic Technologies Message-ID: <660fa006-4f91-2fb5-ef98-ba0482e1ecff@mothictech.com> Date: Tue, 22 Aug 2017 17:05:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Document the DT bindings for the rtc-v3020 driver. MMIO and GPIO attachment modes are both supported via DT. Signed-off-by: Brandon Martin --- .../devicetree/bindings/rtc/rtc-v3020.txt | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/rtc-v3020.txt diff --git a/Documentation/devicetree/bindings/rtc/rtc-v3020.txt b/Documentation/devicetree/bindings/rtc/rtc-v3020.txt new file mode 100644 index 000000000000..8b32e6a79960 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/rtc-v3020.txt @@ -0,0 +1,38 @@ + EM Micro v3020 RTC +~~~~~~~~~~~~~~~~~~~~ + +Required properties: + - compatible : "emmicro,v3020" + +Required for MMIO connection: + - reg : should contain registers location and length. + +Required for GPIO connection: +- emmicro,use-gpio +- cs-gpios, wr-gpios, rd-gpios, io-gpios : specify gpios connected to + corresponding pins of the RTC + +Optional properties: +- emmicro,mmio-left-shift : data bit to which IO line is connected for MMIO + connection (defaults to 0) + +MMIO Example: + + rtc@70 { + ompatible = "emmicro,v3020"; + reg = <1 0x70 1>; + emmicro,mmio-left-shift = <16>; /* IO connected to D16 */ + }; + + +GPIO Example: + + rtc { + compatible = "emmicro,v3020"; + + emmicro,use-gpio; + cs-gpios = <&gpio2 3 0>; + wr-gpios = <&gpio2 4 0>; + rd-gpios = <&gpio2 5 0>; + io-gpios = <&gpio2 6 0>; + };