SPI CS on I2C gpio expander

Hi,

On our custom board we are using a TCA9539 gpio expander to control our CS pins for 8 devices. Currently I have set up the device tree for the SPI devices and the TCA9539 but I am seeing a kernel panic in the dmesg logs and the SPI devices fail to probe properly.

The tca9539 interrupt pin is connected to GPIO09 on the Orin NX. The system is being run on Jetpack 5.1.1.
Below is the device tree setup for the tca9539.

gpio74: gpio@74 {
			compatible = "ti,tca9539";
			reg = <0x74>;
			interrupt-parent = <0x59>;
			interrupts = <166 0x04>;
			interrupt-controller;
			#interrupt-cells = <2>;
			gpio-controller;
			#gpio-cells = <2>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinmux_default>;
		};

Here is a look at the stack trace that I am seeing.

From here the SPI devices do not load their kernel drivers properly.

Is it possible to configure the device tree to support I2C expanded GPIOs for SPI kernel drivers?

Thanks,
Akhil

Hi akhil.m.birlangi,

Have you verified with the latest Jetpack 5.1.2(R35.4.1)?

Please share the full block diagram of your connections about I2C and SPI devices.
and also share the full serial console log for further check.

We would like to check the source of your device tree instead of the de-compiled dts.

From the stack of your kernel panic, it seems caused from the gpiod_set_value().

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.