public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
To: "digetx@gmail.com" <digetx@gmail.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jonathanh@nvidia.com" <jonathanh@nvidia.com>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"pgaikwad@nvidia.com" <pgaikwad@nvidia.com>,
	"sboyd@kernel.org" <sboyd@kernel.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"pdeschrijver@nvidia.com" <pdeschrijver@nvidia.com>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>
Subject: Re: [PATCH] clk: tegra: fix pllu rate configuration
Date: Mon, 26 Feb 2018 23:04:24 +0000	[thread overview]
Message-ID: <1519686262.6374.3.camel@toradex.com> (raw)
In-Reply-To: <31f039e8-9afc-22d1-d478-a7f41db0dace@gmail.com>

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.
> > 
> > Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> > 
> > ---
> > 
> >  drivers/clk/tegra/clk-pll.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-
> > pll.c
> > index 7c369e21c91c..830d1c87fa7c 100644
> > --- a/drivers/clk/tegra/clk-pll.c
> > +++ b/drivers/clk/tegra/clk-pll.c
> > @@ -1151,6 +1151,8 @@ static const struct clk_ops
> > tegra_clk_pllu_ops = {
> >  	.enable = clk_pllu_enable,
> >  	.disable = clk_pll_disable,
> >  	.recalc_rate = clk_pll_recalc_rate,
> > +	.round_rate = clk_pll_round_rate,
> > +	.set_rate = clk_pll_set_rate,
> >  };
> >  
> >  static int _pll_fixed_mdiv(struct tegra_clk_pll_params
> > *pll_params,
> > 
> 
> Tegra's USB PHY driver only enables clock and clk driver doesn't
> specify the
> clock rate in the init table. Could you please clarify where in the
> kernels code
> PLL_U rate is getting set?

I guess that would be according to the following table isn't it:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree
/drivers/clk/tegra/clk-tegra30.c?h=v4.16-rc3#n287

  reply	other threads:[~2018-02-26 23:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180222230451.15515-1-marcel@ziswiler.com>
2018-02-26 12:42 ` [PATCH] clk: tegra: fix pllu rate configuration Dmitry Osipenko
2018-02-26 23:04   ` Marcel Ziswiler [this message]
2018-02-27 11:59     ` Dmitry Osipenko
2018-02-28  9:36       ` Peter De Schrijver
2018-02-28 12:00         ` Dmitry Osipenko
2018-02-28 14:14           ` Peter De Schrijver
2018-02-28 17:20             ` Dmitry Osipenko
2018-03-01  7:41               ` Peter De Schrijver
2018-03-01 13:19                 ` Dmitry Osipenko
2018-03-01 13:44                   ` Dmitry Osipenko
2018-03-02  9:02                 ` Jon Hunter
2018-03-02 11:25                   ` Peter De Schrijver
2018-03-02  8:56 ` Jon Hunter
2018-03-08 14:57 ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519686262.6374.3.camel@toradex.com \
    --to=marcel.ziswiler@toradex.com \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=pgaikwad@nvidia.com \
    --cc=sboyd@kernel.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox