* [PATCH 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
@ 2022-07-21 7:31 Alexander Stein
2022-07-21 8:19 ` Krzysztof Kozlowski
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Stein @ 2022-07-21 7:31 UTC (permalink / raw)
To: Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski
Cc: Alexander Stein, linux-rtc, devicetree
Convert the NXP PCF85063 RTC binding to DT schema format.
Add 'interrupts' and 'wakeup-source' as this device has an interrupt
which was not documented, but is in use.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
checkpath.pl warns about:
WARNING: DT binding docs and includes should be a separate patch. See:
Documentation/devicetree/bindings/submitting-patches.rst
But this seems to be a false positive to me. Includes are not touched at
all.
.../devicetree/bindings/rtc/nxp,pcf85063.txt | 32 --------
.../devicetree/bindings/rtc/nxp,pcf85063.yaml | 76 +++++++++++++++++++
2 files changed, 76 insertions(+), 32 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
deleted file mode 100644
index 217b7cd06c11..000000000000
--- a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-* NXP PCF85063 Real Time Clock
-
-Required properties:
-- compatible: Should one of contain:
- "nxp,pca85073a",
- "nxp,pcf85063",
- "nxp,pcf85063a",
- "nxp,pcf85063tp",
- "microcrystal,rv8263"
-- reg: I2C address for chip.
-
-Optional property:
-- quartz-load-femtofarads: The capacitive load of the quartz(x-tal),
- expressed in femto Farad (fF). Valid values are 7000 and 12500.
- Default value (if no value is specified) is 7000fF.
-
-Optional child node:
-- clock: Provide this if the square wave pin is used as boot-enabled fixed clock.
-
-Example:
-
-pcf85063: rtc@51 {
- compatible = "nxp,pcf85063";
- reg = <0x51>;
- quartz-load-femtofarads = <12500>;
-
- clock {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <32768>;
- };
-};
diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
new file mode 100644
index 000000000000..f46c7e5378e1
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/nxp,pcf85063.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCF85063 Real Time Clock
+
+maintainers:
+ - Alexander Stein <alexander.stein@ew.tq-group.com>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ enum:
+ - nxp,pca85073a
+ - nxp,pcf85063
+ - nxp,pcf85063a
+ - nxp,pcf85063tp
+ - microcrystal,rv8263
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 0
+
+ clock-output-names:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ const: irq
+
+ quartz-load-femtofarads:
+ description:
+ The capacitive load of the quartz(x-tal),
+ expressed in femto Farad (fF). Valid values are 7000 and 12500.
+ Default value (if no value is specified) is 7000fF.
+
+ clock:
+ $ref: /schemas/clock/fixed-clock.yaml
+ description:
+ Provide this if the square wave pin is used as boot-enabled
+ fixed clock.
+
+ wakeup-source: true
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@51 {
+ compatible = "nxp,pcf85063";
+ reg = <0x51>;
+ quartz-load-femtofarads = <12500>;
+
+ clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ };
+ };
+ };
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
2022-07-21 7:31 [PATCH 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema Alexander Stein
@ 2022-07-21 8:19 ` Krzysztof Kozlowski
0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-21 8:19 UTC (permalink / raw)
To: Alexander Stein, Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski
Cc: linux-rtc, devicetree
On 21/07/2022 09:31, Alexander Stein wrote:
> Convert the NXP PCF85063 RTC binding to DT schema format.
>
> Add 'interrupts' and 'wakeup-source' as this device has an interrupt
> which was not documented, but is in use.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> checkpath.pl warns about:
> WARNING: DT binding docs and includes should be a separate patch. See:
> Documentation/devicetree/bindings/submitting-patches.rst
>
> But this seems to be a false positive to me. Includes are not touched at
> all.
>
> .../devicetree/bindings/rtc/nxp,pcf85063.txt | 32 --------
> .../devicetree/bindings/rtc/nxp,pcf85063.yaml | 76 +++++++++++++++++++
> 2 files changed, 76 insertions(+), 32 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
> create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
>
> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
> deleted file mode 100644
> index 217b7cd06c11..000000000000
> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -* NXP PCF85063 Real Time Clock
> -
> -Required properties:
> -- compatible: Should one of contain:
> - "nxp,pca85073a",
> - "nxp,pcf85063",
> - "nxp,pcf85063a",
> - "nxp,pcf85063tp",
> - "microcrystal,rv8263"
> -- reg: I2C address for chip.
> -
> -Optional property:
> -- quartz-load-femtofarads: The capacitive load of the quartz(x-tal),
> - expressed in femto Farad (fF). Valid values are 7000 and 12500.
> - Default value (if no value is specified) is 7000fF.
> -
> -Optional child node:
> -- clock: Provide this if the square wave pin is used as boot-enabled fixed clock.
> -
> -Example:
> -
> -pcf85063: rtc@51 {
> - compatible = "nxp,pcf85063";
> - reg = <0x51>;
> - quartz-load-femtofarads = <12500>;
> -
> - clock {
> - compatible = "fixed-clock";
> - #clock-cells = <0>;
> - clock-frequency = <32768>;
> - };
> -};
> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> new file mode 100644
> index 000000000000..f46c7e5378e1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
> @@ -0,0 +1,76 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/nxp,pcf85063.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP PCF85063 Real Time Clock
> +
> +maintainers:
> + - Alexander Stein <alexander.stein@ew.tq-group.com>
> +
> +allOf:
> + - $ref: rtc.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - nxp,pca85073a
> + - nxp,pcf85063
> + - nxp,pcf85063a
> + - nxp,pcf85063tp
> + - microcrystal,rv8263
How about ordering the entries alphabetically?
> +
> + reg:
> + maxItems: 1
> +
> + "#clock-cells":
> + const: 0
This is an unexpected change, not mentioned in commit msg.
> +
> + clock-output-names:
> + maxItems: 1
The same.
> +
> + interrupts:
> + maxItems: 1
> +
> + interrupt-names:
> + const: irq
interrupt-names was not in original bindings and should not be needed.
> +
> + quartz-load-femtofarads:
> + description:
> + The capacitive load of the quartz(x-tal),
Full stop.
> + expressed in femto Farad (fF).
Redundant.
> Valid values are 7000 and 12500.
Use enum.
> + Default value (if no value is specified) is 7000fF.
Use default: 7000.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-21 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 7:31 [PATCH 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema Alexander Stein
2022-07-21 8:19 ` Krzysztof Kozlowski
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).