Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp979382iob; Fri, 13 May 2022 18:25:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuyp68pt8kU5hVQpGNQTBpjvQmPDFYjCrFvVUKlSgIoenv1GqSdok63zE1MbLkrZ4rmNZH X-Received: by 2002:adf:f7cb:0:b0:20c:9dbd:49be with SMTP id a11-20020adff7cb000000b0020c9dbd49bemr5916384wrq.250.1652491506366; Fri, 13 May 2022 18:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652491506; cv=none; d=google.com; s=arc-20160816; b=zFwQWjEozkM4F9d40dcuF6jCCxzD3M1TZX3/8JWpg3qba1IMfIn0TV/UjHU0EkrIER GZ/a2O/2HB5yr3YVWvyiZPoF6xIjXRFbi2UAJb8TJqxJ9AIFAMSh++fMmp5xFbJe0EY6 1Ap6VeNBAyH89KhcEmMBvJ9jjlfA5h4oD7ZmMdCytgVUFdOlOEkCuOTJkhM2FL+y0zus XsEWlO9rzOVoE2rerfw0eRmU9mZslTFXfTqn4kra/QEMyf3vyqLDRotdpKmHQKUZ733j kdSvovNj957K/Ur7oPY0TTrhZr13ay9Thc6THyY4PiwPVYiKEscHDjwrhK70hU220ZFS jQng== 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:dkim-signature; bh=1wq4x+GCdYKq7VSZUcMOO2GqRgSu1qPIqNZNKgKe78o=; b=CsIzeBAmKW4TTDnFDT6tHbt6pBra0Pi0W4Pxv2aMeD0WnLJYI6FcNBH+7jZ7nrJ6Tf wFXXX3vJTEglOOLBKlHtXqOmC2fDyrTOW4JGXECYB5Jq1x5SJ0xPq3rnIbBdlTx9ZGpe +7+1mTeVZBnzabI7ydXF8p95304PvZAq3zlboD80vWsuwAwrMEIgW7GqHrTuP4jEEq9o oQ7Ps1Je3xiVn/DAq48g4UmB3a9o4dWAXpG85e1iv6ArxxBi3x4slt4Citmmf6BGltVW tLludp0v4tbghpwo6LcGIIN+vr2IWqvKnb/h+p8tBUjp0/gvymkKBuOV8s7qSM2TTqwL J4xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=aGsvRiKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id az37-20020a05600c602500b0039433e6f304si4012823wmb.161.2022.05.13.18.25.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:25:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=aGsvRiKo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E83B03DBABD; Fri, 13 May 2022 16:54:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378207AbiEMIYk (ORCPT + 99 others); Fri, 13 May 2022 04:24:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351221AbiEMIY3 (ORCPT ); Fri, 13 May 2022 04:24:29 -0400 Received: from m12-11.163.com (m12-11.163.com [220.181.12.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 936A62A76A2; Fri, 13 May 2022 01:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Message-ID:Date:MIME-Version:Subject:From; bh=1wq4x +GCdYKq7VSZUcMOO2GqRgSu1qPIqNZNKgKe78o=; b=aGsvRiKodBfXXrQubvrmS eNaI5SHRoxDxCWaYRIFOL0XFsdCTJuktUokDSniA34TYvI8srQh30tyJ9TWbM8jI lxOuOLA8XtgwGgdS0M1LYm33GJSaddvaBUQLXrNYbyp9MyMZGTjSwqlVHSNuJWFu A5KmFokyy5XONgBDiMi4is= Received: from [192.168.3.102] (unknown [218.201.129.19]) by smtp7 (Coremail) with SMTP id C8CowAA3GrB4FX5i05E+CQ--.22485S2; Fri, 13 May 2022 16:23:21 +0800 (CST) Message-ID: <666ead08-af1e-81f5-6fe1-e5e3370e6d6f@163.com> Date: Fri, 13 May 2022 16:23:20 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v3 2/2] ARM: dts: sun8i-r40: Add "cpu-supply" node for sun8i-r40 based board Content-Language: en-US To: Maxime Ripard Cc: linux-sunxi@lists.linux.dev, Rob Herring , Chen-Yu Tsai , Jernej Skrabec , "Rafael J . Wysocki" , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20220512071858.10805-1-qianfanguijin@163.com> <20220512071858.10805-2-qianfanguijin@163.com> <20220513073849.cu4jzykefat2sepg@houat> <1352b9d7-5219-af09-948b-6462def39ea5@163.com> <20220513081556.knd3tf6pangfblh3@houat> From: qianfan In-Reply-To: <20220513081556.knd3tf6pangfblh3@houat> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: C8CowAA3GrB4FX5i05E+CQ--.22485S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxWF1ktF47Kw4DXw1DCw4kJFb_yoW5GFyDp3 y7uF4DCF4kGFyrtry2gFWUJrySy34rWr4UXFn8Kw1rJrn8XF9rtrs5K3WFkFZ8Wr4fGw40 vrWUWrn7Wws8Za7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UpWlPUUUUU= X-Originating-IP: [218.201.129.19] X-CM-SenderInfo: htld0w5dqj3xxmlqqiywtou0bp/1tbiGh0A7VaEBkJFWgABsi X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 在 2022/5/13 16:15, Maxime Ripard 写道: > On Fri, May 13, 2022 at 03:48:50PM +0800, qianfan wrote: >> >> 在 2022/5/13 15:38, Maxime Ripard 写道: >>> Hi, >>> >>> On Thu, May 12, 2022 at 03:18:58PM +0800, qianfanguijin@163.com wrote: >>>> From: qianfan Zhao >>>> >>>> sun8i-r40 actived cpufreq feature now, let's add "cpu-supply" node on >>>> board. >>>> >>>> Signed-off-by: qianfan Zhao >>>> --- >>>> arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts | 4 ++++ >>>> arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 4 ++++ >>>> arch/arm/boot/dts/sun8i-t3-cqa3t-bv3.dts | 4 ++++ >>>> arch/arm/boot/dts/sun8i-v40-bananapi-m2-berry.dts | 4 ++++ >>>> 4 files changed, 16 insertions(+) >>>> >>>> diff --git a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts >>>> index a6a1087a0c9b..4f30018ec4a2 100644 >>>> --- a/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts >>>> +++ b/arch/arm/boot/dts/sun8i-r40-bananapi-m2-ultra.dts >>>> @@ -113,6 +113,10 @@ &ahci { >>>> status = "okay"; >>>> }; >>>> +&cpu0 { >>>> + cpu-supply = <®_dcdc2>; >>>> +}; >>>> + >>> This will break bisection on those boards. Indeed, you added the OPPs on >>> the first patch, and if you only apply that patch, the boards in the >>> second patch will be missing their CPU regulator. The kernel will then >>> ramp up the frequency to the highest OPP, but will not change the >>> voltage, resulting in a crash. >> This is a good point and I will merge those two patch. > That's not what I meant to say. Those two patches are great separated. > You can invert them though. haha, invert them, so interesting. good idea. > >>> There's a similar issue for all the boards that don't have a regulator >>> in the first place. >>> >>> The way we worked around this for the other SoCs is to have a DTSI with >>> the OPPs with a frequency higher than what U-Boot boots with (1008MHz?), >>> and only include that DTSI on boards that have a CPU regulator hooked in. >> Is this really necessary? It seems like every board based on sun8i-r40 >> have a cpu regulator. > This probably won't be the case whenever someone starts a new design, > and then they'll face random crashes for no apparent reason, and waste a > lot of time in the process. > > Whereas the alternative is that you would be missing some OPPs, > something that is fairly easy to figure out. How about remove the OPPs which greate that 1.08G in sun8i-r40.dtsi, If some boards want to run at a higher frequency, can add them byself in the board's file. > > Maxime