Hello everyone,
I am developing a functionality under the imx8m mini evk.
I want to use one of the expansion connector pin as an interrupt pin for my driver.
I chose the EXP_IO10 but it seems it's connected to an I2C IO expansion.
Could anyone help and find a way to work with that pin or is there any other pin that can be used directly without interacting with I2C.
Thank you in advance.
Best regards,
Dear @weidong_sun
I am sorry for the late reply I had been working on other work. Now I get back to this problem
I have tried the external pull-up way. How can I disable the internal pull up for the pin?
Thank you.
Hi,
See pins in blue rectangle, they all can be used as GPIO.
You only need to multiplex one of them in dts.
For example, if you want to use SAI5 pins, such as SAI5_RXD0, you should comment node below in imx8mm-evk.dtsi.
/*
&micfil {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pdm>;
assigned-clocks = <&clk IMX8MM_CLK_PDM>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <196608000>;
status = "okay";
};
*/
By default, these pins are used for PDM.
Then add SAI5_RXD0 to iomux node to be a GPIO .
IOMUX definitions are in imx8mm-pinfunc.h .
Have a good day!
Regards,
weidong
Hello,
Thank you for your support.
Adding the pin to the pinctrl node requires the pin ID.
The code below is the pinctrl I defined in my device tree :
pinctrl_intrpt: intrptiogrp {
fsl,pins = <
MX8MM_IOMUXC_SAI5_RXD3_GPIO3_IO24 0x00000005
>;
};
(Is the Pin ID correct ?)
and then I add it in my driver node :
pinctrl-0 = <&pinctrl_intrpt>;
interrupt-parent = <&gpio3>; // Data ready interrupt pin
interrupts = <24 IRQ_TYPE_EDGE_FALLING>;// gpio3.IO[24] Falling Edge
Please correct me if there is something wrong.
Hi,
Very sorry!
We have a 7-day holiday for China’s National Day, and we just returned to the office today!
please try the setting for the GPIO pin:
0x41
>>Is there a pull up pin in J1003 connector.
If you want to use 3.3V IO, external pull up should be needed. and disable internal pull up/down
[Note]
For 3.3V IO, warning is maked in it's schematic.
If 1.8V IO, you can use internal pull up.
Try it please!
Have a good day!
Regards,
weidong