xref: /OK3568_Linux_fs/kernel/Documentation/hwmon/da9055.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunKernel driver da9055
2*4882a593Smuzhiyun====================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunSupported chips:
5*4882a593Smuzhiyun  * Dialog Semiconductors DA9055 PMIC
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun    Prefix: 'da9055'
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun    Datasheet: Datasheet is not publicly available.
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunAuthors: David Dajun Chen <dchen@diasemi.com>
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunDescription
14*4882a593Smuzhiyun-----------
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunThe DA9055 provides an Analogue to Digital Converter (ADC) with 10 bits
17*4882a593Smuzhiyunresolution and track and hold circuitry combined with an analogue input
18*4882a593Smuzhiyunmultiplexer. The analogue input multiplexer will allow conversion of up to 5
19*4882a593Smuzhiyundifferent inputs. The track and hold circuit ensures stable input voltages at
20*4882a593Smuzhiyunthe input of the ADC during the conversion.
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunThe ADC is used to measure the following inputs:
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun- Channel 0: VDDOUT - measurement of the system voltage
25*4882a593Smuzhiyun- Channel 1: ADC_IN1 - high impedance input (0 - 2.5V)
26*4882a593Smuzhiyun- Channel 2: ADC_IN2 - high impedance input (0 - 2.5V)
27*4882a593Smuzhiyun- Channel 3: ADC_IN3 - high impedance input (0 - 2.5V)
28*4882a593Smuzhiyun- Channel 4: Internal Tjunc. - sense (internal temp. sensor)
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunBy using sysfs attributes we can measure the system voltage VDDOUT,
31*4882a593Smuzhiyunchip junction temperature and auxiliary channels voltages.
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunVoltage Monitoring
34*4882a593Smuzhiyun------------------
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunVoltages are sampled in a AUTO mode it can be manually sampled too and results
37*4882a593Smuzhiyunare stored in a 10 bit ADC.
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunThe system voltage is calculated as:
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun	Milli volt = ((ADC value * 1000) / 85) + 2500
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunThe voltages on ADC channels 1, 2 and 3 are calculated as:
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun	Milli volt = (ADC value * 1000) / 102
46*4882a593Smuzhiyun
47*4882a593SmuzhiyunTemperature Monitoring
48*4882a593Smuzhiyun----------------------
49*4882a593Smuzhiyun
50*4882a593SmuzhiyunTemperatures are sampled by a 10 bit ADC.  Junction temperatures
51*4882a593Smuzhiyunare monitored by the ADC channels.
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunThe junction temperature is calculated:
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun	Degrees celsius = -0.4084 * (ADC_RES - T_OFFSET) + 307.6332
56*4882a593Smuzhiyun
57*4882a593SmuzhiyunThe junction temperature attribute is supported by the driver.
58