* [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
@ 2022-07-25 7:19 Alexander Stein
2022-07-25 13:36 ` Rob Herring
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Alexander Stein @ 2022-07-25 7:19 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.
'clock-output-names' and '#clock-cells' are added as well, those were
probably missed when adding clkout support in commit 8c229ab6048b
("rtc: pcf85063: Add pcf85063 clkout control to common clock framework")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Krzysztof, thanks for your review.
Changes in v3:
* Added constraints for rv8263 & pcf85063 regarding 'quartz-load-femtofarads'
* Fixed example
I have to admit I could not actually verify in the registers that pcf85063 is
limited to 7pF. I was not able to find any datasheet containg the registers,
only a product brief [1] indicating this limit.
Changes in v2:
* Sorted compatible list
* Mentioned new #clock-cells and clock-output-names properties in commit message
* Removed 'interrupt-names', not needed/used anyway
* Fixed quartz-load-femtofarads defintion/description
[1] https://www.mouser.de/pdfDocs/NXP_PCF85063_PB.pdf
.../devicetree/bindings/rtc/nxp,pcf85063.txt | 32 -------
.../devicetree/bindings/rtc/nxp,pcf85063.yaml | 92 +++++++++++++++++++
2 files changed, 92 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..2f892f8640d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
@@ -0,0 +1,92 @@
+# 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>
+
+properties:
+ compatible:
+ enum:
+ - microcrystal,rv8263
+ - nxp,pcf85063
+ - nxp,pcf85063a
+ - nxp,pcf85063tp
+ - nxp,pca85073a
+
+ reg:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 0
+
+ clock-output-names:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ quartz-load-femtofarads:
+ description:
+ The capacitive load of the quartz(x-tal).
+ enum: [7000, 12500]
+ default: 7000
+
+ 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
+
+allOf:
+ - $ref: rtc.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microcrystal,rv8263
+ then:
+ properties:
+ quartz-load-femtofarads: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - nxp,pcf85063
+ then:
+ properties:
+ quartz-load-femtofarads:
+ const: 7000
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@51 {
+ compatible = "nxp,pcf85063a";
+ 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] 5+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
2022-07-25 7:19 [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema Alexander Stein
@ 2022-07-25 13:36 ` Rob Herring
2022-07-25 14:09 ` [PATCH v3 1/1] dt-bindings: rtc: nxp, pcf85063: " Alexander Stein
2022-07-25 16:26 ` [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: " Krzysztof Kozlowski
2022-07-26 15:00 ` Alexandre Belloni
2 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2022-07-25 13:36 UTC (permalink / raw)
To: Alexander Stein
Cc: linux-rtc, Rob Herring, Alexandre Belloni, devicetree,
Alessandro Zummo, Krzysztof Kozlowski
On Mon, 25 Jul 2022 09:19:19 +0200, 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.
> 'clock-output-names' and '#clock-cells' are added as well, those were
> probably missed when adding clkout support in commit 8c229ab6048b
> ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework")
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> Krzysztof, thanks for your review.
>
> Changes in v3:
> * Added constraints for rv8263 & pcf85063 regarding 'quartz-load-femtofarads'
> * Fixed example
>
> I have to admit I could not actually verify in the registers that pcf85063 is
> limited to 7pF. I was not able to find any datasheet containg the registers,
> only a product brief [1] indicating this limit.
>
> Changes in v2:
> * Sorted compatible list
> * Mentioned new #clock-cells and clock-output-names properties in commit message
> * Removed 'interrupt-names', not needed/used anyway
> * Fixed quartz-load-femtofarads defintion/description
>
> [1] https://www.mouser.de/pdfDocs/NXP_PCF85063_PB.pdf
>
> .../devicetree/bindings/rtc/nxp,pcf85063.txt | 32 -------
> .../devicetree/bindings/rtc/nxp,pcf85063.yaml | 92 +++++++++++++++++++
> 2 files changed, 92 insertions(+), 32 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
> create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
>
Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.
Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.
Full log is available here: https://patchwork.ozlabs.org/patch/
rtc@51: 'interrupt-names' does not match any of the regexes: 'pinctrl-[0-9]+'
arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dtb
rtc@51: quartz-load-femtofarads:0:0: 7000 was expected
arch/arm/boot/dts/imx6dl-skov-revc-lt2.dtb
arch/arm/boot/dts/imx6dl-skov-revc-lt6.dtb
arch/arm/boot/dts/imx6q-skov-revc-lt2.dtb
arch/arm/boot/dts/imx6q-skov-revc-lt6.dtb
arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dtb
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: rtc: nxp, pcf85063: Convert to DT schema
2022-07-25 13:36 ` Rob Herring
@ 2022-07-25 14:09 ` Alexander Stein
0 siblings, 0 replies; 5+ messages in thread
From: Alexander Stein @ 2022-07-25 14:09 UTC (permalink / raw)
To: Rob Herring
Cc: linux-rtc, Rob Herring, Alexandre Belloni, devicetree,
Alessandro Zummo, Krzysztof Kozlowski, Sam Ravnborg
CC'ed Sam
Am Montag, 25. Juli 2022, 15:36:42 CEST schrieb Rob Herring:
> On Mon, 25 Jul 2022 09:19:19 +0200, 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.
> > 'clock-output-names' and '#clock-cells' are added as well, those were
> > probably missed when adding clkout support in commit 8c229ab6048b
> > ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework")
> >
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > Krzysztof, thanks for your review.
> >
> > Changes in v3:
> > * Added constraints for rv8263 & pcf85063 regarding
> > 'quartz-load-femtofarads' * Fixed example
> >
> > I have to admit I could not actually verify in the registers that pcf85063
> > is limited to 7pF. I was not able to find any datasheet containg the
> > registers, only a product brief [1] indicating this limit.
> >
> > Changes in v2:
> > * Sorted compatible list
> > * Mentioned new #clock-cells and clock-output-names properties in commit
> > message * Removed 'interrupt-names', not needed/used anyway
> > * Fixed quartz-load-femtofarads defintion/description
> >
> > [1] https://www.mouser.de/pdfDocs/NXP_PCF85063_PB.pdf
> >
> > .../devicetree/bindings/rtc/nxp,pcf85063.txt | 32 -------
> > .../devicetree/bindings/rtc/nxp,pcf85063.yaml | 92 +++++++++++++++++++
> > 2 files changed, 92 insertions(+), 32 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf85063.txt
> > create mode 100644
> > Documentation/devicetree/bindings/rtc/nxp,pcf85063.yaml
>
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings.
>
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
>
> Full log is available here: https://patchwork.ozlabs.org/patch/
>
>
> rtc@51: 'interrupt-names' does not match any of the regexes:
> 'pinctrl-[0-9]+' arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx.dtb
This is expected, patch for removal is already prepared.
> rtc@51: quartz-load-femtofarads:0:0: 7000 was expected
> arch/arm/boot/dts/imx6dl-skov-revc-lt2.dtb
> arch/arm/boot/dts/imx6dl-skov-revc-lt6.dtb
> arch/arm/boot/dts/imx6q-skov-revc-lt2.dtb
> arch/arm/boot/dts/imx6q-skov-revc-lt6.dtb
> arch/arm/boot/dts/imx6q-skov-reve-mi1010ait-1cp1.dtb
Oh, this is interesting. Sam, as the author of imx6q-skov, do you happen to
know if "nxp,pcf85063" used in arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi does
actually support 12.5 pF?
Well, if in doubt I would rather remove this restriction.
Best regards,
Alexander
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
2022-07-25 7:19 [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema Alexander Stein
2022-07-25 13:36 ` Rob Herring
@ 2022-07-25 16:26 ` Krzysztof Kozlowski
2022-07-26 15:00 ` Alexandre Belloni
2 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-25 16:26 UTC (permalink / raw)
To: Alexander Stein, Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski
Cc: linux-rtc, devicetree
On 25/07/2022 09:19, 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.
> 'clock-output-names' and '#clock-cells' are added as well, those were
> probably missed when adding clkout support in commit 8c229ab6048b
> ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework")
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
2022-07-25 7:19 [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema Alexander Stein
2022-07-25 13:36 ` Rob Herring
2022-07-25 16:26 ` [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: " Krzysztof Kozlowski
@ 2022-07-26 15:00 ` Alexandre Belloni
2 siblings, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2022-07-26 15:00 UTC (permalink / raw)
To: alexander.stein, a.zummo, robh+dt, krzysztof.kozlowski+dt
Cc: devicetree, linux-rtc
On Mon, 25 Jul 2022 09:19:19 +0200, 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.
> 'clock-output-names' and '#clock-cells' are added as well, those were
> probably missed when adding clkout support in commit 8c229ab6048b
> ("rtc: pcf85063: Add pcf85063 clkout control to common clock framework")
>
> [...]
Applied, thanks!
[1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
commit: 10e1fb88c7b7e71ae04895511f4f98a7721c9e6e
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-07-26 15:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-25 7:19 [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: Convert to DT schema Alexander Stein
2022-07-25 13:36 ` Rob Herring
2022-07-25 14:09 ` [PATCH v3 1/1] dt-bindings: rtc: nxp, pcf85063: " Alexander Stein
2022-07-25 16:26 ` [PATCH v3 1/1] dt-bindings: rtc: nxp,pcf85063: " Krzysztof Kozlowski
2022-07-26 15:00 ` Alexandre Belloni
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).