Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1192004pxb; Fri, 21 Jan 2022 11:55:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/FIHmadxMoM5NzkbYEAg/sXzDs+8eeRCceRr8xTWQH+MtLef4rHmV+GtkqDQbPIVCTYiJ X-Received: by 2002:a05:6a00:9a9:b0:4c1:c43e:75e4 with SMTP id u41-20020a056a0009a900b004c1c43e75e4mr4868651pfg.83.1642794917481; Fri, 21 Jan 2022 11:55:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642794917; cv=none; d=google.com; s=arc-20160816; b=eU+Sr2UlM3iDHLYGiUJb4qRCHjkg/cnkRVLfGfsCMEFsjxGtRmKKBnQpMsZwMNVpzG oaGTxFu4VtZxkLO6Sxb+Y5AY7lt482pSBZlfak4zBgVs7wIxB/6F10BU6W5Mu2hqnGmv g9O8kapfm2DIDPwXUw9P6VRy4n5Wqkir4wn4TmdizCPv0G/1dRIM1RjoHdKmUAsjGCq4 Ism1lpZyP8EHH0HCfGXQp6Td06kzhJvoo4x15Gt/0OkEMLw0C1aaVxCC+G/sZQM4zqMJ JoZPjgz3Mre7WDBRrTPUCOyJgqxJF23K+8/SEILzjtRF9n2fErxzXYn4rhM6p97dGyJm 29/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=ACJty0+Xz6Vy6RxPgDW0XGtO+M4I2GDqtHGXCEv9OH0=; b=vRG8c2BElf6bD07w/xba9Y/oz5hf6RBLIxLHvA6N0uzD22myd1d7W7lD1mzA2rNSw2 QHuDQ8Z8B3Qp57AMoStv+dZANxxxCtCWH7m/QT/gNrvkEGoW3cCravqGx9bjxcoNkWUT fLNDlKx/UQVEUnjmndtWl9f7/wROcW6MDcTnz9CTOMXaCfxSUP8xYsufkgKQKh7wd2fH 66e3PbFqoi4oAMUF+kiJyz8LtO7mbchj5wgmn3TG6MNaTK7NSbQ1jEYNxVPhyDnWglUm 4dJ6LXjuJAy3PPVW0NqHNHbtLRGz5khMwLp+sXL/THIMDDeSatWKyvCJm+ualnrNlRP+ i5XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tkos.co.il header.s=default header.b=NfteVB8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tkos.co.il Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z20si7002116pgk.122.2022.01.21.11.55.04; Fri, 21 Jan 2022 11:55:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@tkos.co.il header.s=default header.b=NfteVB8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tkos.co.il Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356679AbiASSUI (ORCPT + 99 others); Wed, 19 Jan 2022 13:20:08 -0500 Received: from guitar.tcltek.co.il ([84.110.109.230]:54931 "EHLO mx.tkos.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235941AbiASSUF (ORCPT ); Wed, 19 Jan 2022 13:20:05 -0500 Received: from tarshish (unknown [10.0.8.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPS id 49918440636; Wed, 19 Jan 2022 20:19:52 +0200 (IST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tkos.co.il; s=default; t=1642616393; bh=YiIEY8EdhFZDp3IMZEZpIN5BqRDWJATtLtyWjFrte0I=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=NfteVB8o9UgTp3risSYPPfx0t2Ljb7tRlOACyxYlYuOXbP1XT0Yt1HTJVFWIn8ko6 tpsesLrXuTlmSGyMNUvS8dFWWY66SxlPj8PoOT+hFq8QCpjRl2gkcEEVV+Fl/bVEHo 7gF/EsMuv8+SPcU06rJfjx0vxx8Lqm4jSXGlJXlsm3hB0HtERYCTKApvEmC7I3jhBh 8QA2dMzKOTz6Qoco4IF+fL7bKdxvoojNfV292IC7mt0LQUk13TEQ4sKwSTGWmyZm+T V+kgBw1OLNzY1VfXhdnSqluAY5gqL7iyNAkFBQc1j3dgIi53nni8XhjfX2uvtH8bnJ v/OSnLXf4ox2w== References: <20220119002438.106079-1-sean.anderson@seco.com> User-agent: mu4e 1.6.10; emacs 27.1 From: Baruch Siach To: Sean Anderson Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, Felipe Balbi , Thinh Nguyen , Balaji Prakash J , linux-kernel@vger.kernel.org, Robert Hancock , Andy Gross , Bjorn Andersson , Michal Simek , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v2 0/7] usb: dwc3: Calculate REFCLKPER et. al. from reference clock Date: Wed, 19 Jan 2022 20:14:06 +0200 In-reply-to: <20220119002438.106079-1-sean.anderson@seco.com> Message-ID: <87ee53fv01.fsf@tarshish> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, On Tue, Jan 18 2022, Sean Anderson wrote: > This is a rework of patches 3-5 of [1]. It attempts to correctly program > REFCLKPER and REFCLK_FLADJ based on the reference clock frequency. Since > we no longer need a special property duplicating this configuration, > snps,ref-clock-period-ns is deprecated. > > Please test this! Patches 3/4 in this series have the effect of > programming REFCLKPER and REFCLK_FLADJ on boards which already configure > the "ref" clock. I have build tested, but not much else. Tested here on IPQ6010 based system. USB still works. But the with "ref" clock at 24MHz, period is calculated as 0x29. Previous snps,ref-clock-period-ns value used to be 0x32. Is that expected? Thanks, baruch > > [1] https://lore.kernel.org/linux-usb/20220114044230.2677283-1-robert.hancock@calian.com/ > > Changes in v2: > - Document clock members > - Also program GFLADJ.240MHZDECR > - Don't program GFLADJ if the version is < 2.50a > - Add snps,ref-clock-frequency-hz property for ACPI > > Sean Anderson (7): > dt-bindings: usb: dwc3: Deprecate snps,ref-clock-period-ns > usb: dwc3: Get clocks individually > usb: dwc3: Calculate REFCLKPER based on reference clock > usb: dwc3: Program GFLADJ > usb: dwc3: Add snps,ref-clock-frequency-hz property for ACPI > arm64: dts: zynqmp: Move USB clocks to dwc3 node > arm64: dts: ipq6018: Use reference clock to set dwc3 period > > .../devicetree/bindings/usb/snps,dwc3.yaml | 7 +- > arch/arm64/boot/dts/qcom/ipq6018.dtsi | 3 +- > .../arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 4 +- > arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 4 +- > drivers/usb/dwc3/core.c | 112 +++++++++++++++--- > drivers/usb/dwc3/core.h | 17 ++- > 6 files changed, 120 insertions(+), 27 deletions(-) -- ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -