* [PATCH] dt-bindings: maxim-ds1302: Convert to dt schema
@ 2026-09-02 23:35 Sudheendra Sampath
2026-09-03 17:53 ` Conor Dooley
0 siblings, 1 reply; 2+ messages in thread
From: Sudheendra Sampath @ 2026-09-02 23:35 UTC (permalink / raw)
To: alexandre.belloni
Cc: devicetree, skhan, me, jkoolstra, linux-kernel, linux-rtc,
Sudheendra Sampath
Convert Maxim DS1302 real-time clock binding to DT schema.
Signed-off-by: Sudheendra Sampath <giveback4fun@gmail.com>
---
.../devicetree/bindings/rtc/maxim-ds1302.txt | 46 -----------
.../devicetree/bindings/rtc/maxim-ds1302.yaml | 81 +++++++++++++++++++
2 files changed, 81 insertions(+), 46 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/rtc/maxim-ds1302.txt
create mode 100644 Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
diff --git a/Documentation/devicetree/bindings/rtc/maxim-ds1302.txt b/Documentation/devicetree/bindings/rtc/maxim-ds1302.txt
deleted file mode 100644
index ba470c56cdec..000000000000
--- a/Documentation/devicetree/bindings/rtc/maxim-ds1302.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-* Maxim/Dallas Semiconductor DS-1302 RTC
-
-Simple device which could be used to store date/time between reboots.
-
-The device uses the standard MicroWire half-duplex transfer timing.
-Master output is set on low clock and sensed by the RTC on the rising
-edge. Master input is set by the RTC on the trailing edge and is sensed
-by the master on low clock.
-
-Required properties:
-
-- compatible : Should be "maxim,ds1302"
-
-Required SPI properties:
-
-- reg : Should be address of the device chip select within
- the controller.
-
-- spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V,
- and 2MHz if powered at 5V.
-
-- spi-3wire : The device has a shared signal IN/OUT line.
-
-- spi-lsb-first : DS-1302 requires least significant bit first
- transfers.
-
-- spi-cs-high: DS-1302 has active high chip select line. This is
- required unless inverted in hardware.
-
-Example:
-
-spi@901c {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "icpdas,lp8841-spi-rtc";
- reg = <0x901c 0x1>;
-
- rtc@0 {
- compatible = "maxim,ds1302";
- reg = <0>;
- spi-max-frequency = <500000>;
- spi-3wire;
- spi-lsb-first;
- spi-cs-high;
- };
-};
diff --git a/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml b/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
new file mode 100644
index 000000000000..3e6264464e10
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/maxim-ds1302.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Maxim/Dallas Semiconductor DS-1302 RTC
+
+maintainers:
+ - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+description: |
+ Simple device which could be used to store date/time between reboots.
+
+ The device uses the standard MicroWire half-duplex transfer timing.
+ Master output is set on low clock and sensed by the RTC on the rising
+ edge. Master input is set by the RTC on the trailing edge and is sensed
+ by the master on low clock.
+
+properties:
+ compatible:
+ items:
+ # Maxim DS1302 Real-time Clock
+ - const: maxim,ds1302
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: Maximum SPI clocking speed in Hz.
+ enum:
+ - 500000
+ - 2000000
+
+ spi-3wire: true
+
+ spi-lsb-first: true
+
+ spi-cs-high: true
+
+required:
+ - compatible
+ - reg
+ - spi-max-frequency
+ - spi-3wire
+ - spi-lsb-first
+ - spi-cs-high
+
+additionalProperties: false
+
+examples:
+ - |
+ spi1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@0 {
+ compatible = "maxim,ds1302";
+ reg = <0>;
+ spi-max-frequency = <500000>;
+ spi-3wire;
+ spi-lsb-first;
+ spi-cs-high;
+ };
+ };
+
+ - |
+ spi2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@2000 {
+ compatible = "maxim,ds1302";
+ reg = <0x2000>;
+ spi-max-frequency = <2000000>;
+ spi-3wire;
+ spi-lsb-first;
+ spi-cs-high;
+ };
+ };
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: maxim-ds1302: Convert to dt schema
2026-09-02 23:35 [PATCH] dt-bindings: maxim-ds1302: Convert to dt schema Sudheendra Sampath
@ 2026-09-03 17:53 ` Conor Dooley
0 siblings, 0 replies; 2+ messages in thread
From: Conor Dooley @ 2026-09-03 17:53 UTC (permalink / raw)
To: Sudheendra Sampath
Cc: alexandre.belloni, devicetree, skhan, me, jkoolstra,
linux-kernel, linux-rtc
[-- Attachment #1: Type: text/plain, Size: 5008 bytes --]
On Wed, Sep 02, 2026 at 04:35:49PM -0700, Sudheendra Sampath wrote:
> Convert Maxim DS1302 real-time clock binding to DT schema.
>
> Signed-off-by: Sudheendra Sampath <giveback4fun@gmail.com>
> ---
> .../devicetree/bindings/rtc/maxim-ds1302.txt | 46 -----------
> .../devicetree/bindings/rtc/maxim-ds1302.yaml | 81 +++++++++++++++++++
> 2 files changed, 81 insertions(+), 46 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/rtc/maxim-ds1302.txt
> create mode 100644 Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
>
> diff --git a/Documentation/devicetree/bindings/rtc/maxim-ds1302.txt b/Documentation/devicetree/bindings/rtc/maxim-ds1302.txt
> deleted file mode 100644
> index ba470c56cdec..000000000000
> --- a/Documentation/devicetree/bindings/rtc/maxim-ds1302.txt
> +++ /dev/null
> @@ -1,46 +0,0 @@
> -* Maxim/Dallas Semiconductor DS-1302 RTC
> -
> -Simple device which could be used to store date/time between reboots.
> -
> -The device uses the standard MicroWire half-duplex transfer timing.
> -Master output is set on low clock and sensed by the RTC on the rising
> -edge. Master input is set by the RTC on the trailing edge and is sensed
> -by the master on low clock.
> -
> -Required properties:
> -
> -- compatible : Should be "maxim,ds1302"
> -
> -Required SPI properties:
> -
> -- reg : Should be address of the device chip select within
> - the controller.
> -
> -- spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V,
> - and 2MHz if powered at 5V.
> -
> -- spi-3wire : The device has a shared signal IN/OUT line.
> -
> -- spi-lsb-first : DS-1302 requires least significant bit first
> - transfers.
> -
> -- spi-cs-high: DS-1302 has active high chip select line. This is
> - required unless inverted in hardware.
> -
> -Example:
> -
> -spi@901c {
> - #address-cells = <1>;
> - #size-cells = <0>;
> - compatible = "icpdas,lp8841-spi-rtc";
> - reg = <0x901c 0x1>;
> -
> - rtc@0 {
> - compatible = "maxim,ds1302";
> - reg = <0>;
> - spi-max-frequency = <500000>;
> - spi-3wire;
> - spi-lsb-first;
> - spi-cs-high;
> - };
> -};
> diff --git a/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml b/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
> new file mode 100644
> index 000000000000..3e6264464e10
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/maxim-ds1302.yaml
s/-/,/ as the filename should match the compatible.
> @@ -0,0 +1,81 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/maxim-ds1302.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Maxim/Dallas Semiconductor DS-1302 RTC
> +
> +maintainers:
> + - Alexandre Belloni <alexandre.belloni@bootlin.com>
This should be the original author of the text binding, provided they're
still responsive.
> +
> +description: |
> + Simple device which could be used to store date/time between reboots.
> +
> + The device uses the standard MicroWire half-duplex transfer timing.
> + Master output is set on low clock and sensed by the RTC on the rising
> + edge. Master input is set by the RTC on the trailing edge and is sensed
> + by the master on low clock.
> +
> +properties:
> + compatible:
> + items:
> + # Maxim DS1302 Real-time Clock
This comment is obvious, just drop it.
> + - const: maxim,ds1302
> +
> + reg:
> + maxItems: 1
> +
> + spi-max-frequency:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Maximum SPI clocking speed in Hz.
This should retain the comment about the voltages, rather than state the
obvious.
> + enum:
> + - 500000
> + - 2000000
> +
> + spi-3wire: true
> +
> + spi-lsb-first: true
> +
> + spi-cs-high: true
> +
> +required:
> + - compatible
> + - reg
> + - spi-max-frequency
> + - spi-3wire
> + - spi-lsb-first
> + - spi-cs-high
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + spi1 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + rtc@0 {
> + compatible = "maxim,ds1302";
> + reg = <0>;
> + spi-max-frequency = <500000>;
> + spi-3wire;
> + spi-lsb-first;
> + spi-cs-high;
> + };
> + };
> +
> + - |
> + spi2 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + rtc@2000 {
> + compatible = "maxim,ds1302";
> + reg = <0x2000>;
> + spi-max-frequency = <2000000>;
> + spi-3wire;
> + spi-lsb-first;
> + spi-cs-high;
> + };
> + };
Where did this additional example come from? The chip select looks
rather unlikely and the example has nothing meaningfully different in
it.
I think this should be dropped.
pw-bot: changes-requested
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-03 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02 23:35 [PATCH] dt-bindings: maxim-ds1302: Convert to dt schema Sudheendra Sampath
2026-09-03 17:53 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®