Using mikroBUS INT Pin (GPIO1_DAT25) as trigger for gpiod based application on LS128ARDB-PA

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

Using mikroBUS INT Pin (GPIO1_DAT25) as trigger for gpiod based application on LS128ARDB-PA

跳至解决方案
1,425 次查看
rbaur
Contributor II

Hello,

we want to build a demo application on LS1028ARDB-PA EVK which uses the INT Pin of one of the mikroBUS connectors as trigger for controlling the application based on gpiod api. The INT Pin is routed to gpiochip0 line 25.

OS: OpenIL 1.11, kernel 5.10.47-rt46, uboot LSDK 20.12, rcw LDSK 20.12

Has anyone a hint, what to configure in RCW, UBOOT, GPIO registers or DTS for getting a reaction inside gpiomon tool? (call: gpiomon gpiochip0 25)

Thanks in advance

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
1,386 次查看
rbaur
Contributor II

@yipingwang 

The problem was the irq type configuration of gpio1 controller in devicetree. Switching it to IRQ_TYPE_EDGE_RISING gpiomon detects the event on line 25.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,392 次查看
rbaur
Contributor II

yipingwang, what about the brdcfg register for the mikroBUS modules. By default irq seems to be configured with active low logic.
Do i have to reconfigure anything?

0 项奖励
回复
1,390 次查看
yipingwang
NXP TechSupport
NXP TechSupport

No need reconfiguration.

0 项奖励
回复
1,387 次查看
rbaur
Contributor II

@yipingwang 

The problem was the irq type configuration of gpio1 controller in devicetree. Switching it to IRQ_TYPE_EDGE_RISING gpiomon detects the event on line 25.

0 项奖励
回复
1,421 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please go to LSDK20.12 RCW source code folder flexbuild_lsdk2012/packages/firmware/rcw/ls1028ardb/, please configure IIC5_PMUX as "1" to enable GPIO1_DAT25.

In OpenIL build environment, please configure Linux Kernel with the following commands to enable CONFIG_GPIO_SYSFS and CONFIG_GPIO_MPC8XXX.

$ make nxp_ls1028ardb-64b_defconfig

$ make linux-menuconfig

Please refer to this document.

https://community.nxp.com/t5/Layerscape-Knowledge-Base/LS1043-GPIO-support-in-Linux-SDK/ta-p/1103689

0 项奖励
回复
1,415 次查看
rbaur
Contributor II

yipingwang, thanks a lot for your reply.

kernel is already configured this way, RCW should be correct, but I'll check this again inside uboot.

0 项奖励
回复