summaryrefslogtreecommitdiff
path: root/src/mainboard/intel/galileo/gen1.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/intel/galileo/gen1.h')
-rw-r--r--src/mainboard/intel/galileo/gen1.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/mainboard/intel/galileo/gen1.h b/src/mainboard/intel/galileo/gen1.h
index e1e8f59070..23b23091d2 100644
--- a/src/mainboard/intel/galileo/gen1.h
+++ b/src/mainboard/intel/galileo/gen1.h
@@ -59,6 +59,56 @@ static const struct reg_script gen1_gpio_init[] = {
REG_SCRIPT_END
};
+static const struct reg_script gen1_hsuart0_0x20[] = {
+ /* Route UART0_TXD to LVL_TXD -> IO1 -> DIGITAL 1
+ * Set IO1_MUX (EXP.PORT3_5) output, low
+ * Set LVL_OE (GPIO_SUS2) output, high
+ */
+
+ REG_I2C_WRITE(GEN1_I2C_GPIO_EXP_0x20, GEN1_GPIO_EXP_PORT_SELECT, 3),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x20, GEN1_GPIO_EXP_PORT_DIR, ~BIT5),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x20, GEN1_GPIO_EXP_OUTPUT3, ~BIT5),
+
+ /* Route DIGITAL 0 -> IO0 -> LVL_RXD -> UART0_RXD
+ * Set IO0_MUX (EXP.PORT3_4) output, low
+ * Set LVL_OE (GPIO_SUS2) output, high
+ */
+ REG_I2C_WRITE(GEN1_I2C_GPIO_EXP_0x20, GEN1_GPIO_EXP_PORT_SELECT, 3),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x20, GEN1_GPIO_EXP_PORT_DIR, ~BIT4),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x20, GEN1_GPIO_EXP_OUTPUT3, ~BIT4),
+
+ REG_LEG_GPIO_OR(R_QNC_GPIO_RGEN_RESUME_WELL, BIT2),
+ REG_LEG_GPIO_AND(R_QNC_GPIO_RGIO_RESUME_WELL, ~BIT2),
+ REG_LEG_GPIO_OR(R_QNC_GPIO_RGLVL_RESUME_WELL, BIT2),
+
+ REG_SCRIPT_END
+};
+
+static const struct reg_script gen1_hsuart0_0x21[] = {
+ /* Route UART0_TXD to LVL_TXD -> IO1 -> DIGITAL 1
+ * Set IO1_MUX (EXP.PORT3_5) output, low
+ * Set LVL_OE (GPIO_SUS2) output, high
+ */
+
+ REG_I2C_WRITE(GEN1_I2C_GPIO_EXP_0x21, GEN1_GPIO_EXP_PORT_SELECT, 3),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x21, GEN1_GPIO_EXP_PORT_DIR, ~BIT5),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x21, GEN1_GPIO_EXP_OUTPUT3, ~BIT5),
+
+ /* Route DIGITAL 0 -> IO0 -> LVL_RXD -> UART0_RXD
+ * Set IO0_MUX (EXP.PORT3_4) output, low
+ * Set LVL_OE (GPIO_SUS2) output, high
+ */
+ REG_I2C_WRITE(GEN1_I2C_GPIO_EXP_0x21, GEN1_GPIO_EXP_PORT_SELECT, 3),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x21, GEN1_GPIO_EXP_PORT_DIR, ~BIT4),
+ REG_I2C_AND(GEN1_I2C_GPIO_EXP_0x21, GEN1_GPIO_EXP_OUTPUT3, ~BIT4),
+
+ REG_LEG_GPIO_OR(R_QNC_GPIO_RGEN_RESUME_WELL, BIT2),
+ REG_LEG_GPIO_AND(R_QNC_GPIO_RGIO_RESUME_WELL, ~BIT2),
+ REG_LEG_GPIO_OR(R_QNC_GPIO_RGLVL_RESUME_WELL, BIT2),
+
+ REG_SCRIPT_END
+};
+
static const struct reg_script gen1_i2c_0x20_init[] = {
/* Route I2C pins to Arduino header:
* Clear I2C_MUX (GPORT1_BIT5) to route I2C to Arduino Shield connector