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=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 495CCC433F5 for ; Wed, 8 Sep 2021 09:44:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19EEA61139 for ; Wed, 8 Sep 2021 09:44:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 19EEA61139 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lQ79EMgd3bNL1Ldc/hDEjLES7g3pmd5ik/pP2VJdn2c=; b=0bL1k1nM6Z/wCV 0dign4K+fynqekjMnWn8UCaQIfuW2fA2Uh4cyRJRnSc1OBq59tA62ElDyeOxIMLL9Ekz1TbAZp7fD IzNEe908/h4gdk2Tm6eZepMHSRDi7X0oRuKbzIQd6QKUZupvuHeeVOR+XhmhzjhDk0fLiH4bp/QWZ m7TYIgCU7Vohe7/KtpIYqcYcJPX8DVAgvoj3qmcwpRdiwcbvBc4N5WyzNNmt1ZPxz/N1/Xg8zvcqc B6x1+AHFjcPaxMCSEUAsxeyCArjdV45ajH1ZXcDXlovyybORXwp8jVKCFLPhTmE4rz0EzJV6xk6NK Hj4/LEpO6MSGqtrZ1H1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNu6g-006LJA-18; Wed, 08 Sep 2021 09:43:02 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNu6b-006LIf-PW for linux-arm-kernel@lists.infradead.org; Wed, 08 Sep 2021 09:42:59 +0000 Received: by mail-lf1-x136.google.com with SMTP id m28so3705475lfj.6 for ; Wed, 08 Sep 2021 02:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tcxDxLsWHGr7j1cvxMG2JLruNGk37pPqhVGSTiHNRTI=; b=geGIKAXuwrxvpukyugOKBZCm3v64zHneGc4gUrxldK2pKi2rdjMNXnfj8dgx8K58uf ogvILTSHxVVBAyqLgjYHreu0k52T++uJp9lOvpiKnpIQ8Bjyz2BIX7YxHlOjn1gortwr QOkCGYy9DhxEIO6grVDNeIYuzaEpDIKRHkrvbnADXd+UfND9vaLyUaIZYjH3EbSwN7zu hs5MGlB4oIUF1M2DKo6NAAxX4oQmhFNJxeIdmT7c6S72Ui3a+eZ0yvPXJLtQ+owtPjvi S8dDAis6RFUobhVc7tVIRcEpEso4uMkcIqQrszZhhuu47/TXi4vZaBTUqGSAjOO/A+Pr mauA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=tcxDxLsWHGr7j1cvxMG2JLruNGk37pPqhVGSTiHNRTI=; b=XHcX9RPxcUZneV7UC9cDDnjB8jB2do1hsQhkDktkiUtUBpdj4T5saowhb+IbXNxF+x tnbRgOLvJcHPgPzBvDKfXMPNQbrya1oCjFDowoA4xArowm4N+rG/HNyS2V7XQPabcm1c CDFMIf67Llh/CZ+objxMstiNYR6Luii8UuBqkpqcDtyN9bXW7uyLaBPDNlhezBYyJ1r5 0GgNKEm4yo3X/LpsAUqo0SRczrUUpkISio0BaX4EcNZAPvx8lUsyIc39BO7Um5dTIu7U K/9FBX43VTU9NilenwVBb5jNDVf3bTonR5Y/aCEs2wE0Q56q3hGPpYEML8Uhe1BN7Pcy Ij3w== X-Gm-Message-State: AOAM531CU57rWpFiWcUFOO1pKggLxWvWB79MXq2AClsq1M6J9HXDjTa2 kNW8naaorHkfHgPlHVTJm78= X-Google-Smtp-Source: ABdhPJxrOHq4d4XwI1TCtF/j7UjWh+chOlUNydbJM4p4e9w/eyyWqy8UuaUlIgCkRr7/6Fru0VeUQg== X-Received: by 2002:ac2:4185:: with SMTP id z5mr2080264lfh.391.1631094175380; Wed, 08 Sep 2021 02:42:55 -0700 (PDT) Received: from home.paul.comp (paulfertser.info. [2001:470:26:54b:226:9eff:fe70:80c2]) by smtp.gmail.com with ESMTPSA id o8sm142625lfr.265.2021.09.08.02.42.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 02:42:54 -0700 (PDT) Received: from home.paul.comp (home.paul.comp [IPv6:0:0:0:0:0:0:0:1]) by home.paul.comp (8.15.2/8.15.2/Debian-14~deb10u1) with ESMTP id 1889gpxA015666; Wed, 8 Sep 2021 12:42:52 +0300 Received: (from paul@localhost) by home.paul.comp (8.15.2/8.15.2/Submit) id 1889gnns015665; Wed, 8 Sep 2021 12:42:49 +0300 Date: Wed, 8 Sep 2021 12:42:49 +0300 From: Paul Fertser To: Chia-Wei Wang Cc: robh+dt@kernel.org, joel@jms.id.au, andrew@aj.id.au, lee.jones@linaro.org, osk@google.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Konstantin Klubnichkin Subject: Re: [PATCH v2 0/3] arm: aspeed: Add UART routing support Message-ID: <20210908094248.GZ23326@home.paul.comp> References: <20210902021817.17506-1-chiawei_wang@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210902021817.17506-1-chiawei_wang@aspeedtech.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210908_024257_889644_4C832D1A X-CRM114-Status: GOOD ( 17.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, On Thu, Sep 02, 2021 at 10:18:13AM +0800, Chia-Wei Wang wrote: > Add UART routing driver and the device tree nodes. Thank you for working on exposing this functionality in upstreamable way, that's so much better than all the register-level hacks in U-Boot and similar approaches! One (somewhat) related question that I hope you do not mind answering: is there anything special regarding the routing or other configuration that needs to be done for VUART to work with IRQs? The reason I ask is that I have tried hard (and I know several other developers who have too) to use VUART functionality but somehow as soon as Linux was booting on host and starting to use the IRQ-based 16550 driver the communication was halted both ways. Basically, the BMC firmware was enabling VUART in DTS, then setting LPC address to 0x3F8 and LPC IRQ to 4 and reading/writing using the corresponding /dev/ttyS* node. The datasheet is not clearly telling what other actions need to be performed for this to work. Not using VUART and instead routing UART1 lines with exactly the same pinctrl/pinmux worked just fine. One detail is that with VUART the host wasn't seeing new interrupts but when they were simulated by exporting the LPC interrupt pin via /sys/class/gpio and toggling it manually the data was getting through. Does UART1 need some explicit disabling for VUART IRQs to work? It looks like setting LPC address and IRQ number in VUART is enough to override the register part but probably not for the interrupt? -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fercerpav@gmail.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel