From patchwork Fri May 25 18:11:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 136974 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3914254lji; Fri, 25 May 2018 11:13:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpb1A+ntTF/VUHq0wPZvil4Bpfu2ImyxIFpbL7rLjHcLTxkecdcwy7/6dwIcImPk0jezEMn X-Received: by 2002:a63:be01:: with SMTP id l1-v6mr2840149pgf.382.1527272014689; Fri, 25 May 2018 11:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527272014; cv=none; d=google.com; s=arc-20160816; b=Qt/0ZH5JW6ij7LMb4cQAmRJyGersDP6LX2ZYnAQ15J6VZfE3Hs/JkfX6vVcl7LgiCG nFVszrAIbb2YxOBWBnfnoNY+/p8963Q7byHaT0mepv2ZIUN688xWcksNLDs8YqLZ9oBu mi7SxZYSZOkbbrvDzEI7en0L6Y9sc3P+mUzQzuhMlvDLUxktKagBp0QfzM7TG6MNDRSd Ej5xBMZcK19UPbE4haN1Y2QCEmJb/rx8+IU9j9HISmsnY4OMAnyLfXlt7zoyo30J7lwJ b/TWZ/feHUiYJ5v0DmM0ZkfBWLhUdF6wzbyHPb9Uh9rwob0UgjKLaAzE6Grue/FMmN3l eiag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=YwwfhasOHD5llhMJN8gf01H23s1a16KiWCNefDfp54w=; b=GqCjj9Bm4KF/fPheu24Fg2tpeoONi0Ft39A3brp6FsZRE1NzeZ2o6gdIfvUp9DSRJd aMkh4nRjQWX6ZX+jwfkZnwV5xGwUBhUPn1dZI3LnfKY+f72jGyYmx5YAaJC9zczsiAW8 jNx5Gj7dR1C/dZK6YWRuCI7fwayU95TKXJ+ut6NHt8cL9MFhFfhw3u0MP0LOczs1/dL5 WBWLRERthfEanYspAW1cb6Oia3wTs4fUvdbMmUwkr7tPB+FX4BaZb6F83axCWkujFzhh PggzWTs5KnLJ7BaebFy1vww52+Dmue7NLHwzpa7+TxrcnAdgttn4y5RqJfllU10UhYZk oa+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=MzFBGFxY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si24256673plc.179.2018.05.25.11.13.34; Fri, 25 May 2018 11:13:34 -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=fail header.i=@lechnology.com header.s=default header.b=MzFBGFxY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967899AbeEYSNU (ORCPT + 30 others); Fri, 25 May 2018 14:13:20 -0400 Received: from vern.gendns.com ([206.190.152.46]:46240 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967732AbeEYSMJ (ORCPT ); Fri, 25 May 2018 14:12:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YwwfhasOHD5llhMJN8gf01H23s1a16KiWCNefDfp54w=; b=MzFBGFxY0WylccGO4IB4BxwtQ SEyTDvuxAqbnN4dgphrmY7JNWCv3fk3kMwfQ1olYos4Vkr5AapYdRklh6dbtfX23foZ/0ud+58UId urLONhEKN/qddU8gh5WNkHz3Dmfs73QmCn4Af7GR8t0btcLKSOUTEDYhA2jcXmQc4ZLx4+x0zqCu0 oJ+aLMysLDdO2WN/EwzKZp6h3xrqrr5aBJZHUKZeoGJz2OANj8H8pMMteVvQdsZIJzLy6DEm40O9V 29NN1vgwq9dXER+ogfNfrnx8Tez8HBwsaq70pBpnHcUdNhJC/mzG2nnamIxCk/Qqbkh1MYZU+gex1 LWqO1HH1Q==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:45118 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.89_1) (envelope-from ) id 1fMHCC-009OyY-WE; Fri, 25 May 2018 14:12:09 -0400 From: David Lechner To: Michael Turquette , Stephen Boyd Cc: Sekhar Nori , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Kevin Hilman , 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 Message-Id: <20180525181150.17873-6-david@lechnology.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180525181150.17873-1-david@lechnology.com> References: <20180525181150.17873-1-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sekhar Nori 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 Reviewed-by: David Lechner --- drivers/clk/davinci/psc-dm365.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) -- 2.17.0 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), { }