i2c bus gpio expander ...
Robert Sciuk
robert.sciuk at exfo.com
Thu Nov 10 04:39:39 EST 2011
My problem seems to be evolving, and the localbus issue now seems less
important than correctly mapping the gpio's on the i2c bus.
I have a pca9539 16 pin gpio expander on an i2c bus, and I'm wondering
what the correct way to map each of the pins on the expander might be?
In this case, I am programming FPGAs, and the connections look like
this:
Pca9539
Port 0
0 -> done FPGA1
1 -> init
2 -> cs
3 -> program
Port 1
0 -> done FPGA2
1 -> init
2 -> cs
3 -> program
i2c at 119000 {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <2>;
compatible = "fsl-i2c";
reg = <0x119000 0x100>;
interrupts = <39 2 0 0>;
interrupt-parent = <&mpic>;
dfsrr;
fpga_ctrl: gpio at ea {
compatible = "nxp,pca953x";
reg = <0xea>;
#gpio-cells = <2>;
gpio-controller;
polarity = <0x00>;
};
};
My question is, how might one correctly map the gpio pins? Are they a
subnode of the gpio node, or would each of the two ports on the 9539
constitute a subnode of the gpio, and then the pins be labeled as
subnodes of the port? How might one represent pins which are not
connected or are only the used pins actually mapped?. Any pointers would
be appreciated.
Robert Sciuk
Senior Designer, R&D.
905.738.3741 xt 22621
More information about the devicetree-discuss
mailing list