From patchwork Fri May 25 18:11:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 136973 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3914107lji; Fri, 25 May 2018 11:13:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZouBSHcpWihdqyDMDcm7J+JjK7t1O1eTR+iWNSN7g6991upysfdkl/tr4sGiaxJICLOkVqN X-Received: by 2002:a63:b943:: with SMTP id v3-v6mr2834042pgo.438.1527272005844; Fri, 25 May 2018 11:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527272005; cv=none; d=google.com; s=arc-20160816; b=g4qt56ZrkQAvsx+sr1QOrM8hbml9yOIXaUjj1bW1x7UeRFmZM9PcCImFAxWlbyc61T QN5wLVc/YYxmjbn8Q0tCnvRVJySJcaTe29qI0EWu/x86+8lGDugNWE49aHzcnilEtirF 9n6UqTNAwnXHdqZw0OeHlP64sU1yq0ErVJyzJFS68B5Gj4Zd8509i+UmHZoehJEuGcEN +OjHxC7ZWgxy4woudlFGs91DZOJMtOidz/juKprXM7l10a0yh0TiTRP5EXxkTM0KvlRK IPwtl6DOXyT9TROa+mMv8WExnK1qhQ5eypYY4XDe+T/8CbBqdelQa1uTlus9kHINUHvA 0Inw== 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=PYBNlsyhtvmUqJ7y1a2uQqH+2ZVL8FUjNCmTTDbCAaM=; b=05vPvU+sJkq5zgX5taVIQ2LnVoBErmRn0lXxmjybYdWOy+qw8Hq6OV/9MilvbIRAIF 2fXQ0t6LLyZt6rTdPTAzo4f93LkG/LojVAvUp6HzFhlgA/jfQHm6H5oVQz0gpf3kRs/F LdILAkvfg8KvygRddNXW5gbl3n5m91i37hot8f0fStG5zWUqInbRIoEXWqoRWM28dln4 0lTO3dOHIfrudTghldOiIVdaW3OmFg45V/LLnLqszisZaItODhM0XgYRlopA9TNOSDVn uiGVn7CInDo51oe6dey6XponsMqJBjTlzGwUKDr8FoYA07+erDtCDpx/IDNWN0HiGK10 1ALA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=EV+0Yy2Z; 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.25; Fri, 25 May 2018 11:13:25 -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=EV+0Yy2Z; 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 S967931AbeEYSNW (ORCPT + 30 others); Fri, 25 May 2018 14:13:22 -0400 Received: from vern.gendns.com ([206.190.152.46]:46235 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967730AbeEYSMJ (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=PYBNlsyhtvmUqJ7y1a2uQqH+2ZVL8FUjNCmTTDbCAaM=; b=EV+0Yy2ZhxjcGz7yOVMF2CJKA gPOukbj1dophn0DHOsUAwQKYXpDIniq3JndGw1PvBzNRwf9mAdIZiDyH2+OhprWzxYmt0ShN/UsW/ fMHeCJ6l8Lky9ZoMbS/9aa3hwG8dUSXRirKG4pxMwTWgsuIUU1gZ0YRCE2mXrPbr8wi84SPi+5c19 K7pvGaWDeGUemRBG30YL1yCpO+5DiJAEw9YN9GggZZJJtysS8ymhkxoTe7/bpyY9Kfg5pM7gDvp/+ nELHE+LnhDWQjjTjUcFZexSbLUo8LOkE0Uc7WHicEjCFteiDohO4iM5mEzUkdCy5JnT8ltMzroAqE eb9UInXVw==; 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-2O; Fri, 25 May 2018 14:12:08 -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 4/9] clk: davinci: pll-dm646x: keep PLL2 SYSCLK1 always enabled Date: Fri, 25 May 2018 13:11:45 -0500 Message-Id: <20180525181150.17873-5-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 PLL2 SYSCLK1 on DM646x is connected to DDR2 PHY and cannot be disabled. Mark it so to prevent unused clock disable infrastructure from disabling it. Signed-off-by: Sekhar Nori Reviewed-by: David Lechner --- drivers/clk/davinci/pll-dm646x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.0 diff --git a/drivers/clk/davinci/pll-dm646x.c b/drivers/clk/davinci/pll-dm646x.c index a61cc3256418..0ae827e3ce80 100644 --- a/drivers/clk/davinci/pll-dm646x.c +++ b/drivers/clk/davinci/pll-dm646x.c @@ -72,7 +72,7 @@ static const struct davinci_pll_clk_info dm646x_pll2_info = { .flags = 0, }; -SYSCLK(1, pll2_sysclk1, pll2_pllen, 4, 0); +SYSCLK(1, pll2_sysclk1, pll2_pllen, 4, SYSCLK_ALWAYS_ENABLED); int dm646x_pll2_init(struct device *dev, void __iomem *base) { 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), { }