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 Rajput X-Patchwork-Id: 153200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3252696vqb; Sun, 15 Oct 2023 22:36:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfdmKWni5TRWyyyeEbwlDQc5mg/lvC6pt9pM4l+zRM6tsZC233u9Uv6ytmMPoHz9qcjxyu X-Received: by 2002:a05:6359:639d:b0:149:cbfd:c663 with SMTP id sg29-20020a056359639d00b00149cbfdc663mr26047425rwb.2.1697434605195; Sun, 15 Oct 2023 22:36:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697434605; cv=pass; d=google.com; s=arc-20160816; b=dGKX7St8I3vUoQsngEcwrO7emcfNS3QaW1XJKuX8YprdJKDk844qki3Iephk2mogMu MliBSpfUfbTNkWWfrP9yPMGvCOQA/C1Qy5xyx4NC7QarR//kZ0KyCJA3+XYugpCg1ucX XOVFqO5HqWtNSuIbwm1D1bdvKOi4njXL2mqaveAAXS0GNFv3dGZZKALDAgxlTyyWyjUG +BK8xJ++r6VWE0muC67nPaNqW52mcVHiBz0RVIAzsIrXJJvjYD4fVRAQ0RNXdx1ePDNt r9fhqG6qKSpHbiDqOudgtDzNI/+FzCPn8qaoNTQjAuvax0/GovFPoLat0Q3v8mBPrBX3 LU8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Mc7Y8uE9T1ZTCbSjAzTP5hNlgaBupFVz56cm0VutrO4=; fh=WbbGAqTwxxTqGDtZLSrOYDkqRNeOYHUFpJWT8dEgneI=; b=EyxHcRXrGvj4NKPeRLRYQPI5OmABbXaDy/vZvx85NrdFlpXTMa5hWXPmoecYTxUzQJ Ym/ZQZYAWN9uAca6QynWOcphj6uQrPRyKVvu8y5zNbK10vpvKLo4pu+K7QLPTrMncz8J 8XI/lRIb+BsZfvgfPNDZc8E0XQniLhfFJC1AM8iTGe307yuzq9ZfYCtRJZwTV4vlkD+L noZ419DXB4dc/MErjXI+xpmZyXZh6GzyNkAwN9kL++q0esgML9paKsv8SXFqTQboE97e 8D0b/OyBhTCCKwlen5ijh8NsyzAI4YhafIkHD9CGX+lieIvvwjCnLl2ElIpC5XbgqelT A8FQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=n0LMXQSn; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id i4-20020a635404000000b0059d479f3da1si9628364pgb.852.2023.10.15.22.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 22:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=n0LMXQSn; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 49596807C869; Sun, 15 Oct 2023 22:36:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231759AbjJPFfp (ORCPT + 18 others); Mon, 16 Oct 2023 01:35:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231876AbjJPFf0 (ORCPT ); Mon, 16 Oct 2023 01:35:26 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2070.outbound.protection.outlook.com [40.107.93.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED8510B; Sun, 15 Oct 2023 22:35:16 -0700 (PDT) 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-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 15 Oct 2023 22:36:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779889188792486159 X-GMAIL-MSGID: 1779889188792486159 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