Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5404082ybe; Tue, 17 Sep 2019 07:34:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2Wj7Im0qjPh7LRKPcsoKZ4rEgCBfP88SDdeqZH3IoPxQWa7rasyonFc32cd/Nt4T6gAiA X-Received: by 2002:a50:ce53:: with SMTP id k19mr4987361edj.2.1568730885619; Tue, 17 Sep 2019 07:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568730885; cv=none; d=google.com; s=arc-20160816; b=mwO6QjYl7AQLGez+FxLz7YUzFxprJ2qrP7mhq6XXEcJicz3Y5VWRDD9quuPKRUD5cu rM8PRuUxP3tzjRgvaGyeTCY4rs1ZyK60arE4IwcFWnxT5a0P0AQR+XLNeYrR2qppqCG6 rsAWxbTyA0mQdDBto20XBilmNeUn3xpwEhbfUdhtFvjL5tLrO1kUORUOXb3q1wiMR+3z 98NqLtfbF+gkFrWgrP8u+vILT6Lc2DnzWh0oSaQflfEz2uxznTaElFO3IG6DcqiS9yxc 90CUkzFoCGKr2Q0y8Dy/jEMe1wBKzp4Sc9cFkeybuXYUXAeQjxh+2hfHmivAgCqVinHu LqkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=lffzSN0kQI6c+ARqILv8Azbrh4v5IES2btJoToUkH4I=; b=SmZdJWalN+11ikAmCBjw5gwywlb58OM+C/a4wCC8Y8mtCUZ6CpEb94fugtulv9HGlM u7QMFu8cUOR4yuZF2dyRI+8hbkMRBqNC++bE9Mko58Buhr5rg21r68qQqhy28utIDSPd +GCTo/cJOFBF7mc3flLhqYaNdme6Dc0q0YzpR8ki7NR+VSqpR853X+d0SLd5pUgWOOMK abiqlk0u1UQaHb3lto63MpAF5Rbbl/egTMRYCUAS4z7rPcSYSqaSLDnOJ/DD70FnYDaJ L9fk7qjiZibQucJxag9PYtateUtOUjpBiOSQobysWPJkZ70M67fat+r1wEuebvmbRFMm J4iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FMmkBmxC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si1242740ejp.347.2019.09.17.07.34.20; Tue, 17 Sep 2019 07:34:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FMmkBmxC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390986AbfIQBNT (ORCPT + 99 others); Mon, 16 Sep 2019 21:13:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:35164 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390703AbfIQBNT (ORCPT ); Mon, 16 Sep 2019 21:13:19 -0400 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0497C214D9; Tue, 17 Sep 2019 01:13:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568682798; bh=0Jj0ktCFmYGyjaVUlwUqQ0RP1WWgHi1nZHfaZalsFFM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FMmkBmxC3EA5LqT65REpwgkPz7s0+QqiQ/TxvARVos0Yy1DLiMKIgifI+3O6POG3U 8VakYmZrGheycO9jVFO9Pukp4TEga1USGqocsEDE/hfexrYIMMJ9tOA1x+9MhtxQY8 QZ++CWByN9OMjaVWwNP2xia7PrHXr00ShaDYQYus= Received: by mail-qk1-f176.google.com with SMTP id q203so2123951qke.1; Mon, 16 Sep 2019 18:13:17 -0700 (PDT) X-Gm-Message-State: APjAAAXR/k/lxVtNchTYgWeb72SWVW+uHZ1qDcnFQfQZzCqkiJVh9k1A Ic9EcxyTefUDm/rvm2zR9kIFXbz4lYxpgnE7QQ== X-Received: by 2002:a37:be87:: with SMTP id o129mr1294180qkf.254.1568682797178; Mon, 16 Sep 2019 18:13:17 -0700 (PDT) MIME-Version: 1.0 References: <20190910104247.13142-1-biwen.li@nxp.com> In-Reply-To: <20190910104247.13142-1-biwen.li@nxp.com> From: Rob Herring Date: Mon, 16 Sep 2019 20:13:06 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v4,1/2] dt-bindings: rtc: pcf85263/pcf85363: add some properties To: Biwen Li Cc: Alessandro Zummo , Alexandre Belloni , Mark Rutland , Yang-Leo Li , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, Martin Fuzzey Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 10, 2019 at 5:53 AM Biwen Li wrote: > > Add some properties for pcf85263/pcf85363 as follows: > - nxp,rtc-interrupt-type: integer type > - nxp,rtc-interrupt-output-pin: string type > - quartz-load-femtofarads: integer type > - nxp,quartz-drive-strength: integer type > - nxp,quartz-low-jitter: bool type > - wakeup-source: bool type > > Signed-off-by: Martin Fuzzey > Signed-off-by: Biwen Li > --- > Change in v4: > - Drop robust defines in include/dt-bindings/rtc/pcf85363.h > - Add nxp,rtc-interrupt-type property > - Replace interrupt-output-pin with nxp,rtc-interrupt-output-pin > > Change in v3: > - None > > Change in v2: > - Replace properties name > quartz-load-capacitance -> quartz-load-femtofarads > quartz-drive-strength -> nxp,quartz-drive-strength > quartz-low-jitter -> nxp,quartz-low-jitter > - Replace drive strength name > PCF85263_QUARTZDRIVE_NORMAL -> PCF85263_QUARTZDRIVE_100ko > PCF85263_QUARTZDRIVE_LOW -> PCF85263_QUARTZDRIVE_60ko > PCF85263_QUARTZDRIVE_HIGH -> PCF85263_QUARTZDRIVE_500ko > - Set default interrupt-output-pin as "INTA" > > .../devicetree/bindings/rtc/pcf85363.txt | 44 ++++++++++++++++++- > include/dt-bindings/rtc/pcf85363.h | 14 ++++++ > 2 files changed, 57 insertions(+), 1 deletion(-) > create mode 100644 include/dt-bindings/rtc/pcf85363.h > > diff --git a/Documentation/devicetree/bindings/rtc/pcf85363.txt b/Documentation/devicetree/bindings/rtc/pcf85363.txt > index 94adc1cf93d9..fc1579463657 100644 > --- a/Documentation/devicetree/bindings/rtc/pcf85363.txt > +++ b/Documentation/devicetree/bindings/rtc/pcf85363.txt > @@ -8,10 +8,52 @@ Required properties: > Optional properties: > - interrupts: IRQ line for the RTC (not implemented). > > +- nxp,rtc-interrupt-type: integer property, represent the interrupt's > + type. Valid values are > + INT_PIE(periodic interrupt enable), > + INT_OIE(offset correction interrupt enable), > + INT_A1IE(alarm1 interrupt enable), > + INT_A2IE(alarm2 interrupt enable), > + INT_TSRIE(timestamp register interrupt enable) > + INT_BSIE(battery switch interrupt enable), > + INT_WDIE(WatchDog interrupt enable,and > + compose these values such as: INT_A1IE | INT_A2IE, > + but currently only support INT_A1IE, default value is INT_A1IE. > + The property and property nxp,rtc-interrupt-output-pin > + work together to generate some interrupts on some pins. > + > +- nxp,rtc-interrupt-output-pin: The interrupt output pin must be > + "INTA" or "INTB", default value is "INTA". The property and property > + nxp,rtc-interrupt-type work together to generate some interrupts on > + some pins. > + > +- quartz-load-femtofarads: The internal capacitor to select for the quartz, > + expressed in femto Farad (fF). Valid values are 6000, 7000 and 12500. > + Default value is 12500fF. > + > +- nxp,quartz-drive-strength: Drive strength for the quartz, > + expressed in kilo ohms (kOhm) Valid values are 60, 100 and 500. > + Default value is 100kOhm. This needs a unit as defined in property-units.txt. > + > +- nxp,quartz-low-jitter: Boolean property, if present enables low jitter mode > + which reduces jitter at the cost of increased power consumption. > + > +- wakeup-source: Boolean property, Please refer to > + Documentation/devicetree/bindings/power/wakeup-source.txt > + > Example: > > pcf85363: pcf85363@51 { > compatible = "nxp,pcf85363"; > reg = <0x51>; > -}; > > + interrupt-parent = <&gpio1>; > + interrupts = <18 IRQ_TYPE_EDGE_FALLING>; > + > + wakeup-source; > + nxp,rtc-interrupt-output-pin = "INTA"; > + nxp,rtc-interrupt-type = ; > + quartz-load-femtofarads = <12500>; > + nxp,quartz-drive-strength = <60>; > + nxp,quartz-low-jitter; > +}; > diff --git a/include/dt-bindings/rtc/pcf85363.h b/include/dt-bindings/rtc/pcf85363.h > new file mode 100644 > index 000000000000..6340bf2da8f5 > --- /dev/null > +++ b/include/dt-bindings/rtc/pcf85363.h > @@ -0,0 +1,14 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _DT_BINDINGS_RTC_PCF85363_H > +#define _DT_BINDINGS_RTC_PCF85363_H > + > +/* Interrupt type */ > +#define INT_WDIE (1 << 0) > +#define INT_BSIE (1 << 1) > +#define INT_TSRIE (1 << 2) > +#define INT_A2IE (1 << 3) > +#define INT_A1IE (1 << 4) > +#define INT_OIE (1 << 5) > +#define INT_PIE (1 << 6) > + > +#endif /* _DT_BINDINGS_RTC_PCF85363_H */ > -- > 2.17.1 >