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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 D1714C4338F for ; Sun, 25 Jul 2021 23:34:53 +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 5288C60BD3 for ; Sun, 25 Jul 2021 23:34:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5288C60BD3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 24ECF82D49; Mon, 26 Jul 2021 01:34:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D5AF18324B; Mon, 26 Jul 2021 01:17:15 +0200 (CEST) Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E45B18323E for ; Mon, 26 Jul 2021 01:16:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=gyf304@gmail.com Received: by mail-qk1-f173.google.com with SMTP id c9so3435216qkc.13 for ; Sun, 25 Jul 2021 16:16:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ebgdBVzd0sG2iyZOnVz5NVWZ0hUqItKNiA2g7tbpT1s=; b=A0uFsr7xNocFgS/jdpV3pZCy75SEJV7TjwD8+mwShWwCeUSJt3m0bnyG+aPHwTX4pv om6dnVKgHkWUCMTMbqQtrJRa9k2v2PG5TQHFqNGdVFv5g8kIDF7xxHzOYJWiTHGR30EW cszDz8ZEwMcq3LntMItdYHT2KMUZIbAPwpOeTiO/iAV+P+pp5iL9XhA8//9btF6+qF4b kkhP0WKskgvRZ8df3LuWol7gc1g0gdSXGmrdvDak+BK18W1kMiadYnzH3h+lovQeWM+y dpm5iSxgOq+WGmipA+GLBdG4zY9vPxse3e3XAmT+tL6bBaBMKx4EOcmKGupxnr2EhP+y OiVw== X-Gm-Message-State: AOAM533/58IbNL4gwjGC7otZXnDdRRgNq7AXqIVKuuEAjGQvr14GMoNe OtW/kh4sQJMiFrGpbV7/UNskDBfUL8TPB5lQ X-Google-Smtp-Source: ABdhPJxkTBkQYosyWpNEFcZy19L/4W8sY78d+Cz2lvUX55dYUVF+Fzun03SMYkSn1oilbORPbinl+Q== X-Received: by 2002:ae9:e90e:: with SMTP id x14mr14714115qkf.118.1627255010623; Sun, 25 Jul 2021 16:16:50 -0700 (PDT) Received: from yifangu-Virtual-Machine.mshome.net (pool-100-6-159-43.pitbpa.fios.verizon.net. [100.6.159.43]) by smtp.gmail.com with ESMTPSA id u184sm17754694qkd.53.2021.07.25.16.16.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 16:16:50 -0700 (PDT) From: Yifan Gu To: u-boot@lists.denx.de Cc: Yifan Gu , Jagan Teki , Andre Przywara , Icenowy Zheng , George Hilliard Subject: [PATCH 22/27] sunxi: suniv: allow serial connection on uart1 Date: Sun, 25 Jul 2021 19:16:31 -0400 Message-Id: <20210725231636.879913-23-me@yifangu.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725231636.879913-1-me@yifangu.com> References: <20210725231636.879913-1-me@yifangu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 26 Jul 2021 01:32:10 +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 Signed-off-by: Yifan Gu --- arch/arm/include/asm/arch-sunxi/gpio.h | 1 + arch/arm/mach-sunxi/board.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h index 26c900fb11..2b03325adf 100644 --- a/arch/arm/include/asm/arch-sunxi/gpio.h +++ b/arch/arm/include/asm/arch-sunxi/gpio.h @@ -180,6 +180,7 @@ enum sunxi_gpio_number { #define SUNXI_GPD_PWM 2 #define SUNIV_GPE_UART0 5 +#define SUNIV_GPA_UART1 5 #define SUN5I_GPE_SDC2 3 #define SUN8I_GPE_TWI2 3 #define SUN50I_GPE_TWI2 3 diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 6dd2c6a4d8..7fa44b6f3a 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -100,6 +100,10 @@ static int gpio_init(void) sunxi_gpio_set_cfgpin(SUNXI_GPE(0), SUNIV_GPE_UART0); sunxi_gpio_set_cfgpin(SUNXI_GPE(1), SUNIV_GPE_UART0); sunxi_gpio_set_pull(SUNXI_GPE(1), SUNXI_GPIO_PULL_UP); +#elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUNIV) + sunxi_gpio_set_cfgpin(SUNXI_GPA(2), SUNIV_GPA_UART1); + sunxi_gpio_set_cfgpin(SUNXI_GPA(3), SUNIV_GPA_UART1); + sunxi_gpio_set_pull(SUNXI_GPA(2), SUNXI_GPIO_PULL_UP); #elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN4I) || \ defined(CONFIG_MACH_SUN7I) || \ defined(CONFIG_MACH_SUN8I_R40)) -- 2.25.1