From patchwork Thu Jul 6 17:13:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avadhut Naik X-Patchwork-Id: 13304021 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB398EB64D9 for ; Thu, 6 Jul 2023 17:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232273AbjGFRNy (ORCPT ); Thu, 6 Jul 2023 13:13:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjGFRNx (ORCPT ); Thu, 6 Jul 2023 13:13:53 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2077.outbound.protection.outlook.com [40.107.243.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C60C1BFF; Thu, 6 Jul 2023 10:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fuI4KqWLOY5jVG64lkY74zI1zQ9T9jA0ryQXxNbd+KjmaJl59InxQJ72esMkq5YpeBaXjmWUTUnG/iH8kcFv7f0LbGcQRT+nkxeeQlBxgd0zkfG9IF0l8ncH/me6/aDyAl4V0owjX1tZcvQPIDgFBL2Y6VIICeAuKSI1kDBecwjbWog8H9N6S+6XsAZIZAw1y8WsmdXby7rh3LUjvgzeGQMSQ+wynmWREKgdZdeEa2uVXGAtCk1rUdtlDPlWFS/Ltb9rPpUVDP/X70rCSV3JrFA96xtrlvUGAAPpRVHb9LG/yi8GfmRhi3AF/3fxpiOkD2wcQfS0j9rcdusQybr9ng== 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=r3NwBrK87aWlaYjiW6ksd2eXAhi1zRgg62XYze/0kEM=; b=TJbmgm6Qksfm8fcuVG8xGG6lBSqtBF/QAfAOOYVfE2LvivVZ5Vf0rp0Gj1R5LMPPJpnSRxtJUaDQ+bZETzptMZJzcZ34wrxFJ19N5MPLu8bwP9cML100Jtt+1hoyNZDqeHNz9/QrX0FEOIA1AagPHkxiEC+Qm32AGFao143F/dMibaPxUCpqWEWoZykCeApyKw/yMuBOvgFnoLHdWuPZfgCZeXspzdVxWf328XL6s5NSfo9Ildi7jwPj+7d6AXlo3IFIdvvybm1wnUo5cMrBC0fu5HmNT4koAhBhHFr9scQRUeX2ZIkfdiAPTIIBwaIKzAItGf6PTgwFrP/KEIXumw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=alien8.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r3NwBrK87aWlaYjiW6ksd2eXAhi1zRgg62XYze/0kEM=; b=rcXVeRhg4rsnL/J/cEnQQShLoD8vLAv2woRjKmeFDJmrQ7Xa388YRAy/eyTa+NgPwN28A9+OIGC4TUMo01UM/7w/FXH2WIQ1FG8qWX7ko7fZ3RosK5m9hB5+wzklomGKtNxfeDvAWa+5SFG2+McYDOn1rO8XMTKgK4fiHHSi5cE= Received: from MW4PR04CA0316.namprd04.prod.outlook.com (2603:10b6:303:82::21) by SJ1PR12MB6098.namprd12.prod.outlook.com (2603:10b6:a03:45f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 17:13:45 +0000 Received: from CO1NAM11FT088.eop-nam11.prod.protection.outlook.com (2603:10b6:303:82:cafe::13) by MW4PR04CA0316.outlook.office365.com (2603:10b6:303:82::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.24 via Frontend Transport; Thu, 6 Jul 2023 17:13:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT088.mail.protection.outlook.com (10.13.175.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6521.45 via Frontend Transport; Thu, 6 Jul 2023 17:13:44 +0000 Received: from onyx-7400host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 6 Jul 2023 12:13:42 -0500 From: Avadhut Naik To: , , , , CC: , , , Subject: [PATCH v1 1/3] x86/amd_nb: Add PCI IDs for AMD Family 1Ah-based models Date: Thu, 6 Jul 2023 17:13:21 +0000 Message-ID: <20230706171323.3722900-2-avadhut.naik@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230706171323.3722900-1-avadhut.naik@amd.com> References: <20230706171323.3722900-1-avadhut.naik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT088:EE_|SJ1PR12MB6098:EE_ X-MS-Office365-Filtering-Correlation-Id: c9943a02-d164-4bfd-4b3c-08db7e445a7e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +DakguEPpTLF+dQUrcqU/91VQ4Vw84tTBUmb5LpW6xi52LPSJYGukvsUnYwNbD53YQWrlbF5kGf59in4dHF/AitnA+KclIqcavs8IGMBE+FZ+ArY7SxTXs9nqjfkQ0Ng51+/+d/LO3kaZW5Oxz+ZXxr3f/G8YCqHP7DXBUqSTXFecqDmFj4EHI2VUWZc03FJJbUl5fLIkn5usBed9uO2dRMVvVKoP3p8AXA6hjRPptYpe6n+vijSfthAFRBtgzscB4XHcudXS6PiAN8eUYa7Oaqm7FdQH5wHxJ666JhtHJq0j1FD3oBgwsujCF00MbJrM2GqnjuEbnS4mmvAHLsfRsbQ/BLlA7vlUQfYEeAqAxg6xITaFXsXkpqVyQiiURvHcUhnc5qnqKWXQT3knFZ5BJ9j0A0u0+uR6w9lSrbqmlJ7CbgD/pc7Lz9OvsjO2JOhhmQOjc89ZGtKgeUk6/6o0rNNsX9uw7IMbbf+YpQWrxYY/Wi6jTrDfJnpPtRueNmAW6NBeRFksXWRogVlfU9kNUnIb5CVVXtXJH+LVUJZeZuAbSG5th5yO82bd39YKNinBKsV7Zu1Qzw4CW16tBNrPuQSXJSf8Vtv/1nqGbqVUbgnLdSx7/uGiGzBzrPBVG7kPl0ajqEdkpIy4AwIAqpOwgsBgLImSwOTcTUr7xG88A8+n2wqPDVvbkQi9HpFePHX61/DkJW+Mfm59YveCgwVZT8B1S439c3DIsG5dzzTd8FWoIh8nWVwepAYFZptIDSmq4ziXfi3PsUtb45Kncu93wPz71JG0dTQLw8D8PeToYc= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(136003)(39860400002)(376002)(346002)(396003)(451199021)(40470700004)(36840700001)(46966006)(186003)(26005)(336012)(1076003)(16526019)(426003)(7696005)(6666004)(36860700001)(81166007)(54906003)(478600001)(47076005)(356005)(2616005)(110136005)(82740400003)(316002)(8676002)(8936002)(41300700001)(40460700003)(44832011)(5660300002)(4326008)(70586007)(70206006)(40480700001)(2906002)(86362001)(36756003)(82310400005)(170073001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 17:13:44.2440 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9943a02-d164-4bfd-4b3c-08db7e445a7e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT088.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6098 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org From: Avadhut Naik Add new PCI Device IDs, required to support AMD's new Family 1Ah-based models 00h-1Fh and 20h. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Avadhut Naik --- arch/x86/kernel/amd_nb.c | 8 ++++++++ include/linux/pci_ids.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c index 035a3db5330b..356de955e78d 100644 --- a/arch/x86/kernel/amd_nb.c +++ b/arch/x86/kernel/amd_nb.c @@ -24,6 +24,8 @@ #define PCI_DEVICE_ID_AMD_19H_M40H_ROOT 0x14b5 #define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 #define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8 +#define PCI_DEVICE_ID_AMD_1AH_M00H_ROOT 0x153a +#define PCI_DEVICE_ID_AMD_1AH_M20H_ROOT 0x1507 #define PCI_DEVICE_ID_AMD_MI200_ROOT 0x14bb #define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464 @@ -39,6 +41,7 @@ #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F4 0x14e4 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F4 0x14f4 #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F4 0x12fc +#define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F4 0x12c4 #define PCI_DEVICE_ID_AMD_MI200_DF_F4 0x14d4 /* Protect the PCI config register pairs used for SMN. */ @@ -56,6 +59,8 @@ static const struct pci_device_id amd_root_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_ROOT) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_ROOT) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_ROOT) }, {} }; @@ -85,6 +90,8 @@ static const struct pci_device_id amd_nb_misc_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F3) }, {} }; @@ -106,6 +113,7 @@ static const struct pci_device_id amd_nb_link_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M40H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_19H_M50H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_MI200_DF_F4) }, {} }; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a99b1fcfc617..6947e148bf38 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -568,6 +568,8 @@ #define PCI_DEVICE_ID_AMD_19H_M60H_DF_F3 0x14e3 #define PCI_DEVICE_ID_AMD_19H_M70H_DF_F3 0x14f3 #define PCI_DEVICE_ID_AMD_19H_M78H_DF_F3 0x12fb +#define PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3 0x12c3 +#define PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3 0x16fb #define PCI_DEVICE_ID_AMD_MI200_DF_F3 0x14d3 #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 From patchwork Thu Jul 6 17:13:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avadhut Naik X-Patchwork-Id: 13304022 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A654CEB64DD for ; Thu, 6 Jul 2023 17:14:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232600AbjGFROE (ORCPT ); Thu, 6 Jul 2023 13:14:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232626AbjGFROB (ORCPT ); Thu, 6 Jul 2023 13:14:01 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20614.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::614]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEB081FC8; Thu, 6 Jul 2023 10:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BjusqhFhwubiQmZOCwPg1f/zsBYA3s9LWHglSCe+tQgkyd9PdAFPYwaUcYreL/SksK6HXgT4KUX6kvd7dLGe8Y7Ws9sq8XzERXTlTdVXYRrgHFNRpTOl7fLIHEK3l7Lw1ePosmMJ4uIPTtz7AEauErLQuIYt5pYCxNNctnTbfyTmp52Dccekt8rXIQzcvp9ss3K9ZWwuPdOQenEpLVNnP3AIGzh2h6U3fHifn+zAqLNbms2blmForojf1iiHdWo5W992JdZ+mV0bFdRPqAtXrWXjkh0IcDMYJvh2TmlpFTdOUzY1tpyTIjtNKZLKV6Wy3U0HXeMbqR9veT7A6Ug05w== 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=2CZzdcqNYjgBUtkv7aw3HRiS6Hi0VosdreprdCoFf2k=; b=IbIXE65YQM+eZNJh501jpYj3ZXBH+K97Gt3Jl8LNhSCPEL/5Ydbtt/yqPM4GjCyrDTPtux8coXEdsHPjzDVZIeFG1lswdJJ2WLD3Oy2GwLtlPX1uU+qswjQglfiXg3gkb+Up3EZ/Tw73OsiS4prZb5ky+xGonAqldC6A52dxtu/XLUDRtChTzCTExIb4BgFj3rOcNtr8BssKEm9HTOXFMQ1N/590PDBV+gOgPhkxh+HQACKAlcsnPos/vURRF5HsuMXbvTl5slbDwmxo8dn8pSLTWsMUn0OV+6vsDrjsMsnyLve1BNNoEKYyf0NH4T9WuUS0+B5B82jrmNRAQBNFqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=alien8.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2CZzdcqNYjgBUtkv7aw3HRiS6Hi0VosdreprdCoFf2k=; b=qF8mKX9PzlTyCg/DFO6ixrOR13DeDJsEbCy9ddsa8noSMjYxaI6kalEsFcOIxBkna/cRN6G3pl2l+iVvF+ixtWe0oNT6xkyp2cRIWUo+h5pyXpsIa4WZWMvTGK0BvGe8NO+QbbhL2qkrsq6Fk4KLPJnEFQekg1Hrmxdy4v7fNz4= Received: from MW4PR03CA0237.namprd03.prod.outlook.com (2603:10b6:303:b9::32) by CO6PR12MB5441.namprd12.prod.outlook.com (2603:10b6:303:13b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.24; Thu, 6 Jul 2023 17:13:58 +0000 Received: from CO1NAM11FT022.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b9:cafe::cd) by MW4PR03CA0237.outlook.office365.com (2603:10b6:303:b9::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.24 via Frontend Transport; Thu, 6 Jul 2023 17:13:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT022.mail.protection.outlook.com (10.13.175.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6521.45 via Frontend Transport; Thu, 6 Jul 2023 17:13:57 +0000 Received: from onyx-7400host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 6 Jul 2023 12:13:55 -0500 From: Avadhut Naik To: , , , , CC: , , , Subject: [PATCH v1 2/3] hwmon: (k10temp) Add thermal support for AMD Family 1Ah-based models Date: Thu, 6 Jul 2023 17:13:22 +0000 Message-ID: <20230706171323.3722900-3-avadhut.naik@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230706171323.3722900-1-avadhut.naik@amd.com> References: <20230706171323.3722900-1-avadhut.naik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT022:EE_|CO6PR12MB5441:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e64d9aa-ec16-4cbe-a80f-08db7e446254 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0JOB6BhTrfwvunTl2frdBwIvNH9NBp8G74aHpYD9WWIl0XCJylJmz1nyietidEPMCc006MJjMsE1/ZGkpbQh3aQTO1GZgY1SCGzWPVfafZzX1pzhkbRuKx+4iOKXyQ7k1HoAcbycz+CCPPvLvnya1dHv4mGHXwWktnpxPZJRb5efQ4rZmZhPatE4e0FFEMq1T6bhbdNLK/rSKDT6T6YeiWdKgv1hBPkg85Ude07kWJHHPLeWWjiogLHT5JDpqcUQkEfRP0Pu5Ndpm0dRmcMH/yBOTUqC2+UBLEy4/Vxx5U6GJgdwFPXgJZXkMLrxRMXtno74KjC/T4Ikik1KWVbB1r1eFEcgJOeHoZ5NICb+1p28uFQ1sXC56f5gyJ5aT97xleDi0Q4XocxGpxvtnreode4ai2Jxx0pkXAIPg+xy046nWx+ny9+mYHEZqObRCKmDWwTTYfCqh/M9vvNHDHeJV0Maak5W0PmDnJh9qFWlBP35M/mBk7zaVAJev3gjGrCi+8WU5zyjKioXbgiCPN++aPeWaT/Gn+SL9qb61p32n4YcmlE+3RMyBacGIWDSw4FYjErDiZoUpNEg9YosIvodnlcwWA3mqIANouXE28XUJ+opzoGwRvABmOe3alQQE+BdfqR9XLN8DABbcT0/cXfztr0mEAoSAU1OmDByCZJE8lmI4eVS1y6EHktgr04uJr6/Y04vcpHkJZTLCRaYCp6J3XehZCGnF0YD6atmPwWEH8Vv+c6ujf9sw6aHFXVBZ4ouezYTkCgroJfI5FVls6yMbXcVqIsXtF2S3Pm8KmFs6sg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(346002)(376002)(396003)(451199021)(36840700001)(46966006)(40470700004)(426003)(336012)(47076005)(36860700001)(83380400001)(356005)(82740400003)(81166007)(36756003)(40480700001)(86362001)(82310400005)(40460700003)(54906003)(110136005)(7696005)(6666004)(8676002)(41300700001)(5660300002)(8936002)(478600001)(44832011)(316002)(2906002)(4326008)(70206006)(70586007)(186003)(16526019)(2616005)(1076003)(26005)(170073001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 17:13:57.3929 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e64d9aa-ec16-4cbe-a80f-08db7e446254 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT022.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5441 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org From: Avadhut Naik Add thermal info support for AMD Family 1Ah-based models. Support is provided on a per-socket granularity. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Signed-off-by: Avadhut Naik Acked-by: Guenter Roeck --- drivers/hwmon/k10temp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 7b177b9fbb09..c61837fbc315 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -65,7 +65,7 @@ static DEFINE_MUTEX(nb_smu_ind_mutex); #define F15H_M60H_HARDWARE_TEMP_CTRL_OFFSET 0xd8200c64 #define F15H_M60H_REPORTED_TEMP_CTRL_OFFSET 0xd8200ca4 -/* Common for Zen CPU families (Family 17h and 18h and 19h) */ +/* Common for Zen CPU families (Family 17h and 18h and 19h and 1Ah) */ #define ZEN_REPORTED_TEMP_CTRL_BASE 0x00059800 #define ZEN_CCD_TEMP(offset, x) (ZEN_REPORTED_TEMP_CTRL_BASE + \ @@ -462,6 +462,10 @@ static int k10temp_probe(struct pci_dev *pdev, const struct pci_device_id *id) k10temp_get_ccd_support(pdev, data, 12); break; } + } else if (boot_cpu_data.x86 == 0x1a) { + data->temp_adjust_mask = ZEN_CUR_TEMP_RANGE_SEL_MASK; + data->read_tempreg = read_tempreg_nb_zen; + data->is_zen = true; } else { data->read_htcreg = read_htcreg_pci; data->read_tempreg = read_tempreg_pci; @@ -508,6 +512,8 @@ static const struct pci_device_id k10temp_id_table[] = { { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M60H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M70H_DF_F3) }, { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_19H_M78H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M00H_DF_F3) }, + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_1AH_M20H_DF_F3) }, { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) }, {} }; From patchwork Thu Jul 6 17:13:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avadhut Naik X-Patchwork-Id: 13304023 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9606EB64DC for ; Thu, 6 Jul 2023 17:14:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232614AbjGFRO1 (ORCPT ); Thu, 6 Jul 2023 13:14:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232620AbjGFROZ (ORCPT ); Thu, 6 Jul 2023 13:14:25 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2076.outbound.protection.outlook.com [40.107.92.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9536B1FF5; Thu, 6 Jul 2023 10:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Eyk6uU/bzkrqlMDJv4TSJ/Pn7tcH7m56XVDdEkwl+2LRGoZrYsktj9HP5JUHcEow5DT4aWDjWwsoMPsOSdUgTGiczBqJ/vdCG+OpDimy3/KCEVLFo+/DHo9F4sHNu7hRS00w7VY+Kqi6G600YhmT4yjpmeeKJtefGc31ia82kpUIkcg56/5fpq6qjEsMjlqGRWynmjIV4fbzCdk/N/3pmHL0Anatik+jnk5v9CrALdn50YZk3/eItHRkzDflxlYJD+9Q/7/6XBY4yf25ZmPLLNJ2+TRxc/rETYNqjssq+8mfWO/6/uyy5ws+E+Nbho2+BuboXu+7IlURWLXYCmTdfg== 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=wI33U8UPa/z717YTkblxNZ6VCf/mgkOtNULadtG5VYc=; b=inmUGP2+KZJQxiBDI3cqcYnnxFP1DLHeSz3hJk7aEdGBB3r7cPFAmY+PwUqiAN5Vlgr1sly7r4B5F1BBoepKSdHRGmpPuZB+wwif6/vRZeuo9KAeZquW7FLEYz6Fx08S4HO8Spr/ThDjyD+KVRVfgmfC/m9NqYls2RA/Vtfu9aPoLfOtjuE1LaMOoPUB2v7tN1Rv/zOteacMJPPdv+WGt7AnyI1lcd3zBDsZDSv0iVMtQ7X+VLx9ny9iiScClnG1ouZOVOvVSF5VRtdTPyhri30CiipQqmbJImJvEg9s/br0Hxh6v60Nc/AgkoJ4v8G5S8rL1MYUieJE0s2fOdI2Wg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=alien8.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wI33U8UPa/z717YTkblxNZ6VCf/mgkOtNULadtG5VYc=; b=xE+6cPCiOTG483QQ5NON4DPWBF4fKg6uL1K7mWJI38lZp+PP/vyKLhrHmRgaYx/rVWnDMfUcKwUP7RzKt04WiW2g7WfTHn36+y9xCwOAW6lReKR0I9L5kwvSTGnnKyQecAHehVLSopcCAR5JWFY4Qn3gEEGfzL4iCEvWqvh9m7g= Received: from MW4PR03CA0024.namprd03.prod.outlook.com (2603:10b6:303:8f::29) by CH3PR12MB7548.namprd12.prod.outlook.com (2603:10b6:610:144::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.25; Thu, 6 Jul 2023 17:14:12 +0000 Received: from CO1NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8f:cafe::7) by MW4PR03CA0024.outlook.office365.com (2603:10b6:303:8f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.24 via Frontend Transport; Thu, 6 Jul 2023 17:14:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT021.mail.protection.outlook.com (10.13.175.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6521.45 via Frontend Transport; Thu, 6 Jul 2023 17:14:11 +0000 Received: from onyx-7400host.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 6 Jul 2023 12:14:07 -0500 From: Avadhut Naik To: , , , , CC: , , , Subject: [PATCH v1 3/3] EDAC/amd64: Add support for AMD Family 1Ah Models 00h-1Fh and 40h-4Fh Date: Thu, 6 Jul 2023 17:13:23 +0000 Message-ID: <20230706171323.3722900-4-avadhut.naik@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230706171323.3722900-1-avadhut.naik@amd.com> References: <20230706171323.3722900-1-avadhut.naik@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT021:EE_|CH3PR12MB7548:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e1a821f-87b2-4000-14c4-08db7e446ac5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RdNbGywjka7fDY+BiWr5AC2Ko+n4RCEJqRGjHZ8rW7H4xoYlL34xJrFBh0vwpPkDKYcolhfZICwYp8xFa6ix/8wIKbWG54j0+wjzZ5CSKLpK2VjzVd1ptOfOdcNAN1Ag0wBMw4mG+Q7V+LfG7k7SyiZsPveXGAVZ3d9W3I6ch9lqLekUui/WvL/BQf44yyTMLJe4Lfan1yfiNpeiXvfs2yVQNrCSWYGszvDPHHRaOw8rsDSwIqcDGMh7xPjoBTEAueBwZJ5DZvcouwfMpfigx1g5CtPdQmmhiR9fXdpiKDQ+2DKRcigv9I/BrhIsvC2V5mo1rrO1daWhmY0A4pSTEQ9AySmCARP8adaXH67oNEd7xM9f1KbueoFHtCanpfjqoxVs0d4nWMxJGCaUe5npbW2t26YkfzDM3wGiSIuatXJp+1X6x8WV2wjJ2k29wW1kB7VaW4eBOYPH8GNcQGmBu3JIRsRdpFzRUzFayfgIzrilxsD7XEIQZE2uvAbWfTSeZt/dD1liqURNV1Nt0oxlQl7fZ/UzbgocjglQp4yXDjjpm5yMyy0BWTxwiuCTwdmH+IwBSU7xiCbb0nI2LHkUaZl3kmRceAoGDxoaedHpGmzZ1xvqeqRl1VeuuCknRvEkR4EEHnxqoD7abAG8N9P56oU3fJtugpA35rM+d3IBNUY/Ie0F1kGwZ0KOFx5yUF9me0Jg6gKV8Dcuc83ybfOR58kbtOksU2livM9tgMKrtXiBxWmMSVn1gfOcbVinSHb48KMGwHS2NZahQTtER5IRsA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(376002)(396003)(136003)(451199021)(36840700001)(40470700004)(46966006)(4326008)(81166007)(478600001)(316002)(36756003)(47076005)(40480700001)(110136005)(54906003)(40460700003)(82740400003)(70586007)(70206006)(356005)(36860700001)(2616005)(336012)(426003)(6666004)(8676002)(8936002)(16526019)(186003)(86362001)(26005)(44832011)(1076003)(5660300002)(7696005)(2906002)(82310400005)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 17:14:11.5827 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e1a821f-87b2-4000-14c4-08db7e446ac5 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7548 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org From: Avadhut Naik Add the necessary support in the module for AMD's new Family 1Ah-based models 00h-1Fh and 40h-4Fh. Signed-off-by: Avadhut Naik --- drivers/edac/amd64_edac.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 597dae7692b1..e3b59c488ed1 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c @@ -4150,6 +4150,20 @@ static int per_family_init(struct amd64_pvt *pvt) } break; + case 0x1A: + switch (pvt->model) { + case 0x00 ... 0x1f: + pvt->ctl_name = "F1Ah"; + pvt->max_mcs = 12; + pvt->flags.zn_regs_v2 = 1; + break; + case 0x40 ... 0x4f: + pvt->ctl_name = "F1Ah_M40h"; + pvt->flags.zn_regs_v2 = 1; + break; + } + break; + default: amd64_err("Unsupported family!\n"); return -ENODEV; @@ -4344,6 +4358,7 @@ static const struct x86_cpu_id amd64_cpuids[] = { X86_MATCH_VENDOR_FAM(AMD, 0x17, NULL), X86_MATCH_VENDOR_FAM(HYGON, 0x18, NULL), X86_MATCH_VENDOR_FAM(AMD, 0x19, NULL), + X86_MATCH_VENDOR_FAM(AMD, 0x1A, NULL), { } }; MODULE_DEVICE_TABLE(x86cpu, amd64_cpuids);