linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rhyland Klein <rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Jim Lin <jilin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Peter De Schrijver
	<pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Mike Turquette
	<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4 19/20] clk: tegra210: add support for Tegra210 clocks
Date: Thu, 7 May 2015 12:07:24 -0400	[thread overview]
Message-ID: <554B8DBC.9010001@nvidia.com> (raw)
In-Reply-To: <554B40D7.3040207-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 5/7/2015 6:39 AM, Jim Lin wrote:
> On 05/05/2015 12:37 AM, Rhyland Klein wrote:
>> diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c
>> new file mode 100644
>> index 000000000000..07382a473e22
>> --- /dev/null
>> +++ b/drivers/clk/tegra/clk-tegra210.c
>> @@ -0,0 +1,2761 @@
>> +/*
>> + * Copyright (c) 2012-2014 NVIDIA CORPORATION.  All rights reserved.
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms and conditions of the GNU General Public License,
>> + * version 2, as published by the Free Software Foundation.
>> + *
>> + * This program is distributed in the hope it will be useful, but WITHOUT
>> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>> + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
>> + * more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
>> + */
>> +
>> +#include <linux/io.h>
>> +#include <linux/clk.h>
>> +#include <linux/clk-provider.h>
>> +#include <linux/clkdev.h>
>> +#include <linux/of.h>
>> +#include <linux/of_address.h>
>> +#include <linux/delay.h>
>> +#include <linux/export.h>
>> +#include <linux/clk/tegra.h>
>> +#include <dt-bindings/clock/tegra210-car.h>
>> +
>> +#include "clk.h"
>> +#include "clk-id.h"
>> +
>> +/*
>> + * TEGRA210_CAR_BANK_COUNT: the number of peripheral clock register
>> + * banks present in the Tegra210 CAR IP block.  The banks are
>> + * identified by single letters, e.g.: L, H, U, V, W, X, Y.  See
>> + * periph_regs[] in drivers/clk/tegra/clk.c
>> + */
>> +#define TEGRA210_CAR_BANK_COUNT			7
>> +
>> +#define CLK_SOURCE_CSITE 0x1d4
>> +#define CLK_SOURCE_EMC 0x19c
>> +
>> +#define PLLC_BASE 0x80
>> +#define PLLC_OUT 0x84
>> +#define PLLC_MISC0 0x88
>> +#define PLLC_MISC1 0x8c
>> +#define PLLC_MISC2 0x5d0
>> +#define PLLC_MISC3 0x5d4
>> +
>> +#define PLLC2_BASE 0x4e8
>> +#define PLLC2_MISC0 0x4ec
>> +#define PLLC2_MISC1 0x4f0
>> +#define PLLC2_MISC2 0x4f4
>> +#define PLLC2_MISC3 0x4f8
>> +
>> +#define PLLC3_BASE 0x4fc
>> +#define PLLC3_MISC0 0x500
>> +#define PLLC3_MISC1 0x504
>> +#define PLLC3_MISC2 0x508
>> +#define PLLC3_MISC3 0x50c
>> +
>> +#define PLLM_BASE 0x90
>> +#define PLLM_MISC0 0x9c
>> +#define PLLM_MISC1 0x98
>> +#define PLLP_BASE 0xa0
>> +#define PLLP_MISC0 0xac
>> +#define PLLP_MISC1 0x680
>> +#define PLLA_BASE 0xb0
>> +#define PLLA_MISC0 0xbc
>> +#define PLLA_MISC1 0xb8
>> +#define PLLA_MISC2 0x5d8
>> +#define PLLD_BASE 0xd0
>> +#define PLLD_MISC0 0xdc
>> +#define PLLD_MISC1 0xd8
>> +#define PLLU_BASE 0xc0
>> +#define PLLU_OUTA 0xc4
>> +#define PLLU_MISC0 0xcc
>> +#define PLLU_MISC1 0xc8
>> +#define PLLX_BASE 0xe0
>> +#define PLLX_MISC0 0xe4
>> +#define PLLX_MISC1 0x510
>> +#define PLLX_MISC2 0x514
>> +#define PLLX_MISC3 0x518
>> +#define PLLX_MISC4 0x5f0
>> +#define PLLX_MISC5 0x5f4
>> +#define PLLE_BASE 0xe8
>> +#define PLLE_MISC0 0xec
>> +#define PLLD2_BASE 0x4b8
>> +#define PLLD2_MISC0 0x4bc
>> +#define PLLD2_MISC1 0x570
>> +#define PLLD2_MISC2 0x574
>> +#define PLLD2_MISC3 0x578
>> +#define PLLE_AUX 0x48c
>> +#define PLLRE_BASE 0x4c4
>> +#define PLLRE_MISC0 0x4c8
>> +#define PLLDP_BASE 0x590
>> +#define PLLDP_MISC 0x594
>> +
>> +#define PLLC4_BASE 0x5a4
>> +#define PLLC4_MISC0 0x5a8
>> +#define PLLC4_OUT 0x5e4
>> +#define PLLMB_BASE 0x5e8
>> +#define PLLMB_MISC0 0x5ec
>> +#define PLLA1_BASE 0x6a4
>> +#define PLLA1_MISC0 0x6a8
>> +#define PLLA1_MISC1 0x6ac
>> +#define PLLA1_MISC2 0x6b0
>> +#define PLLA1_MISC3 0x6b4
>> +
>> +#define PLLU_IDDQ_BIT 31
>> +#define PLLCX_IDDQ_BIT 27
>> +#define PLLRE_IDDQ_BIT 24
>> +#define PLLA_IDDQ_BIT 25
>> +#define PLLD_IDDQ_BIT 20
>> +#define PLLSS_IDDQ_BIT 18
>> +#define PLLM_IDDQ_BIT 5
>> +#define PLLMB_IDDQ_BIT 17
>> +#define PLLXP_IDDQ_BIT 3
>> +
>> +#define PLLCX_RESET_BIT 30
>> +
>> +#define PLL_BASE_LOCK BIT(27)
>> +#define PLLCX_BASE_LOCK BIT(26)
>> +#define PLLE_MISC_LOCK BIT(11)
>> +#define PLLRE_MISC_LOCK BIT(27)
>> +
>> +#define PLL_MISC_LOCK_ENABLE 18
>> +#define PLLC_MISC_LOCK_ENABLE 24
>> +#define PLLDU_MISC_LOCK_ENABLE 22
>> +#define PLLU_MISC_LOCK_ENABLE 29
>> +#define PLLE_MISC_LOCK_ENABLE 9
>> +#define PLLRE_MISC_LOCK_ENABLE 30
>> +#define PLLSS_MISC_LOCK_ENABLE 30
>> +#define PLLP_MISC_LOCK_ENABLE 18
>> +#define PLLM_MISC_LOCK_ENABLE 4
>> +#define PLLMB_MISC_LOCK_ENABLE 16
>> +#define PLLA_MISC_LOCK_ENABLE 28
>> +#define PLLU_MISC_LOCK_ENABLE 29
>> +#define PLLD_MISC_LOCK_ENABLE 18
>> +
>> +#define PLLA_SDM_DIN_MASK 0xffff
>> +#define PLLA_SDM_EN_MASK BIT(26)
>> +
>> +#define PLLD_SDM_EN_MASK BIT(16)
>> +
>> +#define PLLD2_SDM_EN_MASK BIT(31)
>> +#define PLLD2_SSC_EN_MASK BIT(30)
>> +
>> +#define PLLDP_SS_CFG	0x598
>> +#define PLLDP_SDM_EN_MASK BIT(31)
>> +#define PLLDP_SSC_EN_MASK BIT(30)
>> +#define PLLDP_SS_CTRL1	0x59c
>> +#define PLLDP_SS_CTRL2	0x5a0
>> +
>> +#define PMC_PLLM_WB0_OVERRIDE 0x1dc
>> +#define PMC_PLLM_WB0_OVERRIDE_2 0x2b0
>> +
>> +#define UTMIP_PLL_CFG2 0x488
>> +#define UTMIP_PLL_CFG2_STABLE_COUNT(x) (((x) & 0xffff) << 6)
> This line should be corrected as
> 
> +#define UTMIP_PLL_CFG2_STABLE_COUNT(x) (((x) & 0xfff) << 6)
> 
> STABLE_COUNT has 12 bits.

