Received: by 10.192.165.148 with SMTP id m20csp102431imm; Fri, 20 Apr 2018 03:52:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+R8YwtA7LBGDMHdELkLMMbBjmr9t6MK5FNF8U0vYqx0qP0t3XzoB9GJ3KRYOuEnvfu9T+W X-Received: by 10.99.2.202 with SMTP id 193mr8238261pgc.117.1524221525581; Fri, 20 Apr 2018 03:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524221525; cv=none; d=google.com; s=arc-20160816; b=u+9a+EThRRduIiqhi748eMnM+wJ46G/AxVTFBedW4o+IgpX8VGQGHoksFkl1czVavW WUi2OO3hc+6B0ohKJeiKFV5G4+uk3dgJ8qMtuTo1uCwrsCFRqrzihQTO2FIFZr9vO1na VSZ7Z3ImsY2b65BBXFDnyPtueWN214c872yPVouZrS2aq4ptW64ooqoTLwhE1FBNeijS CwJYoRMkpCVv37X078jm4+yQ6s9PfKgbUd3ecaszhQjrjzG+FJ9j2dHgJ9No1tMd6aiX 3CN7rPaZarTFEeyIj0pmiKoXrNlxYuwIElcmHe98eCzpJKOc0FRaI3jgTxPMM0UFobr7 CGUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=5K3rLB44zAqbILhgeA71LjbcfqNzPBY2VoWvKfQt4NE=; b=JxRe26CeKI8xr9L43mBAG/dXTAXnfSp/A4CERZsGCrILvH3XMEGNaum1fo/DogI3sU X1EiKzWzb6rvqI6h5fKY/20iPnwcfz59sVAifDH0B06zbznmPX48oN2KppyIneoKZ7o6 kHdp8+L6U7V0fqCBaD+w2cKNrD4jkXRrXrks9UwvOkUYgDe8FShIzygMS9s3d+t+SuMj NGMeqroT/1NuNNmYBruiEWozPQ9NYJna6wQsISKowjVMhWFdIo+dERhV+AfBvwLc8BuC WBpbw0/32PyGtO8cpm5eUJw8maMakSTiDSI2bizSgzAlq4LPnwFGug+8MoVQc3DVC5Fw Nrjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O9XbE9Ym; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si4797092pgr.572.2018.04.20.03.51.50; Fri, 20 Apr 2018 03:52:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O9XbE9Ym; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754734AbeDTKuR (ORCPT + 99 others); Fri, 20 Apr 2018 06:50:17 -0400 Received: from mail-lf0-f50.google.com ([209.85.215.50]:43556 "EHLO mail-lf0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754511AbeDTKuO (ORCPT ); Fri, 20 Apr 2018 06:50:14 -0400 Received: by mail-lf0-f50.google.com with SMTP id v207-v6so4482397lfa.10; Fri, 20 Apr 2018 03:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5K3rLB44zAqbILhgeA71LjbcfqNzPBY2VoWvKfQt4NE=; b=O9XbE9YmjYF9TbWzfgV1NF1rf0ThxkTWbuAuZ9EaXTFLF0wFSSYASzQ5i4/haIshTb OKIt1c1m5N1gW4ec+TpCaWph7R8ICpwkqi4UwYneISJdULlyWRGWTi7pEfQjZjHmpfCM 9c7dMSKKD8gihjkMUM1FAqRlzD6RD4Idh+mo3ZFbW3qUHtrV8dfh2rW/cOaOZbaLt6Cu 8mqEUnEYwjInWCBE0ktKuDXcsgVfv8+lfkATMwc34GPPwsYcBtz3I/QKJ8RGBbLeKJDM 3yyc5yhhcFG6XgNN7s5s62q2uGjb073MY3NuS0YIVMsKC4rDLvHFIOfuHPOjkMp75Eu1 Z6xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=5K3rLB44zAqbILhgeA71LjbcfqNzPBY2VoWvKfQt4NE=; b=f7cViBs33CYZHr2Mc7IbnZutA64YKxmqKJ+jSJcMocUPuofYENAu6E5mZm6Gc7osUI DkJWk2ChUKv2cnAJ8M82psf1DSWNPqZqYhuyQJw5Bdv/t0I4T6ocJD846NOiksDyP2Ov 8iCn8cLVgy/jS6xn1LI0LVyXsesYkk7IUSSbpos5AW6E+kgV9l5K5mYDi6WVTcYKA/oA obwqosnGjoLjqMoxvr0nKpoZtFFiPiSAZY1C4T9hBF2akl6UQBaUCQErSCJS4rCND9By LWnY24Z1qGRqr2EP6+GGLU2Qp7XAfl5B3fhDED70Fhldzn4oIE5c5M9Tjgjseug3XhIE rCkw== X-Gm-Message-State: ALQs6tBOE7QHY6x3xjXQG8H2QFQ5Hc4U0kfv41+v7YbfWFlwxyMDe94J kNO54j0y2sV76UR5Zby3pHc= X-Received: by 2002:a19:4813:: with SMTP id v19-v6mr2312053lfa.63.1524221412833; Fri, 20 Apr 2018 03:50:12 -0700 (PDT) Received: from [192.168.1.145] (ppp109-252-91-130.pppoe.spdop.ru. [109.252.91.130]) by smtp.googlemail.com with ESMTPSA id z19sm1010542ljz.1.2018.04.20.03.50.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Apr 2018 03:50:12 -0700 (PDT) Subject: Re: [PATCH] ARM: tegra: fix ulpi regression on tegra20 To: Marc Dietrich , Marcel Ziswiler Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, Marcel Ziswiler , Thierry Reding , Jonathan Hunter , linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , Russell King , linux-arm-kernel@lists.infradead.org References: <20180219151252.29289-1-marcel@ziswiler.com> <6600596.BijQW1iq1K@ax5200p> From: Dmitry Osipenko Openpgp: preference=signencrypt Autocrypt: addr=digetx@gmail.com; prefer-encrypt=mutual; keydata= xsBNBFpX5TwBCADQhg+lBnTunWSPbP5I+rM9q6EKPm5fu2RbqyVAh/W3fRvLyghdb58Yrmjm KpDYUhBIZvAQoFLEL1IPAgJBtmPvemO1XUGPxfYNh/3BlcDFBAgERrI3BfA/6pk7SAFn8u84 p+J1TW4rrPYcusfs44abJrn8CH0GZKt2AZIsGbGQ79O2HHXKHr9V95ZEPWH5AR0UtL6wxg6o O56UNG3rIzSL5getRDQW3yCtjcqM44mz6GPhSE2sxNgqureAbnzvr4/93ndOHtQUXPzzTrYB z/WqLGhPdx5Ouzn0Q0kSVCQiqeExlcQ7i7aKRRrELz/5/IXbCo2O+53twlX8xOps9iMfABEB AAHNIkRtaXRyeSBPc2lwZW5rbyA8ZGlnZXR4QGdtYWlsLmNvbT7CwJQEEwEIAD4WIQSczHcO 3uc4K1eb3yvTNNaPsNRzvAUCWlflPAIbAwUJA8JnAAULCQgHAgYVCgkICwIEFgIDAQIeAQIX gAAKCRDTNNaPsNRzvFjTCACqAh1M9/YPq73/ai5h2ExDquTgJnjegL8KL2yHL3G+XINwzN5E nPI7esoYm+zVWDJbv3UuRqylpookLNSR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@gmail.com> Date: Fri, 20 Apr 2018 13:50:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <6600596.BijQW1iq1K@ax5200p> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20.04.2018 11:52, Marc Dietrich wrote: > Hi Marcel, > > Am Montag, 19. Februar 2018, 16:12:52 CEST schrieb Marcel Ziswiler: >> From: Marcel Ziswiler >> >> Since commit f8f8f1d04494 ("clk: Don't touch hardware when reparenting >> during registration") ULPI has been broken on Tegra20 leading to the >> following error message during boot: >> >> [ 1.974698] ulpi_phy_power_on: ulpi write failed >> [ 1.979384] tegra-ehci c5004000.usb: Failed to power on the phy >> [ 1.985434] tegra-ehci: probe of c5004000.usb failed with error -110 >> >> Debugging through the changes and finally also consulting the TRM >> revealed that rather than the CDEV2 clock off OSC requiring such pin >> muxing actually the PLL_P_OUT4 clock is in use. It looks like so far it >> just worked by chance of that one having been enabled which Stephen's >> commit now changed when reparenting sclk away from pll_p_out4 leaving >> that one disabled. Fix this by properly assigning the PLL_P_OUT4 clock >> as the ULPI PHY clock. > > I booted 4.17-rc1 (which includes this fix) on an AC100 (T20 paz00 board) and > the error above is still there. Surprisingly the error vanishes when I revert > your patch. So this patch actually *causes* the problem above on my board. > Could it be, that we need all four clocks? Dimitry mentioned on IRC that it > could also be a problem in the clock init table. I don't have the technical > background myself to fix it, but I still wonder what could be so different > between TrimSlice and AC100. I managed to find CDEV clocks in TRM this time. Seems assigning CDEV2 clock to "ulpi-link" was correct and both CDEV2 and PLL_P_OUT4 should be enabled, CDEV2 should gate the PLL_P_OUT4 that feeds USB HW and PLL_P_OUT4 should be always-enabled because it is enabled by init_table, but apparently it is getting disabled erroneously. Marcel, could you please revert your patch, add "trace_event=clk_enable,clk_disable,clk_set_parent tp_printk" to kernels cmdline and post the log? It looks like there is some clk framework bug, but just in case please also try to apply this patch: diff --git a/drivers/clk/tegra/clk-tegra-periph.c b/drivers/clk/tegra/clk-tegra-periph.c index 2acba2986bc6..407bd0c0ac2f 100644 --- a/drivers/clk/tegra/clk-tegra-periph.c +++ b/drivers/clk/tegra/clk-tegra-periph.c @@ -1024,7 +1024,7 @@ static void __init init_pllp(void __iomem *clk_base, void __iomem *pmc_base, if (dt_clk) { clk = tegra_clk_register_pll_out("pll_p_out4", "pll_p_out4_div", clk_base + PLLP_OUTB, - 17, 16, CLK_IGNORE_UNUSED | + 17, 16, CLK_IS_CRITICAL | CLK_SET_RATE_PARENT, 0, &PLLP_OUTB_lock); *dt_clk = clk;