Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1579774rwi; Thu, 20 Oct 2022 14:29:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/UIE2ZaTceHGwjghctUitPSsPyXsJNia3zrqHMiWLFV8y248pSBk8mmUxr/ln7KlRWcV6 X-Received: by 2002:a17:907:6d9a:b0:78d:f864:de0e with SMTP id sb26-20020a1709076d9a00b0078df864de0emr13102854ejc.26.1666301370588; Thu, 20 Oct 2022 14:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666301370; cv=none; d=google.com; s=arc-20160816; b=M0KX7l1ZkvZ0ew7k3qIBGtntTQqTWgF8WeYxD8ua9zUYtgCAHrm9xRDZcPycglai1Y dFfQa7Aro2Ee2/fz2cyxPZSj7mDRcKK5jzUldB6znCtqB2UkFeAvb/vgsACZKNX9TNhE pGQJuiOGRYhRHUWtby/WN3lD1zMY39P5gJhN9keP+3vtcVH9E7wkOR0WPVsq0RS4rZQ4 bAAy+sGiwXsLbNdpD3R4Q7L9k8A+1/SKUQUrP1HcY/baHWUuEME+xQIsvMWn10sf2qs5 bqk6QjuRqQLg2So69iNLDgHusl7y/TfNbNDAPvBGMm89GgPpNNXUKuSsXNOdCjQhM8qX ublA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I4LMS7M24fpjh0kpPQ6wTQki84VuHmXWkbDR03Gia6E=; b=vG4BPIdXzC1yPL4WPqcWSAqo00jB+x7NYydlEOuhaJ5j/c7xaYMbgTQf6t5GOAxtF4 gYRLiZYuZJBKrdodRBzWgZT11APGiNTxsCk5c+X3khqdmJKbwOiqMfO1ah72/5+52U1o 9bTuFfOH3/Zzh2WvH1DIH16GTU/T+96lR6wHKPkSYUj+Uy7toyqyPTk/txSvKWQsw80w Ojj53BsR8WWgSc16sbjLGP0HzPwKkT+Hi3l6SXABcc7iW3LPkkB5TR6iRIdLBMMaFCVc 2pZj5cx8B5MMfComHQC4od5SjDhfsCRVghnzxigmBqrlmgPle3oMDmWE6Oqe0LEkNfCS rhgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d7huTAh7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x8-20020a05640226c800b0045be589ca7fsi20354397edd.331.2022.10.20.14.29.04; Thu, 20 Oct 2022 14:29:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d7huTAh7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbiJTVOG (ORCPT + 99 others); Thu, 20 Oct 2022 17:14:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbiJTVOB (ORCPT ); Thu, 20 Oct 2022 17:14:01 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC42421CD76; Thu, 20 Oct 2022 14:13:59 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 131C2100003; Thu, 20 Oct 2022 21:13:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1666300438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I4LMS7M24fpjh0kpPQ6wTQki84VuHmXWkbDR03Gia6E=; b=d7huTAh7uLOSo8nMo7dzpL+0zLckuH1/c/CLaY2BHtCjfzSsFCJ/PjEhgj2L/2nKki3qOI ygkHRiJHyyqCO2V48uv++SuQAzODf0f5L+bEg9ABu79yZLmPfYEvC+BT7TRjKZEu6AI9zy UuXP10bJlwGL6se+a5UGwz/1STX7bLKeIFa6DfDaUyxEOZvfluZQpXsumcjKUjslKkkuoc 1sXc3q3/JJNoKNDpQCOdt0Uz0b6Oz+RlxYR1HMVs+6H++bv2HxFeSgz2hhBwQCOTizu3gs BBQmR+TR/qiRCuhHxlQT67DoKwytuxELo9ll3uqSvWheRTN3teZf5wjDWl5JXA== Date: Thu, 20 Oct 2022 23:13:56 +0200 From: Alexandre Belloni To: Ibrahim Tilki Cc: a.zummo@towertech.it, jdelvare@suse.com, linux@roeck-us.net, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, Zeynep Arslanbenzer Subject: Re: [PATCH 2/2] dt-bindings: rtc: add bindings for max313xx RTCs Message-ID: References: <20221019133910.282-1-Ibrahim.Tilki@analog.com> <20221019133910.282-2-Ibrahim.Tilki@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221019133910.282-2-Ibrahim.Tilki@analog.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/10/2022 16:39:10+0300, Ibrahim Tilki wrote: > Devicetree binding documentation for Analog Devices MAX313XX RTCs > > Signed-off-by: Ibrahim Tilki > Signed-off-by: Zeynep Arslanbenzer > --- > .../devicetree/bindings/rtc/adi,max313xx.yaml | 163 ++++++++++++++++++ > 1 file changed, 163 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/adi,max313xx.yaml > > diff --git a/Documentation/devicetree/bindings/rtc/adi,max313xx.yaml b/Documentation/devicetree/bindings/rtc/adi,max313xx.yaml > new file mode 100644 > index 000000000..1aa491799 > --- /dev/null > +++ b/Documentation/devicetree/bindings/rtc/adi,max313xx.yaml > @@ -0,0 +1,163 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright 2022 Analog Devices Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/rtc/adi,max313xx.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices MAX313XX series I2C RTC driver > + > +maintainers: > + - Ibrahim Tilki > + - Zeynep Arslanbenzer > + > +description: Bindings for the Analog Devices MAX313XX series RTCs. > + > +properties: > + compatible: > + enum: > + - adi,max31328 > + - adi,max31329 > + - adi,max31331 > + - adi,max31334 > + - adi,max31341 > + - adi,max31342 > + - adi,max31343 > + > + reg: > + description: I2C address of the RTC > + items: > + - enum: [0x68, 0x69] > + > + interrupts: > + minItems: 1 > + maxItems: 2 > + > + interrupt-names: > + description: | > + Name of the interrupt pin of the RTC used for IRQ. Not required for > + RTCs that only have single interrupt pin available. Some of the RTCs > + share interrupt pins with clock input/output pins. > + minItems: 1 > + items: > + - enum: [INTA, INTB] > + - enum: [INTA, INTB] > + I don't think this is right, what this is doing is essentially pinmuxing interrupts versus clocks. What happens if you want INTB but this goes directly to a PMIC instead of the SoC? It is not something you can express with your current bindings. > + "#clock-cells": > + description: | > + RTC can be used as a clock source through its clock output pin when > + supplied. > + const: 0 > + > + clocks: > + description: | > + RTC uses this clock for clock input when supplied. Clock has to provide > + one of these four frequencies: 1Hz, 50Hz, 60Hz or 32.768kHz. > + maxItems: 1 > + > + trickle-diode-disable: true > + > + trickle-resistor-ohms: > + description: Enables trickle charger with specified resistor value. > + enum: [3000, 6000, 11000] > + > + wakeup-source: true > + > +additionalProperties: false > + > +allOf: > + - $ref: rtc.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - adi,max31328 > + - adi,max31342 > + > + then: > + properties: > + trickle-diode-disable: false > + trickle-resistor-ohms: false > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - adi,max31328 > + - adi,max31331 > + - adi,max31334 > + - adi,max31343 > + > + then: > + properties: > + clocks: false > + > + - if: > + properties: > + compatible: > + contains: > + enum: > + - adi,max31341 > + - adi,max31342 > + > + then: > + properties: > + reg: > + items: > + - const: 0x69 > + > + else: > + properties: > + reg: > + items: > + - const: 0x68 > + > +required: > + - compatible > + - reg > + > +examples: > + - | > + #include > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + rtc@68 { > + reg = <0x68>; > + compatible = "adi,max31329"; > + clocks = <&clkin>; > + interrupt-parent = <&gpio>; > + interrupts = <26 IRQ_TYPE_EDGE_FALLING>; > + interrupt-names = "INTB"; > + }; > + }; > + - | > + #include > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + rtc@68 { > + reg = <0x68>; > + compatible = "adi,max31331"; > + #clock-cells = <0>; > + interrupt-parent = <&gpio>; > + interrupts = <25 IRQ_TYPE_EDGE_FALLING>, <26 IRQ_TYPE_EDGE_FALLING>; > + interrupt-names = "INTA", "INTB"; > + }; > + }; > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + rtc@69 { > + reg = <0x69>; > + compatible = "adi,max31341"; > + #clock-cells = <0>; > + clocks = <&clkin>; > + }; > + }; > -- > 2.25.1 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com