summaryrefslogtreecommitdiff
path: root/src/mainboard/google/herobrine/mainboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/herobrine/mainboard.c')
-rw-r--r--src/mainboard/google/herobrine/mainboard.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/mainboard/google/herobrine/mainboard.c b/src/mainboard/google/herobrine/mainboard.c
index 6f8d19d8d1..55b1c5e575 100644
--- a/src/mainboard/google/herobrine/mainboard.c
+++ b/src/mainboard/google/herobrine/mainboard.c
@@ -9,6 +9,9 @@
#include <device/mmio.h>
#include <bootblock_common.h>
#include <soc/clock.h>
+#include <soc/qupv3_config_common.h>
+#include <soc/qup_se_handlers_common.h>
+#include <soc/qcom_qup_se.h>
static void configure_sdhci(void)
{
@@ -25,6 +28,26 @@ static void mainboard_init(struct device *dev)
/* Configure clock for SD card */
clock_configure_sdcc(2, 50 * MHz);
configure_sdhci();
+
+ /*
+ * When coreboot firmware disables serial output,
+ * we still need to load console UART QUP FW for OS.
+ */
+ if (!CONFIG(CONSOLE_SERIAL))
+ qupv3_se_fw_load_and_init(QUPV3_0_SE5, SE_PROTOCOL_UART, FIFO);
+
+ qupv3_se_fw_load_and_init(QUPV3_1_SE5, SE_PROTOCOL_I2C, MIXED); /* Touch I2C */
+ qupv3_se_fw_load_and_init(QUPV3_0_SE7, SE_PROTOCOL_UART, FIFO); /* BT UART */
+
+#if CONFIG(BOARD_GOOGLE_HEROBRINE)
+ qupv3_se_fw_load_and_init(QUPV3_0_SE0, SE_PROTOCOL_I2C, MIXED); /* Audio I2C */
+ qupv3_se_fw_load_and_init(QUPV3_0_SE1, SE_PROTOCOL_I2C, MIXED); /* Trackpad I2C */
+ qupv3_se_fw_load_and_init(QUPV3_1_SE3, SE_PROTOCOL_SPI, MIXED); /* Fingerprint SPI */
+#elif CONFIG(BOARD_GOOGLE_PIGLIN)
+ qupv3_se_fw_load_and_init(QUPV3_0_SE1, SE_PROTOCOL_I2C, GSI); /* APPS I2C */
+ qupv3_se_fw_load_and_init(QUPV3_1_SE4, SE_PROTOCOL_SPI, MIXED); /* ESIM SPI */
+ qupv3_se_fw_load_and_init(QUPV3_1_SE6, SE_PROTOCOL_SPI, MIXED); /* Fingerprint SPI */
+#endif
}
static void mainboard_enable(struct device *dev)