microcrystal,rv3028-counter

Description

Micro Crystal RV3028 RTC counter/timer driver

Examples

/* Example node for an RV3028 RTC counter on the i2c0 bus. */
&i2c0 {
  status = "okay";
  clock-frequency = <I2C_BITRATE_STANDARD>;

  rv3028: rv3028@52 {
    compatible = "microcrystal,rv3028";
    reg = <0x52>;
    int-gpios = <&gpiob 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
    backup-switch-mode = "disabled";
    status = "okay";

    rv3028_counter: rv3028_counter {
      compatible = "microcrystal,rv3028-counter";
      frequency = <64>;
      repeat-mode;
      status = "okay";
    };
  };
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

frequency

int

Clock frequency used for the timer/counter function. If omitted, the
driver uses 4096 Hz.

  4096: 4096 Hz
  64:   64 Hz
  1:    1 Hz
  0:    1/60 Hz

Default value: 4096

Legal values: 4096, 64, 1, 0

repeat-mode

boolean

Automatically reloads the value from the Timer Value registers upon
reaching 0, and continues counting.