Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2673957rdb; Mon, 12 Feb 2024 12:26:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXCIWy/+pexFTkOnuOkhjyLZtWVE9Evul3DglKMeeavq2oDSeMsjmo4uniKkQwWmhC9iWEmPERdT5QUGM6Ce8lG8aPksLLPnHxjgKfznA== X-Google-Smtp-Source: AGHT+IHNiXWJ0dVWUG5yncv0mUgV9PmyOBFq2lpCiiLpFQHNuiFEm+Ef7YvSoFhuZRy5e4YYd7DT X-Received: by 2002:a2e:9a83:0:b0:2d0:a4f7:11aa with SMTP id p3-20020a2e9a83000000b002d0a4f711aamr5149146lji.41.1707769572372; Mon, 12 Feb 2024 12:26:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707769572; cv=pass; d=google.com; s=arc-20160816; b=L330NNnS/wFDvAKpLMMoRe4DaF/PzW0iDf7pGCvQMQ5snBBWlpmS+c1EX2U0wYBPUb 84NeKk9Qvp4oqjhPkBUItJoX9AHILpDgJnAVUGITrobkQy69nyBAE+RNjMLv5/o0QYPu GYFc8AWURrsrYPfpMbG/65tdTMtTI9JHUuY5cjnxymWTPPBnsP/jGRNe5+lgHsYKMC9n ASPsEnm81Ts76SG6+EF35rvXGwAO2si7wxtyevQiJRNQm0b14na5IUB9koWhcl0P1LFY IHqcCf+22omD3fgCPNiryoon5clS4nqmMQMDNeIrq+w4P2FzHoK6XpY9yBYVm5vU/VaL Pvzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=pnb09Ge35F21WCpG+DtPpN++rWHlqheTQ+nytqP/F6I=; fh=Tocv/C6Ai4278quIad249m1VblFdd54CED6SIS/NTPc=; b=z1NC5+a9y+TIniqLKG8UZwFOGW3b3Cu2aUG9wIjpLsHET9yMLWTCSTYrjqljR+rJV9 TSL4Lu1rb1AKy6V+Q8XEkc4A6Bl4UvMO2e7ed2o74qwi337hjIloiuqPSiViwAfijw0y ZiN9WeQwTx4izYPJfh1vVYOW/sThRoHS7oQxtgWOMOdhJiOh4onVGDlah2QaFlsl8ZVz DkVvmJ6fqG4Q4CizJNVEnk6Leckq2+TCpQFX1JNy3H83m8nakTulE/34q8nPUIusXMsZ MUTY/KCbEL/NTcWFAAf7U1yJKH98URtg2L1mlP7jEd2EMsubXzB5faD1b4WL7nGh4qFh nJCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-62332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62332-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCVrxUUkbtJm1oU6cYTork6AR/O4mb4ZtUoqyxW0c+eOFS2WecXAbZfgwV6opE0C6VwpP6SF85lGMrEMZqAPGMCuWePioc0gMvuBbWYC4A== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id co11-20020a0564020c0b00b00561e7874012si200876edb.675.2024.02.12.12.26.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 12:26:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-62332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-62332-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-62332-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1F8A31F257CA for ; Mon, 12 Feb 2024 20:26:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD469482EE; Mon, 12 Feb 2024 20:26:01 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CA40B41208; Mon, 12 Feb 2024 20:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707769561; cv=none; b=WpwykS3czgGQweqTuytdFVsz2mxR4/ZXdWlZUoaF5923gt6jpRKdV8DYGfkEgI4ruWbeqWa07q7ohrfbUKppVXXoto8DSIwLjiDoEvNZSV4P62/lziwyDc2OrP46GOPiNInsB6nKudnKD4kqiD8fQx72I7X/m0lKYY+pCtLvhiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707769561; c=relaxed/simple; bh=4LzQNYnhDLWF7CpRALP+fSk7Y3GuFx5cvns2xtzlsOw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jP8FjXZeudN/8K8XNRsZdgZqtFLzUZF+/Y9odJ4TK4Czqhl6gJzEMfeNhrtwZzC5FOWjNEv4pyW3aRqzvUY4zScCfdOk4oAOs9ZbGVz540zvYA8a0iI4WUMwSv4x268DcUTEEjG85f3Q0vQz988m7gyCqOtFs8joWFjekWgkCSE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 37B6BDA7; Mon, 12 Feb 2024 12:26:39 -0800 (PST) Received: from [10.57.48.89] (unknown [10.57.48.89]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 26C4E3F766; Mon, 12 Feb 2024 12:25:55 -0800 (PST) Message-ID: Date: Mon, 12 Feb 2024 20:25:53 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 01/10] dt-bindings: iommu: Add Translation Buffer Unit bindings Content-Language: en-GB To: Georgi Djakov , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, will@kernel.org, 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 References: <20240201210529.7728-1-quic_c_gdjako@quicinc.com> <20240201210529.7728-2-quic_c_gdjako@quicinc.com> From: Robin Murphy In-Reply-To: <20240201210529.7728-2-quic_c_gdjako@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-02-01 9:05 pm, Georgi Djakov wrote: > 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 Actually, even this doesn't work - for the 15-bit StreamID config, there's no guarantee that the devices behind each TBU will use a single contiguous StreamID range. Conversely, for any other config the StreamIDs are already uniquely associated with a TBU by their top 5 bits, so the "size" doesn't matter. Thanks, Robin. > + > +additionalProperties: true > +...