You are here: Digi Embedded Yocto > System development > Linux v3.14 Board Support Package > Devices and interfaces > Analog-to-Digital Converter (ADC)

Analog-to-Digital Converter (ADC)

The Dialog DA9063 PMIC provides a 10-bit general purpose analog-to-digital converter (ADC) with track and hold circuitry and an analog input multiplexer that allows the conversion of up to nine different inputs.

The ADC measures the following inputs:

Kernel configuration

You can manage the hardware monitor support device driver through the following kernel configuration option:

This option is enabled on the default ConnectCore 6 SBC kernel configuration file.

Platform driver mapping

The hardware monitor support device driver for Dialog DA9063 is located at drivers/hwmon/da9063-hwmon.c.

Device tree bindings and customization

The PMIC ADC device tree binding is documented at Documentation/devicetree/bindings/hwmon/da9063-hwmon.txt.

The device tree node for the hardware monitor support device driver is defined in the ConnectCore 6 system-on-module device tree.

ConnectCore 6 system-on-module device tree
hwmon {
    compatible = "dlg,da9063-hwmon";
    interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
    interrupts-names = "HWMON";
    interrupt-parent = <&pmic_dialog>
    dlg,tjunc-offset = <(-5)>
}

ADC user space usage

You can access the ADC values through the sys file system:

root@ccimx6sbc:# cd /sys/class/hwmon/hwmon0/device
root@ccimx6sbc:# ls
driver       in0_label    in2_input    in3_label    modalias     subsystem    uevent
hwmon        in1_input    in2_label    in4_input    name         temp1_input
in0_input    in1_label    in3_input    in4_label    power        temp1_label
root@ccimx6sbc:# cat in0_label in0_input
VSYS
4968
root@ccimx6sbc:# cat in1_label in1_input
ADCIN1
1124
root@ccimx6sbc:# cat in2_label in2_input
ADCIN2
2096
root@ccimx6sbc:# cat in3_label in3_input
ADCIN3
1632
root@ccimx6sbc:# cat in4_label in4_input
VBBAT
425
root@ccimx6sbc:# cat temp1_label temp1_input
TJUNC
50

 

© 2017 Digi International Inc. All rights reserved.
Analog-to-Digital Converter (ADC) updated on 24 April 2017 11:48:25 PM