mb/google/brya: Create rull variant
[coreboot2.git] / src / drivers / i2c / rx6110sa / rx6110sa.h
blob5be6be7382fbeee458321feda6cab5a7fca2fc67
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef _I2C_RX6110SA_H_
4 #define _I2C_RX6110SA_H_
6 #define RX6110SA_ACPI_NAME "ERX6"
7 #define RX6110SA_HID_NAME "SECC6110"
8 #define RX6110SA_HID_DESC "Real Time Clock"
10 /* Register layout */
11 #define SECOND_REG 0x10
12 #define MINUTE_REG 0x11
13 #define HOUR_REG 0x12
14 #define WEEK_REG 0x13
15 #define DAY_REG 0x14
16 #define MONTH_REG 0x15
17 #define YEAR_REG 0x16
18 #define RESERVED_BIT_REG 0x17
19 #define RTC_INIT_VALUE 0xA8
20 #define ALARM_MINUTE_REG 0x18
21 #define ALARM_HOUR_REG 0x19
22 #define ALARM_WEEKDAY_REG 0x1A
23 #define TMR_COUNTER_0_REG 0x1B
24 #define TMR_COUNTER_1_REG 0x1C
25 #define EXTENSION_REG 0x1D
26 #define TE_BIT (1 << 4)
27 #define FSEL_MASK 0xC0
28 #define TSEL_MASK 0x07
29 #define FLAG_REGISTER 0x1E
30 #define VLF_BIT (1 << 1)
31 #define CTRL_REG 0x1F
32 #define AIE_BIT (1 << 3)
33 #define TIE_BIT (1 << 4)
34 #define UIE_BIT (1 << 5)
35 #define STOP_BIT (1 << 6)
36 #define TEST_BIT (1 << 7)
37 #define TMR_MODE_MASK 0x03
38 #define TMR_MODE_NORM_BACKUP 0x00
39 #define TMR_MODE_NORM_ONLY 0x01
40 #define TMR_MODE_BACKUP_ONLY 0x03
41 #define DIGITAL_REG 0x30
42 #define BATTERY_BACKUP_REG 0x31
43 #define PMON_SAMPL_MASK 0x03
44 #define IRQ_CONTROL_REG 0x32
45 #define FOUT_OUTPUT_PIN_MASK 0x03
47 /* Define CLKOUT frequency divider values valid for parameter cof_selection */
48 #define COF_OFF 0x00
49 #define COF_1_HZ 0x01
50 #define COF_1024_HZ 0x02
51 #define COF_32768_HZ 0x03
53 /* Define valid clock rates for the internal timer */
54 #define TMR_CLK_4096_HZ 0x00
55 #define TMR_CLK_64_HZ 0x01
56 #define TMR_CLK_1_HZ 0x02
57 #define TMR_CLK_1_60_HZ 0x03
58 #define TMR_CLK_1_3600_HZ 0x04
61 * Define possible power monitor sampling times. This value decides for how
62 * long the power supply is sampled every second to detect a power down
63 * condition.
65 #define PMON_SAMPL_2_MS 0x00
66 #define PMON_SAMPL_16_MS 0x01
67 #define PMON_SAMPL_128_MS 0x02
68 #define PMON_SAMPL_256_MS 0x03
70 /* Define on which pin of the RTC the generated square wave will be driven. */
71 #define FOUT_IRQ2 0x00 /* IRQ2 pin used for Fout */
72 #define FOUT_IRQ1 0x01 /* IRQ1 pin used for Fout */
73 #define FOUT_DO_FOUT 0x02 /* DO/FOUT pin used for Fout */
75 #define AFTER_RESET_DELAY_MS 2 /* Delay after reset sequence */
77 #endif /* _I2C_RX6110SA_H_ */