mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
cr50: disable UART0 RX
If the UART0 RX pad is not pulled up, cr50 will get held up on all of the interrupts triggered by the low signal. This causes cr50 to reboot continuously. UART0 RX was moved to DIOA13, which does not have an internal pull up. This means we have to rely on an external pull up. Because not having an external pull up on DIOA13 could prevent the system from booting and UART0 RX is only used as an alternate debugging mechanism from suzyq, we decided it is best for UART0 RX to be disabled by default. BUG=none BRANCH=none TEST=Connect UART1_RX to DIOA1 and test that it still accepts input. Disconnect it from any pads. Verify the system boots normally and console input from DIOA1 no longer works but the suzyq shell still does. Change-Id: I68988c59cfce610cc6c360bf8dd9685e98ab12ff Reviewed-on: https://chromium-review.googlesource.com/357881 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
This commit is contained in:
@@ -76,8 +76,14 @@ PINMUX(GPIO(BATT_PRES), M2, 0)
|
||||
|
||||
/* UARTs */
|
||||
PINMUX(FUNC(UART0_TX), A0, DIO_OUTPUT) /* Cr50 console */
|
||||
PINMUX(FUNC(UART0_RX), A1, DIO_INPUT | DIO_WAKE_LOW)
|
||||
/* UART1_TX and UART2_TX are configured in usart.c. They are not set as outputs
|
||||
/*
|
||||
* UART0_RX should only be used for debugging purposes. There is no internal
|
||||
* pull up on DIOA13, so make sure there is an external pull up. If there is
|
||||
* no external pull up cr50 will be held in UART0RX interrupts and will
|
||||
* constantly reboot.
|
||||
* UART0_RX = DIOA13
|
||||
*
|
||||
* UART1_TX and UART2_TX are configured in usart.c. They are not set as outputs
|
||||
* here in order to avoid interfering with servo. They can be controlled using
|
||||
* the 'uart' console command.
|
||||
* UART1_TX = DIOA7 AP console
|
||||
|
||||
@@ -116,8 +116,12 @@ void uartn_enable_interrupt(int uart)
|
||||
/* Enable TX and RX. Disable HW flow control and loopback */
|
||||
void uartn_enable(int uart)
|
||||
{
|
||||
/* TX and RX enable */
|
||||
GR_UART_CTRL(uart) = 0x03;
|
||||
/* Enable UART TX */
|
||||
GR_UART_CTRL(uart) = 0x01;
|
||||
|
||||
/* Enable UART RX if it is connected to an external pad */
|
||||
if (DIO_SEL_REG(GC_PINMUX_UART0_RX_SEL_OFFSET + (uart * 16)))
|
||||
GR_UART_CTRL(uart) |= 0x02;
|
||||
}
|
||||
|
||||
/* Disable TX, RX, HW flow control, and loopback */
|
||||
|
||||
Reference in New Issue
Block a user