iMX6 - PCAL6416 - Linux kernel gpio expander interrupt issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX6 - PCAL6416 - Linux kernel gpio expander interrupt issue

Jump to solution
1,563 Views
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 Kudos
1 Solution
1,527 Views
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

 

 

View solution in original post

0 Kudos
1 Reply
1,528 Views
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 Kudos