iMX6 - PCAL6416 - Linux kernel gpio expander interrupt issue

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

iMX6 - PCAL6416 - Linux kernel gpio expander interrupt issue

跳至解决方案
2,166 次查看
vocsiphuong
Contributor I

Hi NXP team,

We are working on iMX6ULL and PCAL6416 GPIO expander on Linux 4.14.98. The /linux/drivers/gpio/gpio-pca953x.c driver is backported from Linux 5.2

Currently the pcal6416 gpio controller function is OK. From iMX6 gpio 1 pin 6 use as the gpio pin to receive the pcal6416 interrupt signal.

We expected to use the interrupt from the pcal6416 as interrupt expander and the device tree as below:

 

 

 

&i2c1 {
	clock-frequency = <100000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c1>;
	status = "okay";

	exp_gpio1: exp_gpio1@20 {
		compatible = "nxp,pcal6416";
		reg = <0x20>;
		gpio-controller;
		#gpio-cells = <2>;
		status = "okay";
		reset-gpios = <&gpio5 6 GPIO_ACTIVE_HIGH>;
		vcc-supply = <&reg_sd1_vmmc>;

		interrupt-parent = <&gpio1>;
		interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
		interrupt-controller;
		#interrupt-cells = <2>;
	};

 

 

 

With the device tree configuration as above the issue has occurred. From the debug console after "Starting kernel ..." line is printed kernel hang and it needs up to 30 minutes to boot up and IRQ init for pcal6416 is OK.

Could you please help me to clarify any issue from the device tree configuration or any workaround for this.

Thanks in advance,

Phuong Nguyen

0 项奖励
回复
1 解答
2,130 次查看
jamesbone
NXP TechSupport
NXP TechSupport

I can recommend you that you verify that you Interrupt ID, it is correct always take in consideration that the Interrupts are 32 bits Shift.

And you can take a look to the Kernel Documentation regarding the device tree configuration

 

https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

 

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
235 次查看
5454ty
Contributor II

HI,

   I am debugging the pcal6416,and can you share the linux driver . thank you 

0 项奖励
回复
2,131 次查看
jamesbone
NXP TechSupport
NXP TechSupport

I can recommend you that you verify that you Interrupt ID, it is correct always take in consideration that the Interrupts are 32 bits Shift.

And you can take a look to the Kernel Documentation regarding the device tree configuration

 

https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

 

 

0 项奖励
回复