imx6ulevk enable adc1 linux driver

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx6ulevk enable adc1 linux driver

ソリューションへジャンプ
2,417件の閲覧回数
codylacey
Contributor II

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

  >;

  };*/

ラベル(2)
タグ(2)
0 件の賞賛
返信
1 解決策
1,599件の閲覧回数
codylacey
Contributor II

The issue was J1706 of the Arduino headers is disconnected from GPIO_0-4 signals by resistors that were DNP.  After adding 0 Ohm resistors to R1718 and R1720 I was able to read voltage with ADC1 on adc input 1 and 3.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,600件の閲覧回数
codylacey
Contributor II

The issue was J1706 of the Arduino headers is disconnected from GPIO_0-4 signals by resistors that were DNP.  After adding 0 Ohm resistors to R1718 and R1720 I was able to read voltage with ADC1 on adc input 1 and 3.

0 件の賞賛
返信
1,599件の閲覧回数
octetta
Contributor I

Cody, would you mind posting an example of reading the ADC1/3 channel here?

0 件の賞賛
返信
1,599件の閲覧回数
codylacey
Contributor II

I found the issue.

0 件の賞賛
返信