Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1314764imm; Sat, 4 Aug 2018 00:34:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf0L3ev6zxWBz4VY7i9jbIGKQX3CrTqhsvJBFpDquW7TNib9XnwZ02K8majVZPKrsdKe7Pg X-Received: by 2002:a63:aa44:: with SMTP id x4-v6mr6767247pgo.120.1533368099140; Sat, 04 Aug 2018 00:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533368099; cv=none; d=google.com; s=arc-20160816; b=n3oEwP3WTHw79HiTFnFQXrBa1nGmuFA30oeszQrOoPCDw186MGbOsuiUg2qew/jJEF TIjyHHCb0LVjV3NTdlhqhG47n3tBp7jcljwTOnzJ2OLcXqoDX408juKi+z3rqbXEdlIP Qzo3J/js8uja4ZcYRzV7JZntzTGrW9EeuRZMB63k+McKEYsYqOB+KrvSW58UwKj60qjx /bF7ii6C6458mXWX2K5H6IGK97Ar3XMMM5yUsdn1+iSFEnJRTWcHZjXQggug/x+8yk3H AoySfCyuWNMfwBWQuaeTy0iME4h48rwrXi7B5lPQEy9GKBq5QYSECRbg6k8mqxfu705y E4eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=1XObJVqI6QigmWWFkLk8wFUbYfi/5DPG4yVzFShB5UM=; b=acTXaUrsO/xvZ+bCLbj8pMayDuHY4UaB/+3AxC78Qmpyvshg1esSq5HVf7KmsUivOJ SrTDwGXF+s7In/JfnY42HKnCqfoXWEEfC9LMlc3tIWuKDMpC72LpxWmogrkVs3e9IeZd JMBXAJnwcQd19HVBSQUlyG+NWP54HRzTaX9z+LFQXAsMisIJd1BfnX7gf97uuTqGnX/N YQBvSSXe0U6iiRW5slNKiZgKKIg2IJg4osGy4bRk7zjrB4mwEEeP+1ZkWyOzjrvbZzjY 2giF9D6SX3ewv7tEDkVsI0Lf4rODxovFV6wx6hS8nJ8kQQXG2ETPZ76EbOnNh6IGLa/c zOoA== ARC-Authentication-Results: i=1; mx.google.com; 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 f200-v6si8263490pfa.164.2018.08.04.00.34.10; Sat, 04 Aug 2018 00:34:59 -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; 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 S1726986AbeHDJbi (ORCPT + 99 others); Sat, 4 Aug 2018 05:31:38 -0400 Received: from regular1.263xmail.com ([211.150.99.140]:57014 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbeHDJbi (ORCPT ); Sat, 4 Aug 2018 05:31:38 -0400 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 Cc: Wayne Chou , Levin Du , Heiko Stuebner , Michael Turquette , Stephen Boyd , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.7.4