From patchwork Sat Aug 13 20:35:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 9278591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9D648600CB for ; Sat, 13 Aug 2016 20:38:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8121C28AD5 for ; Sat, 13 Aug 2016 20:38:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74F6628AD8; Sat, 13 Aug 2016 20:38:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E743428AD5 for ; Sat, 13 Aug 2016 20:38:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bYff2-0006jj-FQ; Sat, 13 Aug 2016 20:36:04 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bYfeu-0006hs-N3 for linux-arm-kernel@lists.infradead.org; Sat, 13 Aug 2016 20:35:58 +0000 Received: by mail-wm0-x22e.google.com with SMTP id i5so36044627wmg.0 for ; Sat, 13 Aug 2016 13:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=X2cCDWnUU3tXBsBC3JgWfW6v+sB5JKzGPYsG/aomsIU=; b=H4qutYK5ZbobjAOixqITb6+ovuCEZ2pTVsR8jPB55+VVNmZnzkSe1kuQXIieV5+on9 ws64blHW2zaZDDXlH5B3rRUe2L2POwabMtHtQHA8GsmPgQYqe1sneN2eDqocR/iMH+/6 3vOmteiIez3wd7HAUxzFzYc9B7QF42ckd9fsMNj6DLfgVV6qnmD56w5jDycs28ut1NMz QpXYGbBBHTIKzteZ8SMtbQIAnQH/Uiydo2hHROwhyPGjig+5d6HqwndoHlWl7EnqchoS t+sm+2uAvi/c3JBNv5anmWuFdTBmTTqmIXODjU8XfIMaIM5AKOTkEtXxqM3av3WPhTxN 6C8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:reply-to:to:cc:date :in-reply-to:references:mime-version:content-transfer-encoding; bh=X2cCDWnUU3tXBsBC3JgWfW6v+sB5JKzGPYsG/aomsIU=; b=SkCBLlGURYGFoQQaOoZDGSGbtoQwBKvb1qcTwF1uhB76vpndH/kAzleq2PMrtYpx0M N08//A7/qiysfcnQoPvZensDAWEVqHRlVIzAMwcV9lEug5xRpfxQdPovOKjMaMw/cAH4 qcOmlTe41VqqvKL26t4KxLo++ddxA+T8Xa0tQ6oV+q++oZuhzkOYcW29AxCv31BgHzXa ebl6tuG1XDZ7WEfRJnR6Fmr9A6iZ0sR+NJxsjuFm3hYkkYD+9DIZPCihtnoV0Aqr2TFJ OK1jqmb0oxEM/NCLPfcwc6fhcLJuulsNS28Pdel7qNFoYrdd2VBn3xQ1ar+lJR54bxvS 5Nng== X-Gm-Message-State: AEkooutBJuP3rYFmzq0DGJ+nuOmdGmWgSwzzJ2VOfnOPQd/L0353TTCGTGdAvN2hT127dg== X-Received: by 10.194.95.36 with SMTP id dh4mr12470355wjb.149.1471120534309; Sat, 13 Aug 2016 13:35:34 -0700 (PDT) Received: from mars.fritz.box (HSI-KBW-37-209-75-7.hsi15.kabel-badenwuerttemberg.de. [37.209.75.7]) by smtp.googlemail.com with ESMTPSA id q137sm8587539wmd.19.2016.08.13.13.35.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Aug 2016 13:35:33 -0700 (PDT) Message-ID: <1471120532.1923.4.camel@googlemail.com> Subject: Re: serial: imx: regression triggered by newly introduced DSR irq handling From: Christoph Fritz To: Fabio Estevam Date: Sat, 13 Aug 2016 22:35:32 +0200 In-Reply-To: References: <1458825865-7434-1-git-send-email-u.kleine-koenig@pengutronix.de> <1458825865-7434-7-git-send-email-u.kleine-koenig@pengutronix.de> <1470350663.26773.41.camel@googlemail.com> <20160805065845.GI17874@pengutronix.de> <1470398615.1936.22.camel@googlemail.com> X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160813_133556_918866_586328CA X-CRM114-Status: GOOD ( 18.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: chf.fritz@googlemail.com Cc: Martin Fuzzey , Baruch Siach , Sascha Hauer , Greg Kroah-Hartman , "linux-serial@vger.kernel.org" , Uwe =?ISO-8859-1?Q?Kleine-K=F6nig?= , Fabio Estevam , Shawn Guo , linux-arm-kernel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 2016-08-10 at 17:54 -0300, Fabio Estevam wrote: > On Fri, Aug 5, 2016 at 9:03 AM, Christoph Fritz > wrote: > > > SION is necessary for pinconfig MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 > > if bit 17 in IOMUXC_GPR_GPR1 is set and bit 13 not. > > > > So that ref_enetpll1 provides a clock not only for the external PHY but > > also for the internal controller. > > > > Using SION is a quirk here, because the silicon doesn't feed the clock > > back to the internal controller automatically. > > > > On the other hand, NXP could argue: You need to add a wire on your PCB > > between ENET1_REF_CLK1 and ENET1_TX_CLK -- but referring to the > > datasheet ENET1_TX_CLK isn't used in RMII config... > > > > So if Fabio or Shawn agrees with my assumption above, I'll add something > > like 27e16501052e5341934d3 "serial: imx: implement DSR irq > > handling for DTE mode". To correct myself, I'm referring to commit da4fa6fa8016dba54ae "ARM: imx25-pinfunc: document SION being important for MX25_PAD_SD1_CMD__SD1_CMD". > > > > Okay? > > Could you please post your suggestion as a patch or RFC so that we can > understand what your proposal is? Sure, here is my proposal: --- arch/arm/boot/dts/imx6sx-pinfunc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- diff --git a/arch/arm/boot/dts/imx6sx-pinfunc.h b/arch/arm/boot/dts/imx6sx-pinfunc.h index bb9c6b7..67a3dd7 100644 --- a/arch/arm/boot/dts/imx6sx-pinfunc.h +++ b/arch/arm/boot/dts/imx6sx-pinfunc.h @@ -308,6 +308,19 @@ #define MX6SX_PAD_ENET1_RX_CLK__VDEC_DEBUG_35 0x008C 0x03D4 0x0000 0x8 0x0 #define MX6SX_PAD_ENET1_RX_CLK__PCIE_CTRL_DEBUG_29 0x008C 0x03D4 0x0000 0x9 0x0 #define MX6SX_PAD_ENET1_TX_CLK__ENET1_TX_CLK 0x0090 0x03D8 0x0000 0x0 0x0 +/* + * SION bit is necessary for ENET1_REF_CLK1 (ENET2_REF_CLK2 untested) if it is + * used as clock output of IMX6SX_CLK_ENET_REF (ENET1_TX_CLK) to e.g. supply a + * PHY in RMII mode. This configuration is true if: + * - bit 1 in field IMX6SX_GPR1_FEC_CLOCK_PAD_DIR_MASK is set + * - bit 1 in field IMX6SX_GPR1_FEC_CLOCK_MUX_SEL_MASK unset + * It seems to be a silicon bug that in this configuration ENET1_TX reference + * clock isn't provided automatically. According to i.mx6sx reference manual + * (IOMUXC_GPR_GPR1 field descriptions: ENET1_CLK_SEL, Rev. 0 from 2/2015) it + * should be the case. + * This might have side effects for other hardware units that are connected to + * that pin and use the respective function as input (e.g. DSR irq handling). + */ #define MX6SX_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x0090 0x03D8 0x0760 0x1 0x1 #define MX6SX_PAD_ENET1_TX_CLK__AUDMUX_AUD4_RXD 0x0090 0x03D8 0x0644 0x2 0x1 #define MX6SX_PAD_ENET1_TX_CLK__UART1_DTR_B 0x0090 0x03D8 0x0000 0x3 0x0