[PATCH v1] sunxi: R528: add UART1 support
Maksim Kiselev
bigunclemax at gmail.com
Sun Jan 21 12:49:08 CET 2024
Add PG6-PG7 pins configuration for the SPL to allow use UART1
on boards with the Allwinner R528/T113 family.
Signed-off-by: Maksim Kiselev <bigunclemax at gmail.com>
---
I tested this patch on LC-PI-T113 board.
This board can be found on eBay or Aliexpress, and looks like
that it is widespread enough to send this patch to the upstream :)
arch/arm/mach-sunxi/board.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 11a4941822..9dedcd45f5 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -159,6 +159,10 @@ static int gpio_init(void)
sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1);
sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1);
sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN8I_R528)
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(6), 2);
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(7), 2);
+ sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP);
#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I_H3)
sunxi_gpio_set_cfgpin(SUNXI_GPA(0), SUN8I_H3_GPA_UART2);
sunxi_gpio_set_cfgpin(SUNXI_GPA(1), SUN8I_H3_GPA_UART2);
--
2.40.1
More information about the U-Boot
mailing list