Pca953x 1-0020: no default pinctrl state


currently i try to configure the gpio-pca953x to drive a PCA9574BS,118 gpio-expander, that is connected to the second i2c bus of the Jetson Nano production module with the following DT config:
fl2-cb02.dts (5.1 KB)

	pca9574_i2c2: i2c@7000c400 { // i2c1 for linux
		gpio_adapter: pca9574@20 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "nxp,pca9574";
				reg = <0x20>;
				pinctrl-names = "default";
				// phandle to pin-config-node: child nodes of pin controller that they configure (pinctrl-bindings.txt)
				pinctrl-0 = <>;
				interrupt-parent = <&gpio>;
				interrupts = <33 IRQ_TYPE_LEVEL_LOW>;
				#gpio-cells = <2>;
				#interrupt-cells = <2>;

but i get the following kernel output:

[ 1490.359362] bus: 'i2c': driver_probe_device: matched device 1-0020 with driver pca953x
[ 1490.367399] bus: 'i2c': really_probe: probing driver pca953x with device 1-0020
[ 1490.374884] pca953x 1-0020: no default pinctrl state
[ 1490.380007] pca953x 1-0020: reg get err: -19
[ 1490.384382] pca953x: probe of 1-0020 rejects match -19

With a python-script i can access the gpio-expander from userspace and query its registers via i2c, so it should not be an hardware issue.

I suspect, that the line “pinctrl-0 = <>” is wrong, but reading the drivers binding documentation in Documentation/devicetree/bindings/gpio/gpio-pca953x.txt i am still puzzled if i need to define a pinctrl configuration for the pins controlled by the PCA9574BS,118 chip or if this should reference the Tegra pinmux configuration.

Any hints are highly appreciated.

Best regards,

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

this part looks incomplete,
please see-also reference device tree to have implementation.
for example,

        pinmux@700008d4 {
                dvfs_pwm_active_state: dvfs_pwm_active {...}
                dvfs_pwm_inactive_state: dvfs_pwm_inactive {...}

        pwm@70110000 {
                pinctrl-0 = <&dvfs_pwm_active_state>;
                pinctrl-1 = <&dvfs_pwm_inactive_state>;

Hi Jerry,

thanks for the suggestions. I found that the ‘vcc-supply’ property as documented here: https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt is not optional in the tegra linux.4.9 but required.

in the end providing a fixed regulator for this property helped:
vcc-supply = <&battery_reg>;
which solved the error: reg get err: -19

Thanks for your hints.
Best regards,

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