From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 01FB12FE59B for ; Thu, 7 May 2026 06:22:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778134974; cv=none; b=VRw6PubLY7jytxzlIrUWuhKZ/m4cLMKbhrwePB2sKX49f5oF6nIUKrDeSI5h2jGlGSW7yB6LSSL3eOu7hLslzd5T6tg+yCbazHpRxfih7bWkBE9cYCW2U67iMgy2l4AEOwqpEMo84U3A849ijhi2QcIhe2w2HxPo6qwPQ2zh1OI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778134974; c=relaxed/simple; bh=erpl9bcOmBPzIvZaPl4rPg0Qghz9qPJsoV1ZQ1A1fWg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=H2PHIgI75lSP0ErcqdNDUqbLUp2WwAY8aN/woZ5h3eVXEYR8/w68XL9udXKzF2Hahk8D5FXZZJSuQ/7ovyl85JAeu04kO2UUTz1MSbP6ShfPSBTuXOwrQCaxpHaXRVUjflf5s+kFrs/zWLEcUwpEHUa8ssvpM57gDMZCr/IypOw= 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.168.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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6472C3Wn259326 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-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e0hr8rqcs-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-f197.google.com with SMTP id d2e1a72fcca58-82fa1c94b37so1392250b3a.0 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=rexWFSdaK5zjdfgJl5HIhrSP8BcyChML3ip6eDD6YqUHFgU1JXB9cvY65lZpSugcNj h4frD5H7Lo6g9abgCZOt/CBK18X45zA8pQbYAEeihyWCkZyUfQkVj1kJeddnOoBZn6TG wly1l32fLeH7PSVSBSbwbnRSgvqUvsEbdktJVF3B+XQgYa9ietKtNf0DEEIDiUjmscIO zZ9SAHkIzcrTOam5IVVSj/A9nFxy4SQQiZj0ofXpNOWaYQazjU0Rpv/Opg1/F2dw7MUx jxX+g7Zu9zliXW2Cq2EbW1Vt19riRgeH2rffms91Y82KUVuhuu83zpfw56NN3PSpqoc9 BScw== X-Forwarded-Encrypted: i=1; AFNElJ9mE+8n9jsYSLQZIlPgYk0L/gCB3+M5vBuME1ypLXy5IiQKzV0Jm49SCNYKBfg7mq/lIZzwIMt4caBy0hk=@vger.kernel.org X-Gm-Message-State: AOJu0YzqLVO22xqlDoRhrN2bgewYHFoS/mr3DqNUQei+2rnjA3sejESX KtITdZQjdv8yZJMAUl1HieqpwrPGjawG7+7uIJJWi5pSLOehhH5UTa4sH60acCyM94oO3lUAmFH hK+PNRASwsTyltn0o+dSdaSJ9L5gWDynGUz5eUh0hYhoReRr0VSxt5doGY26TzgFEp6M= X-Gm-Gg: AeBDietu2ZdhCDz1l+8qY6oj02pBwO//tANGoNF5SEj81eZMyqPQGU4ni3q5DKbVEzj BCe6UXk3A5qg0JiMeXRz6/sQZhV9sMoLS54caUJHgN7zV3nvWh1bPctO+LUVsVGSKyJdemxl8/L GX4dEXotVMOnPIWDJMGgLQSgu3yws84fXh3ar73i9ZfQEe22JPClO8vtppLsZc3qVeDGf0jdGvG iy7IoNhhdlpTVgMqnBghxdO7gUJ4ezdsLPrcZ4yTXS44EQfBgPMcnmbz2mH8VgGQMmyz2eB62Rt VqKEEBl6eqCH25ZQ33C/F63b0SgTKPymU0y31wruIwtRTmIRMfIh5wcrkvqfJHhnO9QsLS/Dkmc Fj6iU6lJmp27DW69M7foQEcvtDo5jOpFuW07L/khimlZkmpIN5IMED97ITLKI62z/6inj1tKVyj v+8yvXKyIY8tcNdJX4QfJ9dwVD4CgpxklMeSGljTdAf976FrqbtZap2rxuUA== X-Received: by 2002:a05:6a00:2986:b0:82c:9c90:6ea0 with SMTP id d2e1a72fcca58-83bb630704bmr1396468b3a.3.1778134971544; 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: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: aAIWPN6IZJPpK31pKM2T4LCsx_VrnTog X-Authority-Analysis: v=2.4 cv=caHiaHDM c=1 sm=1 tr=0 ts=69fc2fbc cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=bK4GZpSpkxiEjqyRu_sA:9 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-GUID: aAIWPN6IZJPpK31pKM2T4LCsx_VrnTog X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA3MDA2MCBTYWx0ZWRfXwXLZpfil5lAQ ZqZlNHl+YXXZWvxQAttQJA81QFSwkzllRLShRY2k1k8DSxaYunQFxMMcUqGcJJ0wDpOiyoUcNpQ 9jLP/50PQcnnZw1x7xHzv3ATavLtRg/JWtxOVIeULaznp8w4ImvvT9/KwNtztwhLWcM56t6IdgW 3lSevLceDAgpvlVN2HuFp9HumDloK8AMH8+gJBgExgY+1H0YPUUv3rgCilqYwTjrFGMp3vtpNu+ ElMzgya9o75YdXW1jNFnIX0e2yY2a9IgmxpGR5KCCkOd0yNm5RMvEyUhuZoycQzIsrdySuJEwXc dCyte94CnnitKq9zHJdX58htkXCw6mLanQTxdqiqvW4X6au5GySUFiM5xAUACriM8YaW63107x6 d/OsYzE6cDyHDreyrk/DqkaZ7hyC1+Vp4An/CbnatxGZkHfMlSMy5Am6nZSXe2tuKGilMjM112V CjvJvlWd4DIvTQH0Auw== 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 malwarescore=0 clxscore=1015 suspectscore=0 bulkscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 phishscore=0 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