FS#4187 - mediatek,mt7621-gpio driver register conflict irq number #9167
Labels
flyspray
kernel
pull request/issue with Linux kernel related changes
release/21.02
pull request/issue targeted (also) for OpenWrt 21.02 release
aodzip:
This bug was test on a custom MT7621 board, but I think ubnt,edgerouter-x-sfp also affected.
when we have a node in DT with interrupt-parent = <&gpio> will trigger the bug.
My board:
expender0: pcf8574a@38 {
compatible = "nxp,pcf8574a";
reg = <0x38>;
interrupt-parent = <&gpio>;
interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
ubnt,edgerouter-x-sfp:
expander0: pca9555@25 {
compatible = "nxp,pca9555";
interrupt-parent = <&gpio>;
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
gpio-controller;
#gpio-cells = <2>;
reg = <0x25>;
};
This bug will cause the sfp driver can't detect module insert.
In gpio-mt7621.c:245 every bank's parent is the driver itself, and direct call devm_gpiochip_add_data in :279.
This lead to an unexpected behavior: all three banks register IRQ 0~31 to kernel.
And the DT will always fetch the latest bank (bank2) as IRQ sink.
This can confirm by:
The text was updated successfully, but these errors were encountered: