Set up all internal ADCs of the efusA9X module to get it working.

  • Hello,

    I would like to test all four ADC channels (ADC_D, ADC_C, ADC_B, ADC_A) of the efusA9X module. So far I checked the adc example and the device tree. According to the example the ADC will be handled via device files (/dev/mvf_adc.?). But I could not find these in the sysfs. [1] and [2] shows some device tree nodes. [2] tells me that the ADCs are already in use for some other functions. But [1] does not create the missing decive files in the sysfs.

    What I am missing is a example of a device tree node to inform the kernel about the ADCs. Is there already an example for this or how do I get the device files into the sysfs?



  • VADC is something different, this is the analog video input (Video A/D Converter). So [2] is not relevant in this case.

    The device tree setting in [1] is actually all that needs to be set for ADC to work. There are two channels (ADC_A, ADC_B) on adc1 and two channels (ADC_C, ADC_D) on adc2. You will find the analog values in /sys/bus/iio/devices/iio\:device0 and /sys/bus/iio/devices/iio\:device1 respectively.

    BUT: On a regular efusA9X, the ADC channels are not connected. For some reason I also do not understand, a resistor network that connects the ADC channels to the connector pins is not mounted and therefore the input pins are floating. I have asked the hardware department for a reason and they will check. Maybe ADC will be available on future variants. But for now, ADC can not be used without hardware modification.

    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,

    I just want to share my investigation regarding the ADCs and how I got it working:

    [1] provides a overview about the ADCs numbers, channels and devicefiles. The kernel support can be enabled via [2] and [3] provides a overview about the devicefiles in the filesystem. To calculate the voltage on the pin, see [4]. Furthermore, I contacted F+S to produce efusA9X modules with the missing parts. Until the production will be adjusted please take a look at the attached picture and [5], which provides the information what resistor network IC is missing and where it needs to be placed. Hopefully the efusA9X module will be updated soon.

    @F+S: Please check if everything here is correct and please tell us know when the production was adjusted.


    1. ADC# | channels| pin | /sys/bus/iio/devices/iio\:
    2. ----------------------------------------------------------------------------
    3. adc1 | ADC_A | 44 | device0/in_voltage0_raw
    4. adc1 | ADC_B | 42 | device0/in_voltage1_raw
    5. adc2 | ADC_C | 40 | device1/in_voltage0_raw
    6. adc2 | ADC_D | 38 | device1/in_voltage1_raw


    1. Device Drivers --->
    2. Industrial I/O support --->
    3. Analog to digital converters --->
    4. Freescale vf610 ADC driver



    1. Multiply the value of "/sys/bus/iio/devices/iio:device0/in_voltage_scale" with the value of "/sys/bus/iio/devices/iio:device{0,1}/in_voltage{0,1}_raw".


  • I also would like to request that the adc nodes in the device tree will be configurable through macros like other hardware too.

    Please patch also the device tree also on your (F+S) side.

    P.s.: Sorry but I need to rename the patch file because the website is not accepting a file suffix like "patch":

    $ mv 0001-add_adc_node_control.patch.txt 0001-add_adc_node_control.patch