Indeed, good catch!

> 
>> +#define UTMIP_PLL_CFG2_ACTIVE_DLY_COUNT(x) (((x) & 0x3f) << 18)
>> +#define UTMIP_PLL_CFG2_FORCE_PD_SAMP_A_POWERDOWN BIT(0)
>> +#define UTMIP_PLL_CFG2_FORCE_PD_SAMP_B_POWERDOWN BIT(2)
>> +#define UTMIP_PLL_CFG2_FORCE_PD_SAMP_C_POWERDOWN BIT(4)
>> +
>> +#define UTMIP_PLL_CFG1 0x484
>> +#define UTMIP_PLL_CFG1_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 6)
> This line should be corrected as
> 
> +#define UTMIP_PLL_CFG1_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 27)
> 
> ENABLE_DLY_COUNT starts from bit 27.
> 
> 
Yep. Thanks Jim!

-rhyland

> 
> --nvpublic
> 


-- 
nvpublic

  parent reply	other threads:[~2015-05-07 16:07 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04 16:37 [PATCH v4 00/20] Tegra210 Clock Support Rhyland Klein
2015-05-04 16:37 ` [PATCH v4 05/20] clk: tegra: pll: update warning msg Rhyland Klein
     [not found]   ` <1430757460-9478-6-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 20:20     ` Benson Leung
2015-05-04 16:37 ` [PATCH v4 07/20] clk: tegra: pll: Don't unconditionally set LOCK flags Rhyland Klein
     [not found]   ` <1430757460-9478-8-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 21:42     ` Benson Leung
     [not found] ` <1430757460-9478-1-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 16:37   ` [PATCH v4 01/20] clk: tegra: Modify tegra_audio_clk_init to accept more plls Rhyland Klein
     [not found]     ` <1430757460-9478-2-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 18:05       ` Benson Leung
2015-05-07 15:15       ` Thierry Reding
     [not found]         ` <20150507151545.GB25866-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-07 15:49           ` Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 02/20] clk: tegra: periph: add new periph clks and muxes for Tegra210 Rhyland Klein
     [not found]     ` <1430757460-9478-3-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 19:45       ` Benson Leung
     [not found]         ` <CANLzEkuxPMX2+rq4EkCs6iV4=qRK69u=Ezgy4Zn_KsSh1+oEfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-05 20:14           ` Rhyland Klein
2015-05-06 13:59             ` Thierry Reding
2015-05-06 16:24               ` Rhyland Klein
2015-05-04 21:19       ` Andrew Bresticker
2015-05-06 11:20     ` Jim Lin
2015-05-06 14:15       ` Thierry Reding
2015-05-06 16:20         ` Rhyland Klein
2015-05-06 14:12     ` Thierry Reding
2015-05-04 16:37   ` [PATCH v4 03/20] clk: tegra: pll: add tegra_pll_wait_for_lock to clk header Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 04/20] clk: tegra: pll: simplify clk_enable_path Rhyland Klein
2015-05-04 20:11     ` Benson Leung
2015-05-04 16:37   ` [PATCH v4 06/20] clk: tegra: pll-params: change misc_reg count from 3 -> 6 Rhyland Klein
     [not found]     ` <1430757460-9478-7-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 20:35       ` Benson Leung
     [not found]         ` <CANLzEksajPjf1VH8Zn-1oXhgL8f-b7GuCBprExTP-w18WbCC4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-06 14:18           ` Thierry Reding
2015-05-04 16:37   ` [PATCH v4 08/20] clk: tegra: pll: Add logic for handling SDM data Rhyland Klein
     [not found]     ` <1430757460-9478-9-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 23:01       ` Benson Leung
     [not found]         ` <CANLzEksFVpYOtcG5QHHfQa6bGXJ6nMYrsP4yG=5wszxCHrWqug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-05 19:16           ` Rhyland Klein
2015-05-06 13:57             ` Thierry Reding
2015-05-06 16:16               ` Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 09/20] clk: tegra: pll: Add logic for SS Rhyland Klein
     [not found]     ` <1430757460-9478-10-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 23:11       ` Benson Leung
