From patchwork Sat Aug 4 07:31:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Levin X-Patchwork-Id: 10555629 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B98613AC for ; Sat, 4 Aug 2018 07:32:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 494AA2A63D for ; Sat, 4 Aug 2018 07:32:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D4D82A662; Sat, 4 Aug 2018 07:32:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E5B462A63D for ; Sat, 4 Aug 2018 07:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=32SjnUBe1JbKzsTMdvntNNxxhwzrw4YnvR6MDuJMkpY=; b=gtd IYDkC4JmRF0vgVZ9UUKd4feCu3NMZKRAz8lIN2DVZkUwXDofCV2AxwYLbQr5VN4sx6ZBx48usgOsp LnBNMu0/SaP0Fo1cBuPnP1UOL6nwUF5isMfM6+89AIOpGPNlPayZGzvhGDRj68H2soGMOfpl2/OPj llrl7d8Ds8DfZUM5npT0Avc6u/9kz05EO47euxJvNyAQ1jy4lYglxYWQrsngGXk238IT/4XZaiPFn UhETJYd5Jp2+tyXRZjWA2GRT8moowIFHcw8o/FNe0zt412gcBlwAKyl2CbphGAyPUDh8I0VH2R2SS EkG39z6w3rxNLIq0viU89VayKju1nOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flr2o-0004qg-LX; Sat, 04 Aug 2018 07:32:10 +0000 Received: from regular1.263xmail.com ([211.150.99.140]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1flr2e-0004iP-Qk; Sat, 04 Aug 2018 07:32:03 +0000 Received: from djw?t-chip.com.cn (unknown [192.168.167.160]) by regular1.263xmail.com (Postfix) with ESMTP id 5A6D11EB; Sat, 4 Aug 2018 15:31:39 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 8804D387; Sat, 4 Aug 2018 15:31:36 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: djw@t-chip.com.cn X-FST-TO: linux-rockchip@lists.infradead.org X-SENDER-IP: 59.33.108.240 X-LOGIN-NAME: djw@t-chip.com.cn X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: djw@t-chip.com.cn X-DNS-TYPE: 7 Received: from localhost.localdomain (240.108.33.59.broad.zs.gd.dynamic.163data.com.cn [59.33.108.240]) by smtp.263.net (Postfix) whith ESMTP id 13908AEOABI; Sat, 04 Aug 2018 15:31:37 +0800 (CST) From: djw@t-chip.com.cn To: linux-rockchip@lists.infradead.org Subject: [PATCH v0] clk: rockchip: Add pclk_rkpwm_pmu to PMU critical clocks in rk3399 Date: Sat, 4 Aug 2018 15:31:02 +0800 Message-Id: <1533367862-7212-1-git-send-email-djw@t-chip.com.cn> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180804_003201_104408_F314EB98 X-CRM114-Status: GOOD ( 11.83 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wayne Chou , Heiko Stuebner , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org, Levin Du , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Levin Du PWM2 is commonly used to control voltage of PWM regulator of VDD_LOG in RK3399. On the Firefly-RK3399 board, PWM2 outputs 40 KHz square wave from power on and the VDD_LOG is about 0.9V. When the kernel boots normally into the system, the PWM2 keeps outputing PWM signal. But the kernel hangs randomly after "Starting kernel ..." line on that board. When it happens, PWM2 outputs high level which causes VDD_LOG drops to 0.4V below the normal operating voltage. By adding "pclk_rkpwm_pmu" to the rk3399_pmucru_critical_clocks array, PWM clock is ensured to be prepared at startup and the PWM2 output is normal. After repeated tests, the early boot hang is gone. This patch works on both Firefly-RK3399 and ROC-RK3399-PC boards. Signed-off-by: Levin Du --- drivers/clk/rockchip/clk-rk3399.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c index 2a8634a..5a62814 100644 --- a/drivers/clk/rockchip/clk-rk3399.c +++ b/drivers/clk/rockchip/clk-rk3399.c @@ -1523,6 +1523,7 @@ static const char *const rk3399_pmucru_critical_clocks[] __initconst = { "pclk_pmu_src", "fclk_cm0s_src_pmu", "clk_timer_src_pmu", + "pclk_rkpwm_pmu", }; static void __init rk3399_clk_init(struct device_node *np)