Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2356462rdg; Sun, 13 Aug 2023 22:41:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtPQT/QjLfltkAps3TNv0ZQ+IxXKut1G17ZRzBqR6A+wM+gWDT1tZzwj+vU2P6wk9WxZR8 X-Received: by 2002:a05:6a21:7189:b0:137:53d1:405 with SMTP id wq9-20020a056a21718900b0013753d10405mr9958430pzb.26.1691991663323; Sun, 13 Aug 2023 22:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691991663; cv=none; d=google.com; s=arc-20160816; b=bgtvPvd1kiqIP9Bx4SrjpKPqVeWuUCiz+9jq6ZWsW9/j0cVQh7gZ9J+zyUFcYKg84G LQ7J4ekVdRfeza+ReR4RWbeS9B15KHqeKxLtIb+w0BKq01YxQ27wVl/SWyiutQb1aa/O 8p81yxiVUrqFRIuYgQkQhPqLgPgoTX1om6H5HbvNVJsy58Ylj06y+PkYJp044hTh6vSB ci98why501QLLoHSCe46LBOY1+6jcCT2s20jxUi2A28a+hisad8cde4XQkqT5FO/wvv6 JXheKhZNq0uIRFtdUFlsOE/BhbFAdFkjt4/Mq7fV9471X+vA2swgYKqY+Gu/4btfk5qt dNaQ== 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=qmcKKAb9JCk880AqllteBAGukDMj5sOEGsHTrP/k52g=; fh=EUeUHyYt6WluI4g585eOpWah3g+nmbIqixz+MQwmxzA=; b=olxwvZ27+JSWqSGpFtTfnk2uZaZY7oyqY6mzSTpXBer8NQWttwdAhMd6tYAtO8S9sD S9gIUNDYY6tjf0frCu/YSN5fw6+VsS7/9qVDy/EEy+omsgFrwb6Z+E+Z7sZ3l2s57QEJ KXVWB5s1s9Hrr4nbJxofOL4ywD/8MCcjWQTDksHZQp0VmBvLeVbP3ft3cWWnOW2NbGWO 1CuSb8CZ+We9+B8uyMNdIgyU6lCE1ZMv3FP6Lz+Bc+HIvLsqyWLTibCh+jIbJQj/1Lge 0eKv7Pu/nO8Mwfk8Ki9cHP5a4hS2F0VdLJ1K8y/gI3YQv2Oxy1d0v33H5Rb40GHxZ7Gk Jb5Q== 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 e26-20020a65689a000000b00564656da917si7732338pgt.482.2023.08.13.22.40.51; Sun, 13 Aug 2023 22:41:03 -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 S231418AbjHNDLC (ORCPT + 99 others); Sun, 13 Aug 2023 23:11:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230180AbjHNDKx (ORCPT ); Sun, 13 Aug 2023 23:10:53 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B655A9B; Sun, 13 Aug 2023 20:10:51 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 6E15824E27D; Mon, 14 Aug 2023 11:10:49 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Mon, 14 Aug 2023 11:10:49 +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 11:10:48 +0800 Message-ID: Date: Mon, 14 Aug 2023 11:06:05 +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> From: Xingyu Wu In-Reply-To: <20230811-jiffy-nebula-a8ea5ef15eee@wendy> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [183.27.98.20] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) 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/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. Best regards, 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