IRQ handler for iMX8 SCU GPIO

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IRQ handler for iMX8 SCU GPIO

跳至解决方案
3,238 次查看
sbertrand
Contributor III

Hi,

The SCU SCFW porting kit provides different APIs.

I would like to enable interrupt on GPIO in the SCU firmware ( SCFW).

The board init of iMX8QM MEK uses FGPIO_PinInit to handle SCU GPIO.

The driver library has FGPIO_ClearPinsInterruptFlags to clean the interrupt.

How to I enable the interrupt ?

The documentation has the following example, but the function to set interrupt is not there. Which IRQ would correspond ?

```

PORT_SetPinInterruptConfig(BOARD_SW2_PORT, BOARD_SW2_FGPIO_PIN, kPORT_InterruptFallingEdge);
NVIC_EnableIRQ(BOARD_SW2_IRQ);

```

Would this functionality be handled via the SVC service of the SCFW ?

If interrupt are not available on SCU GPIO, how would I used IGPIO driver interrupt? how the IRQ is process for those GPIO ?

Regards,
Stan

0 项奖励
回复
1 解答
2,898 次查看
sbertrand
Contributor III

The Rapid GPIO on the SCU do not support interrupt as mentioned for the M4 complex : https://community.nxp.com/thread/523693 

在原帖中查看解决方案

0 项奖励
回复
7 回复数
2,899 次查看
sbertrand
Contributor III

The Rapid GPIO on the SCU do not support interrupt as mentioned for the M4 complex : https://community.nxp.com/thread/523693 

0 项奖励
回复
2,898 次查看
jimmychan
NXP TechSupport
NXP TechSupport

Could you tell me which version of BSP are you using?

0 项奖励
回复
2,898 次查看
sbertrand
Contributor III

Hi,

I am using the SCFW porting kit 1.2.9 version for scfw_export_mx8qm_b0 : imx-scfw-porting-kit-1.2.9

0 项奖励
回复
2,898 次查看
jimmychan
NXP TechSupport
NXP TechSupport
0 项奖励
回复
2,898 次查看
sbertrand
Contributor III

Does the 1.2.7.1 has SCU GPIO interrupt support ?

Which IRQ routine handles the GPIO interrupt ?

Is there a user function available to add custom handling for GPIO interrupt ?

Regards,
Stan

0 项奖励
回复
2,898 次查看
jimmychan
NXP TechSupport
NXP TechSupport

Take arch/arm64/boot/dts/freescale/fsl-imx8qxp-mek.dts as a reference.

 

For the PCI node we have:

 

&pcieb{
ext_osc = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pcieb>;
clkreq-gpio = <&gpio4 1 GPIO_ACTIVE_LOW>;
disable-gpio = <&pca9557_a 2 GPIO_ACTIVE_LOW>;
reset-gpio = <&gpio4 0 GPIO_ACTIVE_LOW>;
epdev_on-supply = <&epdev_on>;
status = "okay";
};

 

pinctrl_pcieb defines the GPIOs used to control PCI and are defined like:

 

pinctrl_pcieb: pcieagrp{
fsl,pins = <
SC_P_PCIE_CTRL0_PERST_B_LSIO_GPIO4_IO00 0x06000021
SC_P_PCIE_CTRL0_CLKREQ_B_LSIO_GPIO4_IO01 0x06000021
SC_P_PCIE_CTRL0_WAKE_B_LSIO_GPIO4_IO02 0x06000021
>;
};

 

Is this the kind of example that you are looking for?

0 项奖励
回复
2,898 次查看
sbertrand
Contributor III

Hi,

This is not what I am looking for. 

I am looking for SCU firmware bare metal code to support native SCU gpio block interrupt.

The device tree is not helpful with the bare metal code for the SCU firmware.

Regards,

Stan

0 项奖励
回复