Received: by 10.192.165.148 with SMTP id m20csp104562imm; Thu, 26 Apr 2018 17:01:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrIg8NxeJfumPnoVal356hHosypdoF0I3Y70F+avg7QKUCNvcwJu9DJobs5pmuLBE79GFzG X-Received: by 10.98.223.76 with SMTP id u73mr133640pfg.10.1524787313520; Thu, 26 Apr 2018 17:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524787313; cv=none; d=google.com; s=arc-20160816; b=sI0NWmQuuYjMFfvXMw1UfEQW06qNWUXy+ftyCrbU5rg9Svsp63YSrpXCYpYHnGqsBN 2g61hISTyF9eX4YY3x3XDIJFQVEKLOOkuYmSmui0tD7MQb5te8QaMmDWoRVW2D+5wcSj 9B2oZed1VVhjtP4rRyVb8vuk3BorN54w6NtAX3aYca0F1KhQl7xQQphgjtJY2JtVpPOz xBsfQ0WvystTQf/N6cc/lz+xS/JeMCrjFaeRu469XLaTus9/MJbAt4OmnOJ/B1rhrdmK bPe+my/jya3BhZ+3fVzfsIT/5yTAvnY4AmxVDUFNYSMXh8Pbq1tCaHSx2pXqo42g7ME0 OHyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ZjfLH+v7MHWxWk4WPeHQ6K10nCfs8a6H7evjXi7EaPI=; b=X+PChKq7MRVCRgYOROWkWuShY85SPXwUIL4g56on1PbuJFo8C7a4bIpvV0PBTnNqJO 2jjxCC/86/CcYjj1+K/6WYoMCEMpQzXoI6F4HV1gtfWYMcf11lfxFWqpeI1fOWDW6bdD 9CFMUGqMxtxI7fU3cBSuVafolop1QfxHhzjn9STgncsShM/BaxHnjlZyUW9VF+YLfqc4 qVdHQs+DTfbqx0X7ZytPxbdNuq2puqWvO/ZATqZr8cM8jVGDaNbeLLfOA2fWN0RMj4Pj HwUr1x8oGKs5NhuL7uqcbl5DNzW0g9+puvHHs+PP/l+VZyXjnVuNyzf38ZQQZRi8bEt9 iYrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Wvarowe8; 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 f8-v6si28449pgo.689.2018.04.26.17.01.39; Thu, 26 Apr 2018 17:01:53 -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=Wvarowe8; 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 S1757187AbeDZX67 (ORCPT + 99 others); Thu, 26 Apr 2018 19:58:59 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33237 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751626AbeDZX64 (ORCPT ); Thu, 26 Apr 2018 19:58:56 -0400 Received: by mail-lf0-f67.google.com with SMTP id m18-v6so155266lfb.0; Thu, 26 Apr 2018 16:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ZjfLH+v7MHWxWk4WPeHQ6K10nCfs8a6H7evjXi7EaPI=; b=Wvarowe8vp5dAgjd+0H6M8uL+AJVOn/qoX6+E3xbx10QxC+2yosHcdkML4+30/4uNT Vja7CYz4zJpseTF1zFBceHs6gNbz+U4po2zH9v4C39MyacbKfd6nIRdJPNs1SEn/zQLB 6X8Lk0qQuE9dKZeibiRGyT0PINthPStbkAxhE8+LwM2c8fGm+lT0O+v7WPsmKr+yx9oH QkRVmivl4fYrNI/NS6DBwbhDwMJc8eMeM3s4TyVxp2l5dzSYQZPDO8bm5YJ5MlUCUEIZ Uvb8f0Tml5tBz4YIKpaCtmumaQTDw+bSgKUiktDqgovHQh2EfMOIfQSkncO7n9sji0oZ yHkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZjfLH+v7MHWxWk4WPeHQ6K10nCfs8a6H7evjXi7EaPI=; b=X5AIdwRMSZy0QREta4JpaVifbs9G3Kt4o0nGpNvhaHG594Tb0/l9TZ0384HYw5mWxr mIPvSqZ3IZy5Hj/8bk+csbWo5cxogSIOFxIVg3w99mcRdboPS9a19pOGFNHOB/0dDHZw KIb5XQpJ07tp2t88r/neNWAS0QRuHebxpuWjCpcQkT3VidMfFS0e3DOIF0pm8uyDBhe8 BNTRNh5z7bvOQ667o5wr46xWLtLrHktEGgmbyUAX537/y9iByDg32x2VNgIQvFIB18p/ JMzpLPgsD12Fw3GVb2HW+zfZtnTBDe7Qlk4PgKYUFLBAY5Nu7t3FGzoNg2kryZk+8LSF +4JQ== X-Gm-Message-State: ALQs6tCCYbUQewx65SjuN9ByA2hDnI5cNdGHGrnIyorWo+XmeupndHTD UE/1Xq9MHlLFs5NdafaYc0c= X-Received: by 2002:a2e:404d:: with SMTP id n74-v6mr76656lja.6.1524787134163; Thu, 26 Apr 2018 16:58:54 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-91-130.pppoe.spdop.ru. [109.252.91.130]) by smtp.gmail.com with ESMTPSA id o4-v6sm7420ljh.39.2018.04.26.16.58.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Apr 2018 16:58:52 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Prashant Gaikwad , Stephen Boyd , Michael Turquette , Linus Walleij , Marcel Ziswiler , Marc Dietrich Cc: linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 0/4] Restore ULPI USB on Tegra20 Date: Fri, 27 Apr 2018 02:58:14 +0300 Message-Id: <20180426235818.10018-1-digetx@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, This series of patches fixes ULPI USB on Tegra20. The original problem was reported by Marcel Ziswiler, he found that "ulpi-link" clock was incorrectly set to CDEV2 instead of PLL_P_OUT4. Marcel made a patch that changed the "ulpi-link" clock to PLL_P_OUT4 and that fixed issue with the USB for the devices that have CDEV2 being enabled by bootloader. The patch got into the kernel and later Marc Dietrich found that USB stopped working on the "paz00" Tegra20 board. After a bit of discussion was revealed that PLL_P_OUT4 is the parent clock of the CDEV2 and clock driver was setting CDEV2's parent incorrectly. The parent clock is actually determined by the pinmuxing config of CDEV2 pingroup. This patchset fixes the parent of CDEV2 clock by making Tegra's pinctrl driver a clock provider, providing CDEV1/2 clock muxes (thanks to Peter De Schrijver for the suggestion), and then setting these clock muxes as parents for the CDEV1/2 clocks. In the end Marcel's CDEV2->PLL_P_OUT4 change is reverted since CDEV2 (aka MCLK2) is the actual clock source for "ulpi-link". Dmitry Osipenko (4): clk: tegra20: Add DEV1/DEV2 OSC dividers pinctrl: tegra20: Provide CDEV1/2 clock muxes clk: tegra20: Set correct parents for CDEV1/2 clocks ARM: dts: tegra20: Revert "Fix ULPI regression on Tegra20" arch/arm/boot/dts/tegra20.dtsi | 2 +- drivers/clk/tegra/clk-tegra20.c | 18 +++++++++++---- drivers/pinctrl/tegra/pinctrl-tegra.c | 11 --------- drivers/pinctrl/tegra/pinctrl-tegra.h | 11 +++++++++ drivers/pinctrl/tegra/pinctrl-tegra20.c | 30 ++++++++++++++++++++++++- 5 files changed, 55 insertions(+), 17 deletions(-) -- 2.17.0