All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema
@ 2022-06-17 11:44 Thierry Reding
  2022-06-17 11:44 ` [PATCH v2 2/2] dt-bindings: rtc: Add EM Microelectronic EM3027 bindings Thierry Reding
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Thierry Reding @ 2022-06-17 11:44 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: Rob Herring, linux-rtc, devicetree

From: Thierry Reding <treding@nvidia.com>

Convert the DS1307 (and compatible) RTC bindings from the free-form text
format to json-schema.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- add compatible string list for [ st,m41t00, dallas,ds1338 ]
- allow second interrupt and interrupt-names
- remove commented-out section
- allow vcc-supply

 .../devicetree/bindings/rtc/rtc-ds1307.txt    |  52 ---------
 .../devicetree/bindings/rtc/rtc-ds1307.yaml   | 102 ++++++++++++++++++
 2 files changed, 102 insertions(+), 52 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml

diff --git a/Documentation/devicetree/bindings/rtc/rtc-ds1307.txt b/Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
deleted file mode 100644
index 36f610bb051e..000000000000
--- a/Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-Dallas DS1307 and compatible RTC
-
-Required properties:
-- compatible: should be one of:
-	"dallas,ds1307",
-	"dallas,ds1308",
-	"dallas,ds1337",
-	"dallas,ds1338",
-	"dallas,ds1339",
-	"dallas,ds1388",
-	"dallas,ds1340",
-	"dallas,ds1341",
-	"maxim,ds3231",
-	"st,m41t0",
-	"st,m41t00",
-	"st,m41t11",
-	"microchip,mcp7940x",
-	"microchip,mcp7941x",
-	"pericom,pt7c4338",
-	"epson,rx8025",
-	"isil,isl12057"
-	"epson,rx8130"
-- 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
-- trickle-resistor-ohms : ds1339, ds1340 and ds 1388 only
-	Selected resistor for trickle charger
-	Possible values are 250, 2000, 4000
-	Should be given if trickle charger should be enabled
-- aux-voltage-chargeable: ds1339, ds1340, ds1388 and rx8130 only
-	Tells whether the battery/supercap of the RTC (if any) is
-	chargeable or not.
-	Possible values are 0 (not chargeable), 1 (chargeable)
-
-Deprecated properties:
-- trickle-diode-disable : ds1339, ds1340 and ds1388 only
-	Do not use internal trickle charger diode
-	Should be given if internal trickle charger diode should be disabled
-	(superseded by aux-voltage-chargeable)
-
-Example:
-	ds1339: rtc@68 {
-		compatible = "dallas,ds1339";
-		reg = <0x68>;
-		interrupt-parent = <&gpio4>;
-		interrupts = <20 0>;
-		trickle-resistor-ohms = <250>;
-	};
diff --git a/Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml b/Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
new file mode 100644
index 000000000000..98d10e680144
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/rtc-ds1307.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Dallas DS1307 and compatible RTC
+
+maintainers:
+  - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+properties:
+  compatible:
+    oneOf:
+      - enum:
+          - dallas,ds1307
+          - dallas,ds1308
+          - dallas,ds1337
+          - dallas,ds1338
+          - dallas,ds1339
+          - dallas,ds1388
+          - dallas,ds1340
+          - dallas,ds1341
+          - maxim,ds3231
+          - st,m41t0
+          - st,m41t00
+          - st,m41t11
+          - microchip,mcp7940x
+          - microchip,mcp7941x
+          - pericom,pt7c4338
+          - epson,rx8025
+          - isil,isl12057
+          - epson,rx8130
+
+      - items:
+          - enum:
+              - st,m41t00
+          - const: dallas,ds1338
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    minItems: 1
+    maxItems: 2
+
+  interrupt-names:
+    maxItems: 2
+
+  "#clock-cells":
+    const: 1
+
+  clock-output-names:
+    description: From common clock binding to override the default output clock name.
+
+  wakeup-source:
+    description: Enables wake up of host system on alarm.
+
+  vcc-supply: true
+
+allOf:
+  - $ref: rtc.yaml
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - dallas,ds1339
+              - dallas,ds1340
+              - dallas,ds1388
+    then:
+      properties:
+        trickle-resistor-ohms:
+          description: Selected resistor for trickle charger. Should be specified if trickle
+            charger should be enabled.
+          enum: [ 250, 2000, 4000 ]
+
+        trickle-diode-disable:
+          description: Do not use internal trickle charger diode. Should be given if internal
+            trickle charger diode should be disabled (superseded by aux-voltage-chargeable)
+          deprecated: true
+
+unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      rtc@68 {
+        compatible = "dallas,ds1337";
+        reg = <0x68>;
+        interrupt-parent = <&gpio4>;
+        interrupts = <20 0>;
+        trickle-resistor-ohms = <250>;
+      };
+    };
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] dt-bindings: rtc: Add EM Microelectronic EM3027 bindings
  2022-06-17 11:44 [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema Thierry Reding
@ 2022-06-17 11:44 ` Thierry Reding
  2022-06-17 19:04   ` Rob Herring
  2022-06-17 19:04 ` [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema Rob Herring
  2022-07-21 21:37 ` Rob Herring
  2 siblings, 1 reply; 7+ messages in thread
From: Thierry Reding @ 2022-06-17 11:44 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni; +Cc: Rob Herring, linux-rtc, devicetree

From: Thierry Reding <treding@nvidia.com>

Document the bindings for the EM Microelectronic EM3027 RTC.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- add to list of trivial RTCs

 Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
index 13925bb78ec7..d9fc120c61cc 100644
--- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
@@ -30,6 +30,8 @@ properties:
       - dallas,ds1672
       # Extremely Accurate I²C RTC with Integrated Crystal and SRAM
       - dallas,ds3232
+      # EM Microelectronic EM3027 RTC
+      - emmicro,em3027
       # I2C-BUS INTERFACE REAL TIME CLOCK MODULE
       - epson,rx8010
       # I2C-BUS INTERFACE REAL TIME CLOCK MODULE
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema
  2022-06-17 11:44 [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema Thierry Reding
  2022-06-17 11:44 ` [PATCH v2 2/2] dt-bindings: rtc: Add EM Microelectronic EM3027 bindings Thierry Reding
@ 2022-06-17 19:04 ` Rob Herring
  2022-07-21 21:37 ` Rob Herring
  2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2022-06-17 19:04 UTC (permalink / raw)
  To: Thierry Reding
  Cc: linux-rtc, Alexandre Belloni, Alessandro Zummo, devicetree, Rob Herring

On Fri, 17 Jun 2022 13:44:19 +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Convert the DS1307 (and compatible) RTC bindings from the free-form text
> format to json-schema.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v2:
> - add compatible string list for [ st,m41t00, dallas,ds1338 ]
> - allow second interrupt and interrupt-names
> - remove commented-out section
> - allow vcc-supply
> 
>  .../devicetree/bindings/rtc/rtc-ds1307.txt    |  52 ---------
>  .../devicetree/bindings/rtc/rtc-ds1307.yaml   | 102 ++++++++++++++++++
>  2 files changed, 102 insertions(+), 52 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
>  create mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: rtc: Add EM Microelectronic EM3027 bindings
  2022-06-17 11:44 ` [PATCH v2 2/2] dt-bindings: rtc: Add EM Microelectronic EM3027 bindings Thierry Reding
@ 2022-06-17 19:04   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2022-06-17 19:04 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Alessandro Zummo, Rob Herring, Alexandre Belloni, devicetree, linux-rtc

On Fri, 17 Jun 2022 13:44:20 +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Document the bindings for the EM Microelectronic EM3027 RTC.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v2:
> - add to list of trivial RTCs
> 
>  Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema
  2022-06-17 11:44 [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema Thierry Reding
  2022-06-17 11:44 ` [PATCH v2 2/2] dt-bindings: rtc: Add EM Microelectronic EM3027 bindings Thierry Reding
  2022-06-17 19:04 ` [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema Rob Herring
@ 2022-07-21 21:37 ` Rob Herring
  2022-07-22 16:04   ` Alexandre Belloni
  2 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2022-07-21 21:37 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Alexandre Belloni, devicetree, Rob Herring, Alessandro Zummo, linux-rtc

On Fri, 17 Jun 2022 13:44:19 +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Convert the DS1307 (and compatible) RTC bindings from the free-form text
> format to json-schema.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v2:
> - add compatible string list for [ st,m41t00, dallas,ds1338 ]
> - allow second interrupt and interrupt-names
> - remove commented-out section
> - allow vcc-supply
> 
>  .../devicetree/bindings/rtc/rtc-ds1307.txt    |  52 ---------
>  .../devicetree/bindings/rtc/rtc-ds1307.yaml   | 102 ++++++++++++++++++
>  2 files changed, 102 insertions(+), 52 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
>  create mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
> 

Looks like this hasn't been picked up so I've applied both patches, 
thanks!

Rob


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema
  2022-07-21 21:37 ` Rob Herring
@ 2022-07-22 16:04   ` Alexandre Belloni
  2022-08-04 18:03     ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2022-07-22 16:04 UTC (permalink / raw)
  To: Rob Herring
  Cc: Thierry Reding, devicetree, Rob Herring, Alessandro Zummo, linux-rtc

Hello,

On 21/07/2022 15:37:32-0600, Rob Herring wrote:
> On Fri, 17 Jun 2022 13:44:19 +0200, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > Convert the DS1307 (and compatible) RTC bindings from the free-form text
> > format to json-schema.
> > 
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > Changes in v2:
> > - add compatible string list for [ st,m41t00, dallas,ds1338 ]
> > - allow second interrupt and interrupt-names
> > - remove commented-out section
> > - allow vcc-supply
> > 
> >  .../devicetree/bindings/rtc/rtc-ds1307.txt    |  52 ---------
> >  .../devicetree/bindings/rtc/rtc-ds1307.yaml   | 102 ++++++++++++++++++
> >  2 files changed, 102 insertions(+), 52 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
> >  create mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
> > 
> 
> Looks like this hasn't been picked up so I've applied both patches, 
> thanks!

This was on my radar but I'm never sure what you prefer for dt-bindings
only series.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema
  2022-07-22 16:04   ` Alexandre Belloni
@ 2022-08-04 18:03     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2022-08-04 18:03 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Thierry Reding, devicetree, Alessandro Zummo,
	open list:REAL TIME CLOCK (RTC) SUBSYSTEM

On Fri, Jul 22, 2022 at 10:04 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Hello,
>
> On 21/07/2022 15:37:32-0600, Rob Herring wrote:
> > On Fri, 17 Jun 2022 13:44:19 +0200, Thierry Reding wrote:
> > > From: Thierry Reding <treding@nvidia.com>
> > >
> > > Convert the DS1307 (and compatible) RTC bindings from the free-form text
> > > format to json-schema.
> > >
> > > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > > ---
> > > Changes in v2:
> > > - add compatible string list for [ st,m41t00, dallas,ds1338 ]
> > > - allow second interrupt and interrupt-names
> > > - remove commented-out section
> > > - allow vcc-supply
> > >
> > >  .../devicetree/bindings/rtc/rtc-ds1307.txt    |  52 ---------
> > >  .../devicetree/bindings/rtc/rtc-ds1307.yaml   | 102 ++++++++++++++++++
> > >  2 files changed, 102 insertions(+), 52 deletions(-)
> > >  delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.txt
> > >  create mode 100644 Documentation/devicetree/bindings/rtc/rtc-ds1307.yaml
> > >
> >
> > Looks like this hasn't been picked up so I've applied both patches,
> > thanks!
>
> This was on my radar but I'm never sure what you prefer for dt-bindings
> only series.

My (or Krzysztof's) Reviewed-by/Acked-by means I expect it to go via
subsystem tree.

Rob

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-04 18:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 11:44 [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema Thierry Reding
2022-06-17 11:44 ` [PATCH v2 2/2] dt-bindings: rtc: Add EM Microelectronic EM3027 bindings Thierry Reding
2022-06-17 19:04   ` Rob Herring
2022-06-17 19:04 ` [PATCH v2 1/2] dt-bindings: rtc: ds1307: Convert to json-schema Rob Herring
2022-07-21 21:37 ` Rob Herring
2022-07-22 16:04   ` Alexandre Belloni
2022-08-04 18:03     ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.