[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aQTyBBF0IoE+pcXW@Asurada-Nvidia>
Date: Fri, 31 Oct 2025 10:29:40 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Ashish Mhetre <amhetre@...dia.com>
CC: <will@...nel.org>, <robin.murphy@....com>, <joro@...tes.org>,
<robh@...nel.org>, <krzk+dt@...nel.org>, <conor+dt@...nel.org>,
<thierry.reding@...il.com>, <jonathanh@...dia.com>, <jgg@...pe.ca>,
<linux-tegra@...dia.com>, <linux-arm-kernel@...ts.infradead.org>,
<iommu@...ts.linux.dev>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH 1/3] iommu/arm-smmu-v3: Add device-tree support for CMDQV
driver
On Fri, Oct 31, 2025 at 06:29:57AM +0000, Ashish Mhetre wrote:
> Add device tree support to the CMDQV driver to enable usage on Tegra264
> SoCs. The implementation mirrors the existing ACPI probe path, parsing
> the nvidia,cmdqv phandle from the SMMU device tree node to associate
> each SMMU with its corresponding CMDQV instance.
>
> Remove the ACPI dependency from Kconfig as the driver now supports both
> ACPI and device tree initialization through conditional compilation.
>
> Signed-off-by: Ashish Mhetre <amhetre@...dia.com>
Reviewed-by: Nicolin Chen <nicolinc@...dia.com>
With two nits:
> diff --git a/drivers/iommu/arm/Kconfig b/drivers/iommu/arm/Kconfig
> index ef42bbe07dbe..5fac08b89dee 100644
> --- a/drivers/iommu/arm/Kconfig
> +++ b/drivers/iommu/arm/Kconfig
> @@ -121,7 +121,6 @@ config ARM_SMMU_V3_KUNIT_TEST
>
> config TEGRA241_CMDQV
> bool "NVIDIA Tegra241 CMDQ-V extension support for ARM SMMUv3"
> - depends on ACPI
Perhaps:
depends on OF || ACPI
and update the commit message.
> +static void tegra_cmdqv_dt_probe(struct device_node *smmu_node,
> + struct arm_smmu_device *smmu)
> +{
> + struct platform_device *pdev;
> + struct device_node *np;
> +
> + np = of_parse_phandle(smmu_node, "nvidia,cmdqv", 0);
> + if (!np)
> + return;
> +
> + pdev = of_find_device_by_node(np);
> + of_node_put(np);
> + if (!pdev)
> + return;
> +
> + smmu->impl_dev = &pdev->dev;
> + smmu->options |= ARM_SMMU_OPT_TEGRA241_CMDQV;
> + dev_info(smmu->dev, "found companion CMDQV device: %s\n",
> + dev_name(smmu->impl_dev));
dev_info(smmu->dev, "found companion CMDQV device: %s\n",
dev_name(smmu->impl_dev));
Nicolin
Powered by blists - more mailing lists