wbrf.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .. SPDX-License-Identifier: GPL-2.0-or-later
  2. =================================
  3. WBRF - Wifi Band RFI Mitigations
  4. =================================
  5. Due to electrical and mechanical constraints in certain platform designs
  6. there may be likely interference of relatively high-powered harmonics of
  7. the GPU memory clocks with local radio module frequency bands used by
  8. certain Wifi bands.
  9. To mitigate possible RFI interference producers can advertise the
  10. frequencies in use and consumers can use this information to avoid using
  11. these frequencies for sensitive features.
  12. When a platform is known to have this issue with any contained devices,
  13. the platform designer will advertise the availability of this feature via
  14. ACPI devices with a device specific method (_DSM).
  15. * Producers with this _DSM will be able to advertise the frequencies in use.
  16. * Consumers with this _DSM will be able to register for notifications of
  17. frequencies in use.
  18. Some general terms
  19. ==================
  20. Producer: such component who can produce high-powered radio frequency
  21. Consumer: such component who can adjust its in-use frequency in
  22. response to the radio frequencies of other components to mitigate the
  23. possible RFI.
  24. To make the mechanism function, those producers should notify active use
  25. of their particular frequencies so that other consumers can make relative
  26. internal adjustments as necessary to avoid this resonance.
  27. ACPI interface
  28. ==============
  29. Although initially used by for wifi + dGPU use cases, the ACPI interface
  30. can be scaled to any type of device that a platform designer discovers
  31. can cause interference.
  32. The GUID used for the _DSM is 7B7656CF-DC3D-4C1C-83E9-66E721DE3070.
  33. 3 functions are available in this _DSM:
  34. * 0: discover # of functions available
  35. * 1: record RF bands in use
  36. * 2: retrieve RF bands in use
  37. Driver programming interface
  38. ============================
  39. .. kernel-doc:: drivers/platform/x86/amd/wbrf.c
  40. Sample Usage
  41. =============
  42. The expected flow for the producers:
  43. 1. During probe, call `acpi_amd_wbrf_supported_producer` to check if WBRF
  44. can be enabled for the device.
  45. 2. On using some frequency band, call `acpi_amd_wbrf_add_remove` with 'add'
  46. param to get other consumers properly notified.
  47. 3. Or on stopping using some frequency band, call
  48. `acpi_amd_wbrf_add_remove` with 'remove' param to get other consumers notified.
  49. The expected flow for the consumers:
  50. 1. During probe, call `acpi_amd_wbrf_supported_consumer` to check if WBRF
  51. can be enabled for the device.
  52. 2. Call `amd_wbrf_register_notifier` to register for notification
  53. of frequency band change(add or remove) from other producers.
  54. 3. Call the `amd_wbrf_retrieve_freq_band` initially to retrieve
  55. current active frequency bands considering some producers may broadcast
  56. such information before the consumer is up.
  57. 4. On receiving a notification for frequency band change, run
  58. `amd_wbrf_retrieve_freq_band` again to retrieve the latest
  59. active frequency bands.
  60. 5. During driver cleanup, call `amd_wbrf_unregister_notifier` to
  61. unregister the notifier.