Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp734484imm; Thu, 13 Sep 2018 07:01:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbiDgvLNOaTPNATNXoWUe/JZp4XJOUv5JKj4I0kXP9OkA9XDpWtefNiMQ9E8RaVHjMmN2gO X-Received: by 2002:a17:902:20c6:: with SMTP id v6-v6mr7593974plg.228.1536847287170; Thu, 13 Sep 2018 07:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847287; cv=none; d=google.com; s=arc-20160816; b=Ll47H/4gcbpgw49+b4gv+KGLo91sWZaKXTpTfmcTvZ8t4ZJcuoiGzMIyL4H7qNGwwh LtC/sOCon+SZvyZ/j/GGqoaZgYDj1fCyoDLOWE0lWaul4yN8mJTXDvajbz40i8r1DNqh yqw5z9skT93kKS82sQygQZxw6XjshSqqGbSaXbL3oxGXq3TqcGdXLqXkyDg9VIrNey6R bkAiIjIiYH1Wo2qbSPYU77rOxHzFwmyF3jKv+xB9mumXKWw8oR2/GlBfksaWnsp70fuH XJaKrggMh9qu9kGutWmpiiTpZ9oSfgPiGJIxjZloDWA/ChDjVRvaSXHMw6HkOf88zeuf w5RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=oPfRiBMR5k9DScjmmtkuFperwcXex/bwFGQ7sKkygLg=; b=t4Goi5WVx3NOCGUpRH1TqnQ1xzhkVgB8kUfF0sJQjLcS1KuMTY8R2b8XY63QJXFla6 BFQCuKXbDNU5mfe40mqbwxNTNN7pmxXrpkFNFEPT1asZMrcl3JYLjpBAaCr7jUjGrw5T ceDinPSqXCUaD+C/g9QRhZI/aBhv36b4v3vNLLjRqCIEqDEVqZeNjnQk0YOnOeDry9nc 508//QZPObIIACUACfoBU2ZOmePNMwvjc/2X8gFOjSH1Ucmsyc/NOaV44s/mqb/wY4r2 626nNgjjm8E48N56q5aVzp1JsgyZ9iMpBNLjG0mlSkR2cpstGhUWNWtWzTp//TLzGkFs MOKA== 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 g3-v6si3678648pgu.248.2018.09.13.07.01.11; Thu, 13 Sep 2018 07:01:27 -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 S1731751AbeIMTJ3 (ORCPT + 99 others); Thu, 13 Sep 2018 15:09:29 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34886 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729039AbeIMTJ3 (ORCPT ); Thu, 13 Sep 2018 15:09:29 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7780CD0E; Thu, 13 Sep 2018 13:59:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Levin Du , Heiko Stuebner , Sasha Levin Subject: [PATCH 4.18 128/197] clk: rockchip: Add pclk_rkpwm_pmu to PMU critical clocks in rk3399 Date: Thu, 13 Sep 2018 15:31:17 +0200 Message-Id: <20180913131846.668080116@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Levin Du [ Upstream commit 640332d1a089909df08bc9f3e42888a2019c66e2 ] 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 Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/clk/rockchip/clk-rk3399.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/clk/rockchip/clk-rk3399.c +++ b/drivers/clk/rockchip/clk-rk3399.c @@ -1523,6 +1523,7 @@ static const char *const rk3399_pmucru_c "pclk_pmu_src", "fclk_cm0s_src_pmu", "clk_timer_src_pmu", + "pclk_rkpwm_pmu", }; static void __init rk3399_clk_init(struct device_node *np)