* Device Tree configuration for I2C-Multiplexer and its Clients
@ 2009-08-18 8:31 Herzig, Christian
[not found] ` <D839955AA28B9A42A61B9181506E27C401B337A5-AR0Msg4NagxrwccGHPhLvUpAGwC+dI/u0e7PPNI6Mm0@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Herzig, Christian @ 2009-08-18 8:31 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: chris-jmrfutXsf6TiB9QmIjCX8w, Herzig, Christian
Hi listmembers!
I'm working on a MPC8360 (powerpc) based target. I'd like to implement
the facility loading drivers for clients behind a I2C multiplexer.
A driver for the I2C multiplexer family PCA954x is already written by
Rodolfo Giometti.
Let's assume, my hardware looks like that:
------ ------
|LM75| |AT24|
| | | |
PCA9542 |0x48| |0x50|
MPC8360 --------- ------ -----
--------- | MUX | 2 | |
| | 2 | 0|--/------------
| I2C-0 |----/----| | 2
| | | 1|--/------------
--------- | 0x70 | |
--------- ------
|AT24|
| |
|0x50|
------
Describing hardware in the traditional style isn't possible any more:
i2c at 3000 {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c";
reg = <0x3000 0x100>;
interrupts = <43 2>;
interrupt-parent = <&mpic>;
dfsrr;
mux at 70 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "philips, pca9542";
reg = <0x70>;
/* and now the clients behind the multiplexer: */
/* channel 0 */
dtt at 48 {
compatible = "national, lm75";
reg = <0x48>;
};
at24 at 50 {
compatible = "atmel, at24c08";
reg = <0x50>;
};
/* channel 1 */
at24 at 50 {
compatible = "atmel, at24c08";
reg = <0x50>;
};
};
};
That can't work for reasons of naming and allocation. My proposal to
describe the hardware:
i2c at 3000 {
#address-cells = <1>;
#size-cells = <0>;
cell-index = <0>;
compatible = "fsl-i2c";
reg = <0x3000 0x100>;
interrupts = <43 2>;
interrupt-parent = <&mpic>;
dfsrr;
mux at 70 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "philips, pca9547";
reg = <0x70>;
/* and now the clients behind the multiplexer: */
/* channel 0 */
0-dtt at 48 {
mux-channel = <0>;
compatible = "national, lm75";
reg = <0x48>;
}
0-at24 at 50 {
mux-channel = <0>;
compatible = "atmel, at24c08";
reg = <0x50>;
}
/* channel 1 */
1-at24 at 50 {
mux-channel = <1>;
compatible = "atmel, at24c08";
reg = <0x50>;
}
}
}
maybe that's absolute nonsense. I'd like to obtain other opinions and
suggestions.
Christian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Device Tree configuration for I2C-Multiplexer and its Clients
[not found] ` <D839955AA28B9A42A61B9181506E27C401B337A5-AR0Msg4NagxrwccGHPhLvUpAGwC+dI/u0e7PPNI6Mm0@public.gmane.org>
@ 2009-08-20 15:27 ` Grant Likely
[not found] ` <fa686aa40908200827t2d5273c9g84f58f09b471074f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2009-08-20 15:27 UTC (permalink / raw)
To: Herzig, Christian
Cc: chris-jmrfutXsf6TiB9QmIjCX8w, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
On Tue, Aug 18, 2009 at 2:31 AM, Herzig,
Christian<Christian.Herzig-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org> wrote:
> i2c at 3000 {
> #address-cells = <1>;
> #size-cells = <0>;
> cell-index = <0>;
> compatible = "fsl-i2c";
> reg = <0x3000 0x100>;
> interrupts = <43 2>;
> interrupt-parent = <&mpic>;
> dfsrr;
>
> mux at 70 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "philips, pca9542";
> reg = <0x70>;
>
> /* and now the clients behind the multiplexer: */
>
> /* channel 0 */
> dtt at 48 {
> compatible = "national, lm75";
> reg = <0x48>;
> };
> at24 at 50 {
> compatible = "atmel, at24c08";
> reg = <0x50>;
> };
>
> /* channel 1 */
> at24 at 50 {
> compatible = "atmel, at24c08";
> reg = <0x50>;
> };
> };
> };
>
> That can't work for reasons of naming and allocation. My proposal to
> describe the hardware:
It looks to me like you should be using this form:
mux@70 {
#address-cells = <2>; /* Note this change */
#size-cells = <0>;
compatible = "philips, pca9542";
reg = <0x70>;
/* and now the clients behind the multiplexer: */
/* channel 0 */
dtt@0,48 {
compatible = "national,lm75";
reg = < 0 0x48 >; /* now reg is specified with 2 cells */
};
at24@0,50 {
compatible = "atmel,at24c08";
reg = < 0 0x50 >;
};
/* channel 1 */
at24@1,50 {
compatible = "atmel,at24c08";
reg = < 1 0x50 >;
};
};
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Device Tree configuration for I2C-Multiplexer and its Clients
[not found] ` <fa686aa40908200827t2d5273c9g84f58f09b471074f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2009-08-20 22:14 ` Herzig, Christian
0 siblings, 0 replies; 3+ messages in thread
From: Herzig, Christian @ 2009-08-20 22:14 UTC (permalink / raw)
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ; +Cc: chris-jmrfutXsf6TiB9QmIjCX8w
Hi Grant!
mux@70 {
#address-cells = <2>; /* Note this change */ /* I've noted ;-)
*/
#size-cells = <0>;
compatible = "philips, pca9542";
reg = <0x70>;
/* channel 0 */
dtt@0,48 {
compatible = "national,lm75";
reg = < 0 0x48 >; /* now reg is specified with 2 cells
*/
};
at24@0,50 {
compatible = "at24,24c08";
reg = < 0 0x50 >;
};
/* channel 1 */
at24@1,50 {
compatible = "at24,24c08";
reg = < 1 0x50 >;
};
};
That looks very good to me!
Thank you very much,
Christian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-20 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-18 8:31 Device Tree configuration for I2C-Multiplexer and its Clients Herzig, Christian
[not found] ` <D839955AA28B9A42A61B9181506E27C401B337A5-AR0Msg4NagxrwccGHPhLvUpAGwC+dI/u0e7PPNI6Mm0@public.gmane.org>
2009-08-20 15:27 ` Grant Likely
[not found] ` <fa686aa40908200827t2d5273c9g84f58f09b471074f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-08-20 22:14 ` Herzig, Christian
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.