Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2748038ybh; Mon, 5 Aug 2019 06:14:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwl3/gZz+O99mBN84XYuFu7v+8ipGpMZ103Pdzx4tDqOAns9V7bc2MpiHUVnZygFuyl75x8 X-Received: by 2002:a17:902:4c:: with SMTP id 70mr143856124pla.308.1565010859835; Mon, 05 Aug 2019 06:14:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565010859; cv=none; d=google.com; s=arc-20160816; b=KTxqqbNSxA7QIODMNLeCe9XkKWZaUpeMBNtjguIWS3QeAUn0/WOkqgptvbZpTcagNy x125e2CIJui+1K4sZP3IvD5n0bDeMQJzGk2Crc+i3rRSjk2O50h4ddgwq8ERpvttBGzJ eKShfnVs29jI3MylTR6ee+lQC8+hfwhAfxH6q33/KAH9yI7G/B6ya1zWMrm4vn1QOlxS sG/ROLwdNIK1i3PqzWhsXM6xSYJ3FVAVxvYUpF4RIS18m8vAoEso/jzegqJPJ0BsWFXm q5+7kP7+kZAAs3gIJL55EIOXDB4RBlWvlsZGWM1onr0ppCXwpnHpy9nKlwbm+GpdTI1d b93w== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c/exuzMrWzdKRoiM/NrgFmu39jCR1H6Oc7xXxdyKzPg=; b=SUHQAif/HDvaYSCS7VUL8JsGqfF/5frjzeA+YNPz+mMYXsqFAlbsKryuNcrtgB6VKi WyS7zpO1qB/Wkn6859jqX5mAPZOLAF6Y6lBhfX00K5ymnTTrA5Mmu5yN+kVZWrMQ3hmK /dtZJFpts0vSObtBvqnI2/uMx9Yr2IA8nTzzXbc1BXLXue7Krx6VUWy0JKKUUHJ1zk0u C0k2zUH0DHo8LQz38OA+SpjduLo6vo7XV2yyKi+52JL3u32pMVNSB5ZUtty8ifB3ZbDi rGwbdY5ohtHdlifv5wV1veinPmap2uKuF9jKWm35tcBDH5stu42PY6yNJa2YvVjotwvT EhEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MIDcL+7u; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si39621599plb.317.2019.08.05.06.14.04; Mon, 05 Aug 2019 06:14:19 -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=@kernel.org header.s=default header.b=MIDcL+7u; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729027AbfHENNe (ORCPT + 99 others); Mon, 5 Aug 2019 09:13:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:47440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730121AbfHENJH (ORCPT ); Mon, 5 Aug 2019 09:09:07 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6C273217D9; Mon, 5 Aug 2019 13:09:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565010545; bh=bvdFT2P/dtWkmua8snWB7W+h9bGz+K8PWddQfLcLNAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MIDcL+7ut3M02skpBj9nzJght9rIUHsPbvvATz3O7UhufWdX9Q2mDQ+GMIEdV7kSm UjRdym0GLABq85t4loWwTkDt1Rem2rp3TvP6DcdO1y1VExiJTi+Kbh9+aH/2J9o/1s r45xOy5o0d80MpQ9ptpxqFmH14qRf8pSPje64zS8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, JC Kuo , Peter De Schrijver , Stephen Boyd , Sasha Levin Subject: [PATCH 4.19 12/74] clk: tegra210: fix PLLU and PLLU_OUT1 Date: Mon, 5 Aug 2019 15:02:25 +0200 Message-Id: <20190805124936.794520436@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124935.819068648@linuxfoundation.org> References: <20190805124935.819068648@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 0d34dfbf3023cf119b83f6470692c0b10c832495 ] Full-speed and low-speed USB devices do not work with Tegra210 platforms because of incorrect PLLU/PLLU_OUT1 clock settings. When full-speed device is connected: [ 14.059886] usb 1-3: new full-speed USB device number 2 using tegra-xusb [ 14.196295] usb 1-3: device descriptor read/64, error -71 [ 14.436311] usb 1-3: device descriptor read/64, error -71 [ 14.675749] usb 1-3: new full-speed USB device number 3 using tegra-xusb [ 14.812335] usb 1-3: device descriptor read/64, error -71 [ 15.052316] usb 1-3: device descriptor read/64, error -71 [ 15.164799] usb usb1-port3: attempt power cycle When low-speed device is connected: [ 37.610949] usb usb1-port3: Cannot enable. Maybe the USB cable is bad? [ 38.557376] usb usb1-port3: Cannot enable. Maybe the USB cable is bad? [ 38.564977] usb usb1-port3: attempt power cycle This commit fixes the issue by: 1. initializing PLLU_OUT1 before initializing XUSB_FS_SRC clock because PLLU_OUT1 is parent of XUSB_FS_SRC. 2. changing PLLU post-divider to /2 (DIVP=1) according to Technical Reference Manual. Fixes: e745f992cf4b ("clk: tegra: Rework pll_u") Signed-off-by: JC Kuo Acked-By: Peter De Schrijver Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/tegra/clk-tegra210.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c index 9eb1cb14fce11..4e1bc23c98655 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -2214,9 +2214,9 @@ static struct div_nmp pllu_nmp = { }; static struct tegra_clk_pll_freq_table pll_u_freq_table[] = { - { 12000000, 480000000, 40, 1, 0, 0 }, - { 13000000, 480000000, 36, 1, 0, 0 }, /* actual: 468.0 MHz */ - { 38400000, 480000000, 25, 2, 0, 0 }, + { 12000000, 480000000, 40, 1, 1, 0 }, + { 13000000, 480000000, 36, 1, 1, 0 }, /* actual: 468.0 MHz */ + { 38400000, 480000000, 25, 2, 1, 0 }, { 0, 0, 0, 0, 0, 0 }, }; @@ -3343,6 +3343,7 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA210_CLK_DFLL_REF, TEGRA210_CLK_PLL_P, 51000000, 1 }, { TEGRA210_CLK_SBC4, TEGRA210_CLK_PLL_P, 12000000, 1 }, { TEGRA210_CLK_PLL_RE_VCO, TEGRA210_CLK_CLK_MAX, 672000000, 1 }, + { TEGRA210_CLK_PLL_U_OUT1, TEGRA210_CLK_CLK_MAX, 48000000, 1 }, { TEGRA210_CLK_XUSB_GATE, TEGRA210_CLK_CLK_MAX, 0, 1 }, { TEGRA210_CLK_XUSB_SS_SRC, TEGRA210_CLK_PLL_U_480M, 120000000, 0 }, { TEGRA210_CLK_XUSB_FS_SRC, TEGRA210_CLK_PLL_U_48M, 48000000, 0 }, @@ -3367,7 +3368,6 @@ static struct tegra_clk_init_table init_table[] __initdata = { { TEGRA210_CLK_PLL_DP, TEGRA210_CLK_CLK_MAX, 270000000, 0 }, { TEGRA210_CLK_SOC_THERM, TEGRA210_CLK_PLL_P, 51000000, 0 }, { TEGRA210_CLK_CCLK_G, TEGRA210_CLK_CLK_MAX, 0, 1 }, - { TEGRA210_CLK_PLL_U_OUT1, TEGRA210_CLK_CLK_MAX, 48000000, 1 }, { TEGRA210_CLK_PLL_U_OUT2, TEGRA210_CLK_CLK_MAX, 60000000, 1 }, /* This MUST be the last entry. */ { TEGRA210_CLK_CLK_MAX, TEGRA210_CLK_CLK_MAX, 0, 0 }, -- 2.20.1