Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4438436rdh; Wed, 29 Nov 2023 01:14:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3UfLzv20m+eglfl0XANl0ELYtkTjROw9YM0r9wF0g3iHjftacIR2cQPPKP1xOiZD9koKp X-Received: by 2002:a05:6214:acc:b0:67a:1a93:2b16 with SMTP id g12-20020a0562140acc00b0067a1a932b16mr18107232qvi.13.1701249287025; Wed, 29 Nov 2023 01:14:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701249287; cv=pass; d=google.com; s=arc-20160816; b=NypGAfH0VdskH/KRJZsMS5PcDLfnwZoDoB6IPRoLz2B1sZcJmA85q8UITe4DrAbiD3 3hZZG7tm7X+BSeMlmHwnjvy+Jq4VVfS8tqKm626I1QEz7HK/xny6WyGndIb3zIDTBHAX yOZJAPl1uvsHFT/QTcEdG+6RY8kG1WhEEckj2pjYmRzVSa5/2jq23nLGgH1rySFTuApw BydeW43I5fFVR1j1UURBo8KPRTjAoEZ0KpHpzmZRcCqbIy0T4Zir7IN8XHp2XP98p5ZY 9ewt+eINUgS90rmqZvVhLcJtCpUGz16SiSmztGqewDXRXQZyJBRj5J+oWmqeyc3Qf1Kh DkvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hbYANmssnII81GCFDHN4Q7992LrDQ1SmxcSBrprIeZg=; fh=rHRXClFW8Aa7N/ZLOEI4RZaqE1h+zuvf1apqYkLFjBw=; b=hwdHYDGrZb5Uhhh+8hjJJ7SaG3nY5hnYZS1HCYGVDWvv3VFqWSY+xH6PHz2tBy4n9+ wvjzCabr97riR/S2rzr+vjZJj2l12Jr2fqNcrqti07N04ltyWdfKeb+APSF+HKf7lfb7 CXun/8/RL/b+7uswKWLaPwpmt/zkHpqH2pPhiU3gzuOCTG6EzP7/YAvq+0DP5t/zVHbd KVAHQr676Kkj279c35EyIDpiGSAdJflvIsEaC3YHysY3rTOWlnQIzvb22jmHK9K9KnuI QNGskaWQQD3gqMm3P+edPJ92IRji9RqpwTSL1Mjn6V6Txvi3nrDDdvavFz4mUm45zDMA 1NxQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gK6kY7MN; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-wireless+bounces-199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-199-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bs39-20020a05620a472700b00775bf2a8188si13537347qkb.360.2023.11.29.01.14.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:14:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=gK6kY7MN; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-wireless+bounces-199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-199-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7AFE31C21006 for ; Wed, 29 Nov 2023 09:14:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B323D12E73; Wed, 29 Nov 2023 09:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="gK6kY7MN" X-Original-To: linux-wireless@vger.kernel.org Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FCF11BDC; Wed, 29 Nov 2023 01:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C2jls8+xceaUq+zmXVR1ym8Qu2vq/2UP6erDdfDqSP9D9G85qRGARU60eFVcGfnEdS9m8Rgj+NTVetDCWeGTIEYQClmWrQXGukTisVAxNjo7k/Pur8iAPER8/XFMHPCQyp+6h7UW8jGv1Oa2x/NYfQ+GjUuH7Zzh2EqdvWyoTsJAWZCHoNtwfCgHwunSDUBfR+MONvofvEiB8PAs0C2akosTYzgmdnBhEHyk9FAJWIj92cJciBC1SpSz9EzTdOCsCkLPhPeNKnlBpUZndBbaIGhC0uA0ZzIu9XFO5QhnB9YPiQ9tQZMOttWrkTxKAOGcPW5uDC6tHiEmIyiAghdqpQ== 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=hbYANmssnII81GCFDHN4Q7992LrDQ1SmxcSBrprIeZg=; b=THOjTKepXjPXsKyYsh+CKM+SEnClWsHJeABOHeAvKTFuGs1q0Igp7LMwZweRcCa7A+9KY+wQvnESflv/xxXEScLbX/BXHDitBtaGdSEc1+bmAtPjt4J0cM+kLRU4rpN2xCWDEFip6NH/Gics1y3hx+UIbsPbTxIUccuFIhQgPpykSHGcQJWD5NYn2jxIno2YAbQieGAtgQjMhTYVuXfiXq+OtUXRpSjg7/SBTfjKXUJI+Sd7aDPNS1TsncWuc17rjUrFpzJ34NlrmtHMrwgM9U1JEqYppRGv5yDZzDUEo16XhGicQKODP8CadqAYVuXV8+9+i6VwhvhH9MRDVD5h7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.freedesktop.org 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 (0) 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=hbYANmssnII81GCFDHN4Q7992LrDQ1SmxcSBrprIeZg=; b=gK6kY7MN86z+FLRCUWLNF4CDr+mjAzjflveMTcWXQRlxq4lRNiGQ0H0Dkuac5h7n5lIiWoTpSnf0rh7fHQYoKIteswagqiilcmf2VD9D+DLpkGX6MPjo02RU4LuhyMceh0Q6QpAHi+sTeiG8Lfx1a96O2UD7RLHgSThrT4oRCSA= Received: from BL1PR13CA0085.namprd13.prod.outlook.com (2603:10b6:208:2b8::30) by CYYPR12MB8962.namprd12.prod.outlook.com (2603:10b6:930:c4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.29; Wed, 29 Nov 2023 09:14:28 +0000 Received: from MN1PEPF0000ECD5.namprd02.prod.outlook.com (2603:10b6:208:2b8:cafe::1) by BL1PR13CA0085.outlook.office365.com (2603:10b6:208:2b8::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.22 via Frontend Transport; Wed, 29 Nov 2023 09:14:27 +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 MN1PEPF0000ECD5.mail.protection.outlook.com (10.167.242.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7046.17 via Frontend Transport; Wed, 29 Nov 2023 09:14:27 +0000 Received: from compile-server.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.34; Wed, 29 Nov 2023 03:14:21 -0600 From: Ma Jun To: , , , , , , , , , , , , , , , CC: , Ma Jun Subject: [PATCH v14 1/9] Documentation/driver-api: Add document about WBRF mechanism Date: Wed, 29 Nov 2023 17:13:40 +0800 Message-ID: <20231129091348.3972539-2-Jun.Ma2@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231129091348.3972539-1-Jun.Ma2@amd.com> References: <20231129091348.3972539-1-Jun.Ma2@amd.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECD5:EE_|CYYPR12MB8962:EE_ X-MS-Office365-Filtering-Correlation-Id: cc9fa9b0-4104-4a5f-812e-08dbf0bb9675 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /ziJvnGfaqJiO7SIEXO16CnItJNpFLOPLEVCJf7XN3Q45h8xBuSit8a29O7cGqpp8HsW68I23v1PodKiaFGO3hg3ahmrh7wUrs/mCNhwwq0eJaF6fmIpL5oboVF/Jwq4OcySveE3kotIbyM9cRMeFOmic4Oyj1id8Op3frojuWSOY+i58BIOeJvyt+nYHefv6rwY8olcSC52FMHkWSQRoza3mjm6MOzvVfCIJTohlwpWZuT/xMSqE7oHScn7bi7Sz/7TahGZlCvRiq2eETM0P1J/cQJYh+nug4LRfXPC2Sla/To7u4NyEHoDSDYvidg+nbRscRbFatSHtGkwC1c5yCVIU4XnEnD0NhmNSHzH60ncNAAsxnow1wADrEgC6s19ON7yz6lrS6GNNQdSs//fq96GHgOxhcZnrLof6njRNM14L+n0V1hZrNFoUv+d1F1tieHitoFMvyufr2p6Ol1W8uSOEL5t65QNmU6yDMuyLUZgz9cV7FIIXPFu9OCBDbn1Vio+GyA8NrNCmdX6I7Jh2dTSHvmm+3bKjvn+Daf4wy+G+1JZLfGYs5fJ3FuhlcRoNjWss6xQ8VTq4Nz92mCqDFzSsT/INmhz3xxrHaXffcpyHJ+2iYDEtNoFnJofpsSTKP6LcfCq3bWer3GJYCkaYOevDUkEGvgSLaa/vFoTYN8zvTdZxGlUHTz7NvmpG62IGaThu0zqSK1EFAgE+4QF0XtUIA5i6azIa5cF4j25E7ky/630obeCoFaP4FZQvDgLH3kAQAHe78n9im0pABoit01AN4Y+YgCY8/KT9oIwMX4= 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:(13230031)(4636009)(136003)(376002)(346002)(39860400002)(396003)(230922051799003)(186009)(1800799012)(82310400011)(64100799003)(451199024)(40470700004)(46966006)(36840700001)(40480700001)(41300700001)(36756003)(1076003)(921008)(81166007)(47076005)(356005)(83380400001)(426003)(7416002)(5660300002)(82740400003)(70206006)(336012)(16526019)(36860700001)(26005)(86362001)(2616005)(70586007)(2906002)(7696005)(6666004)(8676002)(4326008)(8936002)(478600001)(40460700003)(316002)(110136005)(54906003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2023 09:14:27.6422 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc9fa9b0-4104-4a5f-812e-08dbf0bb9675 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: MN1PEPF0000ECD5.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8962 Add documentation about AMD's Wifi band RFI mitigation (WBRF) mechanism explaining the theory and how it is used. Signed-off-by: Ma Jun Reviewed-by: Hans de Goede -- v14: - Fix the format issue (IIpo Jarvinen) --- Documentation/driver-api/wbrf.rst | 78 +++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Documentation/driver-api/wbrf.rst diff --git a/Documentation/driver-api/wbrf.rst b/Documentation/driver-api/wbrf.rst new file mode 100644 index 000000000000..12793bb1abce --- /dev/null +++ b/Documentation/driver-api/wbrf.rst @@ -0,0 +1,78 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +================================= +WBRF - Wifi Band RFI Mitigations +================================= + +Due to electrical and mechanical constraints in certain platform designs +there may be likely interference of relatively high-powered harmonics of +the GPU memory clocks with local radio module frequency bands used by +certain Wifi bands. + +To mitigate possible RFI interference producers can advertise the +frequencies in use and consumers can use this information to avoid using +these frequencies for sensitive features. + +When a platform is known to have this issue with any contained devices, +the platform designer will advertise the availability of this feature via +ACPI devices with a device specific method (_DSM). +* Producers with this _DSM will be able to advertise the frequencies in use. +* Consumers with this _DSM will be able to register for notifications of +frequencies in use. + +Some general terms +================== + +Producer: such component who can produce high-powered radio frequency +Consumer: such component who can adjust its in-use frequency in + response to the radio frequencies of other components to + mitigate the possible RFI. + +To make the mechanism function, those producers should notify active use +of their particular frequencies so that other consumers can make relative +internal adjustments as necessary to avoid this resonance. + +ACPI interface +============== + +Although initially used by for wifi + dGPU use cases, the ACPI interface +can be scaled to any type of device that a platform designer discovers +can cause interference. + +The GUID used for the _DSM is 7B7656CF-DC3D-4C1C-83E9-66E721DE3070. + +3 functions are available in this _DSM: + +* 0: discover # of functions available +* 1: record RF bands in use +* 2: retrieve RF bands in use + +Driver programming interface +============================ + +.. kernel-doc:: drivers/platform/x86/amd/wbrf.c + +Sample Usage +============= + +The expected flow for the producers: +1. During probe, call `acpi_amd_wbrf_supported_producer` to check if WBRF + can be enabled for the device. +2. On using some frequency band, call `acpi_amd_wbrf_add_remove` with 'add' + param to get other consumers properly notified. +3. Or on stopping using some frequency band, call + `acpi_amd_wbrf_add_remove` with 'remove' param to get other consumers notified. + +The expected flow for the consumers: +1. During probe, call `acpi_amd_wbrf_supported_consumer` to check if WBRF + can be enabled for the device. +2. Call `amd_wbrf_register_notifier` to register for notification + of frequency band change(add or remove) from other producers. +3. Call the `amd_wbrf_retrieve_freq_band` initally to retrieve + current active frequency bands considering some producers may broadcast + such information before the consumer is up. +4. On receiving a notification for frequency band change, run + `amd_wbrf_retrieve_freq_band` again to retrieve the latest + active frequency bands. +5. During driver cleanup, call `amd_wbrf_unregister_notifier` to + unregister the notifier. -- 2.34.1