2015-05-05 20:15         ` Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 11/20] clk: tegra: pll: Add code to handle if resets are supported by PLL Rhyland Klein
2015-05-05 17:15     ` Benson Leung
2015-05-04 16:37   ` [PATCH v4 12/20] clk: tegra: pll: Add specialized logic for T210 Rhyland Klein
2015-05-07 15:11     ` Thierry Reding
2015-05-04 16:37   ` [PATCH v4 14/20] clk: tegra: pll: Adjust vco_min if SDM present Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 16/20] clk: tegra: pll: Add Set_default logic Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 17/20] clk: tegra: pll: Fix _pll_ramp_calc_pll logic and _calc_dynamic_ramp_rate Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 18/20] clk: tegra: Add Super Gen5 Logic Rhyland Klein
2015-05-04 16:37   ` [PATCH v4 19/20] clk: tegra210: add support for Tegra210 clocks Rhyland Klein
2015-05-06 14:51     ` Thierry Reding
     [not found]       ` <20150506145113.GH22098-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-06 16:18         ` Rhyland Klein
2015-05-06 17:21         ` Rhyland Klein
     [not found]           ` <554A4D82.80307-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-07 15:16             ` Thierry Reding
2015-05-07 10:39     ` Jim Lin
     [not found]       ` <554B40D7.3040207-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-07 16:07         ` Rhyland Klein [this message]
2015-05-07 15:18     ` Thierry Reding
2015-05-05 13:14   ` [PATCH v4 00/20] Tegra210 Clock Support Thierry Reding
2015-05-05 15:55     ` Rhyland Klein
2015-05-06 13:37       ` Thierry Reding
2015-05-06 16:10         ` Rhyland Klein
2015-05-04 16:37 ` [PATCH v4 10/20] clk: tegra: pll: Add logic for out-of-table rates for T210 Rhyland Klein
     [not found]   ` <1430757460-9478-11-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-04 23:34     ` Benson Leung
     [not found]       ` <CANLzEktX3tiBXvxKgToUr5S7xZ+YibpeG6tDvW1R=qkW6_T5WQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-05 19:55         ` Rhyland Klein
2015-05-04 16:37 ` [PATCH v4 13/20] clk: tegra: pll: Add support for PLLMB " Rhyland Klein
2015-05-04 16:37 ` [PATCH v4 15/20] clk: tegra: pll: Add dyn_ramp callback Rhyland Klein
2015-05-04 16:37 ` [PATCH v4 20/20] clk: tegra: pll: Fix issues with rates for VCO PLLs Rhyland Klein

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=554B8DBC.9010001@nvidia.com \
    --to=rklein-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jilin-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).