Received: by 2002:a05:622a:251a:b0:39a:b4a2:e86 with SMTP id cm26csp316543qtb; Wed, 19 Oct 2022 02:43:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72ohjN+/dRKuU+uk7L/Hg4OkhV5VTZIBvHpD0FKQq2WqUG/W1jefs0J2lO7IJF2xUTdFVt X-Received: by 2002:a17:90a:6f84:b0:209:f35d:ad52 with SMTP id e4-20020a17090a6f8400b00209f35dad52mr44220432pjk.144.1666172632366; Wed, 19 Oct 2022 02:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666172632; cv=none; d=google.com; s=arc-20160816; b=S3ttFms9EPPpUypgUTV1dlcjuYhnGp00zKGF1HXsCi5V/FIOLi9UyX9KUSuuhmfpmS pF2bpr0hnLjvx8YWoMFepysjEzJo6UEhbMgW6pXofsqFTqNDamlfcRpoco6tqZTV3dDj AIt9i5tFHhqyv/bv3KVQiQKA3WKFl20Ykb0Vc88ZDwJ/Me1YJsN4IGegv5WzhjajxXxn CLnZvwpfCH6nq6/hB6TWDO2LpcSwNaVHVrRw5ApyPMZ2Sp9mQPm3JplBCxWvpy+ama/+ addbc/43zL1EEsTHZnbo6KpbKG6ppyyNiO0o0S+k94J8YqSRXoCQbiGcZyzRV14na5Uf ajrw== 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=De62HJrQLZje4XPQ+nztSewSUuWpxB3z0/VkHOrndj3Dz1UIlUR/st0rcFpEoypME0 JzbTHs/o2xIKzzmN8uqE6FE8yB843NnBLBkjFOtDSeFVeCjNXWkYiiOESQSXL6HdRJMX SfcRMUBKWm/4p2R/b5sxzzFoRREi+S6i75w5F5J1vYq0bG6xpMJajkVP2f60gupEi+7W ZnIukxAL4oLTMckx6kRiR4KmqJTW5DdBFWIvH1Nu7gtEfjEsqZI4LnZC2kPCSBCZ0jrW RyGCVMX5XEEf9iIU4CxDKOfAozjtlHP1t+a1cw0l+siQh6CGg1h7sA0PDGwQZ8JjJ1jH EjRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iI4d7Z0p; 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 y7-20020a170902700700b0017e0ca906c8si15918012plk.568.2022.10.19.02.43.33; Wed, 19 Oct 2022 02:43:52 -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=iI4d7Z0p; 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 S231355AbiJSJf2 (ORCPT + 99 others); Wed, 19 Oct 2022 05:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233853AbiJSJ3j (ORCPT ); Wed, 19 Oct 2022 05:29:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F291DC58B2; Wed, 19 Oct 2022 02:13:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 18F2C61828; Wed, 19 Oct 2022 09:04:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 286F3C433D7; Wed, 19 Oct 2022 09:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170272; bh=j+D3BSRw6K3WPL1upC13NhG7/06VKOHGGwiFpM2s2cY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iI4d7Z0psptg7GsWobXlDuAr0eIxIPW3VBCIfnLmiJIU7zyUZxjEKTCcebzq/y8/e alIKvO4+O91BXJo8Vn+93ZOZZ2xQgFYnfGXIiSQb3HQepbIsniS7+k0fMBIFL2abOt yfImzWYRZnBmApjQsb1gZOsZ+6Wy3VxSs3/hKMJk= 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 6.0 591/862] clk: vc5: Fix 5P49V6901 outputs disabling when enabling FOD Date: Wed, 19 Oct 2022 10:31:18 +0200 Message-Id: <20221019083316.087044841@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@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