linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices
@ 2019-05-27 12:00 Maxime Ripard
  2019-05-27 12:00 ` [PATCH 02/10] dt-bindings: rtc: Add YAML schemas for the generic RTC bindings Maxime Ripard
                   ` (9 more replies)
  0 siblings, 10 replies; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The RTC generic bindings has a bunch of devices that have a pretty simple
binding, with just compatible, reg and optional interrupts properties.

This is exactly what the trivial devices YAML schema has been created for,
so let's move those devices there.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/rtc.txt          | 39 +--------
 Documentation/devicetree/bindings/trivial-devices.yaml | 54 +++++++++++-
 2 files changed, 54 insertions(+), 39 deletions(-)

diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt b/Documentation/devicetree/bindings/rtc/rtc.txt
index a97fc6a9a75e..234bd2af1830 100644
--- a/Documentation/devicetree/bindings/rtc/rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/rtc.txt
@@ -31,42 +31,3 @@ below.
                             expressed in femto Farad (fF).
                             The default value shall be listed (if optional),
                             and likewise all valid values.
-
-Trivial RTCs
-------------
-
-This is a list of trivial RTC devices that have simple device tree
-bindings, consisting only of a compatible field, an address and
-possibly an interrupt line.
-
-
-Compatible		Vendor / Chip
-==========		=============
-abracon,abb5zes3	AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface
-abracon,abeoz9		AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface
-dallas,ds1374		I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output
-dallas,ds1672		Dallas DS1672 Real-time Clock
-dallas,ds3232		Extremely Accurate I²C RTC with Integrated Crystal and SRAM
-epson,rx8010		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
-epson,rx8571		I2C-BUS INTERFACE REAL TIME CLOCK MODULE with Battery Backed RAM
-epson,rx8581		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
-emmicro,em3027		EM Microelectronic EM3027 Real-time Clock
-isil,isl1208		Intersil ISL1208 Low Power RTC with Battery Backed SRAM
-isil,isl1218		Intersil ISL1218 Low Power RTC with Battery Backed SRAM
-isil,isl12022		Intersil ISL12022 Real-time Clock
-microcrystal,rv3028	Real Time Clock Module with I2C-Bus
-microcrystal,rv3029	Real Time Clock Module with I2C-Bus
-microcrystal,rv8523	Real Time Clock
-nxp,pcf2127		Real-time clock
-nxp,pcf2129		Real-time clock
-nxp,pcf8563		Real-time clock/calendar
-pericom,pt7c4338	Real-time Clock Module
-ricoh,r2025sd		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-ricoh,r2221tl		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-ricoh,rs5c372a		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-ricoh,rs5c372b		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-ricoh,rv5c386		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-ricoh,rv5c387a		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-sii,s35390a		2-wire CMOS real-time clock
-whwave,sd3078		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
-xircom,x1205		Xircom X1205 I2C RTC
diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 747fd3f689dc..96035c5970d8 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -26,6 +26,10 @@ properties:
   compatible:
     items:
       - enum:
+            # AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface
+          - abracon,abb5zes3
+            # AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface
+          - abracon,abeoz9
             # SMBus/I2C Digital Temperature Sensor in 6-Pin SOT with SMBus Alert and Over Temperature Pin
           - ad,ad7414
             # ADM9240:  Complete System Hardware Monitor for uProcessor-Based Systems
@@ -56,12 +60,18 @@ properties:
           - capella,cm32181
             # CM3232: Ambient Light Sensor
           - capella,cm3232
+            # I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output
+          - dallas,ds1374
             # High-Precision Digital Thermometer
           - dallas,ds1631
+            # Dallas DS1672 Real-time Clock
+          - dallas,ds1672
             # Total-Elapsed-Time Recorder with Alarm
           - dallas,ds1682
             # Tiny Digital Thermometer and Thermostat
           - dallas,ds1775
+            # Extremely Accurate I²C RTC with Integrated Crystal and SRAM
+          - dallas,ds3232
             # CPU Supervisor with Nonvolatile Memory and Programmable I/O
           - dallas,ds4510
             # Digital Thermometer and Thermostat
@@ -80,6 +90,12 @@ properties:
           - domintech,dmard09
             # DMARD10: 3-axis Accelerometer
           - domintech,dmard10
+            # I2C-BUS INTERFACE REAL TIME CLOCK MODULE
+          - epson,rx8010
+            # I2C-BUS INTERFACE REAL TIME CLOCK MODULE with Battery Backed RAM
+          - epson,rx8571
+            # I2C-BUS INTERFACE REAL TIME CLOCK MODULE
+          - epson,rx8581
             # MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
           - fsl,mma7660
             # MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
@@ -100,6 +116,12 @@ properties:
           - infineon,slb9645tt
             # Infineon TLV493D-A1B6 I2C 3D Magnetic Sensor
           - infineon,tlv493d-a1b6
+            # Intersil ISL1208 Low Power RTC with Battery Backed SRAM
+          - isil,isl1208
+            # Intersil ISL1218 Low Power RTC with Battery Backed SRAM
+          - isil,isl1218
+            # Intersil ISL12022 Real-time Clock
+          - isil,isl12022
             # Intersil ISL29028 Ambient Light and Proximity Sensor
           - isil,isl29028
             # Intersil ISL29030 Ambient Light and Proximity Sensor
@@ -274,6 +296,12 @@ properties:
           - microchip,tc654
             # PWM Fan Speed Controller With Fan Fault Detection
           - microchip,tc655
+            # Real Time Clock Module with I2C-Bus
+          - microcrystal,rv3028
+            # Real Time Clock Module with I2C-Bus
+          - microcrystal,rv3029
+            # Real Time Clock
+          - microcrystal,rv8523
             # MiraMEMS DA226 2-axis 14-bit digital accelerometer
           - miramems,da226
             # MiraMEMS DA280 3-axis 14-bit digital accelerometer
@@ -300,18 +328,40 @@ properties:
           - nxp,pca9556
             # 8-bit I2C-bus and SMBus I/O port with reset
           - nxp,pca9557
+            # Real-time clock
+          - nxp,pcf2127
+            # Real-time clock
+          - nxp,pcf2129
+            # Real-time clock/calendar
+          - nxp,pcf8563
             # OKI ML86V7667 video decoder
           - oki,ml86v7667
             # OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus
           - ovti,ov5642
