Linux-RTC Archive on lore.kernel.org
 help / Atom feed
* [PATCH 1/2] dt-bindings: rtc: add generic bindings
@ 2018-11-11 19:31 Alexandre Belloni
  2018-11-11 19:31 ` [PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt Alexandre Belloni
  2018-12-06 10:36 ` [PATCH 1/2] dt-bindings: rtc: add generic bindings Geert Uytterhoeven
  0 siblings, 2 replies; 7+ messages in thread
From: Alexandre Belloni @ 2018-11-11 19:31 UTC (permalink / raw)
  To: Rob Herring, linux-rtc; +Cc: devicetree, linux-kernel, Alexandre Belloni

Add generic binding documentation for the RTC subsystem.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/rtc.txt | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc.txt

diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt b/Documentation/devicetree/bindings/rtc/rtc.txt
new file mode 100644
index 000000000000..221b7da50aca
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc.txt
@@ -0,0 +1,30 @@
+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
+
-- 
2.19.1


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

* [PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt
  2018-11-11 19:31 [PATCH 1/2] dt-bindings: rtc: add generic bindings Alexandre Belloni
@ 2018-11-11 19:31 ` Alexandre Belloni
  2018-12-03 23:45   ` Rob Herring
  2018-12-06 10:36 ` [PATCH 1/2] dt-bindings: rtc: add generic bindings Geert Uytterhoeven
  1 sibling, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2018-11-11 19:31 UTC (permalink / raw)
  To: Rob Herring, linux-rtc; +Cc: devicetree, linux-kernel, Alexandre Belloni

Move trivial RTCs to the rtc generic binding documentation as they all also
support at least 'start-year'.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 Documentation/devicetree/bindings/rtc/rtc.txt | 34 +++++++++++++++++++
 .../devicetree/bindings/trivial-devices.txt   | 24 -------------
 2 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt b/Documentation/devicetree/bindings/rtc/rtc.txt
index 221b7da50aca..7c8da6926095 100644
--- a/Documentation/devicetree/bindings/rtc/rtc.txt
+++ b/Documentation/devicetree/bindings/rtc/rtc.txt
@@ -28,3 +28,37 @@ below.
                           disabled
 - wakeup-source :         Enables wake up of host system on alarm
 
+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
+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,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,rv3029	Real Time Clock Module with I2C-Bus
+nxp,pcf2127		Real-time clock
+nxp,pcf2129		Real-time clock
+nxp,pcf8523		Real-time Clock
+nxp,pcf8563		Real-time clock/calendar
+nxp,pcf85063		Tiny Real-Time Clock
+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
diff --git a/Documentation/devicetree/bindings/trivial-devices.txt b/Documentation/devicetree/bindings/trivial-devices.txt
index 6ab001fa1ed4..fda7a0f50c1e 100644
--- a/Documentation/devicetree/bindings/trivial-devices.txt
+++ b/Documentation/devicetree/bindings/trivial-devices.txt
@@ -9,7 +9,6 @@ document for it just like any other devices.
 
 Compatible		Vendor / Chip
 ==========		=============
-abracon,abb5zes3		AB-RTCMC-32.768kHz-B5ZE-S3: Real Time Clock/Calendar Module with I2C Interface
 ad,ad7414		SMBus/I2C Digital Temperature Sensor in 6-Pin SOT with SMBus Alert and Over Temperature Pin
 ad,adm9240		ADM9240:  Complete System Hardware Monitor for uProcessor-Based Systems
 adi,adt7461		+/-1C TDM Extended Temp Range I.C
@@ -25,12 +24,9 @@ at,24c08		i2c serial eeprom  (24cxx)
 atmel,at97sc3204t	i2c trusted platform module (TPM)
 capella,cm32181		CM32181: Ambient Light Sensor
 capella,cm3232		CM3232: Ambient Light Sensor
-dallas,ds1374		I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output
 dallas,ds1631		High-Precision Digital Thermometer
-dallas,ds1672		Dallas DS1672 Real-time Clock
 dallas,ds1682		Total-Elapsed-Time Recorder with Alarm
 dallas,ds1775		Tiny Digital Thermometer and Thermostat
-dallas,ds3232		Extremely Accurate I²C RTC with Integrated Crystal and SRAM
 dallas,ds4510		CPU Supervisor with Nonvolatile Memory and Programmable I/O
 dallas,ds75		Digital Thermometer and Thermostat
 devantech,srf02		Devantech SRF02 ultrasonic ranger in I2C mode
@@ -40,9 +36,6 @@ dlg,da9053		DA9053: flexible system level PMIC with multicore support
 dlg,da9063		DA9063: system PMIC for quad-core application processors
 domintech,dmard09	DMARD09: 3-axis Accelerometer
 domintech,dmard10	DMARD10: 3-axis Accelerometer
-epson,rx8010		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
-epson,rx8581		I2C-BUS INTERFACE REAL TIME CLOCK MODULE
-emmicro,em3027		EM Microelectronic EM3027 Real-time Clock
 fsl,mag3110		MAG3110: Xtrinsic High Accuracy, 3D Magnetometer
 fsl,mma7660		MMA7660FC: 3-Axis Orientation/Motion Detection Sensor
 fsl,mma8450		MMA8450Q: Xtrinsic Low-power, 3-axis Xtrinsic Accelerometer
@@ -53,9 +46,6 @@ gmt,g751		G751: Digital Temperature Sensor and Thermal Watchdog with Two-Wire In
 infineon,slb9635tt	Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz)
 infineon,slb9645tt	Infineon SLB9645 I2C TPM (new protocol, max 400khz)
 infineon,tlv493d-a1b6	Infineon TLV493D-A1B6 I2C 3D Magnetic Sensor
-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
 isil,isl29028		Intersil ISL29028 Ambient Light and Proximity Sensor
 isil,isl29030		Intersil ISL29030 Ambient Light and Proximity Sensor
 maxim,ds1050		5 Bit Programmable, Pulse-Width Modulator
@@ -142,7 +132,6 @@ microchip,mcp4662-503	Microchip 8-bit Dual I2C Digital Potentiometer with NV Mem
 microchip,mcp4662-104	Microchip 8-bit Dual I2C Digital Potentiometer with NV Memory (100k)
 microchip,tc654		PWM Fan Speed Controller With Fan Fault Detection
 microchip,tc655		PWM Fan Speed Controller With Fan Fault Detection
-microcrystal,rv3029	Real Time Clock Module with I2C-Bus
 miramems,da226		MiraMEMS DA226 2-axis 14-bit digital accelerometer
 miramems,da280		MiraMEMS DA280 3-axis 14-bit digital accelerometer
 miramems,da311		MiraMEMS DA311 3-axis 12-bit digital accelerometer
@@ -156,25 +145,12 @@ nuvoton,npct601		i2c trusted platform module (TPM2)
 nuvoton,w83773g		Nuvoton Temperature Sensor
 nxp,pca9556		Octal SMBus and I2C registered interface
 nxp,pca9557		8-bit I2C-bus and SMBus I/O port with reset
-nxp,pcf2127		Real-time clock
-nxp,pcf2129		Real-time clock
-nxp,pcf8523		Real-time Clock
-nxp,pcf8563		Real-time clock/calendar
-nxp,pcf85063		Tiny Real-Time Clock
 oki,ml86v7667		OKI ML86V7667 video decoder
 ovti,ov5642		OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus
-pericom,pt7c4338	Real-time Clock Module
 plx,pex8648		48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
 pulsedlight,lidar-lite-v2	Pulsedlight LIDAR range-finding sensor
-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
 samsung,24ad0xd1	S524AD0XF1 (128K/256K-bit Serial EEPROM for Low Power)
 sgx,vz89x		SGX Sensortech VZ89X Sensors
-sii,s35390a		2-wire CMOS real-time clock
 silabs,si7020		Relative Humidity and Temperature Sensors
 skyworks,sky81452	Skyworks SKY81452: Six-Channel White LED Driver with Touch Panel Bias Supply
 st,24c256		i2c serial eeprom  (24cxx)
-- 
2.19.1


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

* Re: [PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt
  2018-11-11 19:31 ` [PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt Alexandre Belloni
@ 2018-12-03 23:45   ` Rob Herring
  2018-12-04  0:04     ` Alexandre Belloni
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-12-03 23:45 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: linux-rtc, devicetree, linux-kernel

On Sun, Nov 11, 2018 at 08:31:14PM +0100, Alexandre Belloni wrote:
> Move trivial RTCs to the rtc generic binding documentation as they all also
> support at least 'start-year'.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
>  Documentation/devicetree/bindings/rtc/rtc.txt | 34 +++++++++++++++++++
>  .../devicetree/bindings/trivial-devices.txt   | 24 -------------
>  2 files changed, 34 insertions(+), 24 deletions(-)

Okay if I take these 2 to avoid conflicts with trivial-devices.txt?

Rob

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

* Re: [PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt
  2018-12-03 23:45   ` Rob Herring
@ 2018-12-04  0:04     ` Alexandre Belloni
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2018-12-04  0:04 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-rtc, devicetree, linux-kernel

On 03/12/2018 17:45:58-0600, Rob Herring wrote:
> On Sun, Nov 11, 2018 at 08:31:14PM +0100, Alexandre Belloni wrote:
> > Move trivial RTCs to the rtc generic binding documentation as they all also
> > support at least 'start-year'.
> > 
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > ---
> >  Documentation/devicetree/bindings/rtc/rtc.txt | 34 +++++++++++++++++++
> >  .../devicetree/bindings/trivial-devices.txt   | 24 -------------
> >  2 files changed, 34 insertions(+), 24 deletions(-)
> 
> Okay if I take these 2 to avoid conflicts with trivial-devices.txt?
> 

Sure, I was actually planning for them to go through your tree for this
reason.

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

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

* Re: [PATCH 1/2] dt-bindings: rtc: add generic bindings
  2018-11-11 19:31 [PATCH 1/2] dt-bindings: rtc: add generic bindings Alexandre Belloni
  2018-11-11 19:31 ` [PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt Alexandre Belloni
@ 2018-12-06 10:36 ` Geert Uytterhoeven
  2018-12-07  9:33   ` Alexandre Belloni
  1 sibling, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-12-06 10:36 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Rob Herring, linux-rtc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Alexandre,

On Sun, Nov 11, 2018 at 8:31 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> Add generic binding documentation for the RTC subsystem.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

Thanks for your patch!

> new file mode 100644
> index 000000000000..221b7da50aca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/rtc.txt
> @@ -0,0 +1,30 @@

> +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

Can this resistor be less than 1 ohm?
trickle-resistor-milli-ohms?

> +                          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

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 1/2] dt-bindings: rtc: add generic bindings
  2018-12-06 10:36 ` [PATCH 1/2] dt-bindings: rtc: add generic bindings Geert Uytterhoeven
@ 2018-12-07  9:33   ` Alexandre Belloni
  2018-12-07  9:47     ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Belloni @ 2018-12-07  9:33 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Rob Herring, linux-rtc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On 06/12/2018 11:36:59+0100, Geert Uytterhoeven wrote:
> > +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
> 
> Can this resistor be less than 1 ohm?
> trickle-resistor-milli-ohms?
> 

Well, this is what current drivers already use so we are stuck with that
for now.

The value should be a few kOhm anyway. I think the lowest I know about
is 250 Ohm.

> > +                          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
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> -- 
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

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

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

* Re: [PATCH 1/2] dt-bindings: rtc: add generic bindings
  2018-12-07  9:33   ` Alexandre Belloni
@ 2018-12-07  9:47     ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2018-12-07  9:47 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Rob Herring, linux-rtc,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

Hi Alexandre,

On Fri, Dec 7, 2018 at 10:34 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> On 06/12/2018 11:36:59+0100, Geert Uytterhoeven wrote:
> > > +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
> >
> > Can this resistor be less than 1 ohm?
> > trickle-resistor-milli-ohms?
>
> Well, this is what current drivers already use so we are stuck with that
> for now.
>
> The value should be a few kOhm anyway. I think the lowest I know about
> is 250 Ohm.

OK, good to know. Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-11 19:31 [PATCH 1/2] dt-bindings: rtc: add generic bindings Alexandre Belloni
2018-11-11 19:31 ` [PATCH 2/2] dt-bindings: rtc: Move trivial RTCs to rtc.txt Alexandre Belloni
2018-12-03 23:45   ` Rob Herring
2018-12-04  0:04     ` Alexandre Belloni
2018-12-06 10:36 ` [PATCH 1/2] dt-bindings: rtc: add generic bindings Geert Uytterhoeven
2018-12-07  9:33   ` Alexandre Belloni
2018-12-07  9:47     ` Geert Uytterhoeven

Linux-RTC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rtc/0 linux-rtc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rtc linux-rtc/ https://lore.kernel.org/linux-rtc \
		linux-rtc@vger.kernel.org linux-rtc@archiver.kernel.org
	public-inbox-index linux-rtc


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rtc


AGPL code for this site: git clone https://public-inbox.org/ public-inbox