summaryrefslogtreecommitdiff
path: root/src/mainboard/intel/galileo/gen2.h
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2016-05-30 15:01:06 -0700
committerLeroy P Leahy <leroy.p.leahy@intel.com>2016-05-31 22:11:51 +0200
commitbc518d5cab4234a0d0d06a7d3829bbca9e318ba6 (patch)
tree09eb5cf6c3476c17ca34fde7164d14c2f2ec3b0b /src/mainboard/intel/galileo/gen2.h
parentac78db3a53a7653a73409936455d68c754291e9d (diff)
downloadcoreboot-bc518d5cab4234a0d0d06a7d3829bbca9e318ba6.tar.xz
quark: Enable HSUART0 as console
The use of HSUART0 on galileo requires early initialization of the I2C GPIO expanders to direct the RXD and TXD signals to DIGITAL 0 and 1 on the expansion connector. TEST=None Change-Id: I11195d79e954c1f6bc91eafe257d7ddc1310b2e7 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/15010 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/mainboard/intel/galileo/gen2.h')
-rw-r--r--src/mainboard/intel/galileo/gen2.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mainboard/intel/galileo/gen2.h b/src/mainboard/intel/galileo/gen2.h
index 8eee744392..10c832198e 100644
--- a/src/mainboard/intel/galileo/gen2.h
+++ b/src/mainboard/intel/galileo/gen2.h
@@ -52,6 +52,28 @@ static const struct reg_script gen2_gpio_init[] = {
REG_SCRIPT_END
};
+static const struct reg_script gen2_hsuart0[] = {
+ /* Route UART0_TXD to MUX7_Y -> BUF_IO1 -> IO1 -> DIGITAL 1
+ * Set MUX7_SEL (EXP1.P1_5) high
+ * Configure MUX7_SEL (EXP1.P1_5) as an output
+ * Set LVL_B_OE6_N (EXP0.P1_4) low
+ * Configure LVL_B_OE6_N (EXP0.P1_4) as an output
+ */
+ REG_I2C_OR(GEN2_I2C_GPIO_EXP1, GEN2_GPIO_EXP_OUTPUT1, BIT5),
+ REG_I2C_AND(GEN2_I2C_GPIO_EXP1, GEN2_GPIO_EXP_CONFIG1, ~BIT5),
+ REG_I2C_AND(GEN2_I2C_GPIO_EXP0, GEN2_GPIO_EXP_OUTPUT1, ~BIT4),
+ REG_I2C_AND(GEN2_I2C_GPIO_EXP0, GEN2_GPIO_EXP_CONFIG1, ~BIT4),
+
+ /* Route DIGITAL 0 -> IO0 -> UART0_RXD
+ * Set LVL_C_OE0_N (EXP1.P0_0) high
+ * Configure LVL_C_OE0_N (EXP1.P0_0) as an output
+ */
+ REG_I2C_OR(GEN2_I2C_GPIO_EXP1, GEN2_GPIO_EXP_OUTPUT0, BIT0),
+ REG_I2C_AND(GEN2_I2C_GPIO_EXP1, GEN2_GPIO_EXP_CONFIG0, ~BIT0),
+
+ REG_SCRIPT_END
+};
+
static const struct reg_script gen2_i2c_init[] = {
/* Route I2C to Arduino Shield connector:
* Set AMUX1_IN (EXP2.P1_4) low