All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maksim Kiselev <bigunclemax@gmail.com>
Cc: Maksim Kiselev <bigunclemax@gmail.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Andre Przywara <andre.przywara@arm.com>,
	Samuel Holland <samuel@sholland.org>, Marek Vasut <marex@denx.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	u-boot@lists.denx.de
Subject: [PATCH v1] sunxi: R528: add UART1 support
Date: Sun, 21 Jan 2024 14:49:08 +0300	[thread overview]
Message-ID: <20240121114909.2909574-1-bigunclemax@gmail.com> (raw)

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@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


             reply	other threads:[~2024-01-21 11:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 11:49 Maksim Kiselev [this message]
2024-01-26 17:11 ` [PATCH v1] sunxi: R528: add UART1 support Andre Przywara
2024-01-27  8:20   ` Maxim Kiselev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240121114909.2909574-1-bigunclemax@gmail.com \
    --to=bigunclemax@gmail.com \
    --cc=andre.przywara@arm.com \
    --cc=jagan@amarulasolutions.com \
    --cc=marex@denx.de \
    --cc=samuel@sholland.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.