aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/i2c/rx6110sa/rx6110sa.h
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2017-06-07 09:51:06 +0200
committerWerner Zeh <werner.zeh@siemens.com>2017-06-09 06:31:21 +0200
commit0dc405de980a22721e9faba9127321f4849d10ab (patch)
treecc5fe375be0a67d74fc816328f5d25bbeeac37d3 /src/drivers/i2c/rx6110sa/rx6110sa.h
parent37afb270b461314978ce741cffa3b896673eb829 (diff)
rx6110sa: Add more chip configuration options to chip
The RTC RX6110SA has several configuration options which might be interesting to set. To make this setup independent of the driver itself but let it still be configurable on mainboard level, add more configuration options to the chip driver. Change-Id: I7f8b2aa7cd001a887f271be36f655e10e60e778b Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/20084 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Diffstat (limited to 'src/drivers/i2c/rx6110sa/rx6110sa.h')
-rw-r--r--src/drivers/i2c/rx6110sa/rx6110sa.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/drivers/i2c/rx6110sa/rx6110sa.h b/src/drivers/i2c/rx6110sa/rx6110sa.h
index 99527e0420..ebd75ead60 100644
--- a/src/drivers/i2c/rx6110sa/rx6110sa.h
+++ b/src/drivers/i2c/rx6110sa/rx6110sa.h
@@ -38,6 +38,7 @@
#define EXTENSION_REG 0x1D
#define TE_BIT (1 << 4)
#define FSEL_MASK 0xC0
+#define TSEL_MASK 0x07
#define FLAG_REGISTER 0x1E
#define VLF_BIT (1 << 1)
#define CTRL_REG 0x1F
@@ -46,9 +47,15 @@
#define UIE_BIT (1 << 5)
#define STOP_BIT (1 << 6)
#define TEST_BIT (1 << 7)
+#define TMR_MODE_MASK 0x03
+#define TMR_MODE_NORM_BACKUP 0x00
+#define TMR_MODE_NORM_ONLY 0x01
+#define TMR_MODE_BACKUP_ONLY 0x03
#define DIGITAL_REG 0x30
#define BATTERY_BACKUP_REG 0x31
+#define PMON_SAMPL_MASK 0x03
#define IRQ_CONTROL_REG 0x32
+#define FOUT_OUTPUT_PIN_MASK 0x03
/* Define CLKOUT frequency divider values valid for parameter cof_selection */
#define COF_OFF 0x00
@@ -56,4 +63,26 @@
#define COF_1024_HZ 0x02
#define COF_32768_HZ 0x03
+/* Define valid clock rates for the internal timer */
+#define TMR_CLK_4096_HZ 0x00
+#define TMR_CLK_64_HZ 0x01
+#define TMR_CLK_1_HZ 0x02
+#define TMR_CLK_1_60_HZ 0x03
+#define TMR_CLK_1_3600_HZ 0x04
+
+/*
+ * Define possible power monitor sampling times. This value decides for how
+ * long the power supply is sampled every second to detect a power down
+ * condition.
+ */
+#define PMON_SAMPL_2_MS 0x00
+#define PMON_SAMPL_16_MS 0x01
+#define PMON_SAMPL_128_MS 0x02
+#define PMON_SAMPL_256_MS 0x03
+
+/* Define on which pin of the RTC the generated square wave will be driven. */
+#define FOUT_IRQ2 0x00 /* IRQ2 pin used for Fout */
+#define FOUT_IRQ1 0x01 /* IRQ1 pin used for Fout */
+#define FOUT_DO_FOUT 0x02 /* DO/FOUT pin used for Fout */
+
#endif /* _I2C_RX6110SA_H_ */