187446Sdes.. SPDX-License-Identifier: GPL-2.0-or-later
287446Sdes
3277737Sngie=================================
4277737SngieWBRF - Wifi Band RFI Mitigations
5139103Sru=================================
6170770Syar
7298107SgjbDue to electrical and mechanical constraints in certain platform designs
8298107Sgjbthere may be likely interference of relatively high-powered harmonics of
9170770Syarthe GPU memory clocks with local radio module frequency bands used by
10170890Syarcertain Wifi bands.
11170770Syar
12170770SyarTo mitigate possible RFI interference producers can advertise the
13170770Syarfrequencies in use and consumers can use this information to avoid using
14170770Syarthese frequencies for sensitive features.
15170770Syar
16170770SyarWhen a platform is known to have this issue with any contained devices,
17170770Syarthe platform designer will advertise the availability of this feature via
18321180SngieACPI devices with a device specific method (_DSM).
19321180Sngie* Producers with this _DSM will be able to advertise the frequencies in use.
20321180Sngie* Consumers with this _DSM will be able to register for notifications of
21277737Sngiefrequencies in use.
22298107Sgjb
23298107SgjbSome general terms
24298107Sgjb==================
25321180Sngie
26321180SngieProducer: such component who can produce high-powered radio frequency
27277737SngieConsumer: such component who can adjust its in-use frequency in
28277737Sngieresponse to the radio frequencies of other components to mitigate the
29321246Sngiepossible RFI.
30321246Sngie
31321246SngieTo make the mechanism function, those producers should notify active use
32321246Sngieof their particular frequencies so that other consumers can make relative
33321246Sngieinternal adjustments as necessary to avoid this resonance.
34321246Sngie
35321246SngieACPI interface
36321246Sngie==============
37321246Sngie
38298107SgjbAlthough initially used by for wifi + dGPU use cases, the ACPI interface
39298107Sgjbcan be scaled to any type of device that a platform designer discovers
40298107Sgjbcan cause interference.
41298107Sgjb
42321180SngieThe GUID used for the _DSM is 7B7656CF-DC3D-4C1C-83E9-66E721DE3070.
43321180Sngie
44298107Sgjb3 functions are available in this _DSM:
45298107Sgjb
46321246Sngie* 0: discover # of functions available
47321246Sngie* 1: record RF bands in use
48321246Sngie* 2: retrieve RF bands in use
49321246Sngie
50321246SngieDriver programming interface
51321246Sngie============================
52321246Sngie
53321246Sngie.. kernel-doc:: drivers/platform/x86/amd/wbrf.c
5494989Sru
5587446SdesSample Usage
5694988Sdes=============
57
58The expected flow for the producers:
591. During probe, call `acpi_amd_wbrf_supported_producer` to check if WBRF
60can be enabled for the device.
612. On using some frequency band, call `acpi_amd_wbrf_add_remove` with 'add'
62param to get other consumers properly notified.
633. Or on stopping using some frequency band, call
64`acpi_amd_wbrf_add_remove` with 'remove' param to get other consumers notified.
65
66The expected flow for the consumers:
671. During probe, call `acpi_amd_wbrf_supported_consumer` to check if WBRF
68can be enabled for the device.
692. Call `amd_wbrf_register_notifier` to register for notification
70of frequency band change(add or remove) from other producers.
713. Call the `amd_wbrf_retrieve_freq_band` initially to retrieve
72current active frequency bands considering some producers may broadcast
73such information before the consumer is up.
744. On receiving a notification for frequency band change, run
75`amd_wbrf_retrieve_freq_band` again to retrieve the latest
76active frequency bands.
775. During driver cleanup, call `amd_wbrf_unregister_notifier` to
78unregister the notifier.
79