Commit dcfbd31e authored by Shravan S's avatar Shravan S Committed by Hans de Goede
Browse files

platform/x86: BIOS SAR driver for Intel M.2 Modem



Dynamic BIOS SAR driver exposing dynamic SAR information from BIOS

The Dynamic SAR (Specific Absorption Rate) driver uses ACPI DSM
(Device Specific Method) to communicate with BIOS and retrieve
dynamic SAR information and change notifications. The driver uses
sysfs to expose this data to userspace via read and notify.

Sysfs interface is documented in detail under:
Documentation/ABI/testing/sysfs-driver-intc_sar

Signed-off-by: default avatarShravan S <s.shravan@intel.com>
Link: https://lore.kernel.org/r/20210723211452.27995-2-s.shravan@intel.com


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent ef195e8a
Loading
Loading
Loading
Loading
+54 −0
Original line number Diff line number Diff line
What:		/sys/bus/platform/devices/INTC1092:00/intc_reg
Date:		August 2021
KernelVersion:	5.15
Contact:	Shravan S <s.shravan@intel.com>,
		An Sudhakar <sudhakar.an@intel.com>
Description:
		Specific Absorption Rate (SAR) regulatory mode is typically
		derived based on information like mcc (Mobile Country Code) and
		mnc (Mobile Network Code) that is available for the currently
		attached LTE network. A userspace application is required to set
		the current SAR regulatory mode on the Dynamic SAR driver using
		this sysfs node. Such an application can also read back using
		this sysfs node, the currently configured regulatory mode value
		from the Dynamic SAR driver.

		Acceptable regulatory modes are:
			==	====
			0	FCC
			1	CE
			2	ISED
			==	====

		- The regulatory mode value has one of the above values.
		- The default regulatory mode used in the driver is 0.

What:		/sys/bus/platform/devices/INTC1092:00/intc_data
Date:		August 2021
KernelVersion:	5.15
Contact:	Shravan S <s.shravan@intel.com>,
		An Sudhakar <sudhakar.an@intel.com>
Description:
		This sysfs entry is used to retrieve Dynamic SAR information
		emitted/maintained by a BIOS that supports Dynamic SAR.

		The retrieved information is in the order given below:
		- device_mode
		- bandtable_index
		- antennatable_index
		- sartable_index

		The above information is sent as integer values separated
		by a single space. This information can then be pushed to a
		WWAN modem that uses this to control the transmit signal
		level using the Band/Antenna/SAR table index information.
		These parameters are derived/decided by aggregating
		device-mode like laptop/tablet/clamshell etc. and the
		proximity-sensor data available to the embedded controller on
		given host. The regulatory mode configured on Dynamic SAR
		driver also influences these values.

		The userspace applications can poll for changes to this file
		using POLLPRI event on file-descriptor (fd) obtained by opening
		this sysfs entry. Application can then read this information from
		the sysfs node and consume the given information.
+7 −0
Original line number Diff line number Diff line
@@ -9220,6 +9220,13 @@ L: platform-driver-x86@vger.kernel.org
S:	Maintained
F:	drivers/platform/x86/intel_atomisp2_led.c
INTEL BIOS SAR INT1092 DRIVER
M:	Shravan S <s.shravan@intel.com>
M:	Intel Corporation <linuxwwan@intel.com>
L:	platform-driver-x86@vger.kernel.org
S:	Maintained
F:	drivers/platform/x86/intel/int1092/
INTEL BROXTON PMC DRIVER
M:	Mika Westerberg <mika.westerberg@linux.intel.com>
M:	Zha Qipeng <qipeng.zha@intel.com>
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ menuconfig X86_PLATFORM_DRIVERS_INTEL

if X86_PLATFORM_DRIVERS_INTEL

source "drivers/platform/x86/intel/int1092/Kconfig"
source "drivers/platform/x86/intel/int33fe/Kconfig"
source "drivers/platform/x86/intel/int3472/Kconfig"
source "drivers/platform/x86/intel/pmt/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
# Intel x86 Platform-Specific Drivers
#

obj-$(CONFIG_INTEL_SAR_INT1092)		+= int1092/
obj-$(CONFIG_INTEL_CHT_INT33FE)		+= int33fe/
obj-$(CONFIG_INTEL_SKL_INT3472)		+= int3472/
obj-$(CONFIG_INTEL_PMT_CLASS)		+= pmt/
+14 −0
Original line number Diff line number Diff line
config INTEL_SAR_INT1092
	tristate "Intel Specific Absorption Rate Driver"
	depends on ACPI
	help
	  This driver helps to limit the exposure of human body to RF frequency by
	  providing information to userspace application that will inform the Intel
	  M.2 modem to regulate the RF power based on SAR data obtained from the
	  sensors captured in the BIOS. ACPI interface exposes this data from the BIOS
	  to SAR driver. The front end application in userspace will interact with SAR
	  driver to obtain information like the device mode, Antenna index, baseband index,
	  SAR table index and use available communication like MBIM interface to enable
	  data communication to modem for RF power regulation. Enable this config when
	  given platform needs to support "Dynamic SAR" configuration for a modem available
	  on the platform.
Loading