From: Rob Herring <robh@kernel.org>
To: Georgi Djakov <quic_c_gdjako@quicinc.com>
Cc: krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
will@kernel.org, robin.murphy@arm.com, joro@8bytes.org,
devicetree@vger.kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.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
Subject: Re: [PATCH 1/6] dt-bindings: iommu: Add Translation Buffer Unit bindings
Date: Tue, 24 Oct 2023 13:42:48 -0500 [thread overview]
Message-ID: <20231024184248.GA252155-robh@kernel.org> (raw)
In-Reply-To: <20231019021923.13939-2-quic_c_gdjako@quicinc.com>
On Wed, Oct 18, 2023 at 07:19:18PM -0700, 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.
Arm SMMU-500 is an implementation, too. Is QCom's a modified
implementation or you are just the first to want to control TBU
resources?
You need to split this into what could be any SMMU-500 implementation
and what is truly QCom specific (i.e. modified). Unlike some licensed IP
that's a free-for-all on DT resources, Arm IP has public specs so we
don't have to guess.
> 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 <quic_c_gdjako@quicinc.com>
> ---
> .../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
Generic SMMU binding includes something QCom specific. That's not right.
> + 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 <quic_c_gdjako@quicinc.com>
> +
> +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.
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,qsmmuv500-tbu
> +
> + 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
> +
> +required:
> + - compatible
> + - reg
> + - interconnects
> + - qcom,stream-id-range
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/qcom,gcc-sdm845.h>
> + #include <dt-bindings/interconnect/qcom,sdm845.h>
> + #include <dt-bindings/power/qcom-rpmpd.h>
> +
> +
> + 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>;
> + };
> +
> +...
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Georgi Djakov <quic_c_gdjako@quicinc.com>
Cc: krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
will@kernel.org, robin.murphy@arm.com, joro@8bytes.org,
devicetree@vger.kernel.org, andersson@kernel.org,
konrad.dybcio@linaro.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
Subject: Re: [PATCH 1/6] dt-bindings: iommu: Add Translation Buffer Unit bindings
Date: Tue, 24 Oct 2023 13:42:48 -0500 [thread overview]
Message-ID: <20231024184248.GA252155-robh@kernel.org> (raw)
In-Reply-To: <20231019021923.13939-2-quic_c_gdjako@quicinc.com>
On Wed, Oct 18, 2023 at 07:19:18PM -0700, 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.
Arm SMMU-500 is an implementation, too. Is QCom's a modified
implementation or you are just the first to want to control TBU
resources?
You need to split this into what could be any SMMU-500 implementation
and what is truly QCom specific (i.e. modified). Unlike some licensed IP
that's a free-for-all on DT resources, Arm IP has public specs so we
don't have to guess.
> 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 <quic_c_gdjako@quicinc.com>
> ---
> .../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
Generic SMMU binding includes something QCom specific. That's not right.
> + 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 <quic_c_gdjako@quicinc.com>
> +
> +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.
> +
> +properties:
> + compatible:
> + enum:
> + - qcom,qsmmuv500-tbu
> +
> + 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
> +
> +required:
> + - compatible
> + - reg
> + - interconnects
> + - qcom,stream-id-range
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/qcom,gcc-sdm845.h>
> + #include <dt-bindings/interconnect/qcom,sdm845.h>
> + #include <dt-bindings/power/qcom-rpmpd.h>
> +
> +
> + 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>;
> + };
> +
> +...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-10-24 18:42 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 2:19 [PATCH 0/6] Add support for Translation Buffer Units Georgi Djakov
2023-10-19 2:19 ` Georgi Djakov
2023-10-19 2:19 ` [PATCH 1/6] dt-bindings: iommu: Add Translation Buffer Unit bindings Georgi Djakov
2023-10-19 2:19 ` Georgi Djakov
2023-10-19 11:12 ` Konrad Dybcio
2023-10-19 11:12 ` Konrad Dybcio
2023-10-24 18:42 ` Rob Herring [this message]
2023-10-24 18:42 ` Rob Herring
2023-10-24 22:26 ` Robin Murphy
2023-10-24 22:26 ` Robin Murphy
2023-10-26 17:58 ` Georgi Djakov
2023-10-26 17:58 ` Georgi Djakov
2023-10-19 2:19 ` [PATCH 2/6] iommu/arm-smmu-qcom: Add support for TBUs Georgi Djakov
2023-10-19 2:19 ` Georgi Djakov
2023-10-19 11:13 ` Konrad Dybcio
2023-10-19 11:13 ` Konrad Dybcio
2023-10-19 2:19 ` [PATCH 3/6] iommu/arm-smmu-qcom: Add Qualcomm TBU driver Georgi Djakov
2023-10-19 2:19 ` Georgi Djakov
2023-10-21 21:05 ` Bjorn Andersson
2023-10-21 21:05 ` Bjorn Andersson
2023-11-18 2:26 ` Georgi Djakov
2023-11-18 2:26 ` Georgi Djakov
2023-10-26 15:25 ` kernel test robot
2023-10-26 15:25 ` kernel test robot
2023-10-19 2:19 ` [PATCH 4/6] iommu/arm-smmu: Allow using a threaded handler for context interrupts Georgi Djakov
2023-10-19 2:19 ` Georgi Djakov
2023-10-19 2:19 ` [PATCH 5/6] iommu/arm-smmu-qcom: Use a custom context fault handler for sdm845 Georgi Djakov
2023-10-19 2:19 ` Georgi Djakov
2023-10-19 2:19 ` [PATCH 6/6] arm64: dts: qcom: sdm845: Add DT nodes for the TBUs Georgi Djakov
2023-10-19 2:19 ` Georgi Djakov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231024184248.GA252155-robh@kernel.org \
--to=robh@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djakov@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_c_gdjako@quicinc.com \
--cc=quic_cgoldswo@quicinc.com \
--cc=quic_pdaly@quicinc.com \
--cc=quic_sudaraja@quicinc.com \
--cc=quic_sukadev@quicinc.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.