+            # Real-time Clock Module
+          - pericom,pt7c4338
             # 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
           - plx,pex8648
             # Pulsedlight LIDAR range-finding sensor
           - pulsedlight,lidar-lite-v2
+            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
+          - ricoh,r2025sd
+            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
+          - ricoh,r2221tl
+            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
+          - ricoh,rs5c372a
+            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
+          - ricoh,rs5c372b
+            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
+          - ricoh,rv5c386
+            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
+          - ricoh,rv5c387a
             # S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power)
           - samsung,24ad0xd1
             # SGX Sensortech VZ89X Sensors
           - sgx,vz89x
+            # 2-wire CMOS real-time clock
+          - sii,s35390a
             # Relative Humidity and Temperature Sensors
           - silabs,si7020
             # Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
@@ -336,10 +386,14 @@ properties:
           - ti,tmp103
             # Digital Temperature Sensor
           - ti,tmp275
+            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
+          - whwave,sd3078
             # Winbond/Nuvoton H/W Monitor
           - winbond,w83793
             # i2c trusted platform module (TPM)
           - winbond,wpct301
+            # Xircom X1205 I2C RTC
+          - xircom,x1205
 
 required:
   - compatible

base-commit: 89d8c504132e4c247707ac92d4bf6bb6607461dd
-- 
git-series 0.9.1

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

* [PATCH 02/10] dt-bindings: rtc: Add YAML schemas for the generic RTC bindings
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-27 12:00 ` [PATCH 03/10] dt-bindings: rtc: Convert Allwinner A10 RTC to a schema Maxime Ripard
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The real time clocks have a bunch of generic properties that are needed in
a device tree. Add a YAML schemas for those.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/rtc.txt  | 34 +-------------
 Documentation/devicetree/bindings/rtc/rtc.yaml | 50 +++++++++++++++++++-
 2 files changed, 51 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc.yaml

diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt b/Documentation/devicetree/bindings/rtc/rtc.txt
index 234bd2af1830..b8d36fce5e2d 100644
--- a/Documentation/devicetree/bindings/rtc/rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/rtc.txt
@@ -1,33 +1 @@
-Generic device tree bindings for Real Time Clock devices
-========================================================
-
-This document describes generic bindings which can be used to describe Real Time
-Clock devices in a device tree.
-
-Required properties
--------------------
-
-- compatible : name of RTC device following generic names recommended practice.
-
-For other required properties e.g. to describe register sets,
-clocks, etc. check the binding documentation of the specific driver.
-
-Optional properties
--------------------
-
-- start-year : if provided, the default hardware range supported by the RTC is
-               shifted so the first usable year is the specified one.
-
-The following properties may not be supported by all drivers. However, if a
-driver wants to support one of the below features, it should adapt the bindings
-below.
-- trickle-resistor-ohms :   Selected resistor for trickle charger. Should be given
-                            if trickle charger should be enabled
-- trickle-diode-disable :   Do not use internal trickle charger diode Should be
-                            given if internal trickle charger diode should be
-                            disabled
-- wakeup-source :           Enables wake up of host system on alarm
-- quartz-load-femtofarads : The capacitive load of the quartz(x-tal),
-                            expressed in femto Farad (fF).
-                            The default value shall be listed (if optional),
-                            and likewise all valid values.
+This file has been moved to rtc.yaml.
diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml
new file mode 100644
index 000000000000..ee237b2ed66a
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RTC Generic Binding
+
+maintainers:
+  - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+description: |
+  This document describes generic bindings which can be used to
+  describe Real Time Clock devices in a device tree.
+
+properties:
+  $nodename:
+    pattern: "^rtc(@.*|-[0-9a-f])*$"
+
+  quartz-load-femtofarads:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      The capacitive load of the quartz(x-tal), expressed in femto
+      Farad (fF). The default value shall be listed (if optional),
+      and likewise all valid values.
+
+  start-year:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      If provided, the default hardware range supported by the RTC is
+      shifted so the first usable year is the specified one.
+
+  trickle-diode-disable:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Do not use internal trickle charger diode. Should be given if
+      internal trickle charger diode should be disabled.
+
+  trickle-resistor-ohms:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      Selected resistor for trickle charger. Should be given
+      if trickle charger should be enabled.
+
+  wakeup-source:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Enables wake up of host system on alarm.
+
+...
-- 
git-series 0.9.1

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

* [PATCH 03/10] dt-bindings: rtc: Convert Allwinner A10 RTC to a schema
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
  2019-05-27 12:00 ` [PATCH 02/10] dt-bindings: rtc: Add YAML schemas for the generic RTC bindings Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:33   ` Chen-Yu Tsai
  2019-05-27 12:00 ` [PATCH 04/10] dt-bindings: rtc: Convert Allwinner A31 " Maxime Ripard
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The older Allwinner SoCs have an embedded RTC supported in Linux, with a
matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/allwinner,sun4i-a10-rtc.yaml | 43 +++++++++++++++++++++++++++++++++++++++++++
 Documentation/devicetree/bindings/rtc/sunxi-rtc.txt                | 17 -----------------
 2 files changed, 43 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/allwinner,sun4i-a10-rtc.yaml
 delete mode 100644 Documentation/devicetree/bindings/rtc/sunxi-rtc.txt

diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun4i-a10-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun4i-a10-rtc.yaml
new file mode 100644
index 000000000000..46d69c32b89b
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/allwinner,sun4i-a10-rtc.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/allwinner,sun4i-a10-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A10 RTC Device Tree Bindings
+
+allOf:
+  - $ref: "rtc.yaml#"
+
+maintainers:
+  - Chen-Yu Tsai <wens@csie.org>
+  - Maxime Ripard <maxime.ripard@bootlin.com>
+
+properties:
+  compatible:
+    enum:
+      - allwinner,sun4i-a10-rtc
+      - allwinner,sun7i-a20-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc: rtc@1c20d00 {
+        compatible = "allwinner,sun4i-a10-rtc";
+        reg = <0x01c20d00 0x20>;
+        interrupts = <24>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/rtc/sunxi-rtc.txt b/Documentation/devicetree/bindings/rtc/sunxi-rtc.txt
deleted file mode 100644
index 4a8d79c1cf08..000000000000
--- a/Documentation/devicetree/bindings/rtc/sunxi-rtc.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-* sun4i/sun7i Real Time Clock
-
-RTC controller for the Allwinner A10/A20
-
-Required properties:
-- compatible : Should be "allwinner,sun4i-a10-rtc" or "allwinner,sun7i-a20-rtc"
-- reg: physical base address of the controller and length of memory mapped
-  region.
-- interrupts: IRQ line for the RTC.
-
-Example:
-
-rtc: rtc@1c20d00 {
-	compatible = "allwinner,sun4i-a10-rtc";
-	reg = <0x01c20d00 0x20>;
-	interrupts = <24>;
-};
-- 
git-series 0.9.1

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

* [PATCH 04/10] dt-bindings: rtc: Convert Allwinner A31 RTC to a schema
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
  2019-05-27 12:00 ` [PATCH 02/10] dt-bindings: rtc: Add YAML schemas for the generic RTC bindings Maxime Ripard
  2019-05-27 12:00 ` [PATCH 03/10] dt-bindings: rtc: Convert Allwinner A10 RTC to a schema Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:37   ` Chen-Yu Tsai
  2019-05-27 12:00 ` [PATCH 05/10] dt-bindings: rtc: sun6i: Add the R40 RTC compatible Maxime Ripard
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The newer Allwinner SoCs have an embedded RTC supported in Linux, with a
matching Device Tree binding.

Now that we have the DT validation in place, let's convert the device tree
bindings for that controller over to a YAML schemas.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 Documentation/devicetree/bindings/rtc/sun6i-rtc.txt                |  46 +------------------------------
 2 files changed, 112 insertions(+), 46 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
 delete mode 100644 Documentation/devicetree/bindings/rtc/sun6i-rtc.txt

diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
new file mode 100644
index 000000000000..942ddfc1689d
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
@@ -0,0 +1,112 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/allwinner,sun6i-a31-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner A31 RTC Device Tree Bindings
+
+maintainers:
+  - Chen-Yu Tsai <wens@csie.org>
+  - Maxime Ripard <maxime.ripard@bootlin.com>
+
+properties:
+  "#clock-cells":
+    const: 1
+
+  compatible:
+    oneOf:
+      - const: allwinner,sun6i-a31-rtc
+      - const: allwinner,sun8i-a23-rtc
+      - const: allwinner,sun8i-h3-rtc
+      - const: allwinner,sun8i-v3-rtc
+      - const: allwinner,sun50i-h5-rtc
+      - items:
+          - const: allwinner,sun50i-a64-rtc
+          - const: allwinner,sun8i-h3-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    items:
+      - description: RTC Alarm 0
+      - description: RTC Alarm 1
+
+  clocks:
+    maxItems: 1
+
+  clock-output-names:
+    minItems: 1
+    maxItems: 3
+    description:
+      The RTC provides up to three clocks
+        - the Low Frequency Oscillator or LOSC, at index 0,
+        - the Low Frequency Oscillator External output (X32KFOUT in
+          the datasheet), at index 1,
+        - the Internal Oscillator, at index 2.
+
+allOf:
+  - $ref: "rtc.yaml#"
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: allwinner,sun6i-a31-rtc
+
+    then:
+      properties:
+        clock-output-names:
+          minItems: 1
+          maxItems: 1
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - allwinner,sun8i-a23-rtc
+              - allwinner,sun8i-v3-rtc
+
+    then:
+      properties:
+        clock-output-names:
+          minItems: 2
+          maxItems: 2
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - allwinner,sun8i-h3-rtc
+              - allwinner,sun50i-h5-rtc
+
+    then:
+      properties:
+        clock-output-names:
+          minItems: 3
+          maxItems: 3
+
+required:
+  - "#clock-cells"
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-output-names
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc: rtc@1f00000 {
+        compatible = "allwinner,sun6i-a31-rtc";
+        reg = <0x01f00000 0x400>;
+        interrupts = <0 40 4>, <0 41 4>;
+        clock-output-names = "osc32k";
+        clocks = <&ext_osc32k>;
+        #clock-cells = <1>;
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/rtc/sun6i-rtc.txt b/Documentation/devicetree/bindings/rtc/sun6i-rtc.txt
deleted file mode 100644
index 6b732c41392b..000000000000
--- a/Documentation/devicetree/bindings/rtc/sun6i-rtc.txt
+++ /dev/null
@@ -1,46 +0,0 @@
-* sun6i Real Time Clock
-
-RTC controller for the Allwinner A31
-
-Required properties:
-- compatible	: Should be one of the following combinations:
-		    - "allwinner,sun6i-a31-rtc"
-		    - "allwinner,sun8i-a23-rtc"
-		    - "allwinner,sun8i-h3-rtc"
-		    - "allwinner,sun8i-r40-rtc", "allwinner,sun8i-h3-rtc"
-		    - "allwinner,sun8i-v3-rtc"
-		    - "allwinner,sun50i-a64-rtc", "allwinner,sun8i-h3-rtc"
-		    - "allwinner,sun50i-h5-rtc"
-
-		  Where there are two or more compatible strings, this
-		  denotes the hardware covered by the most specific one
-		  is backward-compatible with the latter ones, and the
-		  implementation for the latter ones can be used, albeit
-		  with reduced functionality.
-
-- reg		: physical base address of the controller and length of
-		  memory mapped region.
-- interrupts	: IRQ lines for the RTC alarm 0 and alarm 1, in that order.
-
-Required properties for new device trees
-- clocks	: phandle to the 32kHz external oscillator
-- clock-output-names : names of up to three clock outputs. See below.
-- #clock-cells  : must be equal to 1.
-
-The RTC provides the following clocks at the given indices:
-- 0: LOSC
-- 1: LOSC external output, known as X32KFOUT in the datasheet.
-     This clock is not available on the A31 and is deprecated for old
-     device trees still using the "allwinner,sun6i-a31-rtc" compatible.
-- 2: InternalOSC, or internal RC oscillator (A64/H3/H5 only)
-
-Example:
-
-rtc: rtc@1f00000 {
-	compatible = "allwinner,sun6i-a31-rtc";
-	reg = <0x01f00000 0x400>;
-	interrupts = <0 40 4>, <0 41 4>;
-	clock-output-names = "osc32k";
-	clocks = <&ext_osc32k>;
-	#clock-cells = <1>;
-};
-- 
git-series 0.9.1

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

* [PATCH 05/10] dt-bindings: rtc: sun6i: Add the R40 RTC compatible
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
                   ` (2 preceding siblings ...)
  2019-05-27 12:00 ` [PATCH 04/10] dt-bindings: rtc: Convert Allwinner A31 " Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:45   ` Chen-Yu Tsai
  2019-05-27 12:00 ` [PATCH 06/10] rtc: sun6i: Add R40 compatible Maxime Ripard
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The R40 has a pretty different RTC compared to the other SoCs we've
encountered so far, the most important difference being that it now has
only a single interrupt, compared to the previous SoCs having two.

Let's add a compatible for that.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
index 942ddfc1689d..924622f39c44 100644
--- a/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
@@ -19,6 +19,7 @@ properties:
       - const: allwinner,sun6i-a31-rtc
       - const: allwinner,sun8i-a23-rtc
       - const: allwinner,sun8i-h3-rtc
+      - const: allwinner,sun8i-r40-rtc
       - const: allwinner,sun8i-v3-rtc
       - const: allwinner,sun50i-h5-rtc
       - items:
@@ -29,6 +30,8 @@ properties:
     maxItems: 1
 
   interrupts:
+    minItems: 1
+    maxItems: 2
     items:
       - description: RTC Alarm 0
       - description: RTC Alarm 1
@@ -66,6 +69,7 @@ allOf:
           contains:
             enum:
               - allwinner,sun8i-a23-rtc
+              - allwinner,sun8i-r40-rtc
               - allwinner,sun8i-v3-rtc
 
     then:
@@ -88,6 +92,24 @@ allOf:
           minItems: 3
           maxItems: 3
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: allwinner,sun8i-r40-rtc
+
+    then:
+      properties:
+        interrupts:
+          minItems: 1
+          maxItems: 1
+
+    else:
+      properties:
+        interrupts:
+          minItems: 2
+          maxItems: 2
+
 required:
   - "#clock-cells"
   - compatible
-- 
git-series 0.9.1

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

* [PATCH 06/10] rtc: sun6i: Add R40 compatible
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
                   ` (3 preceding siblings ...)
  2019-05-27 12:00 ` [PATCH 05/10] dt-bindings: rtc: sun6i: Add the R40 RTC compatible Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:46   ` Chen-Yu Tsai
  2019-05-27 12:00 ` [PATCH 07/10] ARM: dts: sun6i: Fix RTC node Maxime Ripard
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The R40 has a quite different RTC, with only a single interrupt line, but
two clock outputs. Let's add a compatible.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 drivers/rtc/rtc-sun6i.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c
index 11f56de52179..9fab8ed856f4 100644
--- a/drivers/rtc/rtc-sun6i.c
+++ b/drivers/rtc/rtc-sun6i.c
@@ -681,6 +681,7 @@ static const struct of_device_id sun6i_rtc_dt_ids[] = {
 	{ .compatible = "allwinner,sun6i-a31-rtc" },
 	{ .compatible = "allwinner,sun8i-a23-rtc" },
 	{ .compatible = "allwinner,sun8i-h3-rtc" },
+	{ .compatible = "allwinner,sun8i-r40-rtc" },
 	{ .compatible = "allwinner,sun8i-v3-rtc" },
 	{ .compatible = "allwinner,sun50i-h5-rtc" },
 	{ /* sentinel */ },
-- 
git-series 0.9.1

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

* [PATCH 07/10] ARM: dts: sun6i: Fix RTC node
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
                   ` (4 preceding siblings ...)
  2019-05-27 12:00 ` [PATCH 06/10] rtc: sun6i: Add R40 compatible Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:46   ` Chen-Yu Tsai
  2019-05-27 12:00 ` [PATCH 08/10] ARM: dts: sun6i: Add external crystals accuracy Maxime Ripard
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The RTC node doesn't match what is described in the binding for historical
reasons. Let's add the proper description.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 arch/arm/boot/dts/sun6i-a31.dtsi | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index c04efad81bbc..8832650cdc8d 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -223,7 +223,7 @@
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <32768>;
-			clock-output-names = "osc32k";
+			clock-output-names = "ext_osc32k";
 		};
 
 		/*
@@ -588,7 +588,7 @@
 		ccu: clock@1c20000 {
 			compatible = "allwinner,sun6i-a31-ccu";
 			reg = <0x01c20000 0x400>;
-			clocks = <&osc24M>, <&osc32k>;
+			clocks = <&osc24M>, <&rtc 0>;
 			clock-names = "hosc", "losc";
 			#clock-cells = <1>;
 			#reset-cells = <1>;
@@ -601,7 +601,7 @@
 				     <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&ccu CLK_APB1_PIO>, <&osc24M>, <&osc32k>;
+			clocks = <&ccu CLK_APB1_PIO>, <&osc24M>, <&rtc 0>;
 			clock-names = "apb", "hosc", "losc";
 			gpio-controller;
 			interrupt-controller;
@@ -1279,10 +1279,13 @@
 		};
 
 		rtc: rtc@1f00000 {
+			#clock-cells = <1>;
 			compatible = "allwinner,sun6i-a31-rtc";
 			reg = <0x01f00000 0x54>;
 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&osc32k>;
+			clock-output-names = "osc32k";
 		};
 
 		nmi_intc: interrupt-controller@1f00c00 {
@@ -1300,7 +1303,7 @@
 			ar100: ar100_clk {
 				compatible = "allwinner,sun6i-a31-ar100-clk";
 				#clock-cells = <0>;
-				clocks = <&osc32k>, <&osc24M>,
+				clocks = <&rtc 0>, <&osc24M>,
 					 <&ccu CLK_PLL_PERIPH>,
 					 <&ccu CLK_PLL_PERIPH>;
 				clock-output-names = "ar100";
@@ -1335,7 +1338,7 @@
 			ir_clk: ir_clk {
 				#clock-cells = <0>;
 				compatible = "allwinner,sun4i-a10-mod0-clk";
-				clocks = <&osc32k>, <&osc24M>;
+				clocks = <&rtc 0>, <&osc24M>;
 				clock-output-names = "ir";
 			};
 
@@ -1365,7 +1368,7 @@
 			reg = <0x01f02c00 0x400>;
 			interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&apb0_gates 0>, <&osc24M>, <&osc32k>;
+			clocks = <&apb0_gates 0>, <&osc24M>, <&rtc 0>;
 			clock-names = "apb", "hosc", "losc";
 			resets = <&apb0_rst 0>;
 			gpio-controller;
-- 
git-series 0.9.1

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

* [PATCH 08/10] ARM: dts: sun6i: Add external crystals accuracy
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
                   ` (5 preceding siblings ...)
  2019-05-27 12:00 ` [PATCH 07/10] ARM: dts: sun6i: Fix RTC node Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:35   ` Chen-Yu Tsai
  2019-05-27 12:00 ` [PATCH 09/10] ARM: dts: sun8i: v3s: Fix the RTC node Maxime Ripard
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

The A31 datasheet mandates oscillators accuracy to be within 50ppm. Let's
add that accuracy to their device tree nodes.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 arch/arm/boot/dts/sun6i-a31.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
index 8832650cdc8d..f564ba9a9c2d 100644
--- a/arch/arm/boot/dts/sun6i-a31.dtsi
+++ b/arch/arm/boot/dts/sun6i-a31.dtsi
@@ -216,6 +216,7 @@
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <24000000>;
+			clock-accuracy = <50000>;
 			clock-output-names = "osc24M";
 		};
 
@@ -223,6 +224,7 @@
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <32768>;
+			clock-accuracy = <50000>;
 			clock-output-names = "ext_osc32k";
 		};
 
-- 
git-series 0.9.1

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

* [PATCH 09/10] ARM: dts: sun8i: v3s: Fix the RTC node
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
                   ` (6 preceding siblings ...)
  2019-05-27 12:00 ` [PATCH 08/10] ARM: dts: sun6i: Add external crystals accuracy Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:47   ` Chen-Yu Tsai
  2019-05-27 12:00 ` [PATCH 10/10] ARM: dts: r40: Change the RTC compatible Maxime Ripard
  2019-05-27 12:06 ` [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Alexandre Belloni
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

For some reason, while the v3s has a dedicated compatible in the RTC
binding, the one actually used was the A31's. However, it turns out that
the controller is pretty different (which justified the compatible).

Let's use the proper compatible, and use the proper binding description as
well.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 arch/arm/boot/dts/sun8i-v3s.dtsi | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-v3s.dtsi b/arch/arm/boot/dts/sun8i-v3s.dtsi
index df72b1719c34..d7aef128acb3 100644
--- a/arch/arm/boot/dts/sun8i-v3s.dtsi
+++ b/arch/arm/boot/dts/sun8i-v3s.dtsi
@@ -84,6 +84,7 @@
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <24000000>;
+			clock-accuracy = <50000>;
 			clock-output-names = "osc24M";
 		};
 
@@ -91,7 +92,8 @@
 			#clock-cells = <0>;
 			compatible = "fixed-clock";
 			clock-frequency = <32768>;
-			clock-output-names = "osc32k";
+			clock-accuracy = <50000>;
+			clock-output-names = "ext-osc32k";
 		};
 	};
 
