linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5] arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support
@ 2017-06-14 18:25 John Stultz
  2017-06-15 19:50 ` Wei Xu
  0 siblings, 1 reply; 2+ messages in thread
From: John Stultz @ 2017-06-14 18:25 UTC (permalink / raw)
  To: lkml
  Cc: John Stultz, Zhangfei Gao, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Wei Xu, Rob Herring, Andy Green,
	Dave Long, Guodong Xu, Antonio Borneo, Olof Johansson,
	Arnd Bergmann

Add entry for k3-dma driver and i2s/hdmi audio devices.

This enables HDMI audio output.

Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Andy Green <andy@warmcat.com>
Cc: Dave Long <dave.long@linaro.org>
Cc: Guodong Xu <guodong.xu@linaro.org>
Cc: Antonio Borneo <borneo.antonio@gmail.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
v2:
* Split core i2s entry into dtsi and hdmi specific bits into
  hikey dts
v4:
* Rework simple-card to use many-dai-links method, as
  there may be other links in the future
v5:
* Rework audio description to use the audio-card-graph method
  as requested by Mark.
---
 arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 34 +++++++++++++++++++++++---
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi      | 26 ++++++++++++++++++++
 2 files changed, 57 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
index 5cdfe73..2b52630 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
+++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
@@ -468,6 +468,11 @@
 			method = "smc";
 		};
 	};
+
+	sound_card {
+		compatible = "audio-graph-card";
+		dais = <&i2s0_port0>;
+	};
 };
 
 &uart2 {
@@ -508,10 +513,33 @@
 		interrupts = <1 2>;
 		pd-gpio = <&gpio0 4 0>;
 		adi,dsi-lanes = <4>;
+		#sound-dai-cells = <0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			port@0 {
+				adv7533_in: endpoint {
+					remote-endpoint = <&dsi_out0>;
+				};
+			};
+			port@2 {
+				reg = <2>;
+				codec_endpoint: endpoint {
+					remote-endpoint = <&i2s0_cpu_endpoint>;
+				};
+			};
+		};
+	};
+};
 
-		port {
-			adv7533_in: endpoint {
-				remote-endpoint = <&dsi_out0>;
+&i2s0 {
+
+	ports {
+		i2s0_port0: port@0 {
+			i2s0_cpu_endpoint: endpoint {
+				remote-endpoint = <&codec_endpoint>;
+				dai-format = "i2s";
 			};
 		};
 	};
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 5013e4b..f2e218c 100644
--- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -332,6 +332,19 @@
 			status = "disabled";
 		};
 
+		dma0: dma@f7370000 {
+			compatible = "hisilicon,k3-dma-1.0";
+			reg = <0x0 0xf7370000 0x0 0x1000>;
+			#dma-cells = <1>;
+			dma-channels = <15>;
+			dma-requests = <32>;
+			interrupts = <0 84 4>;
+			clocks = <&sys_ctrl HI6220_EDMAC_ACLK>;
+			dma-no-cci;
+			dma-type = "hi6220_dma";
+			status = "ok";
+		};
+
 		dual_timer0: timer@f8008000 {
 			compatible = "arm,sp804", "arm,primecell";
 			reg = <0x0 0xf8008000 0x0 0x1000>;
@@ -805,6 +818,19 @@
 			#thermal-sensor-cells = <1>;
 		};
 
+		i2s0: i2s@f7118000{
+			compatible = "hisilicon,hi6210-i2s";
+			reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */
+			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */
+			clocks = <&sys_ctrl HI6220_DACODEC_PCLK>,
+				 <&sys_ctrl HI6220_BBPPLL0_DIV>;
+			clock-names = "dacodec", "i2s-base";
+			dmas = <&dma0 15 &dma0 14>;
+			dma-names = "rx", "tx";
+			hisilicon,sysctrl-syscon = <&sys_ctrl>;
+			#sound-dai-cells = <1>;
+		};
+
 		thermal-zones {
 
 			cls0: cls0 {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v5] arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support
  2017-06-14 18:25 [PATCH v5] arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support John Stultz
@ 2017-06-15 19:50 ` Wei Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Wei Xu @ 2017-06-15 19:50 UTC (permalink / raw)
  To: John Stultz, lkml
  Cc: Zhangfei Gao, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Rob Herring, Andy Green, Dave Long, Guodong Xu,
	Antonio Borneo, Olof Johansson, Arnd Bergmann

