atmel,sam0-rtc

Vendor: Atmel Corporation

Note

An implementation of a driver matching this compatible is available in drivers/rtc/rtc_sam0.c.

Description

Atmel SAM0 RTC

Properties

Properties not inherited from the base binding file.

Name

Type

Details

atmel,assigned-clocks

phandle-array

Assigned-clock information

This property is required.

atmel,assigned-clock-names

string-array

Name of each assigned-clock

This property is required.

systimer

boolean

Selects RTC peripheral to be used as a system timer and replace
the ARM systick. When this option is selected the normal RTC
functionality is in exclusive mode and the normal RTC functions
will not be available.

The systimer exclusive functionality can be enabled using the
following devicetree entry:

  &rtc {
    status = "okay";
    systimer;
  };

cal-constant

int

Define the constant used to calculate the calibration. More
information can be found in the datasheet of each SoC series
at RTC Frequency Correction topic.

Example:
  Correction in ppm = (FREQCORR.VALUE * 1e6 ppm) / (8192 * 128)

  &rtc {
    cal-constant = <8192 * 128>;
  };

This property is required.

counter-mode

string

Configure the RTC counter operating mode. In mode 0, the counter
register is configured as a 32-bit counter. In mode 1, simmilar
to mode 0, the counter register is only 16-bit counter. In mode
2 the counter register is configured as a clock/calendar.

  &rtc {
    status = "okay";
    counter-mode = "clock";
    prescaler = <1024>;
  };

Legal values: 'count-32', 'count-16', 'clock'

prescaler

int

Enable CLKOUT at given frequency. When disabled, CLKOUT pin is LOW.
The default is 0 and corresponds to the disable the CLKOUT signal.

  &rtc {
    status = "okay";
    counter-mode = "clock";
    prescaler = <1024>;
  };

Legal values: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024

event-control-msk

int

Enable peripheral event sources by bitmask. By default all the channels
are always disabled.

Event Table:

  bit   Event Source
   0    Periodic Interval 0 Event Output
   1    Periodic Interval 1 Event Output
   2    Periodic Interval 2 Event Output
   3    Periodic Interval 3 Event Output
   4    Periodic Interval 4 Event Output
   5    Periodic Interval 5 Event Output
   6    Periodic Interval 6 Event Output
   7    Periodic Interval 7 Event Output
   8    Compare/Alarm 0 Event Output
   9    Compare/Alarm 1 Event Output
  14    Tamper Event Output
  15    Overflow Event Output
  16    Tamper Event Input

Example how to enable Compare/Alarm 0 Event Output:
  &rtc {
    event-control-msk = <100>;
  };

alarms-count

int

Number of alarms supported by RTC device. The number of
alarms defaults to 0, which indicates that the RTC has
no alarms.

pinctrl-0

phandles

Pin configuration/s for the first state. Content is specific to the
selected pin controller driver implementation.

pinctrl-1

phandles

Pin configuration/s for the second state. See pinctrl-0.

pinctrl-2

phandles

Pin configuration/s for the third state. See pinctrl-0.

pinctrl-3

phandles

Pin configuration/s for the fourth state. See pinctrl-0.

pinctrl-4

phandles

Pin configuration/s for the fifth state. See pinctrl-0.

pinctrl-names

string-array

Names for the provided states. The number of names needs to match the
number of states.