How to setup ADC2 for imx6ull Linux 4.1.15-2.1.0 driver vf610_adc

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

How to setup ADC2 for imx6ull Linux 4.1.15-2.1.0 driver vf610_adc

1,706件の閲覧回数
johanneslind
Contributor I

Hello i'm having some issues setting up ADC2 on our i.MX6ULL custom board.

Below are my .dts and .dtsi configs.

DTS:

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

&adc2 {
    pinctrl-names = "default";
    vref-supply = <&reg_vref_2v5>;
    pinctrl-0 = <&pinctrl_adc2>;
    status = "okay";
};

DTSI:

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 = <5>;
    clock-names = "adc";
    status = "disabled";
};

adc2: adc@0219c000 {
    compatible = "fsl,imx6ul-adc", "fsl,vf610-adc";
    reg = <0x0219c000 0x4000>;
    interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&clks IMX6UL_CLK_ADC2>;
    num-channels = <5>;
    clock-names = "adc";
    status = "disabled";
};

Using irq 101 for adc2 causes the Linux system to crash trying to read any of the raw imputs.

Also in the boot log one can see "Timeout for adc calibration".


Using irq 102 for adc2 causes timeouts when trying to access raw inputs.

All raw inputs can be read for ADC1.

The i.MX Linux Reference Manual say:

The ADC pin settings should be done in the ADCx_PCTL register. No other extra
IOMUX settings are required.

But i can find no reference to PCTL in the i.MX 6ULL Applications Processor Reference Manual.

Could someone explain to me how you're supposed to setup ADC?
In the end i would like to be able to use

GPIO1_IO00 as ADC2_IN0
GPIO1_IO03 as ADC2_IN3

GPIO1_IO01 as ADC1_IN1
GPIO1_IO04 as ADC1_IN4
GPIO1_IO08 as ADC1_IN8

And i just can seem to figure it out.

I apologize for any error in formatting, this is my first question on this forum.

GP

ラベル(2)
0 件の賞賛
返信
1 返信

1,066件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Johannes

one can check if adc2 clocks are enabled in CCM_CCGR1 register

and recheck board memory with ddr test

i.MX6/7 DDR Stress Test Tool V2.70 

i.MX Linux Reference Manual gives description for generic adc driver, so

some descriptions may be for other processors. For i.MX6ULL adc description it is

necessary to look at  i.MX 6ULL Applications Processor Reference Manual.

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

0 件の賞賛
返信