path: root/Documentation
diff options
authorDurgadoss R <durgadoss.r@intel.com>2010-12-13 09:44:36 +0000
committerAlan Cox <alan@linux.intel.com>2010-12-13 09:44:36 +0000
commitd051ad45ef13793159797873161ea07e4a10efbc (patch)
tree951cf01f50618acc2ac621938ab1e17de47e4033 /Documentation
parent2cf5b7ad760b1699d9060ea0ab5601375a5ad43f (diff)
x86,mrst: Intel Medfield over-current detection patch
This patch enables over current detection on the Intel Medfield Platform. This driver provides sysfs interfaces to configure current thresholds. When the current being drawn on the platform exceeds the configured threshold, an interrupt is generated. This interrupt can be used to bring the current consumption down by taking necessary hardware or software actions. Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
Diffstat (limited to 'Documentation')
1 files changed, 86 insertions, 0 deletions
diff --git a/Documentation/x86/intel_mid/intel_mid_ocd.txt b/Documentation/x86/intel_mid/intel_mid_ocd.txt
new file mode 100644
index 00000000000..d9483b0b6af
--- /dev/null
+++ b/Documentation/x86/intel_mid/intel_mid_ocd.txt
@@ -0,0 +1,86 @@
+Kernel driver over current detection driver
+Supported systems:
+ * Intel Medfield Platform
+Author: Durgadoss R
+This driver monitors the current drawn by the platform, and detects the
+peak current conditions. When the current drawn is more than the
+configured limit for a period of time (which is specified by a timer), an
+interrupt is generated. The current limit and the timer value can be
+configured at run time.
+The current thresholds aka BATTCURRENTLIMITS(BC) are of two types:
+ 1.warning threshold(BC1)
+ at which the system should take actions to bring the
+ current consumption down.
+ 2.shutdown threshold(BC2)
+ at which the hardware does a COLDOFF.
+The timer thresholds are of three types:
+ 1.warning threshold(T1)
+ This corresponds to the first flag for time that the battery
+ current has been above BC1. An interrupt is generated to allow
+ software to correct the situation based on use-case.
+ 2.hardware action threshold(T2)
+ This corresponds to the second flag for time that the battery
+ current has been above BC1. It signifies that the system
+ should control high current subsystems through hardware.
+ Besides a general interrupt, audio_volume_crush, vibra_disable
+ signals are sent.
+ 3.shutdown threshold(T3)
+ This final flag signifies that when the system current exceeds
+ the threshold for more than T3, system should shutdown.
+Following table summarizes the exported sysfs files:
+bcu_status(RW) - To enable/disable burst control unit.
+ 0 - enables bcu, 1 - disables bcu.
+accumulation_time(RW)- Time since last clearing/overflow of warning_count
+ in milli seconds. Writing 0 resets the acc_time and
+ also clears both the warning counters.
+warning_count(RO) - Two space seperated values that indicate the number
+ of times the current thresholds have been crossed.
+action_mask(RW) - A hex value to enable/disable specific
+ actions taken when current violation happens.
+ bits [b4 b3 b2 b1 b0] control [a4 a3 a2 a1 a0] actions
+ respectively. a4 - camera output, a3 - sys burst,
+ a2 - SOC burst enable, a1 - vibra, a0 - audio output.
+ bits [b7 b6 b5] - Reserved.
+ Default value:08 (sys burst output is enabled).
+action_status(RO) - A hex value showing the status of actions taken
+ since the __last__ interrupt.
+ b7 - T3 violation
+ b6 - T2 violation
+ b5 - T1 violation
+ b4 - camera action taken status
+ b3 - sys burst disable action taken status
+ b2 - SOC burst disable action taken status
+ b1 - vibra disable
+ b0 - audio volume crush
+ A '1' in a bit position indicates that particular
+ action has been taken.
+current_warning(RW) - This gives the current(in mA) at which a warning is
+ generated. Range: 1400 to 4800. Default:3000
+current_shutdown(RW) - This gives the current(in mA) at which system shutdown
+ is initiated. Range:1800 to 5800. Default:3800
+timer_warning(RW) - Time above current_warning limit at which interrupts
+ are trigerred(so that software can bring the current
+ consumption down). Values are in micro seconds.
+ Range:200 to 7700 in steps of 500
+timer_hw_action(RW) - Time above current_warning limit at which the system
+ is trigerred into hardware control to bring down the
+ current consumption. Values are in micro seconds.
+ Range:200 to 7700 in steps of 500
+timer_shutdown(RW) - Time above current_warning limit at which a hardware
+ shutdown event is trigerred. The timer values are in
+ micro seconds.
+ Range:1000 to 15000 in steps of 1000
+For all timer interfaces, tolerance shall be 5% maximum.
+All timers start running concurrently once current_warning/current_shutdown
+is crossed.