From patchwork Wed Oct 18 08:06:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 15530 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4634576vqb; Wed, 18 Oct 2023 01:06:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOL1IWygvobvovIdl2AqNqMLOkGDpPDOVxtus9TOlWjjHjnzMsXdLyRhLCMThwyaRufhAD X-Received: by 2002:a05:6870:3c88:b0:1bf:9fa2:bfa3 with SMTP id gl8-20020a0568703c8800b001bf9fa2bfa3mr5185943oab.1.1697616397158; Wed, 18 Oct 2023 01:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697616397; cv=none; d=google.com; s=arc-20160816; b=nBwL40mPmEBlj1PBoX0Wk0yFoYMzF4baNLNENw9HYrPZFbBEUmCDhU+2Iggb77nkG+ znlCeqlVRl+9VEmj5Vz0AYle3KSoMuT0xrQFjFlzdFXgMvWpD2EG+A5K580Am+Yp7ByR BRfVy45IzObl3oDGmjCnvAyv8JYoYnMannTRD2kXAoB05GE/M4RXJcsmtmvjmyzNhuSO 8fMpXAYBE+wo/h3o7BTZc2MrR/nnIemcHXTgUItsJfA0tKCJwPl3vm6anf4muRhHrfmN Yh7+aUS8zGyYwkAbowlONSBzDifurE0/MrOVeRMgZHpTuKTFwjiAteKdEbrxze32oiJ8 6RmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=wSnE6AHtReJkLWNCNsw2deG5mtnwk5thFtDKs+hSJYs=; fh=N2KMNt4xB+3cYARJgdoAUqqtWqiZjGDr1YTEqXLlKm0=; b=raspn5KhbqUsH2YeL/mQSUo47y/4zhHgtyTQyV+oOUP0cubkkpmtezxa5+L3NbIp1K P6b4byalHH3acWfwz6NFQRBX4r4Tkh969i6MUOPysCpNUd/bZilY4URWA7YapG92DL37 n+OACkdcmSiMaw1tXmec0jqAdEkyCOueegpx/cl+zeaRlRbyjoLVI0xefIKo9jgBDBT8 NcpaKeWphbi3aVzrnh7HuHlgTLwe3SjCriUPZGww+jLueyN0f/CHIRwQOfepu97P4fW2 20N8KqFnzeu0zFdehkAA2A5KRO4mPjMRH6WGhDNplNjSN9Ntrf8qhEjiSud69SZS0C7M HPVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=o0YoW5fI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x20-20020a656ab4000000b005a0193c9328si1632317pgu.839.2023.10.18.01.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 01:06:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernkonzept.com header.s=mx1 header.b=o0YoW5fI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 5D36481552E6; Wed, 18 Oct 2023 01:06:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235130AbjJRIGW (ORCPT + 24 others); Wed, 18 Oct 2023 04:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235048AbjJRIGT (ORCPT ); Wed, 18 Oct 2023 04:06:19 -0400 Received: from mx.kernkonzept.com (serv1.kernkonzept.com [IPv6:2a01:4f8:1c1c:b490::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 411AB101; Wed, 18 Oct 2023 01:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Cc:To:Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:From:References:In-Reply-To:Reply-To: Content-ID:Content-Description; bh=wSnE6AHtReJkLWNCNsw2deG5mtnwk5thFtDKs+hSJYs=; b=o0YoW5fI8+ZfZjFx3X/xaPh/y3 r3mLLIkTjISzwpKgufg7Xo4C2xacaJkrWIDdZ75qIJ29D0NvK7k8dB+eIDDo3kNX/ER9/7j6F9OAA A1IH8/6uuig++gr0I37pUrZInQDRkwvuygam54rUH09WSTF3LaPh3YR87IJTsjsv+uuZ5Yy9gKf/0 XzXed/knQrS7/NsQh4t6yE7UCPX+5wfBgGuaBs+Jc/epIbEBi/6PUA+7jHTYxkbdIA8VBIGg+UCZ1 rb9GRxByXCzyFkmafHXZSHzK9BOy9KgfpILk4wkLFJ2VrNtgGbOhpW0SXjk/Y7rfRhfTY8h4zfl2x vFDOjTuQ==; Received: from [10.22.3.24] (helo=serv1.dd1.int.kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1qt1ZC-009lIU-04; Wed, 18 Oct 2023 10:06:10 +0200 From: Stephan Gerhold Subject: [PATCH v2 0/3] cpufreq: Add basic cpufreq scaling for Qualcomm MSM8909 Date: Wed, 18 Oct 2023 10:06:01 +0200 Message-Id: <20231018-msm8909-cpufreq-v2-0-0962df95f654@kernkonzept.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOmRL2UC/2WN0Q6CIBhGX8X919EQDcWr3qN5kfCTzAkE5irHu 0euuy7P2b7zbRAxGIzQFRsEXE00zmZghwLkeLU3JEZlBkZZRQXlZI5zK6gg0j90wDtRWrOqVSi 0riCvfEBtnnvx0mceTVxceO0Ha/m1v1bJ/lprSShpeCOR8+FU18N5wmAnZ9/ol6N0M/QppQ/Sh gUztAAAAA== To: Viresh Kumar Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , 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 , Stephan Gerhold , Stephan Gerhold , stable@vger.kernel.org X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.8 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 lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 01:06:34 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780079811165831331 X-GMAIL-MSGID: 1780079811165831331 Add the necessary definitions to the qcom-cpufreq-nvmem driver to support basic cpufreq scaling on the Qualcomm MSM8909 SoC. In practice the necessary power domains vary depending on the actual PMIC the SoC was combined with. With PM8909 the VDD_APC power domain is shared with VDD_CX so the RPM firmware handles all voltage adjustments, while with PM8916 and PM660 Linux is responsible to do adaptive voltage scaling of a dedicated CPU regulator using CPR. Signed-off-by: Stephan Gerhold --- Changes in v2: - Reword commit messages based on discussion with Uffe - Use generic power domain name "perf" (Uffe) - Fix pm_runtime error handling (Uffe) - Add allocation cleanup patch as preparation - Fix ordering of qcom,msm8909 compatible (Konrad) - cpufreq-dt-platdev blocklist/dt-bindings patches were applied already - Link to v1: https://lore.kernel.org/r/20230912-msm8909-cpufreq-v1-0-767ce66b544b@kernkonzept.com --- Stephan Gerhold (3): cpufreq: qcom-nvmem: Simplify driver data allocation cpufreq: qcom-nvmem: Enable virtual power domain devices cpufreq: qcom-nvmem: Add MSM8909 drivers/cpufreq/qcom-cpufreq-nvmem.c | 124 +++++++++++++++++++++++++---------- 1 file changed, 90 insertions(+), 34 deletions(-) --- base-commit: 2e12b516f5e6046ceabd4d24e24297e4d130b148 change-id: 20230906-msm8909-cpufreq-dff238de9ff3 Best regards,