dt-bindings: rtc: m41t80: Convert text schema to YAML one
Subsystems (2)
PATCH 1/2 dt-bindings: rtc: m41t80: Convert text schema to YAML one
Convert the m41t80 text schema to YAML schema.
No functional change.
---
Cc: Alessandro Zummo <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: [email protected]
To: [email protected]
--- .../devicetree/bindings/rtc/rtc-m41t80.txt | 39 ---------- .../devicetree/bindings/rtc/rtc-m41t80.yaml | 75 +++++++++++++++++++ 2 files changed, 75 insertions(+), 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-m41t80.txt create mode 100644 Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml
Documentation/devicetree/bindings/rtc/rtc-m41t80.txt deleted +0 -39
@@ -1,39 +0,0 @@ -ST M41T80 family of RTC and compatible - -Required properties: -- compatible: should be one of: - "st,m41t62", - "st,m41t65", - "st,m41t80", - "st,m41t81", - "st,m41t81s", - "st,m41t82", - "st,m41t83", - "st,m41t84", - "st,m41t85", - "st,m41t87", - "microcrystal,rv4162", -- reg: I2C bus address of the device - -Optional properties: -- interrupts: rtc alarm interrupt. -- clock-output-names: From common clock binding to override the default output - clock name -- wakeup-source: Enables wake up of host system on alarm - -Optional child node: -- clock: Provide this if the square wave pin is used as boot-enabled fixed clock. - -Example: - rtc@68 { - compatible = "st,m41t80"; - reg = <0x68>; - interrupt-parent = <&UIC0>; - interrupts = <0x9 0x8>; - - clock { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <32768>; - }; - };
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +75 -0
75 lines not on this page · raw message
Signature · 1 line
2.35.1
PATCH 2/2 dt-bindings: rtc: m41t80: Mark the clock: subnode as deprecated
The clock {} subnode seems like it is describing an always-on clock generated by the PMIC. This should rather be modeled by consumer of the clock taking phandle to the RTC node itself, since it already does have clock-cells and all. Since there are no users of the clock subnode in tree anyway, mark it as deprecated to avoid proliferation of this approach.
---
Cc: Alessandro Zummo <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: [email protected]
To: [email protected]
--- Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml +1 -0
@@ -42,6 +42,7 @@ properties: clock: type: object $ref: /schemas/clock/fixed-clock.yaml# + deprecated: true properties: clock-frequency: const: 32768
Signature · 1 line
2.35.1
Re: [PATCH 2/2] dt-bindings: rtc: m41t80: Mark the clock: subnode as deprecated
Quoted 9 lines · Marek Vasut
The clock {} subnode seems like it is describing an always-on clock generated by the PMIC. This should rather be modeled by consumer of the clock taking phandle to the RTC node itself, since it already does have clock-cells and all. Since there are no users of the clock subnode in tree anyway, mark it as deprecated to avoid proliferation of this approach.
Signed-off-by Marek Vasut <[email protected]>---
Best regards,
Krzysztof
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml
Quoted 68 lines · Marek Vasut
Convert the m41t80 text schema to YAML schema.
No functional change.Signed-off-by Marek Vasut <[email protected]>---
Cc: Alessandro Zummo <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: [email protected]
To: [email protected]--- .../devicetree/bindings/rtc/rtc-m41t80.txt | 39 ---------- .../devicetree/bindings/rtc/rtc-m41t80.yaml | 75 +++++++++++++++++++ 2 files changed, 75 insertions(+), 39 deletions(-) delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-m41t80.txt create mode 100644 Documentation/devicetree/bindings/rtc/rtc-m41t80.yamlDocumentation/devicetree/bindings/rtc/rtc-m41t80.txt deleted +0
-39@@ -1,39 +0,0 @@ -ST M41T80 family of RTC and compatible - -Required properties: -- compatible: should be one of: - "st,m41t62", - "st,m41t65", - "st,m41t80", - "st,m41t81", - "st,m41t81s", - "st,m41t82", - "st,m41t83", - "st,m41t84", - "st,m41t85", - "st,m41t87", - "microcrystal,rv4162", -- reg: I2C bus address of the device - -Optional properties: -- interrupts: rtc alarm interrupt. -- clock-output-names: From common clock binding to override the default output - clock name -- wakeup-source: Enables wake up of host system on alarm - -Optional child node: -- clock: Provide this if the square wave pin is used as boot-enabled fixed clock. - -Example: - rtc@68 { - compatible = "st,m41t80"; - reg = <0x68>; - interrupt-parent = <&UIC0>; - interrupts = <0x9 0x8>; - - clock { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <32768>; - }; - };Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +0
-0
Filename based on compatibles (more or less), so could be:
st,m41t80.yaml
or:
st,m41txx.yaml
The "rtc" name can be skipped as it is implied from subsystem folder, unless st,m41txx is a name of some SoC?
Quoted 25 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +24
-0@@ -0,0 +1,75 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/rtc-m41t80.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ST M41T80 family of RTC and compatible + +maintainers: + - Alexandre Belloni <[email protected]> + +properties: + compatible: + enum: + - st,m41t62 + - st,m41t65 + - st,m41t80 + - st,m41t81 + - st,m41t81s + - st,m41t82 + - st,m41t83 + - st,m41t84 + - st,m41t85 + - st,m41t87
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 34
Quoted 10 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +10
-0+ - microcrystal,rv4162 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#clock-cells": + const: 1
Hm, why do you have it?
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 37
Quoted 3 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +3
-0+ + clock-output-names: + description: From common clock binding to override the default output clock name.
You need maxItems
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 40
Quoted 3 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +3
-0+ + wakeup-source: + description: Enables wake up of host system on alarm.
Skip the property - it comes from rtc.yaml.
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 48
Quoted 8 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +8
-0+ + clock: + type: object + $ref: /schemas/clock/fixed-clock.yaml# + properties: + clock-frequency: + const: 32768 +
Best regards,
Krzysztof
On 11/3/22 14:40, Krzysztof Kozlowski wrote:
[...]
Quoted 13 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml
Quoted 5 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +0
-0Filename based on compatibles (more or less), so could be:
st,m41t80.yaml
or:
st,m41txx.yamlThe "rtc" name can be skipped as it is implied from subsystem folder, unless st,m41txx is a name of some SoC?
[...]
Quoted 10 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 34
Quoted 8 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +8
-0+ reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#clock-cells": + const: 1Hm, why do you have it?
Because of the following warning:
$ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/rtc/rtc-m41t80.example.dts CHKDT Documentation/devicetree/bindings/processed-schema.json Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml: properties: '#clock-cells' is a dependency of 'clock-output-names'
Quoted 5 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 37
Quoted 3 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +3
-0+ + clock-output-names: + description: From common clock binding to override the default output clock name.You need maxItems
Done
Quoted 5 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 40
Quoted 3 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +3
-0+ + wakeup-source: + description: Enables wake up of host system on alarm.Skip the property - it comes from
rtc.yaml.
Done
Quoted 33 lines · Marek Vasut
On 11/3/22 14:40, Krzysztof Kozlowski wrote:
[...]
Quoted 13 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml
Quoted 5 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +0
-0Filename based on compatibles (more or less), so could be:
st,m41t80.yaml
or:
st,m41txx.yamlThe "rtc" name can be skipped as it is implied from subsystem folder, unless st,m41txx is a name of some SoC?
[...]
Quoted 10 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml line 34
Quoted 8 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +8
-0+ reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#clock-cells": + const: 1Hm, why do you have it?
Because of the following warning:
Quoted 7 lines
$ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml LINT Documentation/devicetree/bindings DTEX Documentation/devicetree/bindings/rtc/rtc-m41t80.example.dts CHKDT Documentation/devicetree/bindings/processed-schema.json Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml: properties: '#clock-cells' is a dependency of 'clock-output-names'
So mention any changes from pure conversion in commit msg.
Best regards,
Krzysztof
On 11/3/22 14:40, Krzysztof Kozlowski wrote:
[...]
Quoted 11 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml
Quoted 5 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +0
-0Filename based on compatibles (more or less), so could be:
st,m41t80.yaml
or:
st,m41txx.yaml
Quoted 2 lines
The "rtc" name can be skipped as it is implied from subsystem folder, unless st,m41txx is a name of some SoC?
It's dedicated I2C RTC, a discrete soic8 chip with optional coin cell battery.
We cannot really call it m41txx because there are other m41txx chips with different register layouts and thus different RTC drivers:
next$ ls -1 drivers/rtc/*m41t*drivers/rtc/rtc-m41t80.cdrivers/rtc/rtc-m41t93.cdrivers/rtc/rtc-m41t94.c
The m41t80 is a sane choice, the m41t80 was the first supported, the other chips are just compatible to it.
Whether I should drop the rtc- prefix or not, I will defer that preference to Alexandre .
[...]
Quoted 29 lines · Marek Vasut
On 11/3/22 14:40, Krzysztof Kozlowski wrote:
[...]
Quoted 11 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml
Quoted 5 lines
Documentation/devicetree/bindings/rtc/rtc-m41t80.yaml new file +0
-0Filename based on compatibles (more or less), so could be:
st,m41t80.yaml
or:
st,m41txx.yamlQuoted 2 lines
The "rtc" name can be skipped as it is implied from subsystem folder, unless st,m41txx is a name of some SoC?
It's dedicated I2C RTC, a discrete soic8 chip with optional coin cell battery.
We cannot really call it m41txx because there are other m41txx chips with different register layouts and thus different RTC drivers:
next$ ls -1
drivers/rtc/*m41t*drivers/rtc/rtc-m41t80.cdrivers/rtc/rtc-m41t93.cdrivers/rtc/rtc-m41t94.c
Quoted 5 lines
The m41t80 is a sane choice, the m41t80 was the first supported, the other chips are just compatible to it.
Whether I should drop the rtc- prefix or not, I will defer that preference to Alexandre .
so st,m41t80.yaml
Best regards,
Krzysztof