Devicetree
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Markus Probst <markus.probst@posteo.de>
Cc: "Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Uwe Kleine-König" <uwe@kleine-koenig.org>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Gregory Clement" <gregory.clement@bootlin.com>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Michael Langer" <michael.brainbug.langer@googlemail.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	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
Date: Mon, 3 Aug 2026 11:56:07 +0200	[thread overview]
Message-ID: <20260803-mottled-pretty-sloth-bf7dbd@quoll> (raw)
In-Reply-To: <20260801-rtc_s35390a_int1-v2-1-f10c99ad1d6c@posteo.de>

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 <dt-bindings/rtc/s35390a.h>
> +
> +    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 = <S35390A_MODE_WAKEUP>;
> +              };
> +              int2-pins {
> +                pins = S35390A_PIN_INT2;
> +                sii,mode = <S35390A_MODE_DISABLE>;
> +              };
> +            };
> +        };
> +    };
> 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
> 

  parent reply	other threads:[~2026-08-03  9:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-01 18:42 [PATCH v2 0/5] rtc: s35390a: Allow use of output pin for interrupt signal 1 for wakealarm Markus Probst
2026-08-01 18:43 ` [PATCH v2 1/5] dt-bindings: rtc: Add pinctrl for S35390A Markus Probst
2026-08-01 18:51   ` sashiko-bot
2026-08-03  9:56   ` Krzysztof Kozlowski [this message]
2026-08-03 23:33     ` Markus Probst
2026-08-04 22:16       ` Alexandre Belloni
2026-08-01 18:43 ` [PATCH v2 2/5] rtc: s35390a: Add missing newline to dev_err Markus Probst
2026-08-01 18:46   ` sashiko-bot
2026-08-01 18:43 ` [PATCH v2 3/5] rtc: s35390a: Fix alarm not disabling Markus Probst
2026-08-01 18:55   ` sashiko-bot
2026-08-01 22:06   ` Alexandre Belloni
2026-08-01 18:43 ` [PATCH v2 4/5] rtc: s35390a: Add pinctrl Markus Probst
2026-08-01 18:58   ` sashiko-bot
2026-08-04 22:20   ` Alexandre Belloni
2026-08-04 22:32     ` Markus Probst
2026-08-01 18:43 ` [PATCH v2 5/5] rtc: s35390a: Add synology quirk Markus Probst
2026-08-01 18:52   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260803-mottled-pretty-sloth-bf7dbd@quoll \
    --to=krzk@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=markus.probst@posteo.de \
    --cc=michael.brainbug.langer@googlemail.com \
    --cc=robh@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=uwe@kleine-koenig.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox