From patchwork Thu Feb 1 21:05:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 13541822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E7A8C48292 for ; Thu, 1 Feb 2024 21:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xpo0Q79zDq3cRWxH1Yy+TnngdPoq3ZU0A5+/CxSJDYY=; b=l4aSGw2Eafpe2n E51Yz5/LfnpdlfdQssZre0FJDPjDD1x7rfREDEJ7Zea8mfVLAEtXnl8rYw//wGYFBhsEr7B2GrGHy eSLqtgAFzcaEkRREaWNGhlXkYM3Hxpx3dqCucihhkGO/cOTvIZ8Jed9MLifZWqL6nncc5cvOTcXAg bGLVMjVIvEqnUTbrHi0W3QF2vIBMcPk2ugGL6CDlPaKRtfciBjRnODgvyFokZeUJwUalcG1xl3Zgx pPvrbSzPPdTbyvMn6hlTisQy/0U3Wg9j/1tJLdOhweXyLp/VchT8GLEsC10Fh26YzzuZwmRAcrSFf aiZH3/XShSOZpyDkVGcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVeG3-00000009MGl-2Dwc; Thu, 01 Feb 2024 21:06:03 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVeFw-00000009MAr-2eka for linux-arm-kernel@lists.infradead.org; Thu, 01 Feb 2024 21:05:58 +0000 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 411Jmb1u032191; Thu, 1 Feb 2024 21:05:41 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-type; s=qcppdkim1; bh=iNUFl+O4Q+nSOF+40pkC YbU/d8xhFCc4glTBr+0sDes=; b=CCsN8STOuOQydrW2DiW9sLzAgCcnWBlTWOxH 8pO3bAmGbIR/FtkFFmjwZ60zscEnNvuMDHNGHWohrAUI4me7/oliDb+f/GRUj8XL XngxdUgNdraRY21pNBrTVczEXmYcV92nqOblcD/Jo9G8+JOk467HUtRFaMG7JYAI plSG00FDcw1ySYghtEl1RWbDuaYw1H/BI/VXZSM6WFBJG80n5k6mf41WfsScBSYE ZzEVR1J8TpgqsPFh1rcCTo71Gq94XUx+XpuhQdEDi5mklmxwrajqnwblikmO/WkN xX+wLYZoRDww66GeEFI4Mqg62dQ9iemVT0q722EYhBY4quGVJA== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w0b4y16vh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Feb 2024 21:05:41 +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 411L5eZv028370 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Feb 2024 21:05:40 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; Thu, 1 Feb 2024 13:05:39 -0800 From: Georgi Djakov To: , , , , , , CC: , , , , , , , , , , , Subject: [PATCH v4 01/10] dt-bindings: iommu: Add Translation Buffer Unit bindings Date: Thu, 1 Feb 2024 13:05:20 -0800 Message-ID: <20240201210529.7728-2-quic_c_gdjako@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240201210529.7728-1-quic_c_gdjako@quicinc.com> References: <20240201210529.7728-1-quic_c_gdjako@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) 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: BDMj7KM5nmqU7Ej7G0k1JUIEKGi1vezK X-Proofpoint-GUID: BDMj7KM5nmqU7Ej7G0k1JUIEKGi1vezK 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-01_06,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 bulkscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2402010163 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240201_130556_762989_72D476FA X-CRM114-Status: GOOD ( 14.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add common bindings for the TBUs to describe their properties. The TBUs are modelled as child devices of the IOMMU and each of them is described with their compatible, reg and stream-id-range properties. There could be other implementation specific properties to describe any resources like clocks, regulators, power-domains, interconnects that would be needed for TBU operation. Such properties will be documented in a separate vendor-specific TBU schema. Signed-off-by: Georgi Djakov --- .../devicetree/bindings/iommu/arm,smmu.yaml | 14 ++++++++++ .../devicetree/bindings/iommu/tbu-common.yaml | 28 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/tbu-common.yaml diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml index a4042ae24770..ba3237023b39 100644 --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml @@ -235,6 +235,20 @@ properties: enabled for any given device. $ref: /schemas/types.yaml#/definitions/phandle + '#address-cells': + enum: [ 1, 2 ] + + '#size-cells': + enum: [ 1, 2 ] + + ranges: true + +patternProperties: + "^tbu@[0-9a-f]+$": + description: TBU child nodes + type: object + $ref: tbu-common.yaml# + required: - compatible - reg diff --git a/Documentation/devicetree/bindings/iommu/tbu-common.yaml b/Documentation/devicetree/bindings/iommu/tbu-common.yaml new file mode 100644 index 000000000000..3e95b356e572 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/tbu-common.yaml @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/tbu-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Translation Buffer Unit (TBU) common properties + +maintainers: + - Georgi Djakov + +description: + The SMMU implements a TBU for system masters. It consists if a + Translation Lookaside Buffer (TLB) that caches page tables. + +properties: + reg: + maxItems: 1 + + stream-id-range: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: Stream ID range (address and size) that is assigned by the TBU + items: + minItems: 2 + maxItems: 2 + +additionalProperties: true +...