ADC on the IMX6SX

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC on the IMX6SX

Jump to solution
1,714 Views
jeroenvanderlaa
Contributor III

Hi There I can't figure out how to get the ADC to work on the IMX6SX. I have tried the following so far:

inlcuded the imx6sx.dtsi that creates the adc1 reference as follows:

adc1: adc@02280000 {
compatible = "fsl,imx6sx-adc", "fsl,vf610-adc";
reg = <0x02280000 0x4000>;
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_IPG>;
num-channels = <4>;
clock-names = "adc";
status = "disabled";
};

I have enabled adc1 in my own dts file as follows:

&adc1 {
   vref-supply = <&reg_vref_3v3>;
   status = "okay";
};

I have both the IMX7D and the vf610 adc driver compiled in my linux kernel

But I can't see any devices unde /sys/bus/iio/devices

Can somebody tell me what am I missing?

Best regards,

Jeroen van der Laan

Labels (2)
0 Kudos
1 Solution
1,354 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jeroen

please try procedure given in Chapter 53 ADC Driver

attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
1,355 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jeroen

please try procedure given in Chapter 53 ADC Driver

attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,354 Views
jeroenvanderlaa
Contributor III

This procedure does provide me with an sysfs entry in /sys/devices/soc0/soc/2200000.aips-bus/2280000.adc with the following contents:

./power
./power/control
./power/runtime_active_time
./power/autosuspend_delay_ms
./power/runtime_status
./power/runtime_suspended_time
./driver_override
./modalias
./subsystem
./of_node
./uevent

I'm missing the in_voltage0_raw~ in_voltage3_raw sampling_frequency_available and in_voltage_sampling_frequency entries. Does it have anaything to do with setting the ADC pin settings?

0 Kudos
1,354 Views
jeroenvanderlaa
Contributor III

The eventual problem was with an incorrect definition of the voltage regulator