From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECDBAC55175 for ; Mon, 3 Aug 2026 09:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=n0aB7qGBLZyAd1fXd3wTUVGSroPtec55ZWHXPynR+mg=; b=maj4TMhqdjcEe6YtPie+cxcYxx psKrZv0X3rINc675o3xn9QUj2ET/wZLAy1rkv7asQncdT9w+Bbmh6RPjaSNQ2I3klFMzvfgy1jYaJ XL19AfCKhFx8blPNUvryqBN6u+E9dHmNyJyxuYGoGYJirxriAqET1qMgey6yjIBGTq3POXquo/VL9 nY6m0yjFkUcSVmIq7oGBQf2sVk74A6Yzdso4cP8Xmy7Z+WEsM6TNpnSErIQl6undbEd3Z7JOIpwx8 pm2uEDgwwYwgYI8iWGKWWrx+smDFBioAXtPhVMZbFLRb2IT+jpGzko1AoBINCuN/dCV+D6nRQysk7 7OkY44PQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wqpP3-0000000GlJt-3AdC; Mon, 03 Aug 2026 09:56:13 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wqpP2-0000000GlJk-3Hbu for linux-arm-kernel@lists.infradead.org; Mon, 03 Aug 2026 09:56:12 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 09A1C43856; Mon, 3 Aug 2026 09:56:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2C491F000E9; Mon, 3 Aug 2026 09:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785750971; bh=n0aB7qGBLZyAd1fXd3wTUVGSroPtec55ZWHXPynR+mg=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=g9TJgROjkZFESO6T8yl5X6xkRwQmBwdIoX748rbmcVPRlawHMV/F2UO11mBC/e9TU Pr0vbB5es1YS11qONg8QWpT5WnTq1oVjPUqBULbZoK08477uJjbN2VMfQy3BnVi5Fe sSqbhPqf3CGO6u6nC4h2HmTB2S3ynRgFua+RMIRhIq3j3+lWlagvSliEM1eYzLf5G/ BC7vXII39Oz8ucBxOp1FGwdt9EwuNvR6a97O38tYp38rp4iF1ohnZ7JlxSgMnGGPPn ftU8r3QAzJINM5RqbuydnlR2g0yntS29vo/2fe2VCLXoLjFDrtb0JCKFPXvIJHB2se rfeVWu9PDon9A== Date: Mon, 3 Aug 2026 11:56:07 +0200 From: Krzysztof Kozlowski To: Markus Probst Cc: Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Michael Langer , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/5] dt-bindings: rtc: Add pinctrl for S35390A Message-ID: <20260803-mottled-pretty-sloth-bf7dbd@quoll> References: <20260801-rtc_s35390a_int1-v2-0-f10c99ad1d6c@posteo.de> <20260801-rtc_s35390a_int1-v2-1-f10c99ad1d6c@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260801-rtc_s35390a_int1-v2-1-f10c99ad1d6c@posteo.de> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Aug 01, 2026 at 06:43:00PM +0000, Markus Probst wrote: > + wakeup-parent: true > + > + wakeup-source: true > + > +required: > + - compatible > + - reg > + > +patternProperties: This goes after "properties:" block. > + "^pins": > + type: object > + patternProperties: > + "-pins$": > + type: object > + properties: > + pins: > + $ref: /schemas/pinctrl/pinmux-node.yaml#/properties/pins > + > + sii,mode: > + $ref: /schemas/types.yaml#/definitions/uint32 Use simple string. See pinmux bindings. > + description: | > + Modes for the specific pin: > + - S35390A_MODE_IGNORE: Preserve the previous state. > + - S35390A_MODE_DISABLE: Disable all interrupts. > + - S35390A_MODE_WAKEUP: Used for waking up the system. > + - S35390A_MODE_ALARM: Userspace defined alarm. > + - S35390A_MODE_FREQ: Periodical at configurable frequency. > + - S35390A_MODE_PMIN1: Minute periodical output with 50% duty. > + - S35390A_MODE_PMIN2: Minute periodical output L for 7.81 ms. > + Can only be used with pin INT1. > + - S35390A_MODE_32768KHZ: Raw 32.768 kHz output. > + Can only be used with pin INT1. > + minimum: 0 > + maximum: 7 > + > + sii,frequency: Frequency needs -hz, but anyway if this is becoming a clock, then you must have clocks property and this is simply not needed... unless this is some periodical wakeup call, not a clock? Then simply -hz and property must be more descriptive (frequency of what? pulse?). > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Frequency in Hz to be used with mode S35390A_MODE_FREQ. > + minimum: 1 > + maximum: 31 > + > + required: > + - sii,mode > + > + if: > + properties: > + sii,mode: > + const: 4 > + then: > + required: > + - sii,frequency > + else: > + properties: > + sii,frequency: false > + > + additionalProperties: false > + > + additionalProperties: false > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + rtc: rtc@30 { Drop unused label > + compatible = "sii,s35390a"; > + reg = <0x30>; > + pinctrl-0 = <&rtc_pins_default>; > + pinctrl-names = "default"; > + > + wakeup-parent = <&int>; > + > + rtc_pins_default: pins { > + int1-pins { > + pins = S35390A_PIN_INT1; > + sii,mode = ; > + }; > + int2-pins { > + pins = S35390A_PIN_INT2; > + sii,mode = ; > + }; > + }; > + }; > + }; > diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml > index f4d0eed98a08..7b3f682ef4d5 100644 > --- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml > +++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml > @@ -81,8 +81,6 @@ properties: > - ricoh,rv5c386 > # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC > - ricoh,rv5c387a > - # 2-wire CMOS real-time clock > - - sii,s35390a > # ST SPEAr Real-time Clock > - st,spear600-rtc > # VIA/Wondermedia VT8500 Real-time Clock > @@ -105,5 +103,4 @@ required: > - reg > > additionalProperties: false > - > ... > diff --git a/MAINTAINERS b/MAINTAINERS > index 716acfc3d7c1..c85be1eefdb1 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -22696,6 +22696,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git > F: Documentation/admin-guide/rtc.rst > F: Documentation/devicetree/bindings/rtc/ > F: drivers/rtc/ > +F: include/dt-bindings/rtc/ > F: include/linux/rtc.h > F: include/linux/rtc/ > F: include/uapi/linux/rtc.h > diff --git a/include/dt-bindings/rtc/s35390a.h b/include/dt-bindings/rtc/s35390a.h > new file mode 100644 > index 000000000000..dcd0ca15f9e9 > --- /dev/null > +++ b/include/dt-bindings/rtc/s35390a.h > @@ -0,0 +1,23 @@ > +/* SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) */ > + > +#ifndef __DT_BINDINGS_RTC_S35390A_H > +#define __DT_BINDINGS_RTC_S35390A_H > + > +#define S35390A_MODE_IGNORE 0x0 > +#define S35390A_MODE_DISABLE 0x1 > +#define S35390A_MODE_WAKEUP 0x2 > +#define S35390A_MODE_ALARM 0x3 > +#define S35390A_MODE_FREQ 0x4 > +#define S35390A_MODE_PMIN1 0x5 > +#define S35390A_MODE_PMIN2 0x6 > +#define S35390A_MODE_32768KHZ 0x7 > + > +#define S35390A_MODE_INT1_MAX 0x7 > +#define S35390A_MODE_INT2_MAX 0x5 > + > +#define S35390A_FREQ_MASK 0x1F don't get why this grew. None of these look like bindings. > + > +#define S35390A_PIN_INT1 "int1" > +#define S35390A_PIN_INT2 "int2" Drop entire header. > + > +#endif /* __DT_BINDINGS_RTC_S35390A_H */ > > -- > 2.54.0 >