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

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


      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?


      Source Code

      1. &adc1 {
      2. vref-supply = <&reg_vref_3v3>;
      3. num-channels = <2>;
      4. status = "okay";
      5. };
      6. &adc2 {
      7. vref-supply = <&reg_vref_3v3>;
      8. num-channels = <2>;
      9. status = "okay";
      10. };


      Source Code

      2. &csi2 {
      3. status = "okay";
      4. port {
      5. csi2_ep: endpoint {
      6. remote-endpoint = <&vadc_ep>;
      7. };
      8. };
      9. };
      10. &vadc {
      11. vadc_in = <0>;
      12. csi_id = <1>;
      13. status = "okay";
      14. port {
      15. vadc_ep: endpoint {
      16. remote-endpoint = <&csi2_ep>;
      17. };
      18. };
      19. };
      20. #endif
      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.