Device trees and audio codecs

Grant Likely grant.likely at secretlab.ca
Tue Oct 23 13:24:52 EST 2007


On 10/21/07, Jon Smirl <jonsmirl at gmail.com> wrote:
> I have received conflicting opinions as to whether a codec hooked to
> an ac97 bus should get a chip specific codec entry in the device tree.
> Without the codec specific entry only generic ac97 features can be
> used. The Efika has a STA9766. Looking at the data sheet for the chip
> I see that it implements some proprietary functions in addition to the
> standard ones.

You definitely want the codec node on the control bus.  This is
analogous to how Ethernet PHYs are handled.  The PHY nodes are
children of an MDIO node (because that's the control path).  The
ethernet MAC node contains a phandle to the PHY.

In I2S/I2C terms, the CODEC ~= MAC, I2C ~= MDIO and I2S ~= MAC.

In AC97 terms this analogy doesn't work because AC97 doesn't separate
the control and data interfaces.  An AC97 codec is simply a child of
an AC97 controller.

For the MPC5200; the device tree should reflect the required mode.  If
the PSC needs to be in AC97 mode, then the device tree should say
compatible = "fsl,mpc5200b-psc-ac97".  If the PSC needs to be in I2C
mode, then it should be compatible = "fsl,mpc5200b-psc-i2s".  For the
5200 PSCs, the device node not only reflects the hardware (a PSC
core), but also reflects the schematic design (it is wired either as
an I2S bus or an AC97 bus).

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195



More information about the Linuxppc-dev mailing list