Hello,
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-controller;
#gpio-cells = <2>;
interrupt-controller;
#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,
Johannes