@@ -264,17 +266,20 @@
 		ccu: clock@1c20000 {
 			compatible = "allwinner,sun8i-v3s-ccu";
 			reg = <0x01c20000 0x400>;
-			clocks = <&osc24M>, <&osc32k>;
+			clocks = <&osc24M>, <&rtc 0>;
 			clock-names = "hosc", "losc";
 			#clock-cells = <1>;
 			#reset-cells = <1>;
 		};
 
 		rtc: rtc@1c20400 {
-			compatible = "allwinner,sun6i-a31-rtc";
+			#clock-cells = <1>;
+			compatible = "allwinner,sun8i-v3-rtc";
 			reg = <0x01c20400 0x54>;
 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&osc32k>;
+			clock-output-names = "osc32k", "osc32k-out";
 		};
 
 		pio: pinctrl@1c20800 {
@@ -282,7 +287,7 @@
 			reg = <0x01c20800 0x400>;
 			interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
-			clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc32k>;
+			clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&rtc 0>;
 			clock-names = "apb", "hosc", "losc";
 			gpio-controller;
 			#gpio-cells = <3>;
-- 
git-series 0.9.1

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

* [PATCH 10/10] ARM: dts: r40: Change the RTC compatible
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
                   ` (7 preceding siblings ...)
  2019-05-27 12:00 ` [PATCH 09/10] ARM: dts: sun8i: v3s: Fix the RTC node Maxime Ripard
@ 2019-05-27 12:00 ` Maxime Ripard
  2019-05-28  3:47   ` Chen-Yu Tsai
  2019-05-27 12:06 ` [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Alexandre Belloni
  9 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:00 UTC (permalink / raw)
  To: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	Chen-Yu Tsai, Maxime Ripard
  Cc: devicetree, linux-arm-kernel, linux-rtc

Unlike what's being reported in the device tree so far, the RTC in the R40
is quite different from the H3. Indeed it doesn't have the internal
oscillator output, and it has only a single interrupt. Let's add a
compatible for it.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 arch/arm/boot/dts/sun8i-r40.dtsi | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi
index bb856e53b806..96fe39f27f24 100644
--- a/arch/arm/boot/dts/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/sun8i-r40.dtsi
@@ -318,13 +318,12 @@
 		};
 
 		rtc: rtc@1c20400 {
-			compatible = "allwinner,sun8i-r40-rtc",
-				     "allwinner,sun8i-h3-rtc";
+			#clock-cells = <1>;
+			compatible = "allwinner,sun8i-r40-rtc";
 			reg = <0x01c20400 0x400>;
 			interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
-			clock-output-names = "osc32k", "osc32k-out";
 			clocks = <&osc32k>;
-			#clock-cells = <1>;
+			clock-output-names = "osc32k", "osc32k-out";
 		};
 
 		pio: pinctrl@1c20800 {
-- 
git-series 0.9.1

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

* Re: [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices
  2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
                   ` (8 preceding siblings ...)
  2019-05-27 12:00 ` [PATCH 10/10] ARM: dts: r40: Change the RTC compatible Maxime Ripard
@ 2019-05-27 12:06 ` Alexandre Belloni
  2019-05-27 12:18   ` Maxime Ripard
  9 siblings, 1 reply; 23+ messages in thread
From: Alexandre Belloni @ 2019-05-27 12:06 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, Rob Herring, Frank Rowand, Chen-Yu Tsai,
	devicetree, linux-arm-kernel, linux-rtc

On 27/05/2019 14:00:33+0200, Maxime Ripard wrote:
> The RTC generic bindings has a bunch of devices that have a pretty simple
> binding, with just compatible, reg and optional interrupts properties.
> 

This is not true, they all also support the star-year property, this is
why they are not in the trivial-devices file anymore.

> This is exactly what the trivial devices YAML schema has been created for,
> so let's move those devices there.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
> ---
>  Documentation/devicetree/bindings/rtc/rtc.txt          | 39 +--------
>  Documentation/devicetree/bindings/trivial-devices.yaml | 54 +++++++++++-
>  2 files changed, 54 insertions(+), 39 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt b/Documentation/devicetree/bindings/rtc/rtc.txt
> index a97fc6a9a75e..234bd2af1830 100644
> --- a/Documentation/devicetree/bindings/rtc/rtc.txt
> +++ b/Documentation/devicetree/bindings/rtc/rtc.txt
> @@ -31,42 +31,3 @@ below.
>                              expressed in femto Farad (fF).
>                              The default value shall be listed (if optional),
>                              and likewise all valid values.
> -
> -Trivial RTCs
> -------------
> -
> -This is a list of trivial RTC devices that have simple device tree
> -bindings, consisting only of a compatible field, an address and
> -possibly an interrupt line.
> -
> -
> -Compatible		Vendor / Chip
> -==========		=============
> -abracon,abb5zes3	AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface
> -abracon,abeoz9		AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface
> -dallas,ds1374		I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output
> -dallas,ds1672		Dallas DS1672 Real-time Clock
> -dallas,ds3232		Extremely Accurate I²C RTC with Integrated Crystal and SRAM
> -epson,rx8010		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
> -epson,rx8571		I2C-BUS INTERFACE REAL TIME CLOCK MODULE with Battery Backed RAM
> -epson,rx8581		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
> -emmicro,em3027		EM Microelectronic EM3027 Real-time Clock
> -isil,isl1208		Intersil ISL1208 Low Power RTC with Battery Backed SRAM
> -isil,isl1218		Intersil ISL1218 Low Power RTC with Battery Backed SRAM
> -isil,isl12022		Intersil ISL12022 Real-time Clock
> -microcrystal,rv3028	Real Time Clock Module with I2C-Bus
> -microcrystal,rv3029	Real Time Clock Module with I2C-Bus
> -microcrystal,rv8523	Real Time Clock
> -nxp,pcf2127		Real-time clock
> -nxp,pcf2129		Real-time clock
> -nxp,pcf8563		Real-time clock/calendar
> -pericom,pt7c4338	Real-time Clock Module
> -ricoh,r2025sd		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> -ricoh,r2221tl		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> -ricoh,rs5c372a		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> -ricoh,rs5c372b		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> -ricoh,rv5c386		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> -ricoh,rv5c387a		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> -sii,s35390a		2-wire CMOS real-time clock
> -whwave,sd3078		I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> -xircom,x1205		Xircom X1205 I2C RTC
> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> index 747fd3f689dc..96035c5970d8 100644
> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> @@ -26,6 +26,10 @@ properties:
>    compatible:
>      items:
>        - enum:
> +            # AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface
> +          - abracon,abb5zes3
> +            # AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface
> +          - abracon,abeoz9
>              # SMBus/I2C Digital Temperature Sensor in 6-Pin SOT with SMBus Alert and Over Temperature Pin
>            - ad,ad7414
>              # ADM9240:  Complete System Hardware Monitor for uProcessor-Based Systems
> @@ -56,12 +60,18 @@ properties:
>            - capella,cm32181
>              # CM3232: Ambient Light Sensor
>            - capella,cm3232
> +            # I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output
> +          - dallas,ds1374
>              # High-Precision Digital Thermometer
>            - dallas,ds1631
> +            # Dallas DS1672 Real-time Clock
> +          - dallas,ds1672
>              # Total-Elapsed-Time Recorder with Alarm
>            - dallas,ds1682
>              # Tiny Digital Thermometer and Thermostat
>            - dallas,ds1775
> +            # Extremely Accurate I²C RTC with Integrated Crystal and SRAM
> +          - dallas,ds3232
>              # CPU Supervisor with Nonvolatile Memory and Programmable I/O
>            - dallas,ds4510
>              # Digital Thermometer and Thermostat
> @@ -80,6 +90,12 @@ properties:
>            - domintech,dmard09
>              # DMARD10: 3-axis Accelerometer
>            - domintech,dmard10
> +            # I2C-BUS INTERFACE REAL TIME CLOCK MODULE
> +          - epson,rx8010
> +            # I2C-BUS INTERFACE REAL TIME CLOCK MODULE with Battery Backed RAM
> +          - epson,rx8571
> +            # I2C-BUS INTERFACE REAL TIME CLOCK MODULE
> +          - epson,rx8581
>              # MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
>            - fsl,mma7660
>              # MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
> @@ -100,6 +116,12 @@ properties:
>            - infineon,slb9645tt
>              # Infineon TLV493D-A1B6 I2C 3D Magnetic Sensor
>            - infineon,tlv493d-a1b6
> +            # Intersil ISL1208 Low Power RTC with Battery Backed SRAM
> +          - isil,isl1208
> +            # Intersil ISL1218 Low Power RTC with Battery Backed SRAM
> +          - isil,isl1218
> +            # Intersil ISL12022 Real-time Clock
> +          - isil,isl12022
>              # Intersil ISL29028 Ambient Light and Proximity Sensor
>            - isil,isl29028
>              # Intersil ISL29030 Ambient Light and Proximity Sensor
> @@ -274,6 +296,12 @@ properties:
>            - microchip,tc654
>              # PWM Fan Speed Controller With Fan Fault Detection
>            - microchip,tc655
> +            # Real Time Clock Module with I2C-Bus
> +          - microcrystal,rv3028
> +            # Real Time Clock Module with I2C-Bus
> +          - microcrystal,rv3029
> +            # Real Time Clock
> +          - microcrystal,rv8523
>              # MiraMEMS DA226 2-axis 14-bit digital accelerometer
>            - miramems,da226
>              # MiraMEMS DA280 3-axis 14-bit digital accelerometer
> @@ -300,18 +328,40 @@ properties:
>            - nxp,pca9556
>              # 8-bit I2C-bus and SMBus I/O port with reset
>            - nxp,pca9557
> +            # Real-time clock
> +          - nxp,pcf2127
> +            # Real-time clock
> +          - nxp,pcf2129
> +            # Real-time clock/calendar
> +          - nxp,pcf8563
>              # OKI ML86V7667 video decoder
>            - oki,ml86v7667
>              # OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus
>            - ovti,ov5642
> +            # Real-time Clock Module
> +          - pericom,pt7c4338
>              # 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
>            - plx,pex8648
>              # Pulsedlight LIDAR range-finding sensor
>            - pulsedlight,lidar-lite-v2
> +            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> +          - ricoh,r2025sd
> +            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> +          - ricoh,r2221tl
> +            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> +          - ricoh,rs5c372a
> +            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> +          - ricoh,rs5c372b
> +            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> +          - ricoh,rv5c386
> +            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> +          - ricoh,rv5c387a
>              # S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power)
>            - samsung,24ad0xd1
>              # SGX Sensortech VZ89X Sensors
>            - sgx,vz89x
> +            # 2-wire CMOS real-time clock
> +          - sii,s35390a
>              # Relative Humidity and Temperature Sensors
>            - silabs,si7020
>              # Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
> @@ -336,10 +386,14 @@ properties:
>            - ti,tmp103
>              # Digital Temperature Sensor
>            - ti,tmp275
> +            # I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
> +          - whwave,sd3078
>              # Winbond/Nuvoton H/W Monitor
>            - winbond,w83793
>              # i2c trusted platform module (TPM)
>            - winbond,wpct301
> +            # Xircom X1205 I2C RTC
> +          - xircom,x1205
>  
>  required:
>    - compatible
> 
> base-commit: 89d8c504132e4c247707ac92d4bf6bb6607461dd
> -- 
> git-series 0.9.1

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

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

* Re: [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices
  2019-05-27 12:06 ` [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Alexandre Belloni
@ 2019-05-27 12:18   ` Maxime Ripard
  2019-05-27 16:06     ` Alexandre Belloni
  0 siblings, 1 reply; 23+ messages in thread
From: Maxime Ripard @ 2019-05-27 12:18 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Mark Rutland, Rob Herring, Frank Rowand, Chen-Yu Tsai,
	devicetree, linux-arm-kernel, linux-rtc

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

Hi Alex,

On Mon, May 27, 2019 at 02:06:26PM +0200, Alexandre Belloni wrote:
> On 27/05/2019 14:00:33+0200, Maxime Ripard wrote:
> > The RTC generic bindings has a bunch of devices that have a pretty simple
> > binding, with just compatible, reg and optional interrupts properties.
> >
>
> This is not true, they all also support the star-year property, this is
> why they are not in the trivial-devices file anymore.

Ok, I misunderstood the binding then.

Should we create a separate file for the trivial RTC, on the model of
the trivial-devices but supporting all the RTC properties?

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices
  2019-05-27 12:18   ` Maxime Ripard
@ 2019-05-27 16:06     ` Alexandre Belloni
  2019-05-28 12:20       ` Maxime Ripard
  0 siblings, 1 reply; 23+ messages in thread
From: Alexandre Belloni @ 2019-05-27 16:06 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, Rob Herring, Frank Rowand, Chen-Yu Tsai,
	devicetree, linux-arm-kernel, linux-rtc

On 27/05/2019 14:18:32+0200, Maxime Ripard wrote:
> Hi Alex,
> 
> On Mon, May 27, 2019 at 02:06:26PM +0200, Alexandre Belloni wrote:
> > On 27/05/2019 14:00:33+0200, Maxime Ripard wrote:
> > > The RTC generic bindings has a bunch of devices that have a pretty simple
> > > binding, with just compatible, reg and optional interrupts properties.
> > >
> >
> > This is not true, they all also support the star-year property, this is
> > why they are not in the trivial-devices file anymore.
> 
> Ok, I misunderstood the binding then.
> 
> Should we create a separate file for the trivial RTC, on the model of
> the trivial-devices but supporting all the RTC properties?
> 

I would say that this is the way forward. Note that all the RTCs support
start-year but you will have to check for the other properties.


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

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

* Re: [PATCH 03/10] dt-bindings: rtc: Convert Allwinner A10 RTC to a schema
  2019-05-27 12:00 ` [PATCH 03/10] dt-bindings: rtc: Convert Allwinner A10 RTC to a schema Maxime Ripard
@ 2019-05-28  3:33   ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:33 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:00 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> The older Allwinner SoCs have an embedded RTC supported in Linux, with a
> matching Device Tree binding.
>
> Now that we have the DT validation in place, let's convert the device tree
> bindings for that controller over to a YAML schemas.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 08/10] ARM: dts: sun6i: Add external crystals accuracy
  2019-05-27 12:00 ` [PATCH 08/10] ARM: dts: sun6i: Add external crystals accuracy Maxime Ripard
@ 2019-05-28  3:35   ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:35 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:01 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> The A31 datasheet mandates oscillators accuracy to be within 50ppm. Let's
> add that accuracy to their device tree nodes.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 04/10] dt-bindings: rtc: Convert Allwinner A31 RTC to a schema
  2019-05-27 12:00 ` [PATCH 04/10] dt-bindings: rtc: Convert Allwinner A31 " Maxime Ripard
@ 2019-05-28  3:37   ` Chen-Yu Tsai
  2019-05-28  3:45     ` Chen-Yu Tsai
  0 siblings, 1 reply; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:37 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:00 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> The newer Allwinner SoCs have an embedded RTC supported in Linux, with a
> matching Device Tree binding.
>
> Now that we have the DT validation in place, let's convert the device tree
> bindings for that controller over to a YAML schemas.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Without understanding the full detains of JSON schema, the new description
looks correct to me.

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 04/10] dt-bindings: rtc: Convert Allwinner A31 RTC to a schema
  2019-05-28  3:37   ` Chen-Yu Tsai
@ 2019-05-28  3:45     ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:45 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Tue, May 28, 2019 at 11:37 AM Chen-Yu Tsai <wens@csie.org> wrote:
>
> On Mon, May 27, 2019 at 8:00 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > The newer Allwinner SoCs have an embedded RTC supported in Linux, with a
> > matching Device Tree binding.
> >
> > Now that we have the DT validation in place, let's convert the device tree
> > bindings for that controller over to a YAML schemas.
> >
> > Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
>
> Without understanding the full detains of JSON schema, the new description
> looks correct to me.
>
> Acked-by: Chen-Yu Tsai <wens@csie.org>

You should probably mention the R40 compatible was dropped in favor of
the new one in the next patch. Or was that an error?

ChenYu

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

* Re: [PATCH 05/10] dt-bindings: rtc: sun6i: Add the R40 RTC compatible
  2019-05-27 12:00 ` [PATCH 05/10] dt-bindings: rtc: sun6i: Add the R40 RTC compatible Maxime Ripard