Hi John,

On 2017/6/14 19:25, John Stultz wrote:
> Add entry for k3-dma driver and i2s/hdmi audio devices.
> 
> This enables HDMI audio output.
> 
> Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.com>
> Cc: Wei Xu <xuwei5@hisilicon.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Andy Green <andy@warmcat.com>
> Cc: Dave Long <dave.long@linaro.org>
> Cc: Guodong Xu <guodong.xu@linaro.org>
> Cc: Antonio Borneo <borneo.antonio@gmail.com>
> Cc: Olof Johansson <olof@lixom.net>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> v2:
> * Split core i2s entry into dtsi and hdmi specific bits into
>   hikey dts
> v4:
> * Rework simple-card to use many-dai-links method, as
>   there may be other links in the future
> v5:
> * Rework audio description to use the audio-card-graph method
>   as requested by Mark.
> ---

Applied to the hisilicon arm64 dt tree.
Sorry for the delay!
Thanks!

BR,
Wei

>  arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 34 +++++++++++++++++++++++---
>  arch/arm64/boot/dts/hisilicon/hi6220.dtsi      | 26 ++++++++++++++++++++
>  2 files changed, 57 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
> index 5cdfe73..2b52630 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
> +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts
> @@ -468,6 +468,11 @@
>  			method = "smc";
>  		};
>  	};
> +
> +	sound_card {
> +		compatible = "audio-graph-card";
> +		dais = <&i2s0_port0>;
> +	};
>  };
>  
>  &uart2 {
> @@ -508,10 +513,33 @@
>  		interrupts = <1 2>;
>  		pd-gpio = <&gpio0 4 0>;
>  		adi,dsi-lanes = <4>;
> +		#sound-dai-cells = <0>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			port@0 {
> +				adv7533_in: endpoint {
> +					remote-endpoint = <&dsi_out0>;
> +				};
> +			};
> +			port@2 {
> +				reg = <2>;
> +				codec_endpoint: endpoint {
> +					remote-endpoint = <&i2s0_cpu_endpoint>;
> +				};
> +			};
> +		};
> +	};
> +};
>  
> -		port {
> -			adv7533_in: endpoint {
> -				remote-endpoint = <&dsi_out0>;
> +&i2s0 {
> +
> +	ports {
> +		i2s0_port0: port@0 {
> +			i2s0_cpu_endpoint: endpoint {
> +				remote-endpoint = <&codec_endpoint>;
> +				dai-format = "i2s";
>  			};
>  		};
>  	};
> diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> index 5013e4b..f2e218c 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
> @@ -332,6 +332,19 @@
>  			status = "disabled";
>  		};
>  
> +		dma0: dma@f7370000 {
> +			compatible = "hisilicon,k3-dma-1.0";
> +			reg = <0x0 0xf7370000 0x0 0x1000>;
> +			#dma-cells = <1>;
> +			dma-channels = <15>;
> +			dma-requests = <32>;
> +			interrupts = <0 84 4>;
> +			clocks = <&sys_ctrl HI6220_EDMAC_ACLK>;
> +			dma-no-cci;
> +			dma-type = "hi6220_dma";
> +			status = "ok";
> +		};
> +
>  		dual_timer0: timer@f8008000 {
>  			compatible = "arm,sp804", "arm,primecell";
>  			reg = <0x0 0xf8008000 0x0 0x1000>;
> @@ -805,6 +818,19 @@
>  			#thermal-sensor-cells = <1>;
>  		};
>  
> +		i2s0: i2s@f7118000{
> +			compatible = "hisilicon,hi6210-i2s";
> +			reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */
> +			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */
> +			clocks = <&sys_ctrl HI6220_DACODEC_PCLK>,
> +				 <&sys_ctrl HI6220_BBPPLL0_DIV>;
> +			clock-names = "dacodec", "i2s-base";
> +			dmas = <&dma0 15 &dma0 14>;
> +			dma-names = "rx", "tx";
> +			hisilicon,sysctrl-syscon = <&sys_ctrl>;
> +			#sound-dai-cells = <1>;
> +		};
> +
>  		thermal-zones {
>  
>  			cls0: cls0 {
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-15 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14 18:25 [PATCH v5] arm64: dts: hi6220: Add k3-dma and i2s/hdmi audio support John Stultz
2017-06-15 19:50 ` Wei Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).