From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44823C49EA6 for ; Thu, 24 Jun 2021 21:43:01 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F17DA613B7 for ; Thu, 24 Jun 2021 21:42:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F17DA613B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=robart.cc Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 533FB829BE; Thu, 24 Jun 2021 23:42:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=robart.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=robart.cc header.i=@robart.cc header.b="fYRKUPj1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4DDB882B64; Thu, 24 Jun 2021 14:39:55 +0200 (CEST) Received: from srv-mta-01.robart.cc (srv-mta-01.robart.cc [80.123.245.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8743A80082 for ; Thu, 24 Jun 2021 14:39:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=robart.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mdipolt@robart.cc Received: from localhost (localhost [127.0.0.1]) by srv-mta-01.robart.cc (Postfix) with ESMTP id 1838C1C0C07; Thu, 24 Jun 2021 14:39:52 +0200 (CEST) Received: from srv-mta-01.robart.cc ([127.0.0.1]) by localhost (srv-mta-01.robart.cc [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pIx6Cko1D0Vv; Thu, 24 Jun 2021 14:39:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by srv-mta-01.robart.cc (Postfix) with ESMTP id DB8021C0D0E; Thu, 24 Jun 2021 14:39:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 srv-mta-01.robart.cc DB8021C0D0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=robart.cc; s=B016B336-104E-11EA-8E2D-E36DD02BB770; t=1624538391; bh=P+C8L6y2HUeKaY2FeM9dCJy7H0j8+0oeDTO4K1TQQnY=; h=Date:From:To:Message-ID:MIME-Version; b=fYRKUPj1wdFGR1oTk2+CgC1zNdJvaMddIxSl8Q4nYPraQM6mrnyuleodGMEkHIUUn 0Ch4MdM2DTcwPrPv9ywzL5/RUeUqMiKDZ7DuRxJV305h+zPqJ6rbd8VFmuOE2uDMyF DjjkAj2kZlVFAgBIjOHBaaBUKrQjLZZNz6cECefCja2YHB0gSpgU9B6NxlfqgPoK1Q Ux9jH2rFxos0bnvK2O5MEc8KTNhU/9vM7GzZ4nFCUKHysxK/BMEwH4gtHK6bdJ3eWx jKc1pN2MoXiwi689GpNE34UPLK59CK7wZo+01t2sWEeav3NhJkSCOVReNjltfrwXiv n9lQzjnv/5iIw== Received: from srv-mta-01.robart.cc ([127.0.0.1]) by localhost (srv-mta-01.robart.cc [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EcLWKHnDDB8d; Thu, 24 Jun 2021 14:39:51 +0200 (CEST) Received: from srv-mda-01.robart.cc (srv-mda-01.robart.cc [10.0.10.21]) by srv-mta-01.robart.cc (Postfix) with ESMTP id B8B471C0C07; Thu, 24 Jun 2021 14:39:51 +0200 (CEST) Date: Thu, 24 Jun 2021 14:39:51 +0200 (CEST) From: Manuel Dipolt To: u-boot Cc: jagan Message-ID: <1165740128.2849934.1624538391702.JavaMail.zimbra@robart.cc> In-Reply-To: <304591524.2849399.1624537560261.JavaMail.zimbra@robart.cc> References: <304591524.2849399.1624537560261.JavaMail.zimbra@robart.cc> Subject: [PATCH] sunxi: h3: add console support for uart1-3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.0.20.40] X-Mailer: Zimbra 8.8.15_GA_4018 (ZimbraWebClient - FF78 (Linux)/8.8.15_GA_4026) Thread-Topic: sunxi: h3: add console support for uart1-3 Thread-Index: xMvUPk3wru77dHIJGDHnEjyB9sIYvUUIadin X-Mailman-Approved-At: Thu, 24 Jun 2021 23:42:55 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Add uart1-3 console support for the Allwinner H3 SOC Signed-off-by: Manuel Dipolt --- arch/arm/include/asm/arch-sunxi/gpio.h | 3 +++ arch/arm/mach-sunxi/board.c | 14 ++++++++++++++ include/configs/sunxi-common.h | 5 ++++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h index 40a3f845d0..50010071ae 100644 --- a/arch/arm/include/asm/arch-sunxi/gpio.h +++ b/arch/arm/include/asm/arch-sunxi/gpio.h @@ -148,6 +148,9 @@ enum sunxi_gpio_number { #define SUN6I_GPA_SDC2 5 #define SUN6I_GPA_SDC3 4 #define SUN8I_H3_GPA_UART0 2 +#define SUN8I_H3_GPG_UART1 2 +#define SUN8I_H3_GPA_UART2 2 +#define SUN8I_H3_GPA_UART3 3 #define SUN4I_GPB_PWM 2 #define SUN4I_GPB_TWI0 2 diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 8e9bb63d9d..31f780d1b5 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -127,10 +127,24 @@ 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_H3) + sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN8I_H3_GPG_UART1); + sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN8I_H3_GPG_UART1); + sunxi_gpio_set_pull(SUNXI_GPG(6), SUNXI_GPIO_PULL_UP); #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I) +#if defined(CONFIG_MACH_SUN8I_H3) + sunxi_gpio_set_cfgpin(SUNXI_GPA(1), SUN8I_H3_GPA_UART2); + sunxi_gpio_set_cfgpin(SUNXI_GPA(0), SUN8I_H3_GPA_UART2); + sunxi_gpio_set_pull(SUNXI_GPA(0), SUNXI_GPIO_PULL_UP); +#else sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2); sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2); sunxi_gpio_set_pull(SUNXI_GPB(1), SUNXI_GPIO_PULL_UP); +#endif +#elif CONFIG_CONS_INDEX == 4 && defined(CONFIG_MACH_SUN8I_H3) + sunxi_gpio_set_cfgpin(SUNXI_GPA(14), SUN8I_H3_GPA_UART3); + sunxi_gpio_set_cfgpin(SUNXI_GPA(13), SUN8I_H3_GPA_UART3); + sunxi_gpio_set_pull(SUNXI_GPA(13), SUNXI_GPIO_PULL_UP); #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I) sunxi_gpio_set_cfgpin(SUNXI_GPL(2), SUN8I_GPL_R_UART); sunxi_gpio_set_cfgpin(SUNXI_GPL(3), SUN8I_GPL_R_UART); diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index fceb812448..5b7c310fde 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -246,10 +246,13 @@ extern int soft_i2c_gpio_scl; #else #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28000:115200" #endif -#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I) +#elif CONFIG_CONS_INDEX == 2 && \ + (defined(CONFIG_MACH_SUN5I) || \defined(CONFIG_MACH_SUN8I_H3)) #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28400:115200" #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I) #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200" +#elif CONFIG_CONS_INDEX == 4 && defined(CONFIG_MACH_SUN8I_H3) +#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28C00:115200" #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I) #define OF_STDOUT_PATH "/soc@01c00000/serial@01f02800:115200" #else -- 2.20.1