summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/purism/librem_cnl/Kconfig16
-rw-r--r--src/mainboard/purism/librem_cnl/variants/librem_mini/Makefile.inc1
-rw-r--r--src/mainboard/purism/librem_cnl/variants/librem_mini/com_init.c13
3 files changed, 30 insertions, 0 deletions
diff --git a/src/mainboard/purism/librem_cnl/Kconfig b/src/mainboard/purism/librem_cnl/Kconfig
index 39b0883a53..f0fd6a85f0 100644
--- a/src/mainboard/purism/librem_cnl/Kconfig
+++ b/src/mainboard/purism/librem_cnl/Kconfig
@@ -60,3 +60,19 @@ config NO_POST
default y
endif
+
+config ENABLE_EC_UART1
+ bool "Enable EC UART1"
+ depends on BOARD_PURISM_LIBREM_MINI || BOARD_PURISM_LIBREM_MINI_V2
+ default n
+ select DRIVERS_UART_8250IO
+ help
+ Enable UART1 on the EC.
+
+ This UART can be used for boot logging by coreboot, SeaBIOS, or
+ Linux. It also works as a general-purpose UART.
+
+ Soldering is required to access these signals. Locate the pads for
+ U81 on the bottom of the board near the front edge; the IC is not
+ populated. TX is pin 14, RX is pin 19. The signals are 3.3V (do NOT
+ connect directly to an RS-232 serial port).
diff --git a/src/mainboard/purism/librem_cnl/variants/librem_mini/Makefile.inc b/src/mainboard/purism/librem_cnl/variants/librem_mini/Makefile.inc
index 20ff43819f..59020ef001 100644
--- a/src/mainboard/purism/librem_cnl/variants/librem_mini/Makefile.inc
+++ b/src/mainboard/purism/librem_cnl/variants/librem_mini/Makefile.inc
@@ -2,3 +2,4 @@
all-y += die.c
smm-y += die.c
+bootblock-$(CONFIG_ENABLE_EC_UART1) += com_init.c
diff --git a/src/mainboard/purism/librem_cnl/variants/librem_mini/com_init.c b/src/mainboard/purism/librem_cnl/variants/librem_mini/com_init.c
new file mode 100644
index 0000000000..6d0f79f843
--- /dev/null
+++ b/src/mainboard/purism/librem_cnl/variants/librem_mini/com_init.c
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <bootblock_common.h>
+#include <device/pnp_ops.h>
+
+#define SERIAL_DEV PNP_DEV(0x6E, 1) /* ITE8528 UART1 */
+
+void bootblock_mainboard_early_init(void)
+{
+ /* Enable the serial port inside the EC */
+ pnp_set_logical_device(SERIAL_DEV);
+ pnp_set_enable(SERIAL_DEV, 1);
+}