AnsweredAssumed Answered

imx6ulevk enable adc1 linux driver

Question asked by Cody Lacey on Jul 11, 2016
Latest reply on Aug 5, 2016 by joseph Stewart

Dear All,

 

I have an imx6ulevk and I am trying to configure ADC1 for GPIO1_IO01__GPIO1_IO01 - GPIO1_IO03__GPIO1_IO03.  I am testing by connecting two potentiometers to GPIO_1 and GPIO_3 of header J1706 out of the Arduino headers.  I have changed the imx6ul-14x14-evk.dts to configure ADC1.  I enabled ADC1 then set the pin control and regulator.  I then disabled tsc and its pin control that was using GPIO_1 and GPIO_3.  I see /sys/bus/iio/devices/iio:device0/in_voltage1_raw and in_voltage3_raw, but their values do not change with the changing voltage.  The values seem to stay around 3100.  I have checked the voltage values with a multimeter to make sure things are connected correctly and they are.  I didn't see any place in u-boot where these pads have already been configured.  Do you know what I may be missing?

 

reg_adc_vref_3v3: regulator@2 {

  compatible = "regulator-fixed";

  regulator-name = "vref-3v3";

  regulator-min-microvolt = <3300000>;

  regulator-max-microvolt = <3300000>;

  };

 

&adc1 {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_adc>;

  vref-supply = <&reg_adc_vref_3v3>;

  num-channels = <4>;

  status = "okay";

};

 

pinctrl_adc: adcgrp {

  fsl,pins = <

  MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0xb0

  MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0xb0

  >;

  };

 

&tsc {

  status = "disabled";

};

 

/*pinctrl_tsc: tscgrp {

  fsl,pins = <

  MX6UL_PAD_GPIO1_IO01__GPIO1_IO01 0xb0

  MX6UL_PAD_GPIO1_IO02__GPIO1_IO02 0xb0

  MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0xb0

  MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0xb0

  >;

  };*/

Outcomes