Hi All,
I want to do an adc test on imx6ul board. But, I am not able to see anything under /sys/bus/iio/devices/.
I have enabled the ADC support in kernel configurations.
My dtsi(imx6ul.dtsi) file contains :
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 = <2>;
clock-names = "adc";
status = "disabled";
};
Is there anything more to be done to see the devices in /sys/bus/iio/devices/.
Could anyone kindly help me out on this ?
Hi,
I tried the MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 as ADC_IN4 connecting the physical pin to 3.3V
or 0V but I read always a number near 4095 as I read a different gpio pin ...
Any suggestion?
Thanks
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 = <1>;
clock-names = "adc";
status = "disabled";
};
&adc1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_adc1>;
vref-supply = <®_vref_3v3>;
status = "okay";
};
pinctrl_adc1 define the pins.
I think the key is: status = "okay";
you will see /sys/bus/iio/devices/iio:device0,document is wrong.
I don't se anything ...
is it correct the pin definition
&iomuxc {
imx6ul-ccimx6ul {
/* Uncomment specific pins of the ADC channels enabled in 'adc-ch-list' */
pinctrl_adc1: adc1grp {
fsl,pins = <
/* GPIO1_4/ADC1_IN4 (pin 7 of the expansion header) */
MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x80
>;
};
};
thanks
my dts:
pinctrl_adc1: adc1grp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0x1b0b0
>;
};
ADC_IN4, the i.MX Pins Tools recommed configuration is
MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x000010B0
adn maybe your kernel configuration is not correct.
now I see something but I have some doubts regarding the meaning of pinctrl_adc1 ...
1) in your example you set pinctrl_adc1 as MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 with value 0x10B0
is it correct? is the initial value for IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO03 register? The same for
MX6UL_PAD_GPIO1_IO04__GPIO1_IO04
2) how is possible to set the adc input channel? Or in other words ... how is the relationship
beetwen the adc input channel, the bit0.4 of ADC1.HC0.ADCH register and the setting as
pinctrl_adc1 in the DTB file?
thanks
any news?
always in the same condition .... and I also modified the DTS file to produce the adc1 anabled ..
but always I didn't see anything in the /sys directories
Thanks
Hi Anshul
please try procedures described in sect.53.3.3 Programming Interface
attached Linux Manual, use nxp bsps described on
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello igor,
Thank you for the suggestion. But as per the document, we have enabled freescale vf610 ADC driver as well as ADC driver for imx6 (the board we are using). Still we are not able to see any devices under /sys/bus/iio/devices/.
Is there anything else we are supposed to do?
Hi Anshul
according to document interface is available at
/sys/devices/soc0/soc.1/2200000.aips-bus/
Best regards
igor
Hi igor,
There is nothing as soc.1 under /sys/devices/soc0/.
I can see only family, machine, power(dir), revision, soc_id, subsystem(link), uevent under this directory.
Hi Anshul
please try demo images
https://www.nxp.com/webapp/Download?colCode=L4.1.15_2.0.0_iMX6UL&appType=license&location=null
Best regards
igor
I have the same problem ... and the demo image does not work signalling a
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
Any suggestion?
thanks