[alsa-devel] [PATCH 3/3 v5] ASoC: simple-card: add Device Tree support

Stephen Warren swarren at wwwdotorg.org
Mon Feb 11 22:40:17 CET 2013


On 02/06/2013 05:55 PM, Kuninori Morimoto wrote:
> Support for loading the simple-card module via devicetree.
> It requests cpu/codec information for probing.


> +Simple-Card:
> +
> +Required properties:
> +
> + [prefix] means cpu/codec here
> +
> +- compatible					: "simple-audio"
> +- simple-audio,card-name			: simple-audio card name
> +- simple-audio,format				: see below

> +- simple-audio,[prefix],dai			: phandle and port for CPU/CODEC
> +- simple-audio,[prefix],frame-master		: frame master
> +- simple-audio,[prefix],bitclock-master		: bitclock master
> +
> +Optional properties:
> +
> +- simple-audio,system-clock-frequency		: system clock rate if it is connected to both CPU/CODEC
> +- simple-audio,bitclock-inversion		: bit clock inversion for both CPU/CODEC
> +- simple-audio,frame-inversion			: frame inversion for both CPU/CODEC
> +
> +- simple-audio,[prefix],bitclock-inversion	: if CPU/CODEC needs clock inversion
> +- simple-audio,[prefix],frame-inversion		: if CPU/CODEC needs frame inversion
> +- simple-audio,[prefix],system-clock-frequency	: system clock rate for each CPU/CODEC

I know Mark had a preference to store DAI-specific data in sub-nodes
rather than using this "[prefix]" thing... If that doesn't end up
happening though, rather than "[prefix],", I think it'd be more typical
to use "[prefix]-" since I've never seen a DT property name with two
","; "-" is typically used as the word separator in DT property names.

> +sound {
> +	compatible = "simple-audio";
...
> +	simple-audio,codec,dai = <&ak4648 0>;
...
> +sh_fsi2: sh_fsi2 at 0xec230000 {
> +	compatible = "renesas,sh_fsi2";
> +	reg = <0xec230000 0x400>;
> +	interrupt-parent = <&gic>;
> +	interrupts = <0 146 0x4>;
> +};

Note that the DT binding documentation for renesas,sh_fsi2 needs to define:

a) The value of the #sound-dai-cells property that's missing from the
sh_fsi2 node.

b) The legal values for the "0" in the "simple-audio,codec,dai" property
in the "sound" node above, and which DAI on the device each value
represents.


More information about the Alsa-devel mailing list