@ 2019-05-28  3:45   ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:45 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:01 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> The R40 has a pretty different RTC compared to the other SoCs we've
> encountered so far, the most important difference being that it now has
> only a single interrupt, compared to the previous SoCs having two.
>
> Let's add a compatible for that.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 06/10] rtc: sun6i: Add R40 compatible
  2019-05-27 12:00 ` [PATCH 06/10] rtc: sun6i: Add R40 compatible Maxime Ripard
@ 2019-05-28  3:46   ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:46 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:01 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> The R40 has a quite different RTC, with only a single interrupt line, but
> two clock outputs. Let's add a compatible.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 07/10] ARM: dts: sun6i: Fix RTC node
  2019-05-27 12:00 ` [PATCH 07/10] ARM: dts: sun6i: Fix RTC node Maxime Ripard
@ 2019-05-28  3:46   ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:46 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:01 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> The RTC node doesn't match what is described in the binding for historical
> reasons. Let's add the proper description.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 09/10] ARM: dts: sun8i: v3s: Fix the RTC node
  2019-05-27 12:00 ` [PATCH 09/10] ARM: dts: sun8i: v3s: Fix the RTC node Maxime Ripard
@ 2019-05-28  3:47   ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:47 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:01 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> For some reason, while the v3s has a dedicated compatible in the RTC
> binding, the one actually used was the A31's. However, it turns out that
> the controller is pretty different (which justified the compatible).
>
> Let's use the proper compatible, and use the proper binding description as
> well.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

You may want to split out the clock-accuracy bits, since they are unrelated.

Otherwise, for both resulting patches,

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 10/10] ARM: dts: r40: Change the RTC compatible
  2019-05-27 12:00 ` [PATCH 10/10] ARM: dts: r40: Change the RTC compatible Maxime Ripard
