linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>
Cc: Sekhar Nori <nsekhar@ti.com>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Kevin Hilman <khilman@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/9] clk: davinci: psc-dm365: fix few clocks
Date: Fri, 25 May 2018 13:11:46 -0500	[thread overview]
Message-ID: <20180525181150.17873-6-david@lechnology.com> (raw)
In-Reply-To: <20180525181150.17873-1-david@lechnology.com>

From: Sekhar Nori <nsekhar@ti.com>

Fix parent of EMAC and voice codec PSC clocks. Documentation is clear
on EMAC clock parent, but its not fully clear on parent of voice codec
clock. The implementation chosen is matches arch/arm/mach-davinci/dm365.c.
Add a comment explaining this for posterity.

There is only one power domain on DM365. Fix the power domain of voice
codec and vpss dac modules.

While at it, add a comment explaining how the parent of vpss dac clock was
derived. Note that this patch does not touch the parent of vpss dac clock.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: David Lechner <david@lechnology.com>
---
 drivers/clk/davinci/psc-dm365.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/davinci/psc-dm365.c b/drivers/clk/davinci/psc-dm365.c
index 3ad915f37376..289af3913fb0 100644
--- a/drivers/clk/davinci/psc-dm365.c
+++ b/drivers/clk/davinci/psc-dm365.c
@@ -65,9 +65,22 @@ static const struct davinci_lpsc_clk_info dm365_psc_info[] = {
 	LPSC(31, 0, arm,         pll2_sysclk2, NULL,               LPSC_ALWAYS_ENABLED),
 	LPSC(38, 0, spi3,        pll1_sysclk4, spi3_clkdev,        0),
 	LPSC(39, 0, spi4,        pll1_auxclk,  spi4_clkdev,        0),
-	LPSC(40, 0, emac,        pll2_sysclk4, emac_clkdev,        0),
-	LPSC(44, 1, voice_codec, pll1_sysclk3, voice_codec_clkdev, 0),
-	LPSC(46, 1, vpss_dac,    pll1_sysclk3, vpss_dac_clkdev,    0),
+	LPSC(40, 0, emac,        pll1_sysclk4, emac_clkdev,        0),
+	/*
+	 * The TRM (ARM Subsystem User's Guide) shows two clocks input into
+	 * voice codec module (PLL2 SYSCLK4 with a DIV2 and PLL1 SYSCLK4). Its
+	 * not fully clear from documentation which clock should be considered
+	 * as parent for PSC. The clock chosen here is to maintain
+	 * compatibility with existing code in arch/arm/mach-davinci/dm365.c
+	 */
+	LPSC(44, 0, voice_codec, pll2_sysclk4, voice_codec_clkdev, 0),
+	/*
+	 * Its not fully clear from TRM (ARM Subsystem User's Guide) as to what
+	 * the parent of VPSS DAC LPSC should actually be. PLL1 SYSCLK3 feeds
+	 * into HDVICP and MJCP. The clock chosen here is to remain compatible
+	 * with code existing in arch/arm/mach-davinci/dm365.c
+	 */
+	LPSC(46, 0, vpss_dac,    pll1_sysclk3, vpss_dac_clkdev,    0),
 	LPSC(47, 0, vpss_master, pll1_sysclk5, vpss_master_clkdev, 0),
 	LPSC(50, 0, mjcp,        pll1_sysclk3, NULL,               0),
 	{ }
-- 
2.17.0

  parent reply	other threads:[~2018-05-25 18:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 18:11 [PATCH 0/9] clk: davinci: outstanding fixes David Lechner
2018-05-25 18:11 ` [PATCH 1/9] clk: davinci: pll-dm355: drop pll2_sysclk2 David Lechner
2018-05-25 18:11 ` [PATCH 2/9] clk: davinci: pll-dm355: fix SYSCLKn parent names David Lechner
2018-05-25 18:11 ` [PATCH 3/9] clk: davinci: psc-dm355: fix ASP0/1 clkdev lookups David Lechner
2018-05-25 18:11 ` [PATCH 4/9] clk: davinci: pll-dm646x: keep PLL2 SYSCLK1 always enabled David Lechner
2018-05-30 17:22   ` Michael Turquette
2018-05-30 19:20     ` David Lechner
2018-05-25 18:11 ` David Lechner [this message]
2018-05-25 18:11 ` [PATCH 6/9] clk: davinci: pll: allow dev == NULL David Lechner
2018-05-30 19:46   ` Michael Turquette
2018-05-30 19:59     ` David Lechner
2018-05-25 18:11 ` [PATCH 7/9] clk: davinci: da850-pll: change PLL0 to CLK_OF_DECLARE David Lechner
2018-05-25 18:11 ` [PATCH 8/9] clk: davinci: psc: allow for dev == NULL David Lechner
2018-05-25 18:11 ` [PATCH 9/9] clk: davinci: Fix link errors when not all SoCs are enabled David Lechner
2018-05-28 13:43   ` Sekhar Nori
2018-05-28 16:54     ` David Lechner
2018-05-30 20:09 ` [PATCH 0/9] clk: davinci: outstanding fixes Michael Turquette
2018-05-31  4:43   ` Sekhar Nori

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=20180525181150.17873-6-david@lechnology.com \
    --to=david@lechnology.com \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nsekhar@ti.com \
    --cc=sboyd@kernel.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).