From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796291895; b=iyuqkilijLM6AO/oDfnQZHDKtTKLoA2hMggZvUZ6rQhntLeobTvw2IWrRssZSxTbe13J 2DoAlO/Psct4vMvBh6M33gMKGhomAjxwf2ns/nK3H3+hbgUeEAsLFNQa9zrzl23whsP7p 1kGHXbS92NIdgnnCkppuUquoTAvrf7jJtbagbwLxYsm3Cwle267WxGIfa90hcoGC+ZJxd mlS7hKtI9wk5ap4rb5J6N4vC7bzhsQyf+JvFlWGlhhfX5fZPKNEx3xf/GHYaf5dg2JDSg TyBEtTCtVQi2dOxwloFcPLyY3gsRdt8Qk5GlPs/P5PoHXNUDfpalR3lnxDmzlJ8aq6A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796291895; h=Received:DKIM-Signature:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key; bh=GwKej1T3BOoQPomvPN4YWkh5UASqK9UKMcPoRc5lP9Q=; b=CbnQdVvsY+JiWYYrhWsFQmOQFhoZ+HhTTtxtW4d3mWb6z4uQM6KJ6hnZU/I9xDGkDzDr uaAKQmG5Fq6hJH9NzQb2Bk+Jv0lf/eiEIgK9ifSq3VVGQWVcIUQLPgrCGlhepG+hA9FYC SAtjhC+5nUY+Z9hcErZrxrNXttiBnB0x4huUBMswcojYwCWJpIFOXZ6TzUt820DR9rvIA bScim3u2ipZi6DjDbb6nM/ev4P+6DFxbMkxffkgeQ5tOgtaJx8sBU41OKrSalALvCOXbi MgKndTT8r6OyT9Jxtu1PYCPs6BA+hPHyyM1EwRsrhv2L4wbY78B4CVO3dyuPh3kAKig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TV2Exj0O; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 308FF606A6A1; Thu, 3 Dec 2026 09:58:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TV2Exj0O Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B62E1F00925; Thu, 3 Dec 2026 09:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796291894; bh=GwKej1T3BOoQPomvPN4YWkh5UASqK9UKMcPoRc5lP9Q=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=TV2Exj0OWycWEcTRWZMOVZXtvl1uz4RYb2Fz84girIe0aw4V1uX4QYfZug15jKLjZ y3xunmaqha+m6vcMpOPSwJFqVnyF7e+StLvCZAu03nFy+MxOQuoaMVSyqlfDEOYsAZ mG8DipiyAHzRT7GbISghUq41hCKyKa4GPXm1H9OIt0/hzRIsv9wh+6aVRQXd1X3r31 XVlH+dWdTXWUo5b+zH6idcB0l9VN4YSf8yvga1x7z8Duxf3MCfFQj8nUTr/boXGdpP hGV4ErMuajByVSWWAR1beo2DiF7FIFxXPR5U7hOy86RXxqYVJlC0ONO2fcHQuwf2XJ OY2ok5KiHtO+Q== From: Drew Fustini Date: Thu, 03 Dec 2026 01:57:05 -0800 Subject: [PATCH v13 4/5] dt-bindings: riscv: Add binding for CBQRI controllers X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261203-dfustini-atl-sc-cbqri-dt-v13-4-eaa688b1624c@kernel.org> References: <20261203-dfustini-atl-sc-cbqri-dt-v13-0-eaa688b1624c@kernel.org> In-Reply-To: <20261203-dfustini-atl-sc-cbqri-dt-v13-0-eaa688b1624c@kernel.org> To: Adrien Ricciardi , Alexandre Ghiti , Albert Ou , Atish Patra , Babu Moger , Ben Horgan , Borislav Petkov , Chen Pei , Conor Dooley , Conor Dooley , Dave Hansen , Dave Martin , Fenghua Yu , Gong Shuai , Gong Shuai , guo.wenjia23@zte.com.cn, James Morse , =?utf-8?q?Kornel_Dul=C4=99ba?= , Krzysztof Kozlowski , liu.qingtao2@zte.com.cn, Liu Zhiwei , Palmer Dabbelt , Paul Walmsley , Peter Newman , =?utf-8?q?Radim_Kr=C4=8Dm=C3=A1=C5=99?= , Reinette Chatre , Rob Herring , Samuel Holland , Sunil V L , Tony Luck , Weiwei Li , yunhui cui , Zhanpeng Zhang , Drew Fustini Cc: Catalin Marinas , Jonathan Cameron , Shaopeng Tan , Zeng Heng , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, x86@kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=4819; i=fustini@kernel.org; h=from:subject:message-id; bh=sKXr4EexR1L1i1sCn1FNTJvR16635O+nA1JRFhfXrew=; b=owGbwMvMwCV2+43O4ZsaG3kYT6slMWQL2hprnlDdMm1r56tWo8tcIosCF75+s2gJg8y33kdZQ k62uTv/dZSyMIhxMciKKbJs+pB3YYlX6NcF819sg5nDygQyhIGLUwAmcjie4X/SrlV27z6JMloV OpWwnbAUNV0amBB98mX5oV0cOwMSLNsZ/llYqYSXzfD5H1tVXXTWnMHtz+/GgxapVzpfV/xZslT 4Ih8A X-Developer-Key: i=fustini@kernel.org; a=openpgp; fpr=1B6F948213EA489734F3997035D5CD577C1E6010 Document the device tree binding for RISC-V CBQRI capacity and bandwidth controllers. Each controller is named by a device-specific compatible followed by the generic compatible. The binding also describes the common riscv,cbqri-rcid and riscv,cbqri-mcid properties, and the riscv,cbqri-cache phandle, required for capacity controllers, that links a capacity controller to the cache whose capacity it allocates. Reviewed-by: Conor Dooley Reviewed-by: Zeng Heng Co-developed-by: Adrien Ricciardi Signed-off-by: Adrien Ricciardi Signed-off-by: Drew Fustini --- .../devicetree/bindings/riscv/riscv,cbqri.yaml | 98 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 99 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/riscv,cbqri.yaml b/Documentation/devicetree/bindings/riscv/riscv,cbqri.yaml new file mode 100644 index 000000000000..160b0bc797b1 --- /dev/null +++ b/Documentation/devicetree/bindings/riscv/riscv,cbqri.yaml @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/riscv/riscv,cbqri.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RISC-V Capacity and Bandwidth QoS Register Interface (CBQRI) controller + +description: | + The RISC-V CBQRI specification defines capacity-controller and + bandwidth-controller register blocks that allocate cache capacity and memory + bandwidth to resource-control IDs (RCIDs) and monitor usage per + monitoring-counter ID (MCID): + https://github.com/riscv-non-isa/riscv-cbqri/blob/main/riscv-cbqri.pdf + + Allocation and monitoring share one register block, and a controller may + implement either or both. A driver discovers which at runtime from the + capabilities register, so the compatible names only the controller type. It + does not distinguish allocation-only, monitoring-only or combined + controllers, and no property declares monitoring support. + +maintainers: + - Drew Fustini + +properties: + compatible: + oneOf: + - items: + - enum: + - tenstorrent,ascalon-shared-cache-controller + - const: riscv,cbqri-capacity-controller + - items: + - not: {} + description: Needs a vendor-specific compatible + - const: riscv,cbqri-bandwidth-controller + + reg: + maxItems: 1 + description: + The CBQRI controller register block. + + riscv,cbqri-rcid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The maximum number of RCIDs the controller supports. RCIDs are the + resource-control IDs that allocation operations target. + + riscv,cbqri-mcid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The maximum number of MCIDs the controller supports. MCIDs are the + monitoring-counter IDs that usage-monitoring operations target. Present + on controllers that implement monitoring. + + riscv,cbqri-cache: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the cache node whose capacity this controller allocates. + Applies to capacity controllers that back a CPU cache. The cache level + and the harts sharing it are taken from that node's cache topology. + +required: + - compatible + - reg + +allOf: + - if: + properties: + compatible: + contains: + const: riscv,cbqri-capacity-controller + then: + required: + - riscv,cbqri-rcid + - riscv,cbqri-cache + +additionalProperties: false + +examples: + - | + l2_cache: l2-cache { + compatible = "cache"; + cache-level = <2>; + cache-unified; + cache-size = <0xc00000>; + cache-sets = <8192>; + cache-block-size = <64>; + }; + + qos-controller@a21a00c0 { + compatible = "tenstorrent,ascalon-shared-cache-controller", + "riscv,cbqri-capacity-controller"; + reg = <0xa21a00c0 0xf40>; + riscv,cbqri-rcid = <16>; + riscv,cbqri-cache = <&l2_cache>; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 1ba75a57c77b..636835e313ee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24137,6 +24137,7 @@ M: Drew Fustini R: yunhui cui L: linux-riscv@lists.infradead.org S: Supported +F: Documentation/devicetree/bindings/riscv/riscv,cbqri.yaml F: arch/riscv/include/asm/qos.h F: arch/riscv/include/asm/resctrl.h F: arch/riscv/kernel/qos.c -- 2.43.0