From: Rob Herring <robh@kernel.org>
To: Paul Cercueil <paul@crapouillou.net>
Cc: "Alessandro Zummo" <a.zummo@towertech.it>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Mark Rutland" <mark.rutland@arm.com>,
od@zcrc.me, 周琰杰 <zhouyanjie@wanyeetech.com>,
linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] dt-bindings: rtc: Convert and update jz4740-rtc doc to YAML
Date: Tue, 10 Mar 2020 15:17:06 -0500 [thread overview]
Message-ID: <20200310201706.GA25562@bogus> (raw)
In-Reply-To: <20200302213953.28834-3-paul@crapouillou.net>
On Mon, Mar 02, 2020 at 06:39:53PM -0300, Paul Cercueil wrote:
> Convert the jz4740-rtc doc to YAML, and update it to reflect the new
> changes in the driver:
> - More compatible strings are specified, with fallbacks if needed,
> - The vendor-specific properties are now properly prefixed with the
> 'ingenic,' prefix.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> .../bindings/rtc/ingenic,jz4740-rtc.txt | 37 --------
> .../devicetree/bindings/rtc/ingenic,rtc.yaml | 87 +++++++++++++++++++
> 2 files changed, 87 insertions(+), 37 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
> create mode 100644 Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
>
> diff --git a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt b/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
> deleted file mode 100644
> index 41c7ae18fd7b..000000000000
> --- a/Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
> +++ /dev/null
> @@ -1,37 +0,0 @@
> -JZ4740 and similar SoCs real-time clock driver
> -
> -Required properties:
> -
> -- compatible: One of:
> - - "ingenic,jz4740-rtc" - for use with the JZ4740 SoC
> - - "ingenic,jz4780-rtc" - for use with the JZ4780 SoC
> -- reg: Address range of rtc register set
> -- interrupts: IRQ number for the alarm interrupt
> -- clocks: phandle to the "rtc" clock
> -- clock-names: must be "rtc"
> -
> -Optional properties:
> -- system-power-controller: To use this component as the
> - system power controller
> -- reset-pin-assert-time-ms: Reset pin low-level assertion
> - time after wakeup (default 60ms; range 0-125ms if RTC clock
> - at 32 kHz)
> -- min-wakeup-pin-assert-time-ms: Minimum wakeup pin assertion
> - time (default 100ms; range 0-2s if RTC clock at 32 kHz)
> -
> -Example:
> -
> -rtc@10003000 {
> - compatible = "ingenic,jz4740-rtc";
> - reg = <0x10003000 0x40>;
> -
> - interrupt-parent = <&intc>;
> - interrupts = <32>;
> -
> - clocks = <&rtc_clock>;
> - clock-names = "rtc";
> -
> - system-power-controller;
> - reset-pin-assert-time-ms = <60>;
> - min-wakeup-pin-assert-time-ms = <100>;
> -};
> diff --git a/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml b/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
> new file mode 100644
> index 000000000000..c18ed8ac263f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
> @@ -0,0 +1,87 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/ingenic,rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ingenic SoCs Real-Time Clock DT bindings
> +
> +maintainers:
> + - Paul Cercueil <paul@crapouillou.net>
> +
> +allOf:
> + - $ref: rtc.yaml#
> +
> +properties:
> + compatible:
> + oneOf:
> + - enum:
> + - ingenic,jz4740-rtc
> + - ingenic,jz4760-rtc
> + - items:
> + - const: ingenic,jz4725b-rtc
> + - const: ingenic,jz4740-rtc
> + - items:
> + - enum:
> + - ingenic,jz4770-rtc
> + - ingenic,jz4780-rtc
> + - const: ingenic,jz4760-rtc
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + const: rtc
> +
> + system-power-controller:
> + description: |
> + Indicates that the RTC is responsible for powering OFF
> + the system.
> + type: boolean
> +
> + ingenic,reset-pin-assert-time-ms:
> + description: |
> + Reset pin low-level assertion time after wakeup
> + (assuming RTC clock at 32 kHz)
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
You can drop this because standard units have a type already.
> + - minimum: 0
> + - maximum: 125
> + - default: 60
And then move all there out of allOf.
> +
> + ingenic,min-wakeup-pin-assert-time-ms:
> + description: |
> + Minimum wakeup pin assertion time
> + (assuming RTC clock at 32 kHz)
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - minimum: 0
> + - maximum: 2000
> + - default: 100
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/jz4740-cgu.h>
> + rtc_dev: rtc@10003000 {
> + compatible = "ingenic,jz4740-rtc";
> + reg = <0x10003000 0x40>;
> +
> + interrupt-parent = <&intc>;
> + interrupts = <15>;
> +
> + clocks = <&cgu JZ4740_CLK_RTC>;
> + clock-names = "rtc";
> + };
> --
> 2.25.1
>
prev parent reply other threads:[~2020-03-10 20:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 21:39 [PATCH 1/3] rtc: jz4740: Add support for JZ4760 SoC Paul Cercueil
2020-03-02 21:39 ` [PATCH 2/3] rtc: jz4740: Rename vendor-specific DT properties Paul Cercueil
2020-03-02 21:39 ` [PATCH 3/3] dt-bindings: rtc: Convert and update jz4740-rtc doc to YAML Paul Cercueil
2020-03-10 20:17 ` Rob Herring [this message]
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=20200310201706.GA25562@bogus \
--to=robh@kernel.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=od@zcrc.me \
--cc=paul@crapouillou.net \
--cc=zhouyanjie@wanyeetech.com \
/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;
as well as URLs for NNTP newsgroup(s).