Hi all:
1. i.MX8 ADC_IN0 pin can't config to GPIO function, here is my dts pin config:
SC_P_ADC_IN0_LSIO_GPIO3_IO18 0x1E000000
2. when as output function, pin value always 0;
3. when as input function, gpio value always 0 no matter what level at the pin connected.
已解决! 转到解答。
>>SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT_PAD, it can work now,
>but i don't know why
right, seems correct usage with *_PAD, similar example can be found for
"SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD" in
fsl-imx8qxp-mek-lcdif.dts\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel
That specific "dual voltage" pad setting is needed for i.MX8QM/QXP processors,
details can be found in IOMUX Chapter of Reference Manual.
Best regards
igor
igorpadykov Do you know how to change this
to use the 3.3V level instead of 1.8V? I assume it has to do with the hex value at the end, but I couldn't find any references on how to set this in the devicetree.
Thanks,
Nolan Z
Hi zeng
this pad is dual voltage pad and needs special configuartion, one can try to add in dts:
pinctrl_hog*:
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT 0x000514a0
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
igorpadykov, Thanks for your reply at first.
1. Here is my current config in dts:
pinctrl_hog: hoggrp {
fsl,pins = <
[...]
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT 0x000514a0
SC_P_ADC_IN0_LSIO_GPIO3_IO18 0x1E000000 //irq
>;
};
2. It can not work well.
1. when i change SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT to SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT_PAD, it can work now, but i don't know why. :smileyhappy:
pinctrl_hog: hoggrp {
fsl,pins = <
SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT_PAD 0x000514a0
SC_P_ADC_IN0_LSIO_GPIO3_IO18 0x1E000000 //irq
>;
};
2. Is 1V8_3V3 in SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT_PAD means the pin compatible 1.8V and 3.3V External voltage?
3. What is the mean RH in GPIORHT?
>>SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHT_PAD, it can work now,
>but i don't know why
right, seems correct usage with *_PAD, similar example can be found for
"SC_P_COMP_CTL_GPIO_1V8_3V3_GPIORHB_PAD" in
fsl-imx8qxp-mek-lcdif.dts\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel
That specific "dual voltage" pad setting is needed for i.MX8QM/QXP processors,
details can be found in IOMUX Chapter of Reference Manual.
Best regards
igor
1. We can control ADC_IN0 as GPIO input/output at /sys/class/gpio/ in filesystem now;
2. but when i try to use ADC_IN0 as interrupt pin, it still can't work.
2.1 I have use this tool to test interrupt: GitHub - OnionIoT/gpioIrq: Example of using sysfs for edge detection interrupts on the Omega's GPIOs
2.2 I have try this tool at Raspberry Pi 0, it is ok:
also one can look at example pinctrl_gpio_leds: SC_P_SPDIF0_TX_LSIO_GPIO2_IO15
fsl-imx8qm-ddr4-arm2.dts\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel
Best regards
igor
1. I always try the both edge type interrupt at ADC_IN0 before and it can't work;
2. when i try rising/falling edge type interrupt at ADC_IN0 today and it works for me;
3. i.MX8 GPIO driver do not support both edge type interrupt;
Thanks.