Audio codec device tree entries
Timur Tabi
timur at freescale.com
Thu Oct 25 01:07:48 EST 2007
Jon Smirl wrote:
> What I meant was that there is no attempt to describe how the codec is
> connected to the external world. Those connections are described in
> the fabric driver.
Hmmm, I'm not sure I'm okay with that. We can always add properties to those
nodes if it's necessary. However, now you're basically defining some parts of
the board layout in the DTS, and some parts in the fabric driver. On PowerPC
platforms, the fabric driver is supposed to get board layout information from
the device tree.
> I'm getting conflicting opinions on how the devices should be linked
> into the tree. We should pick one and add it to the documentation.
It's a battle of wills!
> The DTC experts need to tell us which way to make the pointers between
> i2s and i2c for the codec. Here's a another way it could be done that
> looks more like the ac97 model.
>
> i2s at 2000 { // PSC1
> compatible = "fsl,mpc5200b-psc-i2s","fsl,mpc5200-psc-i2s";
> cell-index = <0>;
> reg = <2000 100>;
> interrupts = <2 1 0>;
> interrupt-parent = <&mpc5200_pic>;
> codec0: i2s-codec at 0 {
> compatible = "ti,tas5508";
> reg = <0>;
> i2c-handle = <&i2c at 3d00>;
> };
> codec1: i2s-codec at 1 {
> compatible = "ti,tas5508";
> reg = <1>;
> i2c-handle = <&i2c at 3d00>;
> };
> };
>
> i2s at 2200 { // PSC2
> compatible = "fsl,mpc5200b-psc-i2s","fsl,mpc5200-psc-i2s";
> cell-index = <1>;
> reg = <2200 100>;
> interrupts = <2 2 0>;
> interrupt-parent = <&mpc5200_pic>;
> codec2: i2s-codec at 2 {
This should probably be codec0, since it's the first code on this I2S bus.
> compatible = "wolson,wm8750";
> reg = <2>;
> i2c-handle = <&i2c at 3d00>;
> };
> };
>
> i2c at 3d00 {
> compatible = "fsl,mpc5200b-i2c", "fsl,mpc5200-i2c", "fsl-i2c";
> #address-cells = <1>;
> #size-cells = <0>;
> cell-index = <0>;
> reg = <3d00 40>;
> interrupts = <2 f 0>;
> interrupt-parent = <&mpc5200_pic>;
> fsl5200-clocking;
> }
My vote is for this version. In fact, I think it *has* to be this way. If
you're using a CS4270 codec (as I am), the I2C interface is *optional*. So I
want the I2S node to point to the I2C node if it exists.
More information about the Linuxppc-dev
mailing list