summaryrefslogtreecommitdiff
path: root/src/mainboard/google/gale/blsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/gale/blsp.c')
-rw-r--r--src/mainboard/google/gale/blsp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mainboard/google/gale/blsp.c b/src/mainboard/google/gale/blsp.c
index 3be075f141..2bc562a630 100644
--- a/src/mainboard/google/gale/blsp.c
+++ b/src/mainboard/google/gale/blsp.c
@@ -34,6 +34,7 @@
#define IPQ40XX_I2C0_PINGROUP_1 1
#define IPQ40XX_I2C0_PINGROUP_2 (!IPQ40XX_I2C0_PINGROUP_1)
+#define IPQ40XX_I2C1_PINGROUP_1 1
#if IPQ40XX_I2C0_PINGROUP_1
@@ -55,6 +56,16 @@
#endif
+
+#if IPQ40XX_I2C1_PINGROUP_1
+
+#define SCL_GPIO_I2C1 34
+#define SDA_GPIO_I2C1 35
+#define GPIO_I2C1_FUNC_SCL 0x1
+#define GPIO_I2C1_FUNC_SDA 0x1
+
+#endif
+
int blsp_i2c_init_board(blsp_qup_id_t id)
{
switch (id) {
@@ -68,6 +79,13 @@ int blsp_i2c_init_board(blsp_qup_id_t id)
gpio_tlmm_config_set(SCL_GPIO, GPIO_FUNC_SCL,
GPIO_NO_PULL, GPIO_2MA, 1);
#endif /* Pin Group 1 or 2 */
+
+#if defined(IPQ40XX_I2C1_PINGROUP_1)
+ gpio_tlmm_config_set(SDA_GPIO_I2C1, GPIO_I2C1_FUNC_SDA,
+ GPIO_NO_PULL, GPIO_2MA, 1);
+ gpio_tlmm_config_set(SCL_GPIO_I2C1, GPIO_I2C1_FUNC_SCL,
+ GPIO_NO_PULL, GPIO_2MA, 1);
+#endif
break;
default:
return 1;