From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAD94330B32 for ; Thu, 7 May 2026 06:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778134975; cv=none; b=J+3xORfb7+495ti0KYyISY/xJbnFp7Cw2zHMFh08HQnHDf57rvW0AjagIXtyMkpru7ib0C4jA+N3ZLyuev77PtUKLSDFkMM2CVexsJfLjvsBGqcK1Wzs0iMw/fe+bVTIuxl4/T2l/pA+/dqO9/TG6Y2RveZ1HjkUqvyscEG809w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778134975; c=relaxed/simple; bh=erpl9bcOmBPzIvZaPl4rPg0Qghz9qPJsoV1ZQ1A1fWg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=UIfsfIBktsoqAGupqRv/vfnoTKZr7fDFfd8NinM+4skRMlOP8zCjXqzYEj1YA+L7d8NfBaC/eWuTwlnpmpvlPWoi2c1JyWmNwfcodKX+20SK+lFeW778oZGazn6B60FLJMcLdFfXBJWqMrToDl5XvrY73dw6yo+LNo+JRPPL6nI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=GAqcjy+U; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=X13NO1uq; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="GAqcjy+U"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="X13NO1uq" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 647446TI151128 for ; Thu, 7 May 2026 06:22:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=0bYlSt7DWtFV9/30w21jcxKBV6pVHX6j/yi YjnHQK14=; b=GAqcjy+UyF2OdNB80Qo0WASGdve03m019NIzIpUkj3xXHgiJFH7 +5cE8HUCJKFt/xMUjl0tGLwEx+EH3MczqQLm7lagXescsQ0dXzLaijWK+FcqXa2E zDdQsqCors/T+WDNVwPAYOMlZvBJ6EzyRZLL9BNs4RCAT4tqBGRn4JVmpD7WwFyN jxmOx0ExafeeA+rs4MhPff1Imox6K+cQVxeCDhPLy0MRH4+3oNZWMOjS574zUngy q8fRQR7PQguVoIrr6kfoq+zn8fL/sLsMfnHwMPUg2m3joGAdNZ8DpAJz1dY1nmNb mMurm5YzYr/iRJnQ71s9S2/p2dloWrqKTQA== Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e0kctre5a-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 07 May 2026 06:22:52 +0000 (GMT) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-83565161a6eso307223b3a.1 for ; Wed, 06 May 2026 23:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778134972; x=1778739772; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0bYlSt7DWtFV9/30w21jcxKBV6pVHX6j/yiYjnHQK14=; b=X13NO1uqUll5mt3LhhBiIoISb18kxPSfl4zZP+81XyfHK2guL2XLv8g0zonjeClkgl 6QkE+vnDjUGVfl4gp1IMKrhKpvqlLUyL4XTzwkA8+B0z71aPop35UMosITr+d601QdWT 4qz2cDYf5UIL9ovbU+jfQ3S1q3MDkC8cSXPn+X8ZZX7oo0uPfkT/J+EWsguXz5SRdxeP lSWXIQgclVjZDx9Y9+8i+L7PYzNymYrIjS7ab9DxvGBeqv9g74xLuvQZk/2MMXzA3m2v xDQbE6plJ3K97kD1jJkX9nS6wMvmHkC4834mWV+didxOG1fj9GC8HOhheoGNqSW7OrPM C3lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778134972; x=1778739772; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0bYlSt7DWtFV9/30w21jcxKBV6pVHX6j/yiYjnHQK14=; b=aD8AL07nAqpb3uSv+U/fOXjqc7/vuocvkD3czb1R03JOAlz26HWapjKM1t0Naf34SA bHYO21taWjr7LMC6Ke7UQksihF69p+tAL3tqII0jH8LgwPdZ//pdyYxfZMgCrvVep1po KGgGXY88PAiP/aRBc8v4C862vsZyiIC7htHZXsbFpMgBr+5rWEd+YJWKZ6qZQ5rRheCC vkjSmzXk5Naz1AGRbhqUqP1bCCdk5bb9JjxOnwyTWO6yjK34R5YHunJpyFa0nsEY3YU5 xg+X0zSVwGM6+b3UKnfmODV4EAtN4yhrzF/EGWusZSw5UZvzwli7JUft41XqvqE9HvHt qW4g== X-Forwarded-Encrypted: i=1; AFNElJ8JcebZX7IhryurQAvVw0fWiMJArpjLduiXjVJbpOmLZHejv6m1mHqkhgOpsh3bATc6Z6grtGDOPoS9@vger.kernel.org X-Gm-Message-State: AOJu0YwXoYo2qwxSTr+r9slsd9i9vOJoIBjbXcu9i7546HT17ZAVXClt 1un5qtGRgZsp8WsGTyewbNmc+0PWe44QYAjQQTOr3cIi38oGwgVbLpBW9+cNegWCGQs1Ub3oCqV 8vsZHrpc1E/iZOxnma0ZJcB5oJ3WaDrnt8KwDFYLEyOQHcMe4E6Ujn581f2iKvDco X-Gm-Gg: AeBDietsJQ7I/kDvCF9sB+TDoDTrkzO/ZBkR6+RVMxO2GhH40faZqQvNkwDtrI407gV XbXohZA+5GRa5o20+4rvxdXYCxwqKi/j9WXhK+153KHH0OWy4pzLg0jhdSMCMExxpMT2G0Aei8q n9qLULk8FJJBuFf9UjOA/vox+MRpeVhkZABMtzwlsKAyBjj5LG/hBWjqoOwG3TiBm7JDX8GsIgL nG+XqhLEW6VMOApiluV1i+42CQS0juLIuMo5G1khpnUTszmZBuKaPsGhxlfY7rCw7nvZOFVlorz QYGQbYGmRzbv2M8L1U3dsiDoQsJ3sLeLomR9Yz0rsHyMjaEbt0Ck2IS5H32sl4WXMiPmMOex0O9 sZVMfGO7F8qSvJ+Wn2ifbhifbAMfP3atuFOHjPcHB7hzdg3UVyzV5lBE4z0EOrJ70cJebbn+ijJ c3McRcWOF/09jDEBWpnw92KWObUlF03UUYo2ym4a0azEKJtQSsDuPX4t8K2Q== X-Received: by 2002:a05:6a00:2986:b0:82c:9c90:6ea0 with SMTP id d2e1a72fcca58-83bb630704bmr1396462b3a.3.1778134971536; Wed, 06 May 2026 23:22:51 -0700 (PDT) X-Received: by 2002:a05:6a00:2986:b0:82c:9c90:6ea0 with SMTP id d2e1a72fcca58-83bb630704bmr1396426b3a.3.1778134971017; Wed, 06 May 2026 23:22:51 -0700 (PDT) Received: from hu-sibis-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83965945101sm7346557b3a.13.2026.05.06.23.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 23:22:50 -0700 (PDT) From: Sibi Sankar To: cristian.marussi@arm.com, sudeep.holla@kernel.org, cw00.choi@samsung.com, kyungmin.park@samsung.com, myungjoo.ham@samsung.com, konradybcio@kernel.org, andersson@kernel.org Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, dmitry.baryshkov@oss.qualcomm.com, jonathanh@nvidia.com, thierry.reding@kernel.org, digetx@gmail.com, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org Subject: [RFC V6 0/8] arm_scmi: vendors: Qualcomm Generic Vendor Extensions Date: Thu, 7 May 2026 11:52:29 +0530 Message-Id: <20260507062237.78051-1-sibi.sankar@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=XsPK/1F9 c=1 sm=1 tr=0 ts=69fc2fbc cx=c_pps a=m5Vt/hrsBiPMCU0y4gIsQw==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=bK4GZpSpkxiEjqyRu_sA:9 a=IoOABgeZipijB_acs4fv:22 X-Proofpoint-GUID: wzNEr67S9n3Zkp6unafPtGPHYGExqTiG X-Proofpoint-ORIG-GUID: wzNEr67S9n3Zkp6unafPtGPHYGExqTiG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA3MDA2MCBTYWx0ZWRfX/guhuTvxIQxk 8ksg1be2IChTfI1nG/pKqgaiijU3nUNMplSA5AaHtGvXPVyfm33fVGwq2/a8VU9AMG8QbUb+8Le bybPnmYPGGn9QGAaj976F+mAnLe7gt0gGENqLaVpG+tRoBjSxb7zPZwFmbndb0CMcAI/xcdg0GA Pz5Ny747QX96bPMcKJNtvD+Mm12+5MaSsLnOPmqKESyOfCMuoRdW1yxPvwQYWlvK9NDheqSe8D5 7i0mo6CIbrnMrfI3pI4qUA3SsZz7mQkWrCD2RMc21WjVcbqZGNyN++lEHEnQgOUZQzOYexKx9O7 6jX4KGM9IKVmy7zdX1OYMsUNU7pOF07iZXP+z5EOt+mszqHceHvVapEvaHFgWvaMhlzJKUtiSev FnulCgpbG7HEWfrMJc/TKE50/D9XrAnQxio2DQXmhSk+RJRJdSfCuVVHJNDcA1ofO4RHCyy70Du 1kuq5SYD9zTkGrQSaUA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-06_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 adultscore=0 suspectscore=0 phishscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 spamscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605070060 The QCOM SCMI vendor protocol provides a generic way of exposing a number of Qualcomm SoC specific features (like memory bus scaling) through a mixture of pre-determined algorithm strings and param_id pairs hosted on the SCMI controller. On Qualcomm Glymur and Hamoa SoCs, the memlat governor and the mechanism to control the various caches and ram is hosted on the CPU Control Processor (CPUCP) and the method to tweak and start the governor is exposed through the QCOM SCMI Generic Extension Protocol. This series introduces the devfreq scmi client driver that uses the memlat algorithm string hosted on QCOM SCMI Generic Extension Protocol to detect memory latency workloads and control frequency/level of the various memory buses (DDR/LLCC/DDR_QOS). The DDR/LLCC/DDR_QOS are modelled as devfreq devices, with the governor set to remote devfreq governor. This serves as a way to get a basic insight into the device operation through trans_stat and provides for ways to further tweak the parameters of the remote governor. Transtat data for DDR/LLCC/DDR_QOS is now available in this series: #cat llcc/trans_stat >From : To 315000000 479000000 545000000 725000000 840000000 95900000010900000001211000000 time(ms) 315000000: 0 3 6 6 6 7 0 30 143956 479000000: 2 0 7 1 1 1 0 3 356 545000000: 7 6 0 5 5 0 0 10 1200 725000000: 3 0 5 0 6 1 0 6 2172 840000000: 8 2 3 2 0 4 0 12 1188 959000000: 3 0 1 2 2 0 0 13 272 1090000000: 0 0 0 0 0 0 0 0 0 1211000000: 35 4 11 5 11 8 0 0 21684 Total transition : 253 QCOM SCMI Generic Vendor protocol background: It was found that a lot of the vendor protocol used internally was for debug/internal development purposes that would either be super SoC specific or had to be disabled because of some features being fused out during production. This lead to a large number of vendor protocol numbers being quickly consumed and were never released either. Using a generic vendor protocol with functionality abstracted behind algorithm strings gave us the flexibility of allowing such functionality exist during initial development/debugging while still being able to expose functionality like memlat once they have matured enough. The param-ids are certainly expected to act as ABI for algorithms strings like MEMLAT. Thanks in advance for taking time to review the series. Changes in v5: - Combining vendor protocol and the client and moving it back into RFC mode. - Introduce target_freq attr flag and TRACK_REMOTE devfreq governor flag. - Add basic remote devfreq governor to give users data like transtat [Dmitry] - Drop the current design that relies on manual parsing of device tree data and move those into SoC specific structs - Add Glymur/Mahua/Hamoa/Purwa support in the same series. Changes in v4: - Splitting the series into vendor protocol and memlat client. - Also the move the memlat client implementation back to RFC due to multiple opens. - Use common xfer helper to avoid code duplication [Dmitry] - Update enum documentation without duplicate enum info [Dmitry] - Update the protol attributes doc with more information. [Cristian] Changes in v3: - Restructure the bindings to mimic IMX [Christian] - Add documentation for the qcom generic vendor protocol [Christian/Sudeep] - Pick up Rb tag and fixup/re-order elements of the vendor ops [Christian] - Follow naming convention and folder structure used by IMX - Add missing enum in the vendor protocol and fix documentation [Konrad] - Add missing enum in the scmi memlat driver and fix documentation [Konrad] - Add checks for max memory and monitor [Shivnandan] - Fix typo from START_TIMER -> STOP_TIMER [Shivnandan] - Make populate_physical_mask func to void [Shivnandan] - Remove unecessary zero set [Shivnandan] - Use __free(device node) in init_cpufreq-memfreqmap [Christian/Konrad] - Use sdev->dev.of_node directly [Christian] - use return dev_err_probe in multiple places [Christian] Changes in v2: - Drop container dvfs memlat container node. [Rob] - Move scmi-memlat.yaml to protocol level given that a lot of vendors might end up - using the same protocol number. [Rob] - Replace qcom,cpulist with the standard "cpus" property. [Rob] - Fix up compute-type/ipm-ceil required. [Rob] - Make driver changes to the accommodate bindings changes. [Rob] - Minor fixups in subjects/coverletter. - Minor style fixes in dts. Changes in v1: - Add missing bindings for the protocol. [Konrad/Dmitry] - Use alternate bindings. [Dmitry/Konrad] - Rebase on top of Cristian's "SCMI multiple vendor protocol support" series. [Cristian] - Add more documentation wherever possible. [Sudeep] - Replace pr_err/info with it's dev equivalents. - Mixed tabs and initialization cleanups in the memlat driver. [Konrad] - Commit message update for the memlat driver. [Dmitry] - Cleanups/Fixes suggested for the client driver. [Dmitry/Konrad/Cristian] - Use opp-tables instead of memfreq-tbl. [Dmitry/Konrad] - Detect physical cpu to deal with variants with reduced cpu count. - Add support for DDR_QOS mem_type. Sibi Sankar (8): firmware: arm_scmi: Add QCOM Generic Vendor Protocol documentation firmware: arm_scmi: vendors: Add QCOM SCMI Generic Extensions PM / devfreq: Add new target_freq attribute flag for governors PM / devfreq: Add new track_remote flag for governors PM / devfreq: Add a governor for tracking remote device frequencies PM / devfreq: Introduce the QCOM SCMI Memlat devfreq device arm64: dts: qcom: glymur: Enable LLCC/DDR/DDR_QOS dvfs arm64: dts: qcom: hamoa: Enable LLCC/DDR/DDR_QOS dvfs arch/arm64/boot/dts/qcom/glymur.dtsi | 42 ++ arch/arm64/boot/dts/qcom/hamoa.dtsi | 4 + drivers/devfreq/Kconfig | 21 + drivers/devfreq/Makefile | 2 + drivers/devfreq/devfreq.c | 9 + drivers/devfreq/governor_passive.c | 1 + drivers/devfreq/governor_performance.c | 1 + drivers/devfreq/governor_powersave.c | 1 + drivers/devfreq/governor_remote.c | 80 +++ drivers/devfreq/governor_simpleondemand.c | 1 + drivers/devfreq/governor_userspace.c | 1 + drivers/devfreq/hisi_uncore_freq.c | 1 + drivers/devfreq/scmi-qcom-memlat-cfg.h | 473 ++++++++++++++ drivers/devfreq/scmi-qcom-memlat-devfreq.c | 582 ++++++++++++++++++ drivers/devfreq/tegra30-devfreq.c | 3 +- drivers/firmware/arm_scmi/Kconfig | 1 + drivers/firmware/arm_scmi/Makefile | 1 + .../firmware/arm_scmi/vendors/qcom/Kconfig | 15 + .../firmware/arm_scmi/vendors/qcom/Makefile | 2 + .../arm_scmi/vendors/qcom/qcom-generic-ext.c | 135 ++++ .../arm_scmi/vendors/qcom/qcom_generic.rst | 211 +++++++ include/linux/devfreq-governor.h | 4 + include/linux/devfreq.h | 1 + include/linux/scmi_qcom_protocol.h | 37 ++ 24 files changed, 1628 insertions(+), 1 deletion(-) create mode 100644 drivers/devfreq/governor_remote.c create mode 100644 drivers/devfreq/scmi-qcom-memlat-cfg.h create mode 100644 drivers/devfreq/scmi-qcom-memlat-devfreq.c create mode 100644 drivers/firmware/arm_scmi/vendors/qcom/Kconfig create mode 100644 drivers/firmware/arm_scmi/vendors/qcom/Makefile create mode 100644 drivers/firmware/arm_scmi/vendors/qcom/qcom-generic-ext.c create mode 100644 drivers/firmware/arm_scmi/vendors/qcom/qcom_generic.rst create mode 100644 include/linux/scmi_qcom_protocol.h base-commit: 9d0d467c3572e93c5faa2e5906a8bbcd70b24efd -- 2.34.1