ADC on the IMX6SX

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

ADC on the IMX6SX

跳至解决方案
1,748 次查看
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

标签 (2)
0 项奖励
1 解答
1,388 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

3 回复数
1,389 次查看
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,388 次查看
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 项奖励
1,388 次查看
jeroenvanderlaa
Contributor III

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