From nobody Wed Apr 1 09:44:36 2026 Received: from PH8PR06CU001.outbound.protection.outlook.com (mail-westus3azon11012054.outbound.protection.outlook.com [40.107.209.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46FED3BE153; Tue, 31 Mar 2026 11:24:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.209.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956263; cv=fail; b=CC6AloxwGeOp5fP0URvEKYXzDxu7vskCyCXXtG5BQdDb6PO5mykQ4sLdrwFltHHfYcpp54oWMwgXoDj2NJF93MHqXdfQCBcgExVLI3hcuQKJ/KwliccMIC9lsz89MNAIsKl2nh+m3JwOZ96E1zyavGX4aYCfRYPLeeQWUuwMzO8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956263; c=relaxed/simple; bh=zYParcjyVPsQKwnBbL7c9pZqZDfR+KMhhaHV89SUqUE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bQOZZ8y7sx/aw3AY7Q9xDrmvOZG2ft0/uhJ0j9XJ+ES8qpt019a0fRBrqNnnQ65uxYP+Zq36ZNNoVpT7yhYhd35VFG2FPWwPk9NNn1/ari2XuLKWP/ZaERzl1wMlcE8FEAHUanZAlk5wTfw1UP0TCGdKQkbuijq0NwMFaTUX6KU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=XycSZCAi; arc=fail smtp.client-ip=40.107.209.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="XycSZCAi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OWa+t/4EUMULhpyUMoYW40cHN28CvA0l19Lucq5TXrj1iHrnjeG6fL+FTxVQQVeNyrz7ZZR6is1ujAM52DsNi4uUU5gkcoXEht1n9wRx7eqFIGtEOQCEuBi6FDXM3MBLY4SVZFqKtt4EgUjvBEldafB0uDCw50S7Dz4nWwsrjOF04HGej3bP8Ny3zEa2k2dZlyevCrXcyUK9kyYRhd45aztmG1PAoAucOiBPahNmPIWwwUPF2VXMstJuR+G+SshngH8PeKE/GPsJvS7dnyWt01pcwD6qr9wTU2b8INPM9IU5WNJ3Q5RbZdCGUCv7HJYs9RieXSspdqOeBaKlNChiLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=x04YelWNpc+2ecDBgT37J/Vz0ZQ8pPBvwnuVxA/Jk+4=; b=ROMfhQsm1n/28oyPCuQytw1WwYThxxrIJaIaxP0ZxSyVW3nqYkMqIfr6gJn8zPKwhwts6NmmQY4FJNLUeTU/1QBK0iw3wVQVt7OwZRO2XM2yjZ0+FPoDNAVyCYmKLA32c5cn8d3OrpZBI8BoGSCJzgR6eQ0oWHAst4vlrft0edSI2rSHm2oZJ9EJphmaf38hgSfRBm9t9aSd0oKEFmeshUfECAcQQxFoMA8X90KuQN9koG8O1wXJkxW/MKCtiixWOJ9fp1zofGxN3lwr5ZmTCz8jlHhI/7V5DdUaY5wKCvgKnDDj3KnqwDtm4MjmBXtC0IbEKAQK9tOssa2bM0xAIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x04YelWNpc+2ecDBgT37J/Vz0ZQ8pPBvwnuVxA/Jk+4=; b=XycSZCAikhmL6JZOJJmIBTnkHNh7rqv7UiqpxvHE2+ML4uv5Wjo+PkuqO2eNKStFvcasRziOBzYnwgghsIWFicyvgzxZrQv8pkci3cE/kWGCrVmHGU50IP0qBakRd2c59EQMle9wqVaBkOl0eiv5AK3JkvlmeUz+Z0IPEoNE5ulvrP9RwSxFOkD7jyuKw8dZXxINhzM6H0+QvSCk13jkWvHajolvJTM5KUm5xoSfvs3XtdIcWs5+TUzTkDaseTR5WQVdUq37KhVb06mlgnWeEfLfwhLAtvF9XNHe7iap6j+QkzxhtRMnnf03hxOXn4DIpvfbrvwhIZ2j0E4gW5FIWg== Received: from BYAPR08CA0037.namprd08.prod.outlook.com (2603:10b6:a03:117::14) by SJ2PR12MB9137.namprd12.prod.outlook.com (2603:10b6:a03:562::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.15; Tue, 31 Mar 2026 11:24:12 +0000 Received: from CO1PEPF00012E66.namprd05.prod.outlook.com (2603:10b6:a03:117:cafe::5a) by BYAPR08CA0037.outlook.office365.com (2603:10b6:a03:117::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9700.24 via Frontend Transport; Tue, 31 Mar 2026 11:24:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CO1PEPF00012E66.mail.protection.outlook.com (10.167.249.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.21 via Frontend Transport; Tue, 31 Mar 2026 11:24:12 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Tue, 31 Mar 2026 04:23:56 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Tue, 31 Mar 2026 04:23:55 -0700 Received: from build-amhetre-focal-20250829.internal (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Tue, 31 Mar 2026 04:23:55 -0700 From: Ashish Mhetre To: , , , <=thierry.reding@kernel.org>, , CC: , , , Ashish Mhetre Subject: [PATCH 1/2] memory: tegra: Add T238 MC support Date: Tue, 31 Mar 2026 11:23:39 +0000 Message-ID: <20260331112347.3897841-2-amhetre@nvidia.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260331112347.3897841-1-amhetre@nvidia.com> References: <20260331112347.3897841-1-amhetre@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF00012E66:EE_|SJ2PR12MB9137:EE_ X-MS-Office365-Filtering-Correlation-Id: 7ab63a8e-c7b4-4d99-1bf7-08de8f180903 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700016|18002099003|56012099003|22082099003; X-Microsoft-Antispam-Message-Info: r1jXfL/s8jrZpPtk9lwT1JzjgqUALJVqwDKVsrkAqZX3OoEh065RpOxgrBB0EZSecg5gp21T80O5fag+RQaaDsbQybJIatW9IDFe2GlXmzgnbpeDww/i4EVw/EOt7pSyWesHy5/cUQj6XiXB6CMlBH3gFlJgXQr9wsuziWfUsjiYb+sWkIqGX2N0YulZ0ao9BuIVLUhV2QhIRFYIw+8Nm6ksW/cJRen1la954KarJWwtkNEh2x0nhpf/xshGWvi7nudPA/GLyuebigh8vnzcNLlTSFhmzhCf+hEiH3GJp+Xhwy3DERdMNINfJ0RDsRDVZVP8GpitFy91acrijVr6i/j1dfJR825jkQ+5Gcf+gV2h+qZNobapPkL9FNakg/BvWWELZZgFr0v65RPZZN/0EoTWRwfac+Hu/u1bNVGMOdHRzlsMmz1DMnh3kz09WhdGXD06tvU68xZux8sOW/BqNWJLozYQpIRzSsTYnIv01YabwEgTqmuNtjYGZ18PJ5SBc0n7Gxaihl59drG4FoVrEbma1Jnmuaygt9nmY+mE+85f8h1haAHYViIo3HRXti1YblLzmDlxqJhz8Iz8P8Y4ViISQGoEwLuh0KY0DZ3ltsHhQTZ9I1EbaKcBsvIJJQU/yi6RAItwUxsGY6faLG4CE3o7YL+TBq8YYWlYhQKo37WpgRGA3lvbDxE/eJ5PBQalVJxUn2utDArUyjnuIBeyXjSBA+XuCBgMWOGVn9O92PcBBMbxHWxVXMFV3Q+DpE4azyQpECcVfUgD7r/dYcfY6g== X-Forefront-Antispam-Report: CIP:216.228.118.233;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge2.nvidia.com;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(376014)(36860700016)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xzElUbxpl2tZkw6WvQwyf2i0MyHWAzsJqtGiCpU/g/+6A/YFNVHoU+a/NhiwUEi8VKauUserxERJ5M83QbCy4tuiKFGp2alNuZHi02gVEeIl9m4YuWXRyIHCFJzKoTpPbmKqISS4kMI9gSeHXkw+AJkUyjLvCLaDgrLHWzGGrNisZ3y3cq0jS+6n7Y7fv7qCeUrtQE8oFRGHDsmHoeOh+J7B2wPNiJ0iY6WuLTFGBCR6+ukV2FSSSfPbH2b5XwZpGuZSlF7IvYIhdoo+L8d+GIeiz8I2B8VkD8xj12bDdpV3po3KK+HyVXg0wuHdc7WNtmFWkyEoX2Wkd+dz/366hP/pAQTkEs/7fAU3mD4fs30Lzfw4lOPkYcjAim5Yjg7Rw2Qup+JtboC53pR/1G8ksfW7+WR4AKioc0AU13k1ZgmJ1JA8gx2bBzY8gQKBZFjr X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2026 11:24:12.5357 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ab63a8e-c7b4-4d99-1bf7-08de8f180903 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.233];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF00012E66.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9137 Content-Type: text/plain; charset="utf-8" Add Memory Controller driver support for Tegra238 SOC, including: - MC client definitions with Tegra238-specific stream IDs - Reuse of Tegra234 ICC operations for bandwidth management via BPMP-FW - Device tree compatible string "nvidia,tegra238-mc" Export tegra234_mc_icc_ops so it can be shared with the Tegra238 MC driver, as both SoCs use the same ICC aggregation and bandwidth management logic. Signed-off-by: Ashish Mhetre --- drivers/memory/tegra/Makefile | 1 + drivers/memory/tegra/mc.c | 3 + drivers/memory/tegra/mc.h | 6 + drivers/memory/tegra/tegra234.c | 2 +- drivers/memory/tegra/tegra238.c | 395 ++++++++++++++++++++++++++++++++ 5 files changed, 406 insertions(+), 1 deletion(-) create mode 100644 drivers/memory/tegra/tegra238.c diff --git a/drivers/memory/tegra/Makefile b/drivers/memory/tegra/Makefile index 6334601e6120..0d50e37d43af 100644 --- a/drivers/memory/tegra/Makefile +++ b/drivers/memory/tegra/Makefile @@ -10,6 +10,7 @@ tegra-mc-$(CONFIG_ARCH_TEGRA_210_SOC) +=3D tegra210.o tegra-mc-$(CONFIG_ARCH_TEGRA_186_SOC) +=3D tegra186.o tegra-mc-$(CONFIG_ARCH_TEGRA_194_SOC) +=3D tegra186.o tegra194.o tegra-mc-$(CONFIG_ARCH_TEGRA_234_SOC) +=3D tegra186.o tegra234.o +tegra-mc-$(CONFIG_ARCH_TEGRA_238_SOC) +=3D tegra186.o tegra238.o tegra-mc-$(CONFIG_ARCH_TEGRA_264_SOC) +=3D tegra186.o tegra264.o =20 obj-$(CONFIG_TEGRA_MC) +=3D tegra-mc.o diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c index d620660da331..10ef3c323e22 100644 --- a/drivers/memory/tegra/mc.c +++ b/drivers/memory/tegra/mc.c @@ -49,6 +49,9 @@ static const struct of_device_id tegra_mc_of_match[] =3D { #ifdef CONFIG_ARCH_TEGRA_234_SOC { .compatible =3D "nvidia,tegra234-mc", .data =3D &tegra234_mc_soc }, #endif +#ifdef CONFIG_ARCH_TEGRA_238_SOC + { .compatible =3D "nvidia,tegra238-mc", .data =3D &tegra238_mc_soc }, +#endif #ifdef CONFIG_ARCH_TEGRA_264_SOC { .compatible =3D "nvidia,tegra264-mc", .data =3D &tegra264_mc_soc }, #endif diff --git a/drivers/memory/tegra/mc.h b/drivers/memory/tegra/mc.h index 649b54369263..d0da4a5f192d 100644 --- a/drivers/memory/tegra/mc.h +++ b/drivers/memory/tegra/mc.h @@ -238,6 +238,11 @@ extern const struct tegra_mc_soc tegra194_mc_soc; =20 #ifdef CONFIG_ARCH_TEGRA_234_SOC extern const struct tegra_mc_soc tegra234_mc_soc; +extern const struct tegra_mc_icc_ops tegra234_mc_icc_ops; +#endif + +#ifdef CONFIG_ARCH_TEGRA_238_SOC +extern const struct tegra_mc_soc tegra238_mc_soc; #endif =20 #ifdef CONFIG_ARCH_TEGRA_264_SOC @@ -256,6 +261,7 @@ extern const struct tegra_mc_ops tegra30_mc_ops; #if defined(CONFIG_ARCH_TEGRA_186_SOC) || \ defined(CONFIG_ARCH_TEGRA_194_SOC) || \ defined(CONFIG_ARCH_TEGRA_234_SOC) || \ + defined(CONFIG_ARCH_TEGRA_238_SOC) || \ defined(CONFIG_ARCH_TEGRA_264_SOC) extern const struct tegra_mc_ops tegra186_mc_ops; #endif diff --git a/drivers/memory/tegra/tegra234.c b/drivers/memory/tegra/tegra23= 4.c index 87b22038a5fb..9fbd34d4abe0 100644 --- a/drivers/memory/tegra/tegra234.c +++ b/drivers/memory/tegra/tegra234.c @@ -1125,7 +1125,7 @@ static int tegra234_mc_icc_get_init_bw(struct icc_nod= e *node, u32 *avg, u32 *pea return 0; } =20 -static const struct tegra_mc_icc_ops tegra234_mc_icc_ops =3D { +const struct tegra_mc_icc_ops tegra234_mc_icc_ops =3D { .xlate =3D tegra_mc_icc_xlate, .aggregate =3D tegra234_mc_icc_aggregate, .get_bw =3D tegra234_mc_icc_get_init_bw, diff --git a/drivers/memory/tegra/tegra238.c b/drivers/memory/tegra/tegra23= 8.c new file mode 100644 index 000000000000..5abdca16a275 --- /dev/null +++ b/drivers/memory/tegra/tegra238.c @@ -0,0 +1,395 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2026, NVIDIA CORPORATION. All rights reserved. + */ + +#include + +#include +#include +#include +#include + +#include +#include "mc.h" + +static const struct tegra_mc_client tegra238_mc_clients[] =3D { + { + .id =3D TEGRA234_MEMORY_CLIENT_HDAR, + .name =3D "hdar", + .bpmp_id =3D TEGRA_ICC_BPMP_HDA, + .type =3D TEGRA_ICC_ISO_AUDIO, + .sid =3D TEGRA238_SID_HDA, + .regs =3D { + .sid =3D { + .override =3D 0xa8, + .security =3D 0xac, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_HDAW, + .name =3D "hdaw", + .bpmp_id =3D TEGRA_ICC_BPMP_HDA, + .type =3D TEGRA_ICC_ISO_AUDIO, + .sid =3D TEGRA238_SID_HDA, + .regs =3D { + .sid =3D { + .override =3D 0x1a8, + .security =3D 0x1ac, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_SDMMCRAB, + .name =3D "sdmmcrab", + .bpmp_id =3D TEGRA_ICC_BPMP_SDMMC_4, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_SDMMC4A, + .regs =3D { + .sid =3D { + .override =3D 0x318, + .security =3D 0x31c, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_SDMMCWAB, + .name =3D "sdmmcwab", + .bpmp_id =3D TEGRA_ICC_BPMP_SDMMC_4, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_SDMMC4A, + .regs =3D { + .sid =3D { + .override =3D 0x338, + .security =3D 0x33c, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_APER, + .name =3D "aper", + .bpmp_id =3D TEGRA_ICC_BPMP_APE, + .type =3D TEGRA_ICC_ISO_AUDIO, + .sid =3D TEGRA238_SID_ISO_APE0, + .regs =3D { + .sid =3D { + .override =3D 0x3d0, + .security =3D 0x3d4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_APEW, + .name =3D "apew", + .bpmp_id =3D TEGRA_ICC_BPMP_APE, + .type =3D TEGRA_ICC_ISO_AUDIO, + .sid =3D TEGRA238_SID_ISO_APE0, + .regs =3D { + .sid =3D { + .override =3D 0x3d8, + .security =3D 0x3dc, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVDISPLAYR, + .name =3D "nvdisplayr", + .bpmp_id =3D TEGRA_ICC_BPMP_DISPLAY, + .type =3D TEGRA_ICC_ISO_DISPLAY, + .sid =3D TEGRA238_SID_ISO_NVDISPLAY, + .regs =3D { + .sid =3D { + .override =3D 0x490, + .security =3D 0x494, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVDISPLAYR1, + .name =3D "nvdisplayr1", + .bpmp_id =3D TEGRA_ICC_BPMP_DISPLAY, + .type =3D TEGRA_ICC_ISO_DISPLAY, + .sid =3D TEGRA238_SID_ISO_NVDISPLAY, + .regs =3D { + .sid =3D { + .override =3D 0x508, + .security =3D 0x50c, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_BPMPR, + .name =3D "bpmpr", + .sid =3D TEGRA238_SID_BPMP, + .regs =3D { + .sid =3D { + .override =3D 0x498, + .security =3D 0x49c, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_BPMPW, + .name =3D "bpmpw", + .sid =3D TEGRA238_SID_BPMP, + .regs =3D { + .sid =3D { + .override =3D 0x4a0, + .security =3D 0x4a4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_BPMPDMAR, + .name =3D "bpmpdmar", + .sid =3D TEGRA238_SID_BPMP, + .regs =3D { + .sid =3D { + .override =3D 0x4a8, + .security =3D 0x4ac, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_BPMPDMAW, + .name =3D "bpmpdmaw", + .sid =3D TEGRA238_SID_BPMP, + .regs =3D { + .sid =3D { + .override =3D 0x4b0, + .security =3D 0x4b4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_APEDMAR, + .name =3D "apedmar", + .bpmp_id =3D TEGRA_ICC_BPMP_APEDMA, + .type =3D TEGRA_ICC_ISO_AUDIO, + .sid =3D TEGRA238_SID_ISO_APE1, + .regs =3D { + .sid =3D { + .override =3D 0x4f8, + .security =3D 0x4fc, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_APEDMAW, + .name =3D "apedmaw", + .bpmp_id =3D TEGRA_ICC_BPMP_APEDMA, + .type =3D TEGRA_ICC_ISO_AUDIO, + .sid =3D TEGRA238_SID_ISO_APE1, + .regs =3D { + .sid =3D { + .override =3D 0x500, + .security =3D 0x504, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_VICSRD, + .name =3D "vicsrd", + .bpmp_id =3D TEGRA_ICC_BPMP_VIC, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_VIC, + .regs =3D { + .sid =3D { + .override =3D 0x360, + .security =3D 0x364, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_VICSWR, + .name =3D "vicswr", + .bpmp_id =3D TEGRA_ICC_BPMP_VIC, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_VIC, + .regs =3D { + .sid =3D { + .override =3D 0x368, + .security =3D 0x36c, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVDECSRD, + .name =3D "nvdecsrd", + .bpmp_id =3D TEGRA_ICC_BPMP_NVDEC, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_NVDEC, + .regs =3D { + .sid =3D { + .override =3D 0x3c0, + .security =3D 0x3c4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVDECSWR, + .name =3D "nvdecswr", + .bpmp_id =3D TEGRA_ICC_BPMP_NVDEC, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_NVDEC, + .regs =3D { + .sid =3D { + .override =3D 0x3c8, + .security =3D 0x3cc, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVENCSRD, + .name =3D "nvencsrd", + .bpmp_id =3D TEGRA_ICC_BPMP_NVENC, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_NVENC, + .regs =3D { + .sid =3D { + .override =3D 0xe0, + .security =3D 0xe4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVENCSWR, + .name =3D "nvencswr", + .bpmp_id =3D TEGRA_ICC_BPMP_NVENC, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_NVENC, + .regs =3D { + .sid =3D { + .override =3D 0x158, + .security =3D 0x15c, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE0R, + .name =3D "pcie0r", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_0, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE0, + .regs =3D { + .sid =3D { + .override =3D 0x6c0, + .security =3D 0x6c4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE0W, + .name =3D "pcie0w", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_0, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE0, + .regs =3D { + .sid =3D { + .override =3D 0x6c8, + .security =3D 0x6cc, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE1R, + .name =3D "pcie1r", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_1, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE1, + .regs =3D { + .sid =3D { + .override =3D 0x6d0, + .security =3D 0x6d4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE1W, + .name =3D "pcie1w", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_1, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE1, + .regs =3D { + .sid =3D { + .override =3D 0x6d8, + .security =3D 0x6dc, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE2AR, + .name =3D "pcie2ar", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_2, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE2, + .regs =3D { + .sid =3D { + .override =3D 0x6e0, + .security =3D 0x6e4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE2AW, + .name =3D "pcie2aw", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_2, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE2, + .regs =3D { + .sid =3D { + .override =3D 0x6e8, + .security =3D 0x6ec, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE3R, + .name =3D "pcie3r", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_3, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE3, + .regs =3D { + .sid =3D { + .override =3D 0x6f0, + .security =3D 0x6f4, + }, + }, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_PCIE3W, + .name =3D "pcie3w", + .bpmp_id =3D TEGRA_ICC_BPMP_PCIE_3, + .type =3D TEGRA_ICC_NISO, + .sid =3D TEGRA238_SID_PCIE3, + .regs =3D { + .sid =3D { + .override =3D 0x6f8, + .security =3D 0x6fc, + }, + }, + }, { + .id =3D TEGRA_ICC_MC_CPU_CLUSTER0, + .name =3D "sw_cluster0", + .bpmp_id =3D TEGRA_ICC_BPMP_CPU_CLUSTER0, + .type =3D TEGRA_ICC_NISO, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVL1R, + .name =3D "nvl1r", + .bpmp_id =3D TEGRA_ICC_BPMP_GPU, + .type =3D TEGRA_ICC_NISO, + }, { + .id =3D TEGRA234_MEMORY_CLIENT_NVL1W, + .name =3D "nvl1w", + .bpmp_id =3D TEGRA_ICC_BPMP_GPU, + .type =3D TEGRA_ICC_NISO, + } +}; + +static const struct tegra_mc_intmask tegra238_mc_intmasks[] =3D { + { + .reg =3D MC_INTMASK, + .mask =3D MC_INT_DECERR_ROUTE_SANITY | MC_INT_DECERR_GENERALIZED_CARVEOU= T | + MC_INT_DECERR_MTS | MC_INT_SECERR_SEC | MC_INT_DECERR_VPR | + MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM, + }, +}; + +const struct tegra_mc_soc tegra238_mc_soc =3D { + .num_clients =3D ARRAY_SIZE(tegra238_mc_clients), + .clients =3D tegra238_mc_clients, + .num_address_bits =3D 40, + .num_channels =3D 8, + .client_id_mask =3D 0x1ff, + .intmasks =3D tegra238_mc_intmasks, + .num_intmasks =3D ARRAY_SIZE(tegra238_mc_intmasks), + .has_addr_hi_reg =3D true, + .ops =3D &tegra186_mc_ops, + .icc_ops =3D &tegra234_mc_icc_ops, + .ch_intmask =3D 0x0000ff00, + .global_intstatus_channel_shift =3D 8, + /* + * Additionally, there are lite carveouts but those are not currently + * supported. + */ + .num_carveouts =3D 32, + .regs =3D &tegra20_mc_regs, + .handle_irq =3D tegra30_mc_irq_handlers, + .num_interrupts =3D ARRAY_SIZE(tegra30_mc_irq_handlers), + .mc_addr_hi_mask =3D 0x3, + .mc_err_status_type_mask =3D (0x7 << 28), +}; --=20 2.50.1 From nobody Wed Apr 1 09:44:36 2026 Received: from BL0PR03CU003.outbound.protection.outlook.com (mail-eastusazon11012053.outbound.protection.outlook.com [52.101.53.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20ABA3A5E61; Tue, 31 Mar 2026 11:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.53.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956260; cv=fail; b=VVECxtNiint0LSx0JHTp8nYj2fKS8XsZ5hTienHt0jDErRdjALnLyF2vQ5jVmDysmKvXjZAE4wO07nRbHmT+wka/2FTJMhg+6xxPPbM3FnthlNYwy/ak6TYx20Co11uvB1lEdxW6FCniJYIDvzeH9OhDBSudrqQKPdUX2BPzs4U= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956260; c=relaxed/simple; bh=B20rldJrHnDxwH/DOOKMAlL/Ct9rX2LCTvKlDx6zQ2Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=F5s6etzWONFZm65ypZInSJ1jVEVxopbZSGOfOoTE8Ew9FgR3Cx93azOUQME4OhoiQGNWUqQWCH5S1y7GsZgAE0ijk/Ip4jalAZibU0a/8bZnmA+EbIu2PsT/ZXEILWMP4ptN0MkCsb2Iy4pHzO2iueDSrl56bPt6LeVE2RJ9yyY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=CZEbcX+m; arc=fail smtp.client-ip=52.101.53.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="CZEbcX+m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FSzvpnoH6KlPv1+E+iJst9D8u1aveSMBPHc10GWMl34WhtavMiOZjrNOqT6lw0fvNKwlGmESUyqWxjXUR7mbWKZYqgtLi9ZiPdAen+SWE6RviG0hcO26OEP5HBE52D/whEWKmGqzTI1MlH2Bo3vb7h8Eo6E1z72B3btFIfYXDZl57j6He9cJe1He/kFOIROwL1qMg8NNvuPGkr78E/zPPA1FxXk76KpRxeEuF+c6QrDCD0ZazPCcbFZWXMxEj+ujUCL/srTdaNywJjQtgglpMItSBcTqoSyDyHDJTlIu2QvS0e4JrLrB/+6tMYel3nAI6e8arLMMveCn7mG+fAhsnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9+VXDrw9C3kAi4qtY/MzuHfj/N/7Anss9Qi6PFri9pc=; b=OgR2E3/0QG5C57AM1x+FjXMxLtImJt3pPa2ANQjUHeDnGkJ89zcYu8UFzBp6LvjKqvegdr1/khbD+jErAlaxo/8esJX01AfsOO6oVtrLKN6etuF5WNU5UrAbzW6gN5A8p6v6IFRsvCvW58ZQMg6KAosy74a1M120zhdv6cMA9vvfRPIPacMPSuqiAhZGp+Tf3Fzst27TTXztX32QQPsRGXUjNuzJdxaUH3hAQVXtzGtUbglmFBiolptfciUyIuPWCZfH9yFaB1TiL6PVBXWwmYUrKMLe8+IXRTCpFF3HRacMhYdtW7COanuWDblIPwZcsQdpCBIkBQaS5t54HygEwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9+VXDrw9C3kAi4qtY/MzuHfj/N/7Anss9Qi6PFri9pc=; b=CZEbcX+mES8/pP/XfogiUg6F0YIM47mZcFkBrXCvHA+lMbaDgSWM94hy7OS9PjREwmLW8RxR7MmXBVPvFpM3bsUYug297bYRk9EwQptc/Jd2Cj/EQV3chH6T0FF5OLn9Z9564nBoNUylrNQSdGuqcckPEBETH7I1qrXvvP4EMwYQA07oU5pTGaIfXqhPesb7OQopjyfnzsiGHbUafuTNP98jynAuHO0T/nrXYVVc1fWmXI7h4a8L5OnkNwu3jKULwbnATlOLhA5DOZB0km+47hq3rGaNpnjZvrDzbK1HmzYQ4u+0NwcOgMRTsZXEUTt8Nfhx7T+LI/00CMWXcMyeog== Received: from BL0PR02CA0055.namprd02.prod.outlook.com (2603:10b6:207:3d::32) by CH2PR12MB4120.namprd12.prod.outlook.com (2603:10b6:610:7b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.17; Tue, 31 Mar 2026 11:24:11 +0000 Received: from BL6PEPF0001AB4C.namprd04.prod.outlook.com (2603:10b6:207:3d:cafe::9a) by BL0PR02CA0055.outlook.office365.com (2603:10b6:207:3d::32) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.29 via Frontend Transport; Tue, 31 Mar 2026 11:24:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by BL6PEPF0001AB4C.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.21 via Frontend Transport; Tue, 31 Mar 2026 11:24:11 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Tue, 31 Mar 2026 04:23:58 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Tue, 31 Mar 2026 04:23:58 -0700 Received: from build-amhetre-focal-20250829.internal (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.2562.20 via Frontend Transport; Tue, 31 Mar 2026 04:23:58 -0700 From: Ashish Mhetre To: , , , <=thierry.reding@kernel.org>, , CC: , , , Ashish Mhetre Subject: [PATCH 2/2] dt-bindings: memory: tegra: Add nvidia,tegra238-mc compatible Date: Tue, 31 Mar 2026 11:23:40 +0000 Message-ID: <20260331112347.3897841-3-amhetre@nvidia.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260331112347.3897841-1-amhetre@nvidia.com> References: <20260331112347.3897841-1-amhetre@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB4C:EE_|CH2PR12MB4120:EE_ X-MS-Office365-Filtering-Correlation-Id: d79b9700-e949-4525-b054-08de8f180865 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|36860700016|1800799024|18002099003|22082099003|56012099003; X-Microsoft-Antispam-Message-Info: jYAInSMIFeqgxgTJOyB8mn8/BLTWoOE06ecfM2MK+geiEP1va8dDW5olZgcTbCUUQ1+iUQeh4Rv3ajoSPf+pJ2buNU3tMe3eI8gHg2LZa3r2TUehwDqdO1IzLLE9i2WORQ6bB6Z/3uSLpDEqsQQXvsql65igGqNxm3KuzzCDo+MtIZDwVt/gSz2/rj+J7qmNwVLLqllNgly/sTC5bn1ob49BzgysmEMbdWamHzx87a63eT2TAmEXpKHoA3cY1/DdGNK0eGth+CkyzqcqmTlspueQZOpKXf3U0mWyTs2A+NgiRTundBKFT0uhCLVsIEA+fzSPq4E9eX07iHlfcEtEQaFtQyV+Ww017+kKsPc1xGtegu5dPOob1KFuaZvfEiVjcwqIhsEnByrDoxW8dIHmlbfKGy8H+RIMq3EfHxqlx9CnPG/h0I8b4ENynSpDNrjTCvYg0JxmPUcezhJzTlBH7tFSAjrpoW9mGVjDjHFYM8oyFjeFds9UyswpfsL3nXOgoTeXRyHZGQ0eLj13EgExPOzKR+DH03+jeBbK6ohvHBypvkrRvO45Tgw+W+nPROhWZLlgdtPEHG/m0IA2TxL+kLUqKCDT1YrGNU0dthACXG8TJkdeF+EwgdHOfmBcHT61l1UO+Kh6pGksD09HNcqX2oIZ8g5Q9zboc54aQM9f8utNC8xNTkjbu6Ek6p6wYcBhOX6pG/As5LYgCIZPAodWD6Px9IN60HOSWQoeXKBxN14eZJM6uoAsbhIzEk/E5tzOMyAZ+xzzEeDiALENO3B2OA== X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230040)(82310400026)(376014)(36860700016)(1800799024)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0HlP44UTQEc2+VurwnlxR1n5LsP11MzBse8ivgiRVcaiJFlSfseam+Yy86wbQVvv/eSDQPBDgTeaMg4y20uhjcma3He6fCWO8IaYD/cpwIsYyuM/e52E3RAww+Dcsq+EcqW2i4v7X9e6xWjas5vINX7Kwc9fFTmQ9wo47ZuwdKeAr7jKByszONH4dQI8kPnFXpYiT9U1MLJrzdicR0zYTihjOsqjAY64oofdEPO2hfYH6J3/aqfUJhWmeNDoArhJdVoPO3go1G3loeM0HGr8Yb+dHBiW/I1UEpw4EeQzxCzGMVV7e04bI0G7T4t0LgvlchrheOLim7qMdVFyfVHrJAqJ0FKCTgMpsdcAt4bc32oJOXHaMUZwEb34vPyUZRH22aU7kpfbuMpsEyr627cLiyPS3Oz1c0g/Wj+ybdJx/m2ouK4/OAaBA8za3t5IYr+g X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2026 11:24:11.4104 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d79b9700-e949-4525-b054-08de8f180865 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF0001AB4C.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4120 Content-Type: text/plain; charset="utf-8" Document the device tree binding for the Tegra238 memory controller. Tegra238 has 8 memory controller channels plus broadcast and stream-id registers. Add the stream ID header (nvidia,tegra238-mc.h) defining ISO and NISO stream IDs for SMMU configuration. Signed-off-by: Ashish Mhetre --- .../nvidia,tegra186-mc.yaml | 31 ++++++++ .../dt-bindings/memory/nvidia,tegra238-mc.h | 74 +++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 include/dt-bindings/memory/nvidia,tegra238-mc.h diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,te= gra186-mc.yaml b/Documentation/devicetree/bindings/memory-controllers/nvidi= a,tegra186-mc.yaml index 7b03b589168b..e008cb1ccd28 100644 --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-= mc.yaml +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra186-= mc.yaml @@ -32,6 +32,7 @@ properties: - nvidia,tegra186-mc - nvidia,tegra194-mc - nvidia,tegra234-mc + - nvidia,tegra238-mc - nvidia,tegra264-mc =20 reg: @@ -266,6 +267,36 @@ allOf: =20 interrupt-names: false =20 + - if: + properties: + compatible: + const: nvidia,tegra238-mc + then: + properties: + reg: + minItems: 10 + maxItems: 10 + description: 8 memory controller channels, 1 broadcast, and 1 fo= r stream-id registers + + reg-names: + items: + - const: sid + - const: broadcast + - const: ch0 + - const: ch1 + - const: ch2 + - const: ch3 + - const: ch4 + - const: ch5 + - const: ch6 + - const: ch7 + + interrupts: + items: + - description: MC general interrupt + + interrupt-names: false + - if: properties: compatible: diff --git a/include/dt-bindings/memory/nvidia,tegra238-mc.h b/include/dt-b= indings/memory/nvidia,tegra238-mc.h new file mode 100644 index 000000000000..be24c0eb3f15 --- /dev/null +++ b/include/dt-bindings/memory/nvidia,tegra238-mc.h @@ -0,0 +1,74 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. */ + +#ifndef DT_BINDINGS_MEMORY_TEGRA238_MC_H +#define DT_BINDINGS_MEMORY_TEGRA238_MC_H + +/* special clients */ +#define TEGRA238_SID_INVALID 0x0 +#define TEGRA238_SID_PASSTHROUGH 0x7f + +/* ISO stream IDs */ +#define TEGRA238_SID_ISO_NVDISPLAY 0x1 +#define TEGRA238_SID_ISO_APE0 0x2 +#define TEGRA238_SID_ISO_APE1 0x3 + +/* NISO stream IDs */ +#define TEGRA238_SID_AON 0x1 +#define TEGRA238_SID_BPMP 0x2 +#define TEGRA238_SID_ETR 0x3 +#define TEGRA238_SID_FDE 0x4 +#define TEGRA238_SID_HC 0x5 +#define TEGRA238_SID_HDA 0x6 +#define TEGRA238_SID_NVDEC 0x7 +#define TEGRA238_SID_NVDISPLAY 0x8 +#define TEGRA238_SID_NVENC 0x9 +#define TEGRA238_SID_OFA 0xa +#define TEGRA238_SID_PCIE0 0xb +#define TEGRA238_SID_PCIE1 0xc +#define TEGRA238_SID_PCIE2 0xd +#define TEGRA238_SID_PCIE3 0xe +#define TEGRA238_SID_HWMP_PMA 0xf +#define TEGRA238_SID_PSC 0x10 +#define TEGRA238_SID_SDMMC1A 0x11 +#define TEGRA238_SID_SDMMC4A 0x12 +#define TEGRA238_SID_SES_SE0 0x13 +#define TEGRA238_SID_SES_SE1 0x14 +#define TEGRA238_SID_SES_SE2 0x15 +#define TEGRA238_SID_SEU1_SE0 0x16 +#define TEGRA238_SID_SEU1_SE1 0x17 +#define TEGRA238_SID_SEU1_SE2 0x18 +#define TEGRA238_SID_TSEC 0x19 +#define TEGRA238_SID_UFSHC 0x1a +#define TEGRA238_SID_VIC 0x1b +#define TEGRA238_SID_XUSB_HOST 0x1c +#define TEGRA238_SID_XUSB_DEV 0x1d +#define TEGRA238_SID_GPCDMA_0 0x1e +#define TEGRA238_SID_SMMU_TEST 0x1f + +/* Host1x virtualization clients. */ +#define TEGRA238_SID_HOST1X_CTX0 0x20 +#define TEGRA238_SID_HOST1X_CTX1 0x21 +#define TEGRA238_SID_HOST1X_CTX2 0x22 +#define TEGRA238_SID_HOST1X_CTX3 0x23 +#define TEGRA238_SID_HOST1X_CTX4 0x24 +#define TEGRA238_SID_HOST1X_CTX5 0x25 +#define TEGRA238_SID_HOST1X_CTX6 0x26 +#define TEGRA238_SID_HOST1X_CTX7 0x27 + +#define TEGRA238_SID_XUSB_VF0 0x28 +#define TEGRA238_SID_XUSB_VF1 0x29 +#define TEGRA238_SID_XUSB_VF2 0x2a +#define TEGRA238_SID_XUSB_VF3 0x2b + +/* Host1x command buffers */ +#define TEGRA238_SID_HC_VM0 0x2c +#define TEGRA238_SID_HC_VM1 0x2d +#define TEGRA238_SID_HC_VM2 0x2e +#define TEGRA238_SID_HC_VM3 0x2f +#define TEGRA238_SID_HC_VM4 0x30 +#define TEGRA238_SID_HC_VM5 0x31 +#define TEGRA238_SID_HC_VM6 0x32 +#define TEGRA238_SID_HC_VM7 0x33 + +#endif --=20 2.50.1