Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb4606e6 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-v4.7-2' of...

Merge tag 'asoc-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v4.7 part 2

Really sorry about this late pull request.  It looks like at the time I
sent my pull request for v4.7 there was some conflict or other issue
which caused my script to stop merging the ASoC branches at some point
after the HDMI changes.

It's all specific driver updates, including:

 - New drivers for MAX98371 and TAS5720.
 - SPI support for TLV320AIC32x4.
 - TDM support for STI Uniperf IPs.

This code should all have been in -next prior to the merge window apart
from some fixes, it dropped out on the 18th.
parents 86c72d1c bf659213
Loading
Loading
Loading
Loading
+19 −40
Original line number Original line Diff line number Diff line
Device-Tree binding for regmap
Devicetree binding for regmap

The endianness mode of CPU & Device scenarios:
Index     Device     Endianness properties
---------------------------------------------------
1         BE         'big-endian'
2         LE         'little-endian'
3	  Native     'native-endian'

For one device driver, which will run in different scenarios above
on different SoCs using the devicetree, we need one way to simplify
this.


Optional properties:
Optional properties:
- {big,little,native}-endian: these are boolean properties, if absent
  then the implementation will choose a default based on the device
  being controlled.  These properties are for register values and all
  the buffers only.  Native endian means that the CPU and device have
  the same endianness.


Examples:
   little-endian,
Scenario 1 : CPU in LE mode & device in LE mode.
   big-endian,
dev: dev@40031000 {
   native-endian:	See common-properties.txt for a definition
	      compatible = "name";
	      reg = <0x40031000 0x1000>;
	      ...
};


Scenario 2 : CPU in LE mode & device in BE mode.
Note:
dev: dev@40031000 {
Regmap defaults to little-endian register access on MMIO based
	      compatible = "name";
devices, this is by far the most common setting. On CPU
	      reg = <0x40031000 0x1000>;
architectures that typically run big-endian operating systems
	      ...
(e.g. PowerPC), registers can be defined as big-endian and must
	      big-endian;
be marked that way in the devicetree.
};


Scenario 3 : CPU in BE mode & device in BE mode.
On SoCs that can be operated in both big-endian and little-endian
dev: dev@40031000 {
modes, with a single hardware switch controlling both the endianess
	      compatible = "name";
of the CPU and a byteswap for MMIO registers (e.g. many Broadcom MIPS
	      reg = <0x40031000 0x1000>;
chips), "native-endian" is used to allow using the same device tree
	      ...
blob in both cases.
};


Scenario 4 : CPU in BE mode & device in LE mode.
Examples:
Scenario 1 : a register set in big-endian mode.
dev: dev@40031000 {
dev: dev@40031000 {
	      compatible = "name";
	      compatible = "syscon";
	      reg = <0x40031000 0x1000>;
	      reg = <0x40031000 0x1000>;
	      big-endian;
	      ...
	      ...
	      little-endian;
};
};
+17 −0
Original line number Original line Diff line number Diff line
max98371 codec

This device supports I2C mode only.

Required properties:

- compatible : "maxim,max98371"
- reg : The chip select number on the I2C bus

Example:

&i2c {
	max98371: max98371@0x31 {
		compatible = "maxim,max98371";
		reg = <0x31>;
	};
};
+3 −2
Original line number Original line Diff line number Diff line
MT8173 with RT5650 RT5676 CODECS
MT8173 with RT5650 RT5676 CODECS and HDMI via I2S


Required properties:
Required properties:
- compatible : "mediatek,mt8173-rt5650-rt5676"
- compatible : "mediatek,mt8173-rt5650-rt5676"
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
- mediatek,audio-codec: the phandles of rt5650 and rt5676 codecs
			and of the hdmi encoder node
- mediatek,platform: the phandle of MT8173 ASoC platform
- mediatek,platform: the phandle of MT8173 ASoC platform


Example:
Example:


	sound {
	sound {
		compatible = "mediatek,mt8173-rt5650-rt5676";
		compatible = "mediatek,mt8173-rt5650-rt5676";
		mediatek,audio-codec = <&rt5650 &rt5676>;
		mediatek,audio-codec = <&rt5650 &rt5676 &hdmi0>;
		mediatek,platform = <&afe>;
		mediatek,platform = <&afe>;
	};
	};
+10 −0
Original line number Original line Diff line number Diff line
@@ -5,11 +5,21 @@ Required properties:
- mediatek,audio-codec: the phandles of rt5650 codecs
- mediatek,audio-codec: the phandles of rt5650 codecs
- mediatek,platform: the phandle of MT8173 ASoC platform
- mediatek,platform: the phandle of MT8173 ASoC platform


Optional subnodes:
- codec-capture : the subnode of rt5650 codec capture
Required codec-capture subnode properties:
- sound-dai: audio codec dai name on capture path
  <&rt5650 0> : Default setting. Connect rt5650 I2S1 for capture. (dai_name = rt5645-aif1)
  <&rt5650 1> : Connect rt5650 I2S2 for capture. (dai_name = rt5645-aif2)

