Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2795124rdb; Tue, 12 Sep 2023 12:16:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLCQIKrPm0hUyst4VjOZl5mXhjNc2Tx9dZfR+Gdwmae8H80xCvRHRcStvtq0UQ53Nh5Zkz X-Received: by 2002:a17:903:445:b0:1c0:ee68:fc84 with SMTP id iw5-20020a170903044500b001c0ee68fc84mr638537plb.26.1694546166085; Tue, 12 Sep 2023 12:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694546166; cv=none; d=google.com; s=arc-20160816; b=G/E/4RvHtCzc/v2JF/taYUYutwCuTmQ9tedewyd6S20XL5ObBd2B7tWIM/B2wnMBUd FdK5sjtaDcQoAi3d5uLYRVF2iWot5SThTooUgC8r3E4H/IClKA9qo08+Mk7epUR7vTVe X4Ha8a5UyjTj2FtCvG8L4cPGD33+gjntnMzKbyp2EjF++YTa8QiDA0Pp4DeBNXXUoeRf x2OhPWWvZgQsUQt+dhzKqSriUoBi7GKTxa6NIInfTBlZbPGOLWvwlNkONbZTGy2J+sy1 B764RmUmC54Nc4pzvdtP0j6WXJG/s3zXZC8N32tk3KCyW610DiBqmk3HC5IYxAyEfYox lzPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ldrgnEH7Sx0aTIOcIuD/sp3SmK2aaFJCluGyd6JiYSU=; fh=woYOdLA+NVqXgyOA3ulnrU0HK+4MHfR+Z/RSIjmR6Bo=; b=oQwXfEi98WvaXLmsmdzRTGggzFs9H5SndIw4BWVDu+fPC6xNZh4//l6r1vPKM5Dcho M2afx6Qo4vKOwngtpA0W12/E2FEGfHag9ejqSs3ZQJJT4lVqZxQgNw1ZPJYcQBYS92Tt AxfnCvP5OL3MBeXJgOYzty4EiMp3OuSaYgGAbXIt0Vy7G5iAknN8jJPoU+WsGiWwewkb dFAPKegohgjuSO7DQ2+9t46BBYN8jcahi2QjiA6QzC7CWMMo+qtHLM7AKQz8E7fSx6vw l19GQceqP5Y1c2A0fUjR4EX8NyHC3D0EFsnq5hIDDMojrFuB8GmHPHJOATRDNzJXXE7/ 4Byw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=kJPnynMA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ku8-20020a170903288800b001c1eb8b79afsi8366960plb.360.2023.09.12.12.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 12:16:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=kJPnynMA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernkonzept.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 321A580E0A7C; Tue, 12 Sep 2023 04:10:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234568AbjILLJ5 (ORCPT + 99 others); Tue, 12 Sep 2023 07:09:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234493AbjILLIs (ORCPT ); Tue, 12 Sep 2023 07:08:48 -0400 Received: from mx.kernkonzept.com (serv1.kernkonzept.com [IPv6:2a01:4f8:1c1c:b490::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C386173C; Tue, 12 Sep 2023 04:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:Reply-To: Content-ID:Content-Description; bh=ldrgnEH7Sx0aTIOcIuD/sp3SmK2aaFJCluGyd6JiYSU=; b=kJPnynMAZu2R1JSqRZhaGZdz3j Vv0VyHVTpJSM5F2zadHn9/KKuECG7EPmPDEvjwNoclnp/vdI9F6l5DYHg0oNGipGk7/5pxIfTOJhj rhf/dgVar2VhPSZ4xmAelyPxZJxEszqphCUE8WC4jvNhwgpFAuGXHrOv85ofWpvpn+HEE1u6LnKoS M4MPGhoBo/FvDqNm+91KDFN1pRFff7V+3lckmTla0uetkOy7E8TqLrLDleIw+8/lgKO7t0xfDwuLo 2UYVmUI16XbLWsC+7+dvh5NdihdmxbTv5WLXR5dbuwEJAVlJCbsbyYFLySNWqm1wyqs+L3V6TwAOD mBa8OaAQ==; Received: from [10.22.3.24] (helo=kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1qg1Fv-0031jw-23; Tue, 12 Sep 2023 13:08:31 +0200 Date: Tue, 12 Sep 2023 13:08:25 +0200 From: Stephan Gerhold To: Konrad Dybcio Cc: Viresh Kumar , Andy Gross , Bjorn Andersson , Ilia Lin , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Ulf Hansson Subject: Re: [PATCH 4/4] cpufreq: qcom-nvmem: Add MSM8909 Message-ID: References: <20230912-msm8909-cpufreq-v1-0-767ce66b544b@kernkonzept.com> <20230912-msm8909-cpufreq-v1-4-767ce66b544b@kernkonzept.com> <5336dac4-af3f-46f7-bcf9-40314f744c8c@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5336dac4-af3f-46f7-bcf9-40314f744c8c@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 12 Sep 2023 04:10:09 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On Tue, Sep 12, 2023 at 11:59:47AM +0200, Konrad Dybcio wrote: > On 12.09.2023 11:40, Stephan Gerhold wrote: > > When the MSM8909 SoC is used together with the PM8909 PMIC the primary > > power supply for the CPU (VDD_APC) is shared with other components to > > the SoC, namely the VDD_CX power domain typically supplied by the PM8909 > > S1 regulator. This means that all votes for necessary performance states > > go via the RPM firmware which collects the requirements from all the > > processors in the SoC. The RPM firmware then chooses the actual voltage > > based on the performance states ("corners"), depending on calibration > > values in the NVMEM and other factors. > > > > The MSM8909 SoC is also sometimes used with the PM8916 or PM660 PMIC. > > In that case there is a dedicated regulator connected to VDD_APC and > > Linux is responsible to do adaptive voltage scaling using CPR (similar > > to the existing code for QCS404). > > > > This difference can be described in the device tree, by either assigning > > the CPU a power domain from RPMPD or from the CPR driver. > > > > To describe this in a more generic way, use "apc" as power domain name > > instead of "cpr". From the Linux point of view there is no CPR involved > > when MSM8909 is used together with PM8909. > Without checking, I have a vague recollection of CPR output also > being called VDD_APCx, so it's a-ok > FWIW: I would say there isn't really something like a "CPR output" in the hardware. The power supply pin on the SoC for the cores is called "VDD_APC" and you just have some regulator hooked up there. CPR then monitors the environment and gives suggestions to adjust the voltage of the regulator to optimize power and stability. But it doesn't provide any power itself. You can use it or not. It's just an "add-in" basically. > > > > Also add a simple function that reads the speedbin from a NVMEM cell > > and sets it as-is for opp-supported-hw. The actual bit position can be > > described in the device tree without additional driver changes. > > > > Signed-off-by: Stephan Gerhold > > --- > Acked-by: Konrad Dybcio > > One nit below: > > [...] > > > static const struct of_device_id qcom_cpufreq_match_list[] __initconst = { > > + { .compatible = "qcom,msm8909", .data = &match_data_msm8909 }, > > { .compatible = "qcom,apq8096", .data = &match_data_kryo }, > msm8909 should come after apq8096 (even if adding apq and not msm was > a mistake) > Right, the list is currently totally out of order. I can prepend a patch in v2 to sort it first. Will wait some more for more comments though. Thanks! -- Stephan Gerhold Kernkonzept GmbH at Dresden, Germany, HRB 31129, CEO Dr.-Ing. Michael Hohmuth