Skip to contentSkip to conversation

dt-bindings: rtc: m41t80: Convert text schema to YAML one

PATCH Superseded Marek Vasut 2 participants 5 messages Dec 11, 2022

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dt-bindings: rtc: m41t80: Convert text schema to YAML one

Convert the m41t80 text schema to YAML schema.

Add "#clock-cells" requirement, which is required by clock-output-names.

---
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]
---
V2: - Add maxItems:1 to clock-output-names
- Skip wakeup-source property, comes from rtc.yaml
- Mention the new clock-cells requirement coming from clock-output-names property.
- Rename rtc-m41t80.txt to st,m41t80.yaml

---
 .../devicetree/bindings/rtc/rtc-m41t80.txt    | 39 ----------
 .../devicetree/bindings/rtc/st,m41t80.yaml    | 73 +++++++++++++++++++
 2 files changed, 73 insertions(+), 39 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-m41t80.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/st,m41t80.yaml
Documentation/devicetree/bindings/rtc/rtc-m41t80.txt deleted +0 -39
deleted file mode 100644
index cdd196b1e9bdb..0000000000000
@@ -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/st,m41t80.yaml new file +73 -0

73 lines not on this page · raw message

Signature · 1 line
2.35.1
#1 lore raw

PATCH v2 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]
---
V2: - Add AB from Krzysztof

---
 Documentation/devicetree/bindings/rtc/st,m41t80.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/rtc/st,m41t80.yaml +1 -0
index 9977c8954307e..98a6da4083897 100644
@@ -40,6 +40,7 @@ properties:
   clock:
     type: object
     $ref: /schemas/clock/fixed-clock.yaml#
+    deprecated: true
     properties:
       clock-frequency:
         const: 32768
Signature · 1 line
2.35.1
#2 lore raw
In reply to Marek Vasut
Quoted 76 lines · Marek Vasut

Convert the m41t80 text schema to YAML schema.

Add "#clock-cells" requirement, which is required by clock-output-names.

---
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]
---
V2: - Add maxItems:1 to clock-output-names
- Skip wakeup-source property, comes from rtc.yaml
- Mention the new clock-cells requirement coming from clock-output-names property.
- Rename rtc-m41t80.txt to st,m41t80.yaml

---
 .../devicetree/bindings/rtc/rtc-m41t80.txt    | 39 ----------
 .../devicetree/bindings/rtc/st,m41t80.yaml    | 73 +++++++++++++++++++
 2 files changed, 73 insertions(+), 39 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-m41t80.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/st,m41t80.yaml
Documentation/devicetree/bindings/rtc/rtc-m41t80.txt deleted +0 -39
deleted file mode 100644
index cdd196b1e9bdb..0000000000000
@@ -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/st,m41t80.yaml new file +0 -0
new file mode 100644
index 0000000000000..9977c8954307e

Documentation/devicetree/bindings/rtc/st,m41t80.yaml line 1

Quoted 1 line
Documentation/devicetree/bindings/rtc/st,m41t80.yaml new file +1 -0
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: GPL-2.0

I missed that one during previous review - why not dual license? I do not see here any text (hardware description) being copied. Is it because of DTS example?

Best regards,
Krzysztof

#3 lore raw
Quoted 74 lines · Krzysztof Kozlowski
Quoted 73 lines · Marek Vasut

Convert the m41t80 text schema to YAML schema.

Add "#clock-cells" requirement, which is required by clock-output-names.

---
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]
---
V2: - Add maxItems:1 to clock-output-names
- Skip wakeup-source property, comes from rtc.yaml
- Mention the new clock-cells requirement coming from clock-output-names property.
- Rename rtc-m41t80.txt to st,m41t80.yaml

---
  .../devicetree/bindings/rtc/rtc-m41t80.txt    | 39 ----------
  .../devicetree/bindings/rtc/st,m41t80.yaml    | 73 +++++++++++++++++++
  2 files changed, 73 insertions(+), 39 deletions(-)

delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-m41t80.txt create mode 100644 Documentation/devicetree/bindings/rtc/st,m41t80.yaml

Documentation/devicetree/bindings/rtc/rtc-m41t80.txt deleted +0 -39
deleted file mode 100644
index cdd196b1e9bdb..0000000000000
@@ -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/st,m41t80.yaml new file +0 -0
new file mode 100644
index 0000000000000..9977c8954307e
Quoted 8 lines

Documentation/devicetree/bindings/rtc/st,m41t80.yaml line 1

Quoted 4 lines
Documentation/devicetree/bindings/rtc/st,m41t80.yaml new file +1 -0
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: GPL-2.0

I missed that one during previous review - why not dual license? I do not see here any text (hardware description) being copied. Is it because of DTS example?

Copy paste from -- likely -- Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml:# SPDX-License-Identifier: GPL-2.0

Would you prefer

(GPL-2.0-only OR BSD-2-Clause)

?

#4 lore raw
Quoted 16 lines · Marek Vasut
Quoted 11 lines

Documentation/devicetree/bindings/rtc/st,m41t80.yaml line 1

Quoted 7 lines
Documentation/devicetree/bindings/rtc/st,m41t80.yaml new file +1 -0
new file mode 100644
index 0000000000000..9977c8954307e
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: GPL-2.0

I missed that one during previous review - why not dual license? I do not see here any text (hardware description) being copied. Is it because of DTS example?

Copy paste from -- likely -- Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml:#
SPDX-License-Identifier: GPL-2.0

Quoted 5 lines

Would you prefer

(GPL-2.0-only OR BSD-2-Clause)

?

Yes, please.

Best regards,
Krzysztof