Freescale i.MX audio complex with AK4373 DAC

Same as Simple-Card, specifies audio DAI connection of SoC <-> codec.

Required properties:

- compatible				: "fsl,imx-simple-audio-card"

Optional properties:

- imx-simple-audio-card,name		: User specified audio sound card name, one string
					  property.
- imx-simple-audio-card,widgets		: Please refer to widgets.txt.
- imx-simple-audio-card,routing		: A list of the connections between audio components.
					  Each entry is a pair of strings, the first being the
					  connection's sink, the second being the connection's
					  source.
- imx-simple-audio-card,mclk-fs         : Multiplication factor between stream rate and codec
					  mclk. When defined, mclk-fs property defined in
					  dai-link sub nodes are ignored.
- imx-simple-audio-card,hp-det-gpio	: Reference to GPIO that signals when
					  headphones are attached.
- imx-simple-audio-card,mic-det-gpio	: Reference to GPIO that signals when
					  a microphone is attached.
- imx-simple-audio-card,aux-devs	: List of phandles pointing to auxiliary devices, such
					  as amplifiers, to be added to the sound card.
- imx-simple-audio-card,pin-switches	: List of strings containing the widget names for
					  which pin switches must be created.

Required subnodes:

- mux-int-port                          : The internal port of the i.MX audio muxer (AUDMUX)
- mux-ext-port                          : The external port of the i.MX audio muxer

Note:
 * The AUDMUX port numbering should start at 1, which is consistent with
hardware manual.

Optional subnodes:

- imx-simple-audio-card,dai-link	: Container for dai-link level
					  properties and the CPU and CODEC
					  sub-nodes. This container may be
					  omitted when the card has only one
					  DAI link. See the examples and the
					  section below.

Dai-link subnode properties and subnodes:

If dai-link subnode is omitted and the subnode properties are directly
under "sound"-node the subnode property and subnode names have to be
prefixed with "simple-audio-card,"-prefix.

Required dai-link subnodes:

- cpu					: CPU   sub-node
- codec					: CODEC sub-node

Optional dai-link subnode properties:

- format				: CPU/CODEC common audio format.
					  "i2s", "right_j", "left_j" , "dsp_a"
					  "dsp_b", "ac97", "pdm", "msb", "lsb"
- frame-master				: Indicates dai-link frame master.
					  phandle to a cpu or codec subnode.
- bitclock-master			: Indicates dai-link bit clock master.
					  phandle to a cpu or codec subnode.
- bitclock-inversion			: bool property. Add this if the
					  dai-link uses bit clock inversion.
- frame-inversion			: bool property. Add this if the
					  dai-link uses frame clock inversion.
- mclk-fs             			: Multiplication factor between stream
					  rate and codec mclk, applied only for
					  the dai-link.

For backward compatibility the frame-master and bitclock-master
properties can be used as booleans in codec subnode to indicate if the
codec is the dai-link frame or bit clock master. In this case there
should be no dai-link node, the same properties should not be present
at sound-node level, and the bitclock-inversion and frame-inversion
properties should also be placed in the codec node if needed.

Required CPU/CODEC subnodes properties:

- sound-dai				: phandle and port of CPU/CODEC

Optional CPU/CODEC subnodes properties:

- dai-tdm-slot-num			: Please refer to tdm-slot.txt.
- dai-tdm-slot-width			: Please refer to tdm-slot.txt.
- clocks / system-clock-frequency	: specify subnode's clock if needed.
					  it can be specified via "clocks" if system has
					  clock node (= common clock), or "system-clock-frequency"
					  (if system doens't support common clock)
					  If a clock is specified, it is
					  enabled with clk_prepare_enable()
					  in dai startup() and disabled with
					  clk_disable_unprepare() in dai
					  shutdown().
					  If a clock is specified and a
					  multiplication factor is given with
					  mclk-fs, the clock will be set to the
					  calculated mclk frequency when the
					  stream starts.
- system-clock-direction-out		: specifies clock direction as 'out' on
					  initialization. It is useful for some aCPUs with
					  fixed clocks.

Example :

sound {
	compatible = "imx-simple-audio-card";
	imx-simple-audio-card,name = "ak4373-audio";
	imx-simple-audio-card,format = "i2s";
	mux-int-port = <2>; /* AUDMUX internal port */
	mux-ext-port = <4>; /* AUDMUX external port */
	imx-simple-audio-card,cpu {
		sound-dai = <&ssi2 0>;
		bitclock-master;
		frame-master;
		format = "i2s";
	};
	imx-simple-audio-card,codec {
		sound-dai = <&ak4373>;
		format = "i2s";
	};
};

&ssi2 {
	#sound-dai-cells = <1>;
	fsl,mode = "i2s-master";
        fsl,fifo-depth = <15>;
	status = "okay";
};

ak4373: ak4373@12 {
	compatible = "asahi-kasei,ak4373";
	#sound-dai-cells = <0>;
	reg = <0x12>;
};

ssi2: ssi@202c000 {
	#sound-dai-cells = <0>;
	compatible = "fsl,imx6q-ssi",
	"fsl,imx21-ssi";
	reg = <0x0202c000 0x4000>;
	interrupts = <0 47 IRQ_TYPE_LEVEL_HIGH>;
	clocks = <&clks IMX6QDL_CLK_SSI2_IPG>,
		 <&clks IMX6QDL_CLK_SSI2>;
	clock-names = "ipg", "baud";
	dmas = <&sdma 41 1 0>,
	       <&sdma 42 1 0>;
	dma-names = "rx", "tx";
	fsl,fifo-depth = <15>;
	status = "disabled";
};
