Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2399845rdg; Mon, 14 Aug 2023 00:48:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE4fp0GPzyCWbbyLRxabRaVc2WALceBRS+UG7A/HOjyV+a36vFkfhaV0pJx2hbbUNw5EuVU X-Received: by 2002:a05:6a20:7d88:b0:13f:c159:63ec with SMTP id v8-20020a056a207d8800b0013fc15963ecmr12578985pzj.24.1691999307455; Mon, 14 Aug 2023 00:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691999307; cv=none; d=google.com; s=arc-20160816; b=ub2PArYkTHj4dM2TtLHO5sGQ2s/TKNfEkNRrT79IsmRKlnJfiWjh1orytWVcbKxP/R ho5w0LKfG6jX8E960g1KcDgtW6y+pIO0aG6Oxo/iu2TEq/2kxIL+hiPS52kgR22a4/t9 DfnfMVm3s/SgAe7V/2jP3+YY7tMZBpPzJV2fmqP8TkxlHCzi+Jlk1TGtFUtVm+IVGqDb eFrGkHR0j4QMypduPyf/YsnlyoYUpnXm/H7uWMutpa1WesUK/X7580c+chKgs/wnQvZ2 0VACUEJI0IK05prRC5wVjBGo3BCHpeSpRBqx2XP0rH+0EMd1pDWSr3+yHyGTVQgvrI7a FGUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=SZWQZCtLNwx2+8kYuskob6HcW9ZFEV7QRRAtIPr2Ilg=; fh=EUeUHyYt6WluI4g585eOpWah3g+nmbIqixz+MQwmxzA=; b=l8Y/d+8hCpjU9PA2r9fipsuXllyGs9Fk3TiYwS7gQSwl64gl1VwiSbaDyayEVEzkI+ oqe4GG93uLrRrHq9sXL51sryKbTnWmyq8JxUm6iT0UGnduJ/kEw0Y6lde4+72xDetoRl W0eWBOe3HdP/Kgs6JlEqEZJtw30Zav5hrW9Sru2ksp1W66pzyf9RF2FIEm44I66Ljxvr eleef27/42J4noEslNB6sNrrEs6O4CaQkoyoFNAMap3N2lsMqw5mjhOoJ6bWDRzAKdC0 ad7ewk2jZyxlvYqIap+POClHuuq6YySm1ELBymTkxUWQuyQBsNSXHnJ47njo/V3GgppR 3PZw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h191-20020a6383c8000000b00563fc720694si25706pge.119.2023.08.14.00.48.14; Mon, 14 Aug 2023 00:48:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234193AbjHNHdg (ORCPT + 99 others); Mon, 14 Aug 2023 03:33:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234215AbjHNHdM (ORCPT ); Mon, 14 Aug 2023 03:33:12 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71A9010E4; Mon, 14 Aug 2023 00:33:06 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 7EB4F24E1ED; Mon, 14 Aug 2023 15:32:58 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 14 Aug 2023 15:32:58 +0800 Received: from [192.168.125.128] (183.27.98.20) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 14 Aug 2023 15:32:57 +0800 Message-ID: Date: Mon, 14 Aug 2023 15:28:14 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v1] clk: starfive: jh7110-sys: Set PLL0 rate to 1.5GHz Content-Language: en-US To: Conor Dooley CC: Michael Turquette , Stephen Boyd , Emil Renner Berthing , Conor Dooley , "Hal Feng" , , References: <20230811033631.160912-1-xingyu.wu@starfivetech.com> <20230811-jiffy-nebula-a8ea5ef15eee@wendy> <20230814-relieving-brisket-9a8c38e817a4@wendy> From: Xingyu Wu In-Reply-To: <20230814-relieving-brisket-9a8c38e817a4@wendy> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [183.27.98.20] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,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 On 2023/8/14 14:57, Conor Dooley wrote: > On Mon, Aug 14, 2023 at 11:06:05AM +0800, Xingyu Wu wrote: >> On 2023/8/11 14:43, Conor Dooley wrote: >> > On Fri, Aug 11, 2023 at 11:36:31AM +0800, Xingyu Wu wrote: >> >> Set PLL0 rate to 1.5GHz. >> > >> > Why are you doing that though? >> >> Because the CPU frequency scaling is based on 1.5GHz rate on JH7110 SoC. >> And now the PLL clock driver has been accepted and PLL0 is just 1GHz[1]. >> [1] https://github.com/starfive-tech/VisionFive2/issues/55 >> >> We should set the PLL0 rate to a correct rate (1.5GHz) and then >> the CPUfreq will work normally. > > Please include an explanation in the commit message of the problem this > is addressing. > > Also, a Fixes: tag + reported-by? > OK, I will add the explanation in next version as a fixes patch. Thanks, Xingyu Wu >> > >> > >> >> Change the parent of cpu_root clock >> >> and the divider of cpu_core before setting. >> >> >> >> Signed-off-by: Xingyu Wu >> >> --- >> >> >> >> Hi Stephen and Emil, >> >> >> >> This patch sets PLL0 rate to 1.5GHz. In order not to affect the cpu >> >> operation, the cpu_root's parent clock should be changed first. >> >> And the divider of the cpu_core clock should be set to 2 so they >> >> won't crash when setting 1.5GHz without voltage regulation. >> >> >> >> This patch is based on linux-next which has merge PLL driver on >> >> StarFive JH7110 SoC. >> >> >> >> Thanks, >> >> Xingyu Wu >>