IMX6UL ADC

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

IMX6UL ADC

3,569件の閲覧回数
anshulkhare
Contributor III

Hello All,

I need my ADC driver working in the imx6ul board with 8 channels.

I have modified dtsi files as shown below:

            adc1: adc@02198000 {
                compatible = "fsl,imx6ul-adc", "fsl,vf610-adc";
                reg = <0x02198000 0x4000>;
                interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&clks IMX6UL_CLK_ADC1>;
                num-channels = <8>;

                clock-names = "adc";
                status = "disabled";
                        };

        pinctrl_adc1: adc1grp {

            fsl,pin = <
                MX6UL_PAD_GPIO1_IO07__GPIO1_IO07        0xb0
            >;

        };

&adc1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_adc1>;
    vref-supply = <&reg_mba6ul_3v3>;
    status = "okay";
};

But, I am able to see only in_voltage0_raw and in_voltage1_raw iio.

Could anyone please tell me what might be the mistake I am doing here?

0 件の賞賛
返信
4 返答(返信)

2,638件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Anshul

seems for 8 channels GPIO1_IO00-GPIO1_IO07 should be added,

please check that these pads were not used by other modules.

        pinctrl_adc1: adc1grp {
            fsl,pins = <
                MX6UL_PAD_GPIO1_IO00__GPIO1_IO00        0xb0
                MX6UL_PAD_GPIO1_IO01__GPIO1_IO01        0xb0

..

                MX6UL_PAD_GPIO1_IO07__GPIO1_IO07        0xb0
            >;
        };

use dts example:  linux/arch/arm/boot/dts/imx6ul-14x14-ddr3-arm2.dts

linux-imx.git - i.MX Linux Kernel 

and Chapter 53 ADC Driver attached Linux Manual

ADC pinmux options are described in sect.4.1.1 Muxing Options i.MX6UL Reference Manual

http://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf

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

0 件の賞賛
返信

2,638件の閲覧回数
anshulkhare
Contributor III

Hello Igor,

   Thank you for the reply,

 As per my requirement i want to read the voltage from GPIO1_IO07.

i have configured GPIO1_IO07 in device tree, but i am getting the voltage as 0,

pinctrl_adc1: adc1grp {

  fsl,pin = <
                MX6UL_PAD_GPIO1_IO07__GPIO1_IO07        0xb0
            >;

        };

but i am able to read the voltage value in other pins(channels).

what could be be the issue??

kindly help to resolve this .

0 件の賞賛
返信

2,638件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Anshul

please check that GPIO1_IO07 was not used in uboot.

Best regards
igor

0 件の賞賛
返信

2,638件の閲覧回数
anshulkhare
Contributor III

Hello Igor,

   Thank you for the reply,

  I have checked GPIO1_IO07 was not using in uboot,

  but when i am using GPIO1_IO07 in uboot,

  i found changes in volatge for channel 7(in_voltage7_raw) without configuration of GPIO1_IO07 in device tree,

  and in logs i am getting below print for adc.

imx6ul-pinctrl 20e0000.iomuxc: no fsl,pins property in node /soc/aips-bus@02000000/iomuxc@020e0000/imx6ul-mba6ul/adc1grp

what could be be the issue??

kindly help to resolve this .

Regards,

Anshul

0 件の賞賛
返信