From patchwork Mon Jan 20 10:46:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 1225858 X-Patchwork-Delegate: alexey.brodkin@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=mail header.b=XjA9CjKQ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481Szc0Xsvz9sRf for ; Mon, 20 Jan 2020 21:47:24 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F3B1818DA; Mon, 20 Jan 2020 11:46:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="XjA9CjKQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8A4D81880; Mon, 20 Jan 2020 11:46:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.87.133]) (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 34BBA81880 for ; Mon, 20 Jan 2020 11:46:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Alexey.Brodkin@synopsys.com Received: from mailhost.synopsys.com (mdc-mailhost1.synopsys.com [10.225.0.209]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 390A0C04F7; Mon, 20 Jan 2020 10:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1579517201; bh=9hNjPN5JegrAlPQCeDdpzlwk09YMaZRioVttgMtg9NA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XjA9CjKQqqlpAz9FHkc6MrDq3CHcEuxhQOxuvmumPQptQbk0pdb0xAHJPHnXorjBj Qfqrrhex/JtMiwYtnP2cibvGiC2f2swPezDwP7Z4DecRRE2rHeI/a+GLGz6RFyXVHn fsE/oZHVHtPNzcHOmI0SuZVuOQv8mGoKJCZmlxfdsONOQB7EFe1tupxmaFWGgwTXi2 bGiOIVSalvMxj5rWX6jMufIsZMMVVFHc0p6uCgfRZdoqLWQuMcdxF9CWrYwmySNSOh lqMTsVzdbVHPWmFjHkiMW2KDhNW50z3+tpbT5RRXRpyZbQFWjpSbw9ipZwA58Ud60i GK2Rp2GfFXnlw== Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 25185A0064; Mon, 20 Jan 2020 10:46:39 +0000 (UTC) From: Alexey Brodkin To: u-boot@lists.denx.de Subject: [PATCH 1/3] ARC: nSIM: switch from ARC UART to DW UART Date: Mon, 20 Jan 2020 13:46:33 +0300 Message-Id: <20200120104635.33290-2-abrodkin@synopsys.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20200120104635.33290-1-abrodkin@synopsys.com> References: <20200120104635.33290-1-abrodkin@synopsys.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-snps-arc@lists.infradead.org, Alexey Brodkin , uboot-snps-arc@synopsys.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean Since v2019.06 DesingWare nSIM supports DesignWare UART simulation and so we may switch from pretty unusual ARC UART to much more standard DesignWare UART (which in case of U-Boot is just an ordinary 16650 UART). This among other things makes built dinaries compatible with our other platforms to name a few: FPGA-based HAPS boards, QEMU and even ZeBU. Signed-off-by: Alexey Brodkin --- arch/arc/dts/nsim.dts | 12 +++++++----- configs/nsim_700_defconfig | 8 ++++---- configs/nsim_700be_defconfig | 8 ++++---- configs/nsim_hs38_defconfig | 8 ++++---- configs/nsim_hs38be_defconfig | 8 ++++---- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/arch/arc/dts/nsim.dts b/arch/arc/dts/nsim.dts index 243ecb178e..a3f3964d35 100644 --- a/arch/arc/dts/nsim.dts +++ b/arch/arc/dts/nsim.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com) + * Copyright (C) 2015-2016, 2019 Synopsys, Inc. (www.synopsys.com) */ /dts-v1/; @@ -10,7 +10,7 @@ model = "snps,nsim"; aliases { - console = &arcuart0; + console = &uart0; }; cpu_card { @@ -22,9 +22,11 @@ }; }; - arcuart0: serial@0xc0fc1000 { - compatible = "snps,arc-uart"; - reg = <0xc0fc1000 0x100>; + uart0: serial@f0000000 { + compatible = "snps,dw-apb-uart"; + reg = <0xf0000000 0x1000>; + reg-shift = <2>; + reg-io-width = <4>; clock-frequency = <70000000>; }; diff --git a/configs/nsim_700_defconfig b/configs/nsim_700_defconfig index 5633113b09..2d4a58b178 100644 --- a/configs/nsim_700_defconfig +++ b/configs/nsim_700_defconfig @@ -1,13 +1,13 @@ CONFIG_ARC=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -16,6 +16,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/nsim_700be_defconfig b/configs/nsim_700be_defconfig index 40f7ec7e1f..61eea91449 100644 --- a/configs/nsim_700be_defconfig +++ b/configs/nsim_700be_defconfig @@ -2,13 +2,13 @@ CONFIG_ARC=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -17,6 +17,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/nsim_hs38_defconfig b/configs/nsim_hs38_defconfig index 2820a6fca3..ce68de3251 100644 --- a/configs/nsim_hs38_defconfig +++ b/configs/nsim_hs38_defconfig @@ -2,13 +2,13 @@ CONFIG_ARC=y CONFIG_ISA_ARCV2=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -17,6 +17,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y diff --git a/configs/nsim_hs38be_defconfig b/configs/nsim_hs38be_defconfig index e533fae2b1..5d2ea59d52 100644 --- a/configs/nsim_hs38be_defconfig +++ b/configs/nsim_hs38be_defconfig @@ -3,13 +3,13 @@ CONFIG_ISA_ARCV2=y CONFIG_CPU_BIG_ENDIAN=y CONFIG_TARGET_NSIM=y CONFIG_SYS_TEXT_BASE=0x81000000 -CONFIG_DEBUG_UART_BASE=0xc0fc1000 +CONFIG_DEBUG_UART_BASE=0xf0000000 CONFIG_DEBUG_UART_CLOCK=70000000 CONFIG_SYS_CLK_FREQ=70000000 CONFIG_DEBUG_UART=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="console=ttyARC0,115200n8" +CONFIG_BOOTARGS="console=ttyS0,115200n8" CONFIG_SYS_PROMPT="nsim# " # CONFIG_CMD_SETEXPR is not set CONFIG_OF_CONTROL=y @@ -18,6 +18,6 @@ CONFIG_DEFAULT_DEVICE_TREE="nsim" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_DM_SERIAL=y -CONFIG_DEBUG_ARC_SERIAL=y -CONFIG_ARC_SERIAL=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y CONFIG_USE_PRIVATE_LIBGCC=y