@ 2019-05-28  3:47   ` Chen-Yu Tsai
  0 siblings, 0 replies; 23+ messages in thread
From: Chen-Yu Tsai @ 2019-05-28  3:47 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Alexandre Belloni, Mark Rutland, Rob Herring, Frank Rowand,
	devicetree, linux-arm-kernel, linux-rtc

On Mon, May 27, 2019 at 8:01 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> Unlike what's being reported in the device tree so far, the RTC in the R40
> is quite different from the H3. Indeed it doesn't have the internal
> oscillator output, and it has only a single interrupt. Let's add a
> compatible for it.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>

There's a lot of unnecessary line reordering. Otherwise,

Acked-by: Chen-Yu Tsai <wens@csie.org>

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

* Re: [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices
  2019-05-27 16:06     ` Alexandre Belloni
@ 2019-05-28 12:20       ` Maxime Ripard
  0 siblings, 0 replies; 23+ messages in thread
From: Maxime Ripard @ 2019-05-28 12:20 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Mark Rutland, Rob Herring, Frank Rowand, Chen-Yu Tsai,
	devicetree, linux-arm-kernel, linux-rtc

Hi,

On Mon, May 27, 2019 at 06:06:57PM +0200, Alexandre Belloni wrote:
> On 27/05/2019 14:18:32+0200, Maxime Ripard wrote:
> > Hi Alex,
> >
> > On Mon, May 27, 2019 at 02:06:26PM +0200, Alexandre Belloni wrote:
> > > On 27/05/2019 14:00:33+0200, Maxime Ripard wrote:
> > > > The RTC generic bindings has a bunch of devices that have a pretty simple
> > > > binding, with just compatible, reg and optional interrupts properties.
> > > >
> > >
> > > This is not true, they all also support the star-year property, this is
> > > why they are not in the trivial-devices file anymore.
> >
> > Ok, I misunderstood the binding then.
> >
> > Should we create a separate file for the trivial RTC, on the model of
> > the trivial-devices but supporting all the RTC properties?
>
> I would say that this is the way forward. Note that all the RTCs
> support start-year but you will have to check for the other
> properties.

The way this will work is that it's a two layers thing. Patch 2
creates a generic RTC binding schema that will match on two things:
  - Schemas including it directly,
  - any devicetree node following the node name pattern.

The point of that schema is to validate that every node (or binding),
if it has those properties, the schemas will make sure that it's the
proper type, (and if we would have any) ranges, etc.

Then, it's up for the driver schemas to do a more on-point validation,
with whatever constraints they have. They can choose to restrict the
set of properties, or not to, it's really up to the device schema.

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2019-05-28 12:20 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 12:00 [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Maxime Ripard
2019-05-27 12:00 ` [PATCH 02/10] dt-bindings: rtc: Add YAML schemas for the generic RTC bindings Maxime Ripard
2019-05-27 12:00 ` [PATCH 03/10] dt-bindings: rtc: Convert Allwinner A10 RTC to a schema Maxime Ripard
2019-05-28  3:33   ` Chen-Yu Tsai
2019-05-27 12:00 ` [PATCH 04/10] dt-bindings: rtc: Convert Allwinner A31 " Maxime Ripard
2019-05-28  3:37   ` Chen-Yu Tsai
2019-05-28  3:45     ` Chen-Yu Tsai
2019-05-27 12:00 ` [PATCH 05/10] dt-bindings: rtc: sun6i: Add the R40 RTC compatible Maxime Ripard
2019-05-28  3:45   ` Chen-Yu Tsai
2019-05-27 12:00 ` [PATCH 06/10] rtc: sun6i: Add R40 compatible Maxime Ripard
2019-05-28  3:46   ` Chen-Yu Tsai
2019-05-27 12:00 ` [PATCH 07/10] ARM: dts: sun6i: Fix RTC node Maxime Ripard
2019-05-28  3:46   ` Chen-Yu Tsai
2019-05-27 12:00 ` [PATCH 08/10] ARM: dts: sun6i: Add external crystals accuracy Maxime Ripard
2019-05-28  3:35   ` Chen-Yu Tsai
2019-05-27 12:00 ` [PATCH 09/10] ARM: dts: sun8i: v3s: Fix the RTC node Maxime Ripard
2019-05-28  3:47   ` Chen-Yu Tsai
2019-05-27 12:00 ` [PATCH 10/10] ARM: dts: r40: Change the RTC compatible Maxime Ripard
2019-05-28  3:47   ` Chen-Yu Tsai
2019-05-27 12:06 ` [PATCH 01/10] dt-bindings: rtc: Move trivial RTC over to trivial devices Alexandre Belloni
2019-05-27 12:18   ` Maxime Ripard
2019-05-27 16:06     ` Alexandre Belloni
2019-05-28 12:20       ` Maxime Ripard

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).