iMX8QXP ADC function abnormal

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

iMX8QXP ADC function abnormal

854 Views
liuyonggang
Contributor III

Platform:iMX8QXP

Build enviroment:yocto

question:config ADC_IN0~ADC_IN5 as ADC channel,but the function is abnormal.

1.confirm CONFIG_IMX8QXP_ADC=y in arch/arm64/configs/defconfig;

2.add dts info in fsl-imx8qxp-ctx0800-rohs.dtsi file as followings:
&iomuxc {
[...]


pinctrl_adc0: adc0grp {
      fsl,pins = <
         SC_P_ADC_IN0_ADMA_ADC_IN0 0xc0000060
         SC_P_ADC_IN1_ADMA_ADC_IN1 0xc0000060
         SC_P_ADC_IN2_ADMA_ADC_IN2 0xc0000060
         SC_P_ADC_IN3_ADMA_ADC_IN3 0xc0000060
         SC_P_ADC_IN4_ADMA_ADC_IN4 0xc0000060
         SC_P_ADC_IN5_ADMA_ADC_IN5 0xc0000060
      >;
   };
};

 

&adc0 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_adc0>;
   digi,adc-ch-list = <0 1 2 3 4 5>;
   status = "okay";
};

3.I can see /dev/iio:device0 device node;

4.root@CTX0800-RoHS:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage_scale
1048.575927734

The value is abnormal.

5.check kernel startup log:

[ 3.085389] imx8qxp-pinctrl iomuxc: pin_config_set op failed for pin 100
[ 3.092240] imx8qxp_adc 5a880000.adc: Error applying setting, reverse things back
[ 3.100523] imx8qxp_adc 5a880000.adc: 5a880000.adc supply vref not found, using dummy regulator

as above info(point 5),ADC_IN0(pin 100) configration are conflicts with somewhere.Moreover ADC supply vref is abnormal.

Can someone help me?

BRs!

Johnny

0 Kudos
2 Replies

729 Views
liuyonggang
Contributor III

Hi igor,

     Tks for your suggestion.

     I researched Linux 4.14.98_2.3.0 Documentation carefully,But They are unuseful for me.

  

BRs

Johnny

0 Kudos

729 Views
igorpadykov
NXP Employee
NXP Employee

Hi Johnny

please check that latest rev.C0 revision used in the case and

latest linux L4.14.98_2.3.0 supporting that revision

Linux 4.14.98_2.3.0 Documentation

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

0 Kudos