From patchwork Mon Oct 16 05:34:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kartik X-Patchwork-Id: 13422505 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97FE8CDB465 for ; Mon, 16 Oct 2023 05:35:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B4498D004C; Mon, 16 Oct 2023 01:35:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 363C88D0001; Mon, 16 Oct 2023 01:35:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1DDE68D004C; Mon, 16 Oct 2023 01:35:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 0A2498D0001 for ; Mon, 16 Oct 2023 01:35:21 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D41E3160A98 for ; Mon, 16 Oct 2023 05:35:20 +0000 (UTC) X-FDA: 81350211600.13.11D671C Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2065.outbound.protection.outlook.com [40.107.220.65]) by imf14.hostedemail.com (Postfix) with ESMTP id D3B9710000F for ; Mon, 16 Oct 2023 05:35:17 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=n0LMXQSn; spf=pass (imf14.hostedemail.com: domain of kkartik@nvidia.com designates 40.107.220.65 as permitted sender) smtp.mailfrom=kkartik@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697434518; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Mc7Y8uE9T1ZTCbSjAzTP5hNlgaBupFVz56cm0VutrO4=; b=6PORcST7+d/79hkPDE3P9YvipoMR4LoYEIc2gkElX0jMAgS7InkXMa1dc+P9FxQFclWiAk mz7rZYn80sSD1yYo0eRTCWhHJF6ZPXNmWr6FxWzBN8f138g7KZzCXf69O5hPGFxVXm4TJd W1yiSwcZNC8WZXP1z1ecEXyH+/fK+lQ= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1697434518; a=rsa-sha256; cv=pass; b=mP2CFgt1geb+EBCcd19iWqBdyxVLP56OkjUnQlU9ctRWDMgzEDIyyl1fBUsnBXsUplq04E HQVSPDwF/TTdom5SGScDnHsV6t8a7CaaRKKwrWNb5yl8HpGCrKaKhvOPqJjX1Lr5KlmcQ7 J/uE4GVqckBno7QqPqyoLNdu//bqNeg= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=n0LMXQSn; spf=pass (imf14.hostedemail.com: domain of kkartik@nvidia.com designates 40.107.220.65 as permitted sender) smtp.mailfrom=kkartik@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mJh4oq8AKjYQsYnUFemE9DwtQp6Dz6fftaki45Z/AAyo4O0YiUVquVs5mUHvaFsl9JlNwDmBuRNF57EPM7zW/o7zvQ+4NJTTUqJ/Y7lstztAHaVeYoARuDbGjAHQKE6DiDMWLg/zyfi4yHD3QB7/vGEsBQb+IxYaCIkWuOuifoeXOqCsGsbA7Tpx32kvTxMke7R604Zl1dm7N5S0VdAm8N9hCca10JZTBzTI7/P+YCHCZLYbQAWImjNQKuDPNiOJsA1/1KWsIw8Sv/1FpPXWf/2f5IROera0wvWje2/AM+vAcuUiad/X9plhPrIAgyFa3cEtFifABj4RE4+z5UKWuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Mc7Y8uE9T1ZTCbSjAzTP5hNlgaBupFVz56cm0VutrO4=; b=i4aAuhCFxGl8Bsk8CtIxgP2b/K0puJa2Q9G4qYo+Eib3IPX+nbQeSu3Nk426Fyf6wzLi+toogfpf08cWkbWnk78YVHiN8HMs8uENBKEj7n5u6rE0dyl5vYF+te7ldqxC9GT2DBnWyxy4zc/eMTdlJzFGcLjD1fgg4+sVgLl6mrYWqlX/w/NP9fVuE2gstvKPByz0VatSws8erkKlVueeeofgI55ISBHYzV4MUMbDDC3BPF/v87fD/WY5XZwLmcWNabtDG6aLA5VJRD1rTpRwRIQrErDE9P4IPTP2lyM0ERtaS36mdBvJmogfrjKbUD6mobvfA4+quD5YXh9TP7j43A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=gmail.com 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 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=Mc7Y8uE9T1ZTCbSjAzTP5hNlgaBupFVz56cm0VutrO4=; b=n0LMXQSnSVl+CWpQvI03RXfX5pGV+gZiusybbOkd3yG213vrcv4TSXLFmSawh9lQCVxhROyDfQxtZLAqhDJRClErc6Js8p9DQkTqEi322sxe8ntDReNBdeRsL9jWt+CmeMIj/PKz+J7XzOHhLayAPGPs9bwpDPIctSDJi0yvpB0lcJjGafWIEu5dENNKkqT2OZS4o80T8DgjzKhxWMY8b5/Z44SCO7WWk54DjSl3pGCjxEhrmPXmBm5aQyMdAco0REiQMauYTVcqkLU+SSRxLewepPvt80wNrpso82e3aBZ27zjX2a/dQGNbFoGJ4lVeNUYcaRTV4sWMAgJeDBLfZA== Received: from DM6PR01CA0020.prod.exchangelabs.com (2603:10b6:5:296::25) by MN6PR12MB8491.namprd12.prod.outlook.com (2603:10b6:208:46f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35; Mon, 16 Oct 2023 05:35:14 +0000 Received: from DS1PEPF00017096.namprd05.prod.outlook.com (2603:10b6:5:296:cafe::9d) by DM6PR01CA0020.outlook.office365.com (2603:10b6:5:296::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35 via Frontend Transport; Mon, 16 Oct 2023 05:35:14 +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 DS1PEPF00017096.mail.protection.outlook.com (10.167.18.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22 via Frontend Transport; Mon, 16 Oct 2023 05:35:14 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) 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.986.41; Sun, 15 Oct 2023 22:35:06 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 15 Oct 2023 22:35:05 -0700 Received: from localhost.localdomain (10.127.8.10) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Sun, 15 Oct 2023 22:35:00 -0700 From: Kartik To: , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 8/8] soc/tegra: fuse: Add support for Tegra241 Date: Mon, 16 Oct 2023 11:04:11 +0530 Message-ID: <20231016053411.3380-9-kkartik@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231016053411.3380-1-kkartik@nvidia.com> References: <20231016053411.3380-1-kkartik@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017096:EE_|MN6PR12MB8491:EE_ X-MS-Office365-Filtering-Correlation-Id: e2a9cc61-c5cb-4cca-572f-08dbce09ac88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GPblzzhVtLPfcaentQ5isVSfwcpASwPLZ+iqWnKpKQ+3nhQmoLGJQzJYKR3xE5VFBVLC1MUvANPEgzPaDuuVUYqFmit1BdhpHtkJHibMfePWA2Hy/9NXae6STqwrMtSiX3eGHyjr3AyLIv5R5V328ucn2+6+almlLKNqThf85eiaSQejP+mBOqaG75Ni4zF8gX2I6p9QdSvrv58QVEFxI+f7r0ETfOwp4AvotqVzRZF9h81wai63bsBftccUdQByDUCO/UMJBr+Q+YgXd4iBVVhkoqSZ5PjAEClPqxjDg/pzmNw7z9uOqm+7WnhSc5XVAK3U2XwuKplBPuhEtapRi99duLmyrT1khTZEGIVqjFKvawOXRmnLqahSZ2Oga9sXjyNA8/fTt4hAAY2aUtAbBODxnvnuN9ZP4x2rxSz0Rl6+Y1JLOvMt6w3YXyAs7bE8k6IEua+g/5iNaO+Zl39H/ZBtEEeUr5aKVae4mZkbch+o97jG6eMIYbXTajnVIXBCgqTIsXh5l821lndd1OgCKDLlq1W1+h3rkby3sRcKrbLESyQXM0Aw8Eg/Y7kI4U+kdTmV1bD+HTIIwBm50krlIzMTFyXBOiVtn0XzaZVcz2GtEqWv7lD/5XyoeiW6YDbj6zMu8TRknoC36W3LTv1yZqXOL76+S3FtPQ3hcUVoP1mclpKbkWyyom+CAqBdwQIwfBDybbDaH8ZF8m9fzk9fmAYSJp7exKn/pjZjqNDELJ3BBYKOm7Jg7PTuUuoWqZxUQC5YA9HfCoEMrg8OcfgxWL+rTqXvOCqZcVacLjioxuqJFoEv6aWHSze2jtocpLgB 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:(13230031)(4636009)(396003)(136003)(376002)(346002)(39860400002)(230922051799003)(451199024)(64100799003)(186009)(82310400011)(1800799009)(46966006)(36840700001)(40470700004)(40460700003)(40480700001)(478600001)(110136005)(70586007)(70206006)(6666004)(921005)(7636003)(47076005)(83380400001)(36860700001)(86362001)(356005)(82740400003)(316002)(2616005)(26005)(1076003)(426003)(336012)(41300700001)(5660300002)(36756003)(8936002)(8676002)(7416002)(2906002)(83996005)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 05:35:14.6294 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e2a9cc61-c5cb-4cca-572f-08dbce09ac88 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: DS1PEPF00017096.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8491 X-Rspamd-Queue-Id: D3B9710000F X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: hyuqgimzz7aec3xayiakmudd8eof8ppd X-HE-Tag: 1697434517-273371 X-HE-Meta: U2FsdGVkX198h4ksgZ9uQIo/Q9+pIOwz2KzvtNmCL9Zem/JHwSjxweKlXoZUfVb0CHeiloa9gYcA163ZCgbTduB8y6E76QyXABDJ0vV4LbTqDI/UgtnELW6wxRfHaS9j5izTEzmrOIW5JkfxrxShWnZPvAkdVVQwG9PB8KVI62qZndt8ppggOqrip4HOank00Gp0G+8MOx5WcwS+lX1h9w19F2aB3NdTFmF5PWO5gLn4AELLFqt5OQplVvUOC6/daKhT3/zD7+IY9ZHfVHICB5N7WBSuAybrfs70QlwowgaBmspse8YuaRSK5wfCXIsZjVFUvayqNVkbpPk2QrB/K+9GSYoDQqTGRBmmxYymwwnaJql81txihgHUb3VfjzIbOgxWEWnR7shVRhNcHHoH3B/9N2S/WdfeufsoStkQKnw/d/3Q5IlIG+sJoEeS1hUEu9msJ9fgHIoXD2mqksWrWva8QjlFHFOfcwy3tyqlaXdYh9rfR9XkljIpy4E9lFTcXGrBdkpfn1mkWUY5N+psvVDctfaW1xx8EtoKhbYMTlM4pUQm/7+UMhhBWD8ELQvizU45dfw/XozsR1LX2GbwYGsU+CgBErT4Puy5zCqLWoMw4oYEUSGCIC3ZiKKYjw9soV0Cq+EYQvZTtuJDmmlbIu+JR5xGwnNmfH3LKBbp8XkvYcMony7jL4XTHlbAUcVzZhv3ZeMYeCuc9d9g5U81+TmtSeHpaRtoksbBBvvyNtJ4z1Y4Kp2NmQ43f962z++1HiqIQ7GhgYX67hjvuFk1Iwk+ZlIgwLxiG7ISGXMbiryApAI1zGoLcWZBcOXE4xz0gFPgkzDtIs7hLN16/tDbPDByrshvGdCdWG62yBFEO8KsdVqBLH9Z1J64BglUqB7R7g8yVwKe8yKzPytOIa9RAjT30Wz2TowiVeFT5NdYq3+E0Bw93cSvc/YUQZgXKT67DXH4RvANHqOSUWYO5+6 vALJ6Lnp gFrBZI1tjjXckjlbbgi+Zu9Ww/AzcBhgz+6Rha2Z8bG4mJKISVSgWcRqFS0y5knzpThqt5WP4Vs8Q5BLnd1NuZbi1l9XMqyeL7AVZxH/Y1re+s7f4T+YnHcm53MVrZGMzVkiT8xxhkj0e/znL2Qmq6XFcNmgoYMnznEcJxGltOViMEwihD9twrWoVnoM2gWu3cs7RSk2Np43Ny8n8WVrAjr6y4GAdpQjzPHdT88RCSxrFOtjpN3pCYfWE3qSvKJFy2f8xfZaVim+HmL20Mq6xv0/b4fAcnrZa/9yFH+rq0DYZ0uKTS3pSgyJhEV0kqhRMio2r0/6LUxGRVPWwr69RtSG8jg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add support for Tegra241 which use ACPI boot. Signed-off-by: Kartik --- v1 -> v2: * Removed few entries from tegra241_fuse_soc which were initilized as NULL or 0. --- drivers/soc/tegra/Kconfig | 5 +++++ drivers/soc/tegra/fuse/fuse-tegra.c | 5 +++++ drivers/soc/tegra/fuse/fuse-tegra30.c | 20 ++++++++++++++++++++ drivers/soc/tegra/fuse/fuse.h | 4 ++++ drivers/soc/tegra/fuse/tegra-apbmisc.c | 1 + include/soc/tegra/fuse.h | 1 + 6 files changed, 36 insertions(+) diff --git a/drivers/soc/tegra/Kconfig b/drivers/soc/tegra/Kconfig index f16beeabaa92..33512558af9f 100644 --- a/drivers/soc/tegra/Kconfig +++ b/drivers/soc/tegra/Kconfig @@ -133,6 +133,11 @@ config ARCH_TEGRA_234_SOC help Enable support for the NVIDIA Tegra234 SoC. +config ARCH_TEGRA_241_SOC + bool "NVIDIA Tegra241 SoC" + help + Enable support for the NVIDIA Tegra241 SoC. + endif endif diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index daf39f0e6d93..eac95946c425 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra.c +++ b/drivers/soc/tegra/fuse/fuse-tegra.c @@ -171,6 +171,11 @@ static int tegra_fuse_probe(struct platform_device *pdev) case TEGRA234: fuse->soc = &tegra234_fuse_soc; break; +#endif +#if defined(CONFIG_ARCH_TEGRA_241_SOC) + case TEGRA241: + fuse->soc = &tegra241_fuse_soc; + break; #endif default: return dev_err_probe(&pdev->dev, -EINVAL, "Unsupported SoC: %02x\n", chip); diff --git a/drivers/soc/tegra/fuse/fuse-tegra30.c b/drivers/soc/tegra/fuse/fuse-tegra30.c index e94d46372a63..2070d36c510d 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra30.c +++ b/drivers/soc/tegra/fuse/fuse-tegra30.c @@ -678,3 +678,23 @@ const struct tegra_fuse_soc tegra234_fuse_soc = { .clk_suspend_on = false, }; #endif + +#if defined(CONFIG_ARCH_TEGRA_241_SOC) +static const struct tegra_fuse_info tegra241_fuse_info = { + .read = tegra30_fuse_read, + .size = 0x16008, + .spare = 0xcf0, +}; + +static const struct nvmem_keepout tegra241_fuse_keepouts[] = { + { .start = 0xc, .end = 0x1600c } +}; + +const struct tegra_fuse_soc tegra241_fuse_soc = { + .init = tegra30_fuse_init, + .info = &tegra241_fuse_info, + .keepouts = tegra241_fuse_keepouts, + .num_keepouts = ARRAY_SIZE(tegra241_fuse_keepouts), + .soc_attr_group = &tegra194_soc_attr_group, +}; +#endif diff --git a/drivers/soc/tegra/fuse/fuse.h b/drivers/soc/tegra/fuse/fuse.h index a41e9f85281a..f3b705327c20 100644 --- a/drivers/soc/tegra/fuse/fuse.h +++ b/drivers/soc/tegra/fuse/fuse.h @@ -136,4 +136,8 @@ extern const struct tegra_fuse_soc tegra194_fuse_soc; extern const struct tegra_fuse_soc tegra234_fuse_soc; #endif +#ifdef CONFIG_ARCH_TEGRA_241_SOC +extern const struct tegra_fuse_soc tegra241_fuse_soc; +#endif + #endif diff --git a/drivers/soc/tegra/fuse/tegra-apbmisc.c b/drivers/soc/tegra/fuse/tegra-apbmisc.c index e2ca93de6c1f..c72bdb3e4e2c 100644 --- a/drivers/soc/tegra/fuse/tegra-apbmisc.c +++ b/drivers/soc/tegra/fuse/tegra-apbmisc.c @@ -64,6 +64,7 @@ bool tegra_is_silicon(void) switch (tegra_get_chip_id()) { case TEGRA194: case TEGRA234: + case TEGRA241: case TEGRA264: if (tegra_get_platform() == 0) return true; diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h index 3a513be50243..8f421b9f7585 100644 --- a/include/soc/tegra/fuse.h +++ b/include/soc/tegra/fuse.h @@ -17,6 +17,7 @@ #define TEGRA186 0x18 #define TEGRA194 0x19 #define TEGRA234 0x23 +#define TEGRA241 0x24 #define TEGRA264 0x26 #define TEGRA_FUSE_SKU_CALIB_0 0xf0