Received: by 10.223.185.116 with SMTP id b49csp5971372wrg; Wed, 28 Feb 2018 01:37:28 -0800 (PST) X-Google-Smtp-Source: AH8x227nntigpEczZy6ZqvYojxeRcbPPy6DFHF+kN+jSALwRavNDO6vuZDaL8YXnCUsf8mn6lDKP X-Received: by 2002:a17:902:6b8a:: with SMTP id p10-v6mr17071594plk.432.1519810648493; Wed, 28 Feb 2018 01:37:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519810648; cv=none; d=google.com; s=arc-20160816; b=AYHK+L93ZPZ3iM2nh+fKNxeim+nCBWfyeV/GpbdTBp/BoAKvtSWfg/eyGXIgCUW5Kn Rq2Kxt0ilvMcCGeqckbaJm2aZWzhHUzSjfci3mrVZ4VEaoiLMI0OPYwmWJB5Vi+8uEGl N/9OtJQxpSLecSk0K9bsYaU2OXOiPU1mwLl2BenQ0+BGH7sOVJQK224yfrNldHd/j8Kh i2mLMFjAIdSUnYY95psDKPbOaXs421t/RYLzTXWKy813u+4hBx0liZKmZ4hhyhGEB7kI VEDzeUQdKBikUOByZBl1XBOxWYpnrWFIud8x4/czPQv3Mx5c5guYrO5GMe4tyVBUDG0E UifA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=dhXqOwhJwt6FxnPFxJo30O3A/fhWlL8RHQ40ffdl8t8=; b=nXNNRjNfQufVDpy39B2slci2UgVkTPCuZYMfocDOM5iqugbOpp1hAWOgoGuv0KvOXw mgGMDLzOROOQRStdIe65605Ux0o9rgv162g4FCMsHTgesQi50sfX4090Dt6Vb+TQ2POj CyGjo1ZdrHoEmPwAF7m3rFqW2I5JYq8tTpKOT/+zrGYPCCCQpTFxhEgoERe0s+wmAMyo i4VW9Uu5QAijx9rgO+E06HCYL9Y8qHX15p9dTlM/1A6ApT5WcUouZYFfVZopjKEMTcAk CBWI4JzOzpxxBE/+6DaxsHjU49Q4HcdNlEa0g3IUUJL0dz2YPrWLPV4/C6j/Tdh0Emyo VAFQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z188si790155pgb.592.2018.02.28.01.37.11; Wed, 28 Feb 2018 01:37:28 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbeB1Jg1 (ORCPT + 99 others); Wed, 28 Feb 2018 04:36:27 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:18980 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbeB1JgZ (ORCPT ); Wed, 28 Feb 2018 04:36:25 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Wed, 28 Feb 2018 01:36:27 -0800 Received: from HQMAIL101.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Wed, 28 Feb 2018 01:36:25 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Wed, 28 Feb 2018 01:36:25 -0800 Received: from UKMAIL101.nvidia.com (10.26.138.13) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 28 Feb 2018 09:36:24 +0000 Received: from tbergstrom-lnx.Nvidia.com (10.21.24.170) by UKMAIL101.nvidia.com (10.26.138.13) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 28 Feb 2018 09:36:20 +0000 Received: by tbergstrom-lnx.Nvidia.com (Postfix, from userid 1002) id 19815F80864; Wed, 28 Feb 2018 11:36:20 +0200 (EET) Date: Wed, 28 Feb 2018 11:36:20 +0200 From: Peter De Schrijver To: Dmitry Osipenko CC: Marcel Ziswiler , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jonathanh@nvidia.com" , "mturquette@baylibre.com" , "pgaikwad@nvidia.com" , "sboyd@kernel.org" , "thierry.reding@gmail.com" , "linux-clk@vger.kernel.org" Subject: Re: [PATCH] clk: tegra: fix pllu rate configuration Message-ID: <20180228093620.GC6190@tbergstrom-lnx.Nvidia.com> References: <20180222230451.15515-1-marcel@ziswiler.com> <31f039e8-9afc-22d1-d478-a7f41db0dace@gmail.com> <1519686262.6374.3.camel@toradex.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-NVConfidentiality: public User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.21.24.170] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 27, 2018 at 02:59:11PM +0300, Dmitry Osipenko wrote: > On 27.02.2018 02:04, Marcel Ziswiler wrote: > > On Mon, 2018-02-26 at 15:42 +0300, Dmitry Osipenko wrote: > >> On 23.02.2018 02:04, Marcel Ziswiler wrote: > >>> Turns out latest upstream U-Boot does not configure/enable pllu > >>> which > >>> leaves it at some default rate of 500 kHz: > >>> > >>> root@apalis-t30:~# cat /sys/kernel/debug/clk/clk_summary | grep > >>> pll_u > >>> pll_u 3 3 0 500000 > >>> 0 > >>> > >>> Of course this won't quite work leading to the following messages: > >>> > >>> [ 6.559593] usb 2-1: new full-speed USB device number 2 using > >>> tegra- > >>> ehci > >>> [ 11.759173] usb 2-1: device descriptor read/64, error -110 > >>> [ 27.119453] usb 2-1: device descriptor read/64, error -110 > >>> [ 27.389217] usb 2-1: new full-speed USB device number 3 using > >>> tegra- > >>> ehci > >>> [ 32.559454] usb 2-1: device descriptor read/64, error -110 > >>> [ 47.929777] usb 2-1: device descriptor read/64, error -110 > >>> [ 48.049658] usb usb2-port1: attempt power cycle > >>> [ 48.759475] usb 2-1: new full-speed USB device number 4 using > >>> tegra- > >>> ehci > >>> [ 59.349457] usb 2-1: device not accepting address 4, error -110 > >>> [ 59.509449] usb 2-1: new full-speed USB device number 5 using > >>> tegra- > >>> ehci > >>> [ 70.069457] usb 2-1: device not accepting address 5, error -110 > >>> [ 70.079721] usb usb2-port1: unable to enumerate USB device > >>> > >>> Fix this by actually allowing the rate also being set from within > >>> the Linux kernel. I think the best solution to this problem would be to make pll_u a fixed clock and enable it and program the rate if it's not enabled at boot. This is how it's done for Tegra210. The reason is that the USB IP blocks can control the pll_u state in hw. This means that if sw would disable and then re-enable the pll_u clock, but there is no USB activity, pll_u will still be disable and therefor not lock, causing an error. Today this is worked around by not polling the lock bit for pll_u, but a better solution would be to just remove all sw controls for pll_u. Peter.