Patchwork [1/2] ARM: tegra: Add Tegra124 HDA support

login
register
mail settings
Submitter Dylan Reid
Date May 20, 2014, 2:35 a.m.
Message ID <1400553346-23238-1-git-send-email-dgreid@chromium.org>
Download mbox | patch
Permalink /patch/350485/
State Accepted, archived
Headers show

Comments

Dylan Reid - May 20, 2014, 2:35 a.m.
Add a device node for the HDA controller found on Tegra124.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
 arch/arm/boot/dts/tegra124.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Stephen Warren - May 20, 2014, 6:24 p.m.
On 05/19/2014 08:35 PM, Dylan Reid wrote:
> Add a device node for the HDA controller found on Tegra124.

> diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi

> +	hda@0,70030000 {
> +		compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
> +		reg = <0x0 0x70030000 0x0 0x10000>;
> +		interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&tegra_car TEGRA124_CLK_HDA>,
> +		         <&tegra_car TEGRA124_CLK_HDA2HDMI>,
> +			 <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
> +		clock-names = "hda", "hda2hdmi", "hdacodec_2x";

I think that should be "hda2codec_2x". Same for the reset-names property
below. This fix also needs to be propagated into the DT binding
documentation.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren - May 20, 2014, 6:31 p.m.
On 05/20/2014 12:24 PM, Stephen Warren wrote:
> On 05/19/2014 08:35 PM, Dylan Reid wrote:
>> Add a device node for the HDA controller found on Tegra124.
> 
>> diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
> 
>> +	hda@0,70030000 {
>> +		compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
>> +		reg = <0x0 0x70030000 0x0 0x10000>;
>> +		interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
>> +		clocks = <&tegra_car TEGRA124_CLK_HDA>,
>> +		         <&tegra_car TEGRA124_CLK_HDA2HDMI>,
>> +			 <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
>> +		clock-names = "hda", "hda2hdmi", "hdacodec_2x";
> 
> I think that should be "hda2codec_2x". Same for the reset-names property
> below. This fix also needs to be propagated into the DT binding
> documentation.

Even after fixing that, I can't play audio on Venice2:

root@localhost:~# speaker-test -Dhw:0,3 -c 2

speaker-test 1.0.27.1

Playback device is hw:0,3
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
Write error: -32,Broken pipe
Write error: -32,Broken pipe
Write error: -32,Broken pipe
^C 1 - Front Right
Time per period = 1.799791

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren - June 16, 2014, 7:10 p.m.
On 05/19/2014 08:35 PM, Dylan Reid wrote:
> Add a device node for the HDA controller found on Tegra124.

I've applied the series to Tegra's for-3.17/dt branch.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/arm/boot/dts/tegra124.dtsi b/arch/arm/boot/dts/tegra124.dtsi
index 6e6bc4e..7890641 100644
--- a/arch/arm/boot/dts/tegra124.dtsi
+++ b/arch/arm/boot/dts/tegra124.dtsi
@@ -449,6 +449,21 @@ 
 		clock-names = "pclk", "clk32k_in";
 	};
 
+	hda@0,70030000 {
+		compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda";
+		reg = <0x0 0x70030000 0x0 0x10000>;
+		interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&tegra_car TEGRA124_CLK_HDA>,
+		         <&tegra_car TEGRA124_CLK_HDA2HDMI>,
+			 <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>;
+		clock-names = "hda", "hda2hdmi", "hdacodec_2x";
+		resets = <&tegra_car 125>, /* hda */
+			 <&tegra_car 128>, /* hda2hdmi */
+			 <&tegra_car 111>; /* hda2codec_2x */
+		reset-names = "hda", "hda2hdmi", "hdacodec_2x";
+		status = "disabled";
+	};
+
 	sdhci@0,700b0000 {
 		compatible = "nvidia,tegra124-sdhci";
 		reg = <0x0 0x700b0000 0x0 0x200>;