diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-01-12 23:18:54 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-01-27 22:18:17 +0000 |
commit | b1fe9de74d420cf7193135c2b6d034bf06dabe94 (patch) | |
tree | 414d6251c4e22441c9b7a9bf2967f7ba84131efa /src/soc/amd/sabrina/uart.c | |
parent | a48f29192dd01e3be490394b265b90b619e81d4a (diff) |
soc/amd/sabrina: add additional UART controllers
Compared to Cezanne there are 3 more UART controllers. Revision 1.50 of
the PPR #57243 was used as a reference.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I628b1a7a0930f3409acdcabda2b864d42bf6bd23
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61086
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Diffstat (limited to 'src/soc/amd/sabrina/uart.c')
-rw-r--r-- | src/soc/amd/sabrina/uart.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/soc/amd/sabrina/uart.c b/src/soc/amd/sabrina/uart.c index c48c3da40f..0ffdacf792 100644 --- a/src/soc/amd/sabrina/uart.c +++ b/src/soc/amd/sabrina/uart.c @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -/* TODO: Check if this is still correct */ - #include <amdblocks/aoac.h> #include <amdblocks/gpio.h> #include <amdblocks/uart.h> @@ -27,6 +25,18 @@ static const struct { PAD_NF(GPIO_140, UART1_TXD, PULL_NONE), PAD_NF(GPIO_142, UART1_RXD, PULL_NONE), } }, + [2] = { APU_UART2_BASE, { + PAD_NF(GPIO_138, UART2_TXD, PULL_NONE), + PAD_NF(GPIO_136, UART2_RXD, PULL_NONE), + } }, + [3] = { APU_UART3_BASE, { + PAD_NF(GPIO_135, UART3_TXD, PULL_NONE), + PAD_NF(GPIO_137, UART3_RXD, PULL_NONE), + } }, + [4] = { APU_UART4_BASE, { + PAD_NF(GPIO_156, UART4_TXD, PULL_NONE), + PAD_NF(GPIO_155, UART4_RXD, PULL_NONE), + } }, }; uintptr_t get_uart_base(unsigned int idx) @@ -57,6 +67,12 @@ static const char *uart_acpi_name(const struct device *dev) return "FUR0"; case APU_UART1_BASE: return "FUR1"; + case APU_UART2_BASE: + return "FUR2"; + case APU_UART3_BASE: + return "FUR3"; + case APU_UART4_BASE: + return "FUR4"; default: return NULL; } @@ -74,6 +90,15 @@ static void uart_enable(struct device *dev) case APU_UART1_BASE: dev_id = FCH_AOAC_DEV_UART1; break; + case APU_UART2_BASE: + dev_id = FCH_AOAC_DEV_UART2; + break; + case APU_UART3_BASE: + dev_id = FCH_AOAC_DEV_UART3; + break; + case APU_UART4_BASE: + dev_id = FCH_AOAC_DEV_UART4; + break; default: printk(BIOS_ERR, "%s: Unknown device: %s\n", __func__, dev_path(dev)); return; |