[PATCH 1/3] iommu/arm-smmu-v3: Add device-tree support for CMDQV driver
Nicolin Chen
nicolinc at nvidia.com
Fri Oct 31 10:29:40 PDT 2025
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 at nvidia.com>
Reviewed-by: Nicolin Chen <nicolinc at nvidia.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
More information about the linux-arm-kernel
mailing list