Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4035086rwi; Sat, 22 Oct 2022 04:12:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7knqrXbhgsSGi/J1Het6OgjlKhH+EKTVq4Fcx60MZukEK/2iEAyuLzW/v/l6DMUMMe9hSn X-Received: by 2002:a05:6402:1287:b0:461:2221:15e2 with SMTP id w7-20020a056402128700b00461222115e2mr9747606edv.270.1666437167539; Sat, 22 Oct 2022 04:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666437167; cv=none; d=google.com; s=arc-20160816; b=EOB8Qf7dJrSI6pOH3zHfkUsRw8CwtE8H+l2YeIKBs+AFuuHmEyaFPxa6A4b9fIEFEV yWjh9bSt5bi4WpUaoZj9mxcWx48OGgmisHuaiCeJhg9NYR2ry6sjhpO0FLnnq0mwqLAd Rq6oUuiRoYG1UJqIjh1bNzbpT65/AoKeG95AUwhsSEgZ4hhwGWakA0+JFGsvXJes3UHD AxEhGc2CRLPo7DfSsq6WAKAwAJdSSohclQ9Lbp/IDsNpcJYQs24rXnMrxeQc8139XCsq 52VsaXV3tYdePrV6x01p2olhQig5mLy0CENuxcYDbCDGKXMrwwMQqC9XH+qthlCFt17h 096w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ijinfp+6zshcEz3zxDVM6H6Z5AoOAH7rNPFsph+s/NQ=; b=LFgyeo81OWjVYNjVCAHTr9fK5o8mt+RK057zxQ+S4EZlEoWdNOZhvP7HCypNoXHNeO oS9XMWGygLQJeDGlX8tR70Ru88duKiX1r656zA1q4i0XwrKTWz2cO4p3XWOnh6HSDJ+M xJCBIoM7pe8BTJGnZEM2pezUEf+wUcHbhZfJJUPV3x/3Jb1ok2mtNwSu1mG4fJ1E83ZI tlQdzyTMS8UpdLJ1Q+sV9FTJ0sxFUMNJCzju7ZtXDGQ7pwnRsdoy/Jg0TlPj+//AcPOa 25bQbz2vCUkUozClFcM5eC4cPadvqnRFC9CuPYL7pfsXAOvQ1KbxDN8YV76dHZqLkR7d eSVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZZLqlskJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a170906354a00b007891fd9179bsi18981758eja.150.2022.10.22.04.12.21; Sat, 22 Oct 2022 04:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZZLqlskJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230512AbiJVLHi (ORCPT + 99 others); Sat, 22 Oct 2022 07:07:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbiJVLHR (ORCPT ); Sat, 22 Oct 2022 07:07:17 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FBBF197F95; Sat, 22 Oct 2022 03:25:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id ADA83CE2CAE; Sat, 22 Oct 2022 07:56:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0A63C433C1; Sat, 22 Oct 2022 07:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425375; bh=j+D3BSRw6K3WPL1upC13NhG7/06VKOHGGwiFpM2s2cY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZZLqlskJat8RcPHh7+IdsMPLV874xZ99avmrGX9Z3LynOlAtcevOSINhBqPTRftDA W9zxKwxuZuH7yDRZ/NE4k/T2qVRPA+03uFDTvd/yAAe+G+imZrZGjrVZvq5RknWhjF VSWFqK0Q7r+qJnk2eIacCaHaYtnVujZb8I9jCynw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Serge Semin , Luca Ceresoli , Stephen Boyd , Sasha Levin Subject: [PATCH 5.19 480/717] clk: vc5: Fix 5P49V6901 outputs disabling when enabling FOD Date: Sat, 22 Oct 2022 09:25:59 +0200 Message-Id: <20221022072519.598997780@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Serge Semin [ Upstream commit c388cc804016cf0f65afdc2362b120aa594ff3e6 ] We have discovered random glitches during the system boot up procedure. The problem investigation led us to the weird outcomes: when none of the Renesas 5P49V6901 ports are explicitly enabled by the kernel driver, the glitches disappeared. It was a mystery since the SoC external clock domains were fed with different 5P49V6901 outputs. The driver code didn't seem like bogus either. We almost despaired to find out a root cause when the solution has been found for a more modern revision of the chip. It turned out the 5P49V6901 clock generator stopped its output for a short period of time during the VC5_OUT_DIV_CONTROL register writing. The same problem was found for the 5P49V6965 revision of the chip and was successfully fixed in commit fc336ae622df ("clk: vc5: fix output disabling when enabling a FOD") by enabling the "bypass_sync" flag hidden inside "Unused Factory Reserved Register". Even though the 5P49V6901 registers description and programming guide doesn't provide any intel regarding that flag, setting it up anyway in the officially unused register completely eliminated the denoted glitches. Thus let's activate the functionality submitted in commit fc336ae622df ("clk: vc5: fix output disabling when enabling a FOD") for the Renesas 5P49V6901 chip too in order to remove the ports implicit inter-dependency. Fixes: dbf6b16f5683 ("clk: vc5: Add support for IDT VersaClock 5P49V6901") Signed-off-by: Serge Semin Reviewed-by: Luca Ceresoli Link: https://lore.kernel.org/r/20220929225402.9696-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/clk-versaclock5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c index e7be3e54b9be..03cfef494b49 100644 --- a/drivers/clk/clk-versaclock5.c +++ b/drivers/clk/clk-versaclock5.c @@ -1204,7 +1204,7 @@ static const struct vc5_chip_info idt_5p49v6901_info = { .model = IDT_VC6_5P49V6901, .clk_fod_cnt = 4, .clk_out_cnt = 5, - .flags = VC5_HAS_PFD_FREQ_DBL, + .flags = VC5_HAS_PFD_FREQ_DBL | VC5_HAS_BYPASS_SYNC_BIT, }; static const struct vc5_chip_info idt_5p49v6965_info = { -- 2.35.1