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 0C2A0283C9D for ; Tue, 11 Aug 2026 13:36:32 +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=1786455401; cv=none; b=hwVibFTnnr5pA8VV3PX5S4VweSgJvOOcg+xpricfpDe6vRkSbP6Kc1+KjB7nbRkYw5quikW6cuS8hRE9CuTgQcmkFT9tE5jqYraLR2CB5NSLXH2JNCZEZYCvd/HqsJ8LZlGfgECQOycgS0LEmE0QBv81oxg+jhh4PTAXDJxf3f8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786455401; c=relaxed/simple; bh=Q1SO6EtCR75JXe3JpYCv7OaNJuuMIm0WdKd+5Zw+RCM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=j3F9+xsjSIpwanEcmVoMFKDgEWkDe/+jRgMOz7PUOGd0RN5JeChBXXovFfwbY7DcQpsXsUOIdQwFkOE2zyby50Ja/JyLQN4pRtrylHXtHhjNsASyyTHlwM0LCKXOJ9JVpeX/7k3g+s6TfOTh2ZfSAloTlWZrNFVJk/XLpHlg89g= 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=U2gkZ9kT; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Tm9uzlnh; 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="U2gkZ9kT"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Tm9uzlnh" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67BDWtFF693942 for ; Tue, 11 Aug 2026 13:36:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tcHuExv7ntKhJgMZFmAB7i1tSGwudIpTtAVbjxinbE8=; b=U2gkZ9kT4fXXVfKB k6aUBJ5qg9PHk2L+Hg8bzEgMuFxRbvXBD75KVzXlwX0rCVxDKm4gwIs4BZS+CEqV nqCi259M9RdF2zdZCAcoSxUXcvIRYJuzM6dsaGgxF/SEzOxrqCOfjPTYaFeoKbfC UKc3RtwCKvfF/Iiy2Mt0ZbiiR+sMvngrUxkTiXwDwVWnIX+Ai8OfVd5vPsHJgUaf I70lZH80TiUtd0jSTdVhPVYiAtlEANm/KEoCQc3djJI7wxxoiJqSQ2wduRc9J9Yx CgRX1V/ptQIDhvZNOgnjHVvd2JTIJBIzCp+jDR4gfxVsiJv7pVSYACuglCDRTu4R VA9syw== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g049gr61m-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 11 Aug 2026 13:36:28 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2cec4226c70so58888965ad.1 for ; Tue, 11 Aug 2026 06:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786455388; x=1787060188; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tcHuExv7ntKhJgMZFmAB7i1tSGwudIpTtAVbjxinbE8=; b=Tm9uzlnhUiwp4UTrw9d1K3hBtDdABGc5qiYQxCl570F2cJjPF46JfVbwMvMtcExFhU iGEM5AT5IPY4Reup+q32RHHDuBpDGmfnF0QQfC/I2Y6WgLDIdFADTFkOMi2fdJ1OsM43 cBy6sTSNtsNLx9fK+gUUt+Y7z8mqNjTUvOT3Fp6bdb/YE92T4kHRdQP+2ds4Fq/rcRd7 JX7DyfduQyz3PopIirGOBTo+3FOJTCUkrXFKHeAT4KkLkPyTA8NSfwvJrgUMB6V9t6Sa gO8ayTCW0BB6EN4vGGdjFiTSe1+ClOwPVicDavAmnyzTqHmLnqBLar38bfDysXJSItH1 kCuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786455388; x=1787060188; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=tcHuExv7ntKhJgMZFmAB7i1tSGwudIpTtAVbjxinbE8=; b=bSUnCj4EnWW0uAfuyFSbuNn+8zSTUJuTkTqs7LFDj0EJ1hfePOtZlUZZgnfhBtQMw7 eZrFLxd6KtvZ+fLkako/KT177Xh7H64SaAN009BOe3MlKVnqmi2e602KbPjH4VQoUxNv P5dcagcl6kSDSD53vOy6Ki/Ws3eqo5v7bXTQOvQMjKgnj6fypP5TSvenajWgYdXzKP1W O6uYKcG6Yec3CvPKrsy51cF+JJgyzPqXvMNywdGVK5MHUUy9DxxUIr0t0iffWJ3EW/zb DrH17l8TjgQlLQz5bzcHFJcE3e3AgSCCVNpHvcEetTgJsqODhiv7eYZcznKsYtBM6t+0 Bstg== X-Forwarded-Encrypted: i=1; AHgh+RrAtgwn0x3rtRBBWr6te+ADFGEbk6NiB8Ff6i0TzGDM5Vkst6E7rlu/a1LzALqEVx4h7q3WK1XBJJrqlDY=@vger.kernel.org X-Gm-Message-State: AOJu0YxegxebRO48AmK9j/XE1Nubyvk/+gE/gPg/i1RHh99NLKCZUeLL /tj25+kw7Q9D4lMfTUv4Rlm9lWw8XLAf5Cnb9meXR7sRJWhW7trayeZOPIxJypPOOZnnVX6EfxD fr7Z9d/Jx/xlgVOBxpz011mjMra3j8gIx8gjJtckYJKw3Rp2YFIldBDidNNALdziHLm4= X-Gm-Gg: AR+sD121lGsNzEwA1T3RINGodETqzK22wbCc2Oh12EsdKzuqOZXxue5jLf7vJPEX98H HXyTRBZ6CtSfljwCGgJ1sS2eTT37WJRS2n4rCu/ogehCyMadacxIORzVilM9nv/i1lFLHFNpG+8 OAZ2W6MHoxEhCaPVlJ05X+Y6XEjnesebaErDXtcMcv+ORbPTP6f03z8joPQglZGZqLr5RUtNhTs 2NqKar8dGP/sSHwIlrRFfL3adC7/VyYzAYrdkilqnDpEc5Rekq1JWJZZkHRwpVuZ/l77ktOEVDi eCeEutDvBmjyV35C5cPOrkiFs3TRh2VNw0bJee4DLjUvWLUiG4zZ20uIeDKMUJEJBjcLQalhNEV urtunoCoM6JrcQQjMSRxcVy1b8HwDFKkdl9x1W0dzHohDYJKvjutq3MyZ X-Received: by 2002:a17:903:947:b0:2ca:d151:383a with SMTP id d9443c01a7336-2d32c0cc361mr7441135ad.20.1786455387789; Tue, 11 Aug 2026 06:36:27 -0700 (PDT) X-Received: by 2002:a17:903:947:b0:2ca:d151:383a with SMTP id d9443c01a7336-2d32c0cc361mr7366555ad.20.1786455343945; Tue, 11 Aug 2026 06:35:43 -0700 (PDT) Received: from yli42-gv.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d315f4819dsm8360885ad.37.2026.08.11.06.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 06:35:43 -0700 (PDT) From: Yin Li Date: Tue, 11 Aug 2026 21:30:30 +0800 Subject: [PATCH RFC 01/15] dt-bindings: arm: Add MPAM MSC binding Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260811-mpam-resctrl-dt-knp-support-v1-1-ea6397bead59@oss.qualcomm.com> References: <20260811-mpam-resctrl-dt-knp-support-v1-0-ea6397bead59@oss.qualcomm.com> In-Reply-To: <20260811-mpam-resctrl-dt-knp-support-v1-0-ea6397bead59@oss.qualcomm.com> To: "Rafael J. Wysocki" , Shanker Donthineni , Conor Dooley , Fenghua Yu , Krzysztof Kozlowski , Rob Herring , Reinette Chatre , Konrad Dybcio , James Morse , Ben Horgan , Bjorn Andersson , Danilo Krummrich , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, ganapatrao.kulkarni@oss.qualcomm.com, trilok.soni@oss.qualcomm.com, devicetree@vger.kernel.org, driver-core@lists.linux.dev, Srivathsa L Rao , Huang Yiwei , aiqun.yu@oss.qualcomm.com, linux-kernel@vger.kernel.org X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786455317; l=6447; i=yin.li@oss.qualcomm.com; s=20260811; h=from:subject:message-id; bh=Ow6nsjOKfT1BtZK/wCsIgEjpwtBp/p95hFXIvpOx3ZI=; b=EdSUjmcrYtIFf72Wox7OPHGBvrR9StE8yFfxh9fmh0idDUwcfqgLknc7J1AmdnjMfVXof7Ltl H5g9SbLwKLUDMzkG/puZnPQsXNTSXdUJ8eozCOIenLS2lVhPtG/cR70 X-Developer-Key: i=yin.li@oss.qualcomm.com; a=ed25519; pk=e/2LM97aSWGBMrxY240URBi9Zi8/kL5hXgB+VHkYvW0= X-Proofpoint-Spam-Info: AW1haW4tMjYwODExMDExMyBTYWx0ZWRfX6cQ3+m4fQsaq tHP/bTYqaBGrfuZ18Fs3oW/xS+KNgkmVhxv7iVupay2++3bwNjuMqoXpLfak4Bzb9cD5+ougDxk mskCdJLR0DetU1tI4ce41u6bp2O19a0= X-Proofpoint-ORIG-GUID: 5_D3h2zGG0TzAHzc4ogeQIsY5ic2bkU2 X-Proofpoint-GUID: 5_D3h2zGG0TzAHzc4ogeQIsY5ic2bkU2 X-Authority-Analysis: v=2.4 cv=cvarVV4i c=1 sm=1 tr=0 ts=6a7b255c cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=gEfo2CItAAAA:8 a=7CQSdrXTAAAA:8 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=FqHZ4tX-ONj_CKorFbsA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 a=sptkURWiP4Gy88Gu7hUp:22 a=a-qgeE7W1pNrGK8U0ZQC:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODExMDExMyBTYWx0ZWRfX3UnZPmdIW24a mx8Uf/ZwzTz67wma+9d52lZnOH176GdUN5pdl/xoYsZEJbvK8gX1uGziXaX8t36ie7WHRJCTK8L EahYf8pz5oO7HcSVZUBsqgGxagPci4WB2lBGSbEZ2p+AEjK4D4VX3i+C4gij3QY6Aya6/MtLp4b H1a8HG/o286hiXBczo54idLkCm8okDGnDV486/39iuHHZHFR0/3sZKFMrbwz0kq3lGnqQlS0FJa fsbU03Byrq+i9Zybvr00R5kpby2Fwqwg6Hg0mjDOVkA+rUZnRoZP3Lg8RpIVHqyi4CUhVGpKAes e7mXEx0b7tk03h6BDTFvykt36J7x+TnoMKMcrsEzR5Wq8yGS8nYIQnJaH+AFOdyZlMjun07X5ld tWnGeEozE9nZ8DYWq2gE0sRa226MIYRXPLT7mYQ8NYGnqV2IG44PD0tdMneHSo5soh8O1GfdLdm cwVweydMjiHc8o17LEw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-11_03,2026-08-10_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 impostorscore=0 adultscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608110113 From: Rob Herring The binding is designed around the assumption that an MSC will be a sub-block of something else such as a memory controller, cache controller, or IOMMU. However, it's certainly possible a design does not have that association or has a mixture of both, so the binding illustrates how we can support that with RIS child nodes. A key part of MPAM is we need to know about all of the MSCs in the system before it can be enabled. This drives the need for the genericish 'arm,mpam-msc' compatible. Though we can't assume an MSC is accessible until a h/w specific driver potentially enables the h/w. Cc: James Morse Signed-off-by: Rob Herring Signed-off-by: James Morse Signed-off-by: Yin Li --- .../devicetree/bindings/arm/arm,mpam-msc.yaml | 199 +++++++++++++++++++++ 1 file changed, 199 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/arm,mpam-msc.yaml b/Documentation/devicetree/bindings/arm/arm,mpam-msc.yaml new file mode 100644 index 000000000000..53a6fdbbf05f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/arm,mpam-msc.yaml @@ -0,0 +1,199 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/arm,mpam-msc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Arm Memory System Resource Partitioning and Monitoring (MPAM) + +description: | + The Arm MPAM specification can be found here: + + https://developer.arm.com/documentation/ddi0598/latest + +maintainers: + - Rob Herring + +properties: + compatible: + items: + - const: arm,mpam-msc # Further details are discoverable + - const: arm,mpam-memory-controller-msc + + reg: + maxItems: 1 + description: A memory region containing registers as defined in the MPAM + specification. + + interrupts: + minItems: 1 + items: + - description: error (optional) + - description: overflow (optional, only for monitoring) + + interrupt-names: + oneOf: + - items: + - enum: [ error, overflow ] + - items: + - const: error + - const: overflow + + arm,not-ready-us: + description: The maximum time in microseconds for monitoring data to be + accurate after a settings change. For more information, see the + Not-Ready (NRDY) bit description in the MPAM specification. + + numa-node-id: true # see NUMA binding + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + '^ris@[0-9a-f]+$': + type: object + additionalProperties: false + description: + RIS nodes for each resource instance in an MSC. These nodes are required + for each resource instance implementing known MPAM controls + + properties: + compatible: + enum: + - arm,mpam-cache + # Memory bandwidth + - arm,mpam-memory + + reg: + minimum: 0 + maximum: 0xf + + cpus: + description: + Phandle(s) to the CPU node(s) this RIS belongs to. By default, the parent + device's affinity is used. + + arm,mpam-device: + $ref: /schemas/types.yaml#/definitions/phandle + description: + By default, the MPAM enabled device associated with a RIS is the MSC's + parent node. It is possible for each RIS to be associated with different + devices in which case 'arm,mpam-device' should be used. + + required: + - compatible + - reg + +required: + - compatible + - reg + +dependencies: + interrupts: [ interrupt-names ] + +additionalProperties: false + +examples: + - | + L3: cache-controller@30000000 { + compatible = "arm,dsu-l3-cache", "cache"; + cache-level = <3>; + cache-unified; + + ranges = <0x0 0x30000000 0x800000>; + #address-cells = <1>; + #size-cells = <1>; + + msc@10000 { + compatible = "arm,mpam-msc"; + + reg = <0x10000 0x2000>; + interrupts = <1>, <2>; + interrupt-names = "error", "overflow"; + arm,not-ready-us = <1>; + /* CPU affinity implied by parent cache node */ + }; + }; + + mem: memory-controller@20000 { + compatible = "foo,a-memory-controller"; + reg = <0x20000 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + ranges; + + msc@21000 { + compatible = "arm,mpam-memory-controller-msc", "arm,mpam-msc"; + reg = <0x21000 0x1000>; + interrupts = <3>; + interrupt-names = "error"; + arm,not-ready-us = <1>; + numa-node-id = <1>; + }; + }; + + iommu@40000 { + reg = <0x40000 0x1000>; + + ranges; + #address-cells = <1>; + #size-cells = <1>; + + msc@41000 { + compatible = "arm,mpam-msc"; + reg = <0 0x1000>; + interrupts = <5>, <6>; + interrupt-names = "error", "overflow"; + arm,not-ready-us = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + ris@2 { + compatible = "arm,mpam-cache"; + reg = <0>; + // TODO: How to map to device(s)? + }; + }; + }; + + msc@80000 { + compatible = "foo,a-standalone-msc"; + reg = <0x80000 0x1000>; + + clocks = <&clks 123>; + + ranges; + #address-cells = <1>; + #size-cells = <1>; + + msc@10000 { + compatible = "arm,mpam-msc"; + + reg = <0x10000 0x2000>; + interrupts = <7>; + interrupt-names = "overflow"; + arm,not-ready-us = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + ris@0 { + compatible = "arm,mpam-cache"; + reg = <0>; + arm,mpam-device = <&L2_0>; + }; + + ris@1 { + compatible = "arm,mpam-memory"; + reg = <1>; + arm,mpam-device = <&mem>; + }; + }; + }; + +... -- 2.34.1