Example:
Example:


	sound {
	sound {
		compatible = "mediatek,mt8173-rt5650";
		compatible = "mediatek,mt8173-rt5650";
		mediatek,audio-codec = <&rt5650>;
		mediatek,audio-codec = <&rt5650>;
		mediatek,platform = <&afe>;
		mediatek,platform = <&afe>;
		codec-capture {
			sound-dai = <&rt5650 1>;
		};
	};
	};
+41 −7
Original line number Original line Diff line number Diff line
@@ -37,17 +37,18 @@ Required properties:


  - dai-name: DAI name that describes the IP.
  - dai-name: DAI name that describes the IP.


  - IP mode: IP working mode depending on associated codec.
	"HDMI" connected to HDMI codec and support IEC HDMI formats (player only).
	"SPDIF" connected to SPDIF codec and support SPDIF formats (player only).
	"PCM" PCM standard mode for I2S or TDM bus.
	"TDM" TDM mode for TDM bus.

Required properties ("st,sti-uni-player" compatibility only):
Required properties ("st,sti-uni-player" compatibility only):
  - clocks: CPU_DAI IP clock source, listed in the same order than the
  - clocks: CPU_DAI IP clock source, listed in the same order than the
	    CPU_DAI properties.
	    CPU_DAI properties.


  - uniperiph-id: internal SOC IP instance ID.
  - uniperiph-id: internal SOC IP instance ID.


  - IP mode: IP working mode depending on associated codec.
	"HDMI" connected to HDMI codec IP and IEC HDMI formats.
	"SPDIF"connected to SPDIF codec and support SPDIF formats.
	"PCM"  PCM standard mode for I2S or TDM bus.

Optional properties:
Optional properties:
  - pinctrl-0: defined for CPU_DAI@1 and CPU_DAI@4 to describe I2S PIOs for
  - pinctrl-0: defined for CPU_DAI@1 and CPU_DAI@4 to describe I2S PIOs for
	       external codecs connection.
	       external codecs connection.
@@ -56,6 +57,22 @@ Optional properties:


Example:
Example:


	sti_uni_player1: sti-uni-player@1 {
		compatible = "st,sti-uni-player";
		status = "okay";
		#sound-dai-cells = <0>;
		st,syscfg = <&syscfg_core>;
		clocks = <&clk_s_d0_flexgen CLK_PCM_1>;
		reg = <0x8D81000 0x158>;
		interrupts = <GIC_SPI 85 IRQ_TYPE_NONE>;
		dmas = <&fdma0 3 0 1>;
		st,dai-name = "Uni Player #1 (I2S)";
		dma-names = "tx";
		st,uniperiph-id = <1>;
		st,version = <5>;
		st,mode = "TDM";
	};

	sti_uni_player2: sti-uni-player@2 {
	sti_uni_player2: sti-uni-player@2 {
		compatible = "st,sti-uni-player";
		compatible = "st,sti-uni-player";
		status = "okay";
		status = "okay";
@@ -65,7 +82,7 @@ Example:
		reg = <0x8D82000 0x158>;
		reg = <0x8D82000 0x158>;
		interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
		interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
		dmas = <&fdma0 4 0 1>;
		dmas = <&fdma0 4 0 1>;
		dai-name = "Uni Player #1 (DAC)";
		dai-name = "Uni Player #2 (DAC)";
		dma-names = "tx";
		dma-names = "tx";
		uniperiph-id = <2>;
		uniperiph-id = <2>;
		version = <5>;
		version = <5>;
@@ -82,7 +99,7 @@ Example:
		interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
		interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
		dmas = <&fdma0 7 0 1>;
		dmas = <&fdma0 7 0 1>;
		dma-names = "tx";
		dma-names = "tx";
		dai-name = "Uni Player #1 (PIO)";
		dai-name = "Uni Player #3 (SPDIF)";
		uniperiph-id = <3>;
		uniperiph-id = <3>;
		version = <5>;
		version = <5>;
		mode = "SPDIF";
		mode = "SPDIF";
@@ -99,6 +116,7 @@ Example:
		dma-names = "rx";
		dma-names = "rx";
		dai-name = "Uni Reader #1 (HDMI RX)";
		dai-name = "Uni Reader #1 (HDMI RX)";
		version = <3>;
		version = <3>;
		st,mode = "PCM";
	};
	};


2) sti-sas-codec: internal audio codec IPs driver
2) sti-sas-codec: internal audio codec IPs driver
@@ -152,4 +170,20 @@ Example of audio card declaration:
				sound-dai = <&sti_sasg_codec 0>;
				sound-dai = <&sti_sasg_codec 0>;
			};
			};
		};
		};
		simple-audio-card,dai-link@2 {
			/* TDM playback  */
			format = "left_j";
			frame-inversion = <1>;
			cpu {
				sound-dai = <&sti_uni_player1>;
				dai-tdm-slot-num = <16>;
				dai-tdm-slot-width = <16>;
				dai-tdm-slot-tx-mask =
					<1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1>;
			};

			codec {
				sound-dai = <&sti_sasg_codec 3>;
			};
		};
	};
	};
Loading