Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp269168rdb; Thu, 19 Oct 2023 04:12:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH592MQEB2CvN3erSeDsHOw9QPkHF9Ic0MGJeSTKke35wKS+CPi01vGwUOjXY2nQRne0fNk X-Received: by 2002:a05:6a20:9191:b0:13d:d5bd:7593 with SMTP id v17-20020a056a20919100b0013dd5bd7593mr1859435pzd.12.1697713932561; Thu, 19 Oct 2023 04:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697713932; cv=none; d=google.com; s=arc-20160816; b=L/9h5EWa3C8dNBYHFd4Adlty5r/QMY9ky6PqtgNStN7cOHNKP+S4EjqXY/Op31GXwW lFP4JlI1c2pDOLS+CUxs8t7vDLoYIPOBQQdn5PfMy9XIbrNzfu7DsiWziRQOC5B9Sm2e IiXnqUuswy7wieoK7O4tJ5owIoNWh0Dqk/qBB9NptQ2Mbuu1nj5bGJLU4Wrskms8MpC/ /flVVQ0yY8VKONGgeH6pLlt8QNq012LauK/fb9a85Dc5G3PPLsAr8hLWvvpse41T5mLW bhENSFA92q7W71KTu59L2G/ckqqB097v+j7TP4zdBLiiGTfHqRyAJCiRM6Qp7/o8IRCh kwoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=RtOBMj5NZCZ3rE38kW7IfyaEnFmC+iva60OYyJozRyc=; fh=sqBAVvcWMWbkmMgfcHX4Ng92CApgb1NzT8ZzWSwl1/g=; b=iYeElDoecHE4bL0JrvJLTMO+ZM4v0I8QGpt2gkVLLVNwazb8IOmKdApP1zaRdJcBIO v2ekiCfofcYRJxwQ7X/aVouap1hqCo6SzkRypJNww61fRJ8KqHtCUnleDPMqAqHVoz6o kppjyTpjJuM9VeYoP7w7cX+Rgtu0lPZuJdySDBCoAdLc69GEeAyaA2DjBL2ymtWuOHuQ N/MTBt9grIaNoxgbVh8tX7uPEv3A+cYpDsFIcz5OeGFFTDo8sh/Ws85wBwcAKCsdpvZh pweRcDSdqVzon6p032kfVHF6D1gd27KiNyu30AQQizEd8DYoeZeqsZX6x/LtyZqIHnyN TQ/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HC9q4g9K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id s140-20020a632c92000000b005acd5108042si4114374pgs.521.2023.10.19.04.12.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:12:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HC9q4g9K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B1F5E802D53D; Thu, 19 Oct 2023 04:12:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345272AbjJSLMJ (ORCPT + 99 others); Thu, 19 Oct 2023 07:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbjJSLMI (ORCPT ); Thu, 19 Oct 2023 07:12:08 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3090112 for ; Thu, 19 Oct 2023 04:12:05 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2c50fbc218bso81517781fa.3 for ; Thu, 19 Oct 2023 04:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697713924; x=1698318724; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RtOBMj5NZCZ3rE38kW7IfyaEnFmC+iva60OYyJozRyc=; b=HC9q4g9KRXTci/2N6VeE6pmbpeeLpB7EUyt//4GaqTh/JjvSO+cA396lzB/hhJ/0sP epHeTPGVSPG3zGFL9ChhqOzm5BC+fm6ww3eMQ7VvRhpAI7qZl0gWVMjleJs/ygAwA17/ NnPYnHehl8RgrvSYOsR4xy5nJp1FbUbd0n6WsP+O7EhtMU6bMIbEuz9dgjEC8yrQymS/ T+z+u3aTSAIzqh6DgJGHFU9/hPteD5fkKZnCN5FM5H5PfI/WuCMEL+6N1k0oMyTW3uBU 3tXEKiLQC1j9y0VlQoTZGY21YBmbjOgPnJIz/bPcEh/BRKFCwOM7KRUD5fJnRWtRofEf hVbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697713924; x=1698318724; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RtOBMj5NZCZ3rE38kW7IfyaEnFmC+iva60OYyJozRyc=; b=VMqUn+aOGSbpVBw97hVe3dy4YFmMZxofhflx1zhvm/2ssEG15N7o2uW1GkGyy/7qrq AeQ17HON9QRa1JmJc8eAlXLLq7RGZhtPVTgF4Q/quwpZltLpH+pyFbGzjT3bSjEInd13 eCdVPeMEvukDzHPmYk+4KUzHWtJRpypxmyhA+8JYd/LAild4yZK0MPKYctFNDM2mbHQb GE2A/NTLVZ31ukBrF2Uoxhc3l83zsV25QbkjnVDfa3sjw3WjqGtn5lJfw9wUHixv0oC5 /i1qS3ZnJc1rg2JPfZmN2FUDY1o91mfCPdAhtBC295qQzruHjANmZyzC07P1/fgkVZfI gpKQ== X-Gm-Message-State: AOJu0YzaeRNekRtsjnKP+q7K4v9inAOJxD51uO5GyW8TxzTQf2Im9+aX vo88SDf8OBUtV85XyieGl1CaXw== X-Received: by 2002:a05:651c:454:b0:2c5:cf0:74e9 with SMTP id g20-20020a05651c045400b002c50cf074e9mr1162473ljg.14.1697713923849; Thu, 19 Oct 2023 04:12:03 -0700 (PDT) Received: from [172.30.205.86] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id q12-20020a05600c2e4c00b0040648217f4fsm4089784wmf.39.2023.10.19.04.12.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Oct 2023 04:12:03 -0700 (PDT) Message-ID: Date: Thu, 19 Oct 2023 13:12:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/6] dt-bindings: iommu: Add Translation Buffer Unit bindings To: Georgi Djakov , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, will@kernel.org, robin.murphy@arm.com, joro@8bytes.org Cc: devicetree@vger.kernel.org, andersson@kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, 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: <20231019021923.13939-1-quic_c_gdjako@quicinc.com> <20231019021923.13939-2-quic_c_gdjako@quicinc.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20231019021923.13939-2-quic_c_gdjako@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 04:12:11 -0700 (PDT) On 10/19/23 04:19, Georgi Djakov wrote: > The "apps_smmu" on the Qualcomm sdm845 platform is an implementation > of the ARM SMMU-500, that consists of a single TCU (Translation Control > Unit) and multiple TBUs (Translation Buffer Units). The TCU is already > being described in the ARM SMMU DT schema. Add also bindings for the > TBUs so that we can describe their properties. > > In this DT schema, the TBUs are modelled as a child devices of the TCU > and each of them is described with it's own resources such as clocks, > power domains, interconnects etc. > > Signed-off-by: Georgi Djakov > --- > .../devicetree/bindings/iommu/arm,smmu.yaml | 13 ++++ > .../bindings/iommu/qcom,qsmmuv500-tbu.yaml | 67 +++++++++++++++++++ > 2 files changed, 80 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iommu/qcom,qsmmuv500-tbu.yaml > > diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > index cf29ab10501c..afc323b4bbc5 100644 > --- a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > +++ b/Documentation/devicetree/bindings/iommu/arm,smmu.yaml > @@ -230,6 +230,19 @@ properties: > enabled for any given device. > $ref: /schemas/types.yaml#/definitions/phandle > > + '#address-cells': > + const: 2 > + > + '#size-cells': > + const: 2 > + > + ranges: true > + > +patternProperties: > + "^tbu@[0-9a-f]+$": > + $ref: qcom,qsmmuv500-tbu.yaml > + description: The SMMU may include Translation Buffer Units (TBU) as subnodes > + > required: > - compatible > - reg > diff --git a/Documentation/devicetree/bindings/iommu/qcom,qsmmuv500-tbu.yaml b/Documentation/devicetree/bindings/iommu/qcom,qsmmuv500-tbu.yaml > new file mode 100644 > index 000000000000..4baba7397e90 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iommu/qcom,qsmmuv500-tbu.yaml > @@ -0,0 +1,67 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iommu/qcom,qsmmuv500-tbu.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm TBU (Translation Buffer Unit) > + > +maintainers: > + - Georgi Djakov > + > +description: > + TBU nodes represent Translation Buffer Units in an ARM SMMU. Each TBU node > + should be a child node of the SMMU in the device tree. description: refers to the hardware, so it should say what this IP is, what it does and things like that > + > +properties: > + compatible: > + enum: > + - qcom,qsmmuv500-tbu Should we expect this list to grow? > + > + reg: > + items: > + - description: Address and size of the TBU's register space. > + > + reg-names: > + items: > + - const: base > + > + clocks: > + maxItems: 1 > + > + interconnects: > + maxItems: 1 > + > + power-domains: > + maxItems: 1 > + > + qcom,stream-id-range: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: Stream ID range (address and size) that is assigned by the TBU I believe you need to size-limit this. If it's only supposed to be a single tuple, perhaps it could be said explicitly. > + > +required: > + - compatible > + - reg > + - interconnects > + - qcom,stream-id-range > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + > + 2 newlines seems excessive > + tbu@150e1000 { > + compatible = "qcom,qsmmuv500-tbu"; > + reg = <0x150e1000 0x1000>; > + reg-names = "base"; > + clocks = <&gcc GCC_AGGRE_NOC_PCIE_TBU_CLK>; > + power-domains = <&gcc HLOS1_VOTE_AGGRE_NOC_MMU_PCIE_TBU_GDSC>; > + interconnects = <&system_noc MASTER_GNOC_SNOC 0 &config_noc SLAVE_IMEM_CFG 0>; > + qcom,stream-id-range = <0x1c00 0x400>; > + }; I think it would be beneficial if this tbu was a child of some smmu node like it's intended to be. Konrad