From patchwork Mon Oct 16 10:14:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kartik X-Patchwork-Id: 13422921 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 6BDEFCDB482 for ; Mon, 16 Oct 2023 10:15:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0DAC08D005C; Mon, 16 Oct 2023 06:15:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0652C8D0001; Mon, 16 Oct 2023 06:15:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CEFE38D005D; Mon, 16 Oct 2023 06:15:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id AD3AE8D0001 for ; Mon, 16 Oct 2023 06:15:54 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8682D1A0BA8 for ; Mon, 16 Oct 2023 10:15:54 +0000 (UTC) X-FDA: 81350918628.23.AE3B8C6 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2075.outbound.protection.outlook.com [40.107.92.75]) by imf01.hostedemail.com (Postfix) with ESMTP id A151740015 for ; Mon, 16 Oct 2023 10:15:51 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=RqDIbZdV; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf01.hostedemail.com: domain of kkartik@nvidia.com designates 40.107.92.75 as permitted sender) smtp.mailfrom=kkartik@nvidia.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1697451351; 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=3b6A1/4Co5BKI2JVzzuIO8+xdLoWsK1IncyT9iv4Tgc=; b=xvudTVayALk/ix9DtpherkICmRf2Xmun8FbdzMS8/3woZzoDb6pY2TdwCOBcCFrxizOkpj XLolynFEiK6w5HLF2jiwSzT8t4TTi2swEBGbENeRXMTPOjRs9VSjl1w6i+leSLpziPqDef 4mfKrLWzOUOs6XGbY3uKj+sWG7aqmg0= ARC-Authentication-Results: i=2; imf01.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=RqDIbZdV; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf01.hostedemail.com: domain of kkartik@nvidia.com designates 40.107.92.75 as permitted sender) smtp.mailfrom=kkartik@nvidia.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1697451351; a=rsa-sha256; cv=pass; b=1HV2bUsg+nzSsiOPDrnUcyDtJFdcBFi3XYe+YoDBV349LwN0ciWNJsTv2aObBsNoMjh9Dh XFemZWCUonkaJQNtRnth1nrK3SX2JdKAoj4YdAr4CYQXXaExoecxVhRbVQCakzhYuBnkHW TP+xTRnY7Mk+WVdpQ7wxbEg/WP5wYXA= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JEh/PCfLYBex2xQ9P3yg2SrM7VZ4pL6oU41VRbRd91FZ/kTr2nWYJB/Bo0SIck5t2bsmYDbKRTWvrBNwZPEMcRg/CJ4HLpbgO4mTwFxUAybDyz5RrF1JgX2UtGvXpI6Tm+peUIo9zrjFuKM9KGe609GE0Sp6c2F265rD0oiyyRug5CZC0/8IMFCfDMKVwt50EGXxMMhe5BQKhQwSFBmglvwuc3N7Y+QabvVaWOit5coNRmnSK88vBAjSxd++fFfjPXHLNFvkvcTmrfj0dyAh3jeq5clV1TjBDaxVl7Sc18HS4VV3xindaSH9dTrn6wDCashbNKsb1ug11ASsAHoD+Q== 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=3b6A1/4Co5BKI2JVzzuIO8+xdLoWsK1IncyT9iv4Tgc=; b=CySMYKHDMWXTWbiDfGv19E928BhKCrM8rETUm6GQYy2FeHVrowGvuKF25/NCfF0Ii9EJiM7mqZ7PrM2XOU4yhoRmQSWF3L7NGzCtX9jQh+nHdijub3Wb0t9dxR7k8X2M5dIJAJSYK1HtWoYplC3lZtCSwDRAfo9D8ka4fLUWr0olPz5W5wh2pZ1QBIsg7U3TtbNA8rYQwe+4uJ6YRukodKwcgSuAR8Q0vMf0QgoNBUzblwPgXw7zuiQmsRHbi0ARJmHvzj6vJP2gFmogyuYOuLPxho3+4Bi09cdOIzl1U03WF0/gsplnLg9oK2PStvR+aTEFx1kRBlom66HgpNeBMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=3b6A1/4Co5BKI2JVzzuIO8+xdLoWsK1IncyT9iv4Tgc=; b=RqDIbZdV8u6euTRJ2wDzj9pACLWR4UMZdfY4VTm4hrgDBMtpNNjg2lJWGZl7Ky5ELdGIOuKxXoAknptNy+7FkVM+WQgWDtkbegV8mO/meNwbzdj4kbtbwomdle/eFhoaLngJNlMpuolKy2aRz6inMJBw1iphLNUTk4OO6iJcIT/qDXz471v3VcsvJOb2v/hm8fqICLuTi2I5F/FPLZ+khsIZvs8KCRUGSmGHv3YayHCIA1nLLIUyfckBx2SpIT8Kj9x7LtQbSN/jqEk6qrDorM5Aw2BiBp2rT6fV1fNkDlkgHfgeANO4Lup2ayZ/qd+nFgFDzPhOVj9vaovlB1sEvg== Received: from DM6PR21CA0027.namprd21.prod.outlook.com (2603:10b6:5:174::37) by SA1PR12MB6920.namprd12.prod.outlook.com (2603:10b6:806:258::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.44; Mon, 16 Oct 2023 10:15:48 +0000 Received: from DS3PEPF000099D6.namprd04.prod.outlook.com (2603:10b6:5:174:cafe::8c) by DM6PR21CA0027.outlook.office365.com (2603:10b6:5:174::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.2 via Frontend Transport; Mon, 16 Oct 2023 10:15:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS3PEPF000099D6.mail.protection.outlook.com (10.167.17.7) 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 10:15:48 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 16 Oct 2023 03:15:36 -0700 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 16 Oct 2023 03:15:35 -0700 Received: from localhost.localdomain (10.127.8.10) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Mon, 16 Oct 2023 03:15:30 -0700 From: Kartik To: , , , , , , , , , , , , , , , , , , Subject: [PATCH v6 8/8] soc/tegra: fuse: Add support for Tegra241 Date: Mon, 16 Oct 2023 15:44:36 +0530 Message-ID: <20231016101436.7146-9-kkartik@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231016101436.7146-1-kkartik@nvidia.com> References: <20231016101436.7146-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: DS3PEPF000099D6:EE_|SA1PR12MB6920:EE_ X-MS-Office365-Filtering-Correlation-Id: 35501aed-6597-400d-cabc-08dbce30de1e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QDjo7XemUXDn1njIO52G3Bz2qvTFC6LSS4kEaKaRrs000AJSLg1u34Ek7G8rPPcEKg9irVtE1x1XLUoT62BsITkmoBFMQpjbdvZCqN2VKFLfyww0W0vPxJv2gR5ZjtEMH7T6SUHFkY1q4ftQQv2j4kEiSWhiDHgRQPhUl6i+JQ5eSVlwiyn32RsC7EsLPeuzlPj5wP46croWSYZAQq0I+6wJ9L6nOwg/pfolDzJ8FBkYzSpRG4B+5/2UXA2+qH/ILmbm8rn1NDGBzy3txxMmvn4d9epvBY8p/kITjiVozjPURDoFdzQWO0MfUZn6CJ1TuxHrUQZVa7jPfAoVZ0Sc55ZqIsD8JxieRTCvpISAe2dw+ekrlsrcmSZaplPdOI2B9mAM+HEWW42dwl2cpaqTHQosBsvfhZqzxWDI1NyviLJVBFqn6jrsY9OidJBnRPurOwYE9X44wNeinpbBbVc5DW1ZhGkDgagOyyYylcHwlg9HHACrUPh/1XwHos6bICDBbEDd7e00RYslVW3kYbZ8ifnH/+XzeXWX6wA+PmMIOg7fgcLSTVT5rvli5mvhvWqAbt2VDVNB1+HLkZpc/DDn4lZNMq1hEqX3k7eD9Sot6mU2Lf3FN1BVZjH64/6tNEdSUyeKr9GjEQRHUwlXELJxDoZ+uL4RodEdnDaOgkKP37BwSdRhM9I2bxqQ+osfOdso6C/7/sTSC1/p8X2HYRNFvLfru9npEbHfqfJJCRMdvQgIh+3cyYDcNpdA35OvwknrsAMYNDieiIwdShORrV6lqF3aReaQpZER6R9J7LrAjuCqekb7eAVXtwcOkEo5qNaG X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(396003)(136003)(376002)(346002)(230922051799003)(64100799003)(451199024)(82310400011)(1800799009)(186009)(40470700004)(36840700001)(46966006)(82740400003)(5660300002)(921005)(8936002)(356005)(7636003)(41300700001)(8676002)(40460700003)(86362001)(40480700001)(7416002)(2906002)(1076003)(36860700001)(336012)(2616005)(478600001)(26005)(36756003)(70206006)(426003)(70586007)(47076005)(110136005)(316002)(83380400001)(2101003)(83996005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2023 10:15:48.1806 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 35501aed-6597-400d-cabc-08dbce30de1e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099D6.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6920 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: A151740015 X-Stat-Signature: uxewuboc8y835jzrsjt8i3iu8guzpn1y X-Rspam-User: X-HE-Tag: 1697451351-972298 X-HE-Meta: U2FsdGVkX1+NpS2SPmCy0c9a5UKEUVXhbYHuI6P+v7/ljLq3VmoWktWqN4YBEKNvT09aSyw7n9Kg1/8as6i9KQHyKidtshY2caRxeIkjh05aHIv7/PNW1ZSaysf9yc5udU9uiFJ5OOj7f/5TQbBf0hWLbvUMcUz6F2l/rN5aP7f0ofINqKH+HrZD0PJv2+JZdAcYm5XQ9vp7Y/ORqAJab7Rrqog4QFsbZCo/uSOX/YOvmDr2i0EzyFnLde0EjrrLobavun/1IFtyh+TegxVM3ErmqZ/umeTJwQviFrDcODv7Y7gQ8YNRQMJFQAR3ysdSI2EIxJHmNng2AoFaERB+PXiyP/buB7ryvn5F5Z1F7kEgX1OV1P5HGgvYelV3RMvZ5dMVQP1RN2EMBBW162EX4LR1Evdd3GHAtDnY58W93faS0uA8/yJMAAKzETZdtzpBop5N7JolK9IqwoAZDEd1FwSH+AAjn2K+XzjFd25rTKTVO2hnKoKVT+YHXoBjt1bkI+3mUE/JlIhTcp17UKEE0vQaY0Qi4gL8Ui71Sy+uw3n+mYzIg3q70FaTBGR0BDCHMV6ZMh2z8OsXhg72NufSuHWxWFZZ1PMxoph5z2jPDCnO81NuJmP+2NwMVHAlRHWU3koSA7GmUVtivgMfYVo93hv/lkOk4G6m6mBOqm+NxdHKupXZEuBKRwT1oGN7yDnd1wOWqCioxKBd1Ot2/HsHC3OyO38xGGs17bwgDlLbi261B/nIlTI2kspPxCRaDNqtFYcMryrdKTJIsmdNEJyUxajZt+jWEQSN+YoNyaBGKULxHvyezONjNxTjcwyof7ccS5FPfhiAns6NUd5iiQwCNd2k2e0VWqeDq45RYXtgS+J1Nb/PG5YLbtR+u1XuR6H+R7WWTaAiZQmhaVl8igWSnZsYyuZsbAZDUu0SMRhKwdw9Tmf8A2AbK0iSvyeY/XZBXHy3xCTCpzXhUtUKEw+ h/7n5zH4 DOklBxZoaaGkflDCoDP7lSwDloTH20RPwjqYXvipapl/TDY0q4IUnfuz6RVxEKTVAPs0cIuuRt+QkRe/Bgwi73VNNXyWz9Hij1LopOPmtBbegeuwQAmjEeiX5PvEKqrM5VXpQLxDctXfIXuu6CzMjzWHysb/82wXky9VOjBSdrqHu12iJEt/+4WVE/IIEhH2WpXJYX2hiOJbfA27SVfaNVCg8XAjwZlkW86cF+3xviOVKALDBbO63IxQ5ZhlyQhaK5s7UIzPyp7B9lEd9Zd6qKsxf5jh3jiMatQkacT4s8AJdmrv/PtwtGMBOljRUiWTZ/uheZ+2TJ0IiMDTgndEACosCcQ== 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 39a59545c93f..240846dd56b4 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 6457f80821bb..e2ca5d55fd31 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