Message ID | 20240226172218.69486-2-quic_c_gdjako@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-82053-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2222048dyb; Mon, 26 Feb 2024 09:26:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+B4C61R+gxK9hya5ByRPARKB2OLDpmmLFGB/3EXhgSv7XgBAFThg1Ma5zpAO+PORcalpMpBtsTj/4dJSyigYm+Pig1g== X-Google-Smtp-Source: AGHT+IEeA9ccj0MdBZij9WEj1ywBszoIBtr4auo5VCkMkRCMDSnxhQ83hexUmQDuTQntsGNyeRp0 X-Received: by 2002:a17:903:26c9:b0:1db:55cc:d226 with SMTP id jg9-20020a17090326c900b001db55ccd226mr5986331plb.66.1708968391138; Mon, 26 Feb 2024 09:26:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708968391; cv=pass; d=google.com; s=arc-20160816; b=O1NQ4/haCq3PD5oaAhrPH9yO5Gh0GQgU8dg3o2e03+AHqBpvbLVCLd2S3o1qUIpki3 dczCB2u8p1Xm0WYGJEDJvW0pwb9nTfq2HBliXX42aVtoMGZJpm6OPPSeN17aHr80PcEy CwHxFZN3M83tb2TErQlfhourO7nGQGhR/65+i64PuvVRWfhqXIYgMWgiOvz7bE/Rf4hB GiUD5u9YI+xI+J9o8OZ7DTTEn+PU0XCrQjbu8rls3FncDZjXn3HtPLmkVQbbQCIE8zJW 0j1UnGsYqWkf5S07fiW0D1lNoZrkhbolN/AvJAcX65wHBOMIhlBvW6zHc7MIn8hWNVve kSxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=IZByAaaeVj1XjREUyDsvcmk4MOJ2bjkDHKZeq+giCnE=; fh=vaF/4wCcB8716OmkqYdm1mjnH1bqK2s/Tq/szIv64gg=; b=d5T0Lwp7nruYbmQrF0+Ci2MI1ij5HUgEksmnP/8f4B0wdx8oOMSz05t8lh499L/G/9 94DvDrNHtlXvxqKNisa4gAzDV6KuSwO8xMttudTFy9IW0XHWnrVcI+KRezQUUGrqg2YY ZqTCddsVCx+P0WoMgRxsliCUJMDvYklflU69YDvSq+ikHcO0RE9By0IaC4zIvhZ7+AUd u1u3ufPeUUyNTLU1YCMspW57mo9bQpVbQN+En3ZG+pJzLWgCFEH7a3cRX3syP8DIadQJ bqMv9T+ni7dFZa7EOrIn+KuO0OPBoSC3x/GyfbXKjzGw2lgxKRxco114Nay0BN776n6/ NrZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S+x7vylU; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-82053-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82053-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c4-20020a170902724400b001dca87344b8si1435671pll.597.2024.02.26.09.26.31 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 09:26:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82053-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S+x7vylU; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-82053-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82053-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1D25C292D23 for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 17:25:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E18EA13246C; Mon, 26 Feb 2024 17:23:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="S+x7vylU" 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 507D7130E4E; Mon, 26 Feb 2024 17:22:57 +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=1708968178; cv=none; b=q/yj/VoZYvIqD+ScZoubvYqemPyqwmcUPnPJZSLdpMKSj667eG0hkIeLOpAVBYCpsfdoFtqyWJ2e3DXSP1bpHCYZsIYA6Cfa/UCcXdgFFpv+KbxGvqGo0I2yqNirDN6yZna4xzfpJO/qdqhHzbrW2pg0ioJYgaPYJPuJLFckuvc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708968178; c=relaxed/simple; bh=OSQZOg4C5cUA/203TuHkAoX1Budypr/wre25wNXEejI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IjFhR2xIgqNVg+SP896gY5PuwJQWF/X4IlLCmzB37vBsKhwFbgCvp+/l1zRcjloPs+aPFs/jPZCpWLNubDp8GgavCx+hHyXEe6JRZFYMje4L6DDIqYVxEtHV00kKe4JeQ+6BaQfW0Wg/frcIct8KNoTJ6coY2y3Ch8HWKA6WxCg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=S+x7vylU; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41QF9YDN002486; Mon, 26 Feb 2024 17:22:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=IZByAaaeVj1XjREUyDsvcmk4MOJ2bjkDHKZeq+giCnE=; b=S+ x7vylUgVmTJ3bbjb0MZ85000MYS4OCGTntLLt2y9gKKcZKuhOSHt2OyVt8G4+RhR nbFWg8QSEV7FB2IeyN/5FnSLqI3CW+NFznHkYN3CUzweBo5/7V1If2CJ8vfwpiPg EVopgCuFOh5Bl22101WdWy4hw/MIFHESFg8hPOVlAvdoV9vlMuWrgDoYPVEtHzHY PZDWOcSfhSu0/xs5kSc52zevcNgItNVI0q8LAkJajztaWueZ/BD+WJXZIxJiW2aU vE/Q+73Wyj0wE+IEpuiaotboMH2mCRDRXy5bViKUk4jQBqtbOKNoq28cFlSCbJld 2I5SeFHvI5f3HAY0eEyA== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wgkxn1jqw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 17:22:34 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41QHMX1Y001114 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 17:22:33 GMT Received: from hu-c-gdjako-lv.qualcomm.com (10.49.16.6) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Mon, 26 Feb 2024 09:22:32 -0800 From: Georgi Djakov <quic_c_gdjako@quicinc.com> To: <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <will@kernel.org>, <robin.murphy@arm.com>, <joro@8bytes.org>, <iommu@lists.linux.dev> CC: <devicetree@vger.kernel.org>, <andersson@kernel.org>, <konrad.dybcio@linaro.org>, <robdclark@gmail.com>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>, <quic_cgoldswo@quicinc.com>, <quic_sukadev@quicinc.com>, <quic_pdaly@quicinc.com>, <quic_sudaraja@quicinc.com>, <djakov@kernel.org> Subject: [PATCH v5 1/7] dt-bindings: iommu: Add Qualcomm TBU bindings Date: Mon, 26 Feb 2024 09:22:12 -0800 Message-ID: <20240226172218.69486-2-quic_c_gdjako@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240226172218.69486-1-quic_c_gdjako@quicinc.com> References: <20240226172218.69486-1-quic_c_gdjako@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 6UiUYkcIYO3ZK_vb1dupmEy3OEp4-Gdu X-Proofpoint-GUID: 6UiUYkcIYO3ZK_vb1dupmEy3OEp4-Gdu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-26_11,2024-02-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402260132 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791983239518537332 X-GMAIL-MSGID: 1791983239518537332 |
Series |
Add support for Translation Buffer Units
|
|
Commit Message
Georgi Djakov
Feb. 26, 2024, 5:22 p.m. UTC
The "apps_smmu" on the Qualcomm sdm845 platform is an implementation
of the SMMU-500, that consists of a single TCU (Translation Control
Unit) and multiple TBUs (Translation Buffer Units). These TBUs have
hardware debugging features that are specific and only present on
Qualcomm hardware. Represent them as independent DT nodes. List all
the resources that are needed to operate them (such as registers,
clocks, power domains and interconnects).
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
---
.../devicetree/bindings/iommu/qcom,tbu.yaml | 65 +++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iommu/qcom,tbu.yaml
Comments
On 26/02/2024 18:22, Georgi Djakov wrote: > The "apps_smmu" on the Qualcomm sdm845 platform is an implementation > of the SMMU-500, that consists of a single TCU (Translation Control > Unit) and multiple TBUs (Translation Buffer Units). These TBUs have > hardware debugging features that are specific and only present on > Qualcomm hardware. Represent them as independent DT nodes. List all > the resources that are needed to operate them (such as registers, > clocks, power domains and interconnects). > > Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com> > --- > .../devicetree/bindings/iommu/qcom,tbu.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iommu/qcom,tbu.yaml > > diff --git a/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml b/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml > new file mode 100644 > index 000000000000..6841ca9af21f > --- /dev/null > +++ b/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml > @@ -0,0 +1,65 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iommu/qcom,tbu.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm TBU (Translation Buffer Unit) > + > +maintainers: > + - Georgi Djakov <quic_c_gdjako@quicinc.com> > + > +description: > + The Qualcomm SMMU500 implementation consists of TCU and TBU. The TBU contains > + a Translation Lookaside Buffer (TLB) that caches page tables. TBUs provides > + debug features to trace and trigger debug transactions. There are multiple TBU > + instances with each client core. > + > +properties: > + compatible: > + const: qcom,qsmmuv500-tbu Why we don't have SoC specific compatibles? If that's for SDM845, then it should be qcom,sdm845-tbu or qcom,sdm845-qsmmuv500-tbu > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + interconnects: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + qcom,stream-id-range: > + description: Phandle of a SMMU device and Stream ID range (address and size) that is assigned by the TBU Please wrap it according to coding style, so 80. > + $ref: /schemas/types.yaml#/definitions/phandle-array > + items: > + - items: > + - description: phandle of a smmu node > + - description: stream id base address > + - description: stream id size > + > +required: > + - compatible > + - reg > + - qcom,stream-id-range > + > +unevaluatedProperties: false This should be additionalProperties: false > + > +examples: Best regards, Krzysztof
On 26/02/2024 18:22, Georgi Djakov wrote: > The "apps_smmu" on the Qualcomm sdm845 platform is an implementation > of the SMMU-500, that consists of a single TCU (Translation Control > Unit) and multiple TBUs (Translation Buffer Units). These TBUs have > hardware debugging features that are specific and only present on > Qualcomm hardware. Represent them as independent DT nodes. List all > the resources that are needed to operate them (such as registers, > clocks, power domains and interconnects). > > Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com> > --- > .../devicetree/bindings/iommu/qcom,tbu.yaml | 65 +++++++++++++++++++ > 1 file changed, 65 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iommu/qcom,tbu.yaml Heh, I wonder how did you solve Robin's comments. I don't see you responding to Robin. Just v5 sent... Best regards, Krzysztof
On 26/02/2024 18:22, Georgi Djakov wrote: > The "apps_smmu" on the Qualcomm sdm845 platform is an implementation > of the SMMU-500, that consists of a single TCU (Translation Control > Unit) and multiple TBUs (Translation Buffer Units). These TBUs have > hardware debugging features that are specific and only present on > Qualcomm hardware. Represent them as independent DT nodes. List all > the resources that are needed to operate them (such as registers, > clocks, power domains and interconnects). > > Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com> Also one more nit, since I expect new version: A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also: https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 Best regards, Krzysztof
Hi Krzysztof, On 29.02.24 19:53, Krzysztof Kozlowski wrote: > On 26/02/2024 18:22, Georgi Djakov wrote: >> The "apps_smmu" on the Qualcomm sdm845 platform is an implementation >> of the SMMU-500, that consists of a single TCU (Translation Control >> Unit) and multiple TBUs (Translation Buffer Units). These TBUs have >> hardware debugging features that are specific and only present on >> Qualcomm hardware. Represent them as independent DT nodes. List all >> the resources that are needed to operate them (such as registers, >> clocks, power domains and interconnects). >> >> Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com> >> --- >> .../devicetree/bindings/iommu/qcom,tbu.yaml | 65 +++++++++++++++++++ >> 1 file changed, 65 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,tbu.yaml >> >> diff --git a/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml b/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml >> new file mode 100644 >> index 000000000000..6841ca9af21f >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml >> @@ -0,0 +1,65 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/iommu/qcom,tbu.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Qualcomm TBU (Translation Buffer Unit) >> + >> +maintainers: >> + - Georgi Djakov <quic_c_gdjako@quicinc.com> >> + >> +description: >> + The Qualcomm SMMU500 implementation consists of TCU and TBU. The TBU contains >> + a Translation Lookaside Buffer (TLB) that caches page tables. TBUs provides >> + debug features to trace and trigger debug transactions. There are multiple TBU >> + instances with each client core. >> + >> +properties: >> + compatible: >> + const: qcom,qsmmuv500-tbu > > Why we don't have SoC specific compatibles? If that's for SDM845, then > it should be qcom,sdm845-tbu or qcom,sdm845-qsmmuv500-tbu > Because they should be all compatible (as registers). Adding a SoC compatible might get overly-specific, but i can also see the benefits in that, so ok will do it! > >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 1 >> + >> + interconnects: >> + maxItems: 1 >> + >> + power-domains: >> + maxItems: 1 >> + >> + qcom,stream-id-range: >> + description: Phandle of a SMMU device and Stream ID range (address and size) that is assigned by the TBU > > Please wrap it according to coding style, so 80. > Sure, thanks! >> + $ref: /schemas/types.yaml#/definitions/phandle-array >> + items: >> + - items: >> + - description: phandle of a smmu node >> + - description: stream id base address >> + - description: stream id size >> + >> +required: >> + - compatible >> + - reg >> + - qcom,stream-id-range >> + >> +unevaluatedProperties: false > > This should be additionalProperties: false > Ok right, thanks for taking a look! BR, Georgi
Hi Krzysztof, On 29.02.24 19:59, Krzysztof Kozlowski wrote: > On 26/02/2024 18:22, Georgi Djakov wrote: >> The "apps_smmu" on the Qualcomm sdm845 platform is an implementation >> of the SMMU-500, that consists of a single TCU (Translation Control >> Unit) and multiple TBUs (Translation Buffer Units). These TBUs have >> hardware debugging features that are specific and only present on >> Qualcomm hardware. Represent them as independent DT nodes. List all >> the resources that are needed to operate them (such as registers, >> clocks, power domains and interconnects). >> >> Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com> >> --- >> .../devicetree/bindings/iommu/qcom,tbu.yaml | 65 +++++++++++++++++++ >> 1 file changed, 65 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/iommu/qcom,tbu.yaml > > Heh, I wonder how did you solve Robin's comments. I don't see you > responding to Robin. Just v5 sent... Yeah, i didn't respond because his response was clear to me. He responded to the fundamental question whether to model the TBUs as child DT nodes of the SMMU or as standalone nodes. So in the first versions of this patchset we tried to explore the path with "child" nodes and search if there are any other implementation than the Qualcomm one and try to find some common binding... and Robin's objection was exactly to that. It seems that adding more functionalities in TBUs (which requires resource management) is only a Qualcomm thing and common binding does not make sense, so now we are going with standalone DT nodes as he suggested. Thanks, Georgi
On Thu, Feb 29, 2024 at 10:09:34PM +0200, Georgi Djakov wrote: > Hi Krzysztof, > > On 29.02.24 19:53, Krzysztof Kozlowski wrote: > >On 26/02/2024 18:22, Georgi Djakov wrote: > >>+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >>+%YAML 1.2 > >>+--- > >>+$id: http://devicetree.org/schemas/iommu/qcom,tbu.yaml# > >>+$schema: http://devicetree.org/meta-schemas/core.yaml# > >>+ > >>+title: Qualcomm TBU (Translation Buffer Unit) > >>+ > >>+maintainers: > >>+ - Georgi Djakov <quic_c_gdjako@quicinc.com> > >>+ > >>+description: > >>+ The Qualcomm SMMU500 implementation consists of TCU and TBU. The TBU contains > >>+ a Translation Lookaside Buffer (TLB) that caches page tables. TBUs provides > >>+ debug features to trace and trigger debug transactions. There are multiple TBU > >>+ instances with each client core. > >>+ > >>+properties: > >>+ compatible: > >>+ const: qcom,qsmmuv500-tbu > > > >Why we don't have SoC specific compatibles? If that's for SDM845, then > >it should be qcom,sdm845-tbu or qcom,sdm845-qsmmuv500-tbu > > > > Because they should be all compatible (as registers). Adding a SoC compatible > might get overly-specific, but i can also see the benefits in that, so ok will > do it! > Hi Krzysztof, JFYI that the TBUs are used on our mobile SoCs going up until the SoC we commercialized in early 2022, Snapdragon 8 Gen 1. Including SDM845 there are three more premium tier SoCs using TBUs plus all of their value-tier derivatives. There will also be prior generation premium tier SoCs along with their derivatives that use the TBU as well. Does it make sense to have a target-specific compatible string given this? Thanks, Chris.
On 29/02/2024 23:24, Chris Goldsworthy wrote: > On Thu, Feb 29, 2024 at 10:09:34PM +0200, Georgi Djakov wrote: >> Hi Krzysztof, >> >> On 29.02.24 19:53, Krzysztof Kozlowski wrote: >>> On 26/02/2024 18:22, Georgi Djakov wrote: >>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/iommu/qcom,tbu.yaml# >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: Qualcomm TBU (Translation Buffer Unit) >>>> + >>>> +maintainers: >>>> + - Georgi Djakov <quic_c_gdjako@quicinc.com> >>>> + >>>> +description: >>>> + The Qualcomm SMMU500 implementation consists of TCU and TBU. The TBU contains >>>> + a Translation Lookaside Buffer (TLB) that caches page tables. TBUs provides >>>> + debug features to trace and trigger debug transactions. There are multiple TBU >>>> + instances with each client core. >>>> + >>>> +properties: >>>> + compatible: >>>> + const: qcom,qsmmuv500-tbu >>> >>> Why we don't have SoC specific compatibles? If that's for SDM845, then >>> it should be qcom,sdm845-tbu or qcom,sdm845-qsmmuv500-tbu >>> >> >> Because they should be all compatible (as registers). Adding a SoC compatible >> might get overly-specific, but i can also see the benefits in that, so ok will >> do it! >> > > Hi Krzysztof, > > JFYI that the TBUs are used on our mobile SoCs going up until the SoC > we commercialized in early 2022, Snapdragon 8 Gen 1. Including SDM845 > there are three more premium tier SoCs using TBUs plus all of their > value-tier derivatives. There will also be prior generation premium > tier SoCs along with their derivatives that use the TBU as well. Does > it make sense to have a target-specific compatible string given this? This does not explain me anything. Why an exemption from usual bindings rules should apply here? https://elixir.bootlin.com/linux/v6.8-rc6/source/Documentation/devicetree/bindings/writing-bindings.rst Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml b/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml new file mode 100644 index 000000000000..6841ca9af21f --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/qcom,tbu.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/qcom,tbu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm TBU (Translation Buffer Unit) + +maintainers: + - Georgi Djakov <quic_c_gdjako@quicinc.com> + +description: + The Qualcomm SMMU500 implementation consists of TCU and TBU. The TBU contains + a Translation Lookaside Buffer (TLB) that caches page tables. TBUs provides + debug features to trace and trigger debug transactions. There are multiple TBU + instances with each client core. + +properties: + compatible: + const: qcom,qsmmuv500-tbu + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + interconnects: + maxItems: 1 + + power-domains: + maxItems: 1 + + qcom,stream-id-range: + description: Phandle of a SMMU device and Stream ID range (address and size) that is assigned by the TBU + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle of a smmu node + - description: stream id base address + - description: stream id size + +required: + - compatible + - reg + - qcom,stream-id-range + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/qcom,gcc-sdm845.h> + #include <dt-bindings/interconnect/qcom,icc.h> + #include <dt-bindings/interconnect/qcom,sdm845.h> + + tbu@150e1000 { + compatible = "qcom,qsmmuv500-tbu"; + reg = <0x150e1000 0x1000>; + clocks = <&gcc GCC_AGGRE_NOC_PCIE_TBU_CLK>; + interconnects = <&system_noc MASTER_GNOC_SNOC QCOM_ICC_TAG_ACTIVE_ONLY + &config_noc SLAVE_IMEM_CFG QCOM_ICC_TAG_ACTIVE_ONLY>; + power-domains = <&gcc HLOS1_VOTE_AGGRE_NOC_MMU_PCIE_TBU_GDSC>; + qcom,stream-id-range = <&apps_smmu 0x1c00 0x400>; + }; +...