[PATCH 6/7] ASoC: tegra: add ac97 host controller to device tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This adds the DT bindings and a default entry for the Tegra 2x
AC97 host controller.

Signed-off-by: Lucas Stach <dev@xxxxxxxxxx>
---
 .../bindings/sound/nvidia,tegra20-ac97.txt         | 22 ++++++++++++++++++++++
 arch/arm/boot/dts/tegra20.dtsi                     |  8 ++++++++
 sound/soc/tegra/tegra20_ac97.c                     |  6 ++++--
 sound/soc/tegra/tegra20_ac97.h                     |  2 +-
 4 Dateien geändert, 35 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)
 create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt

diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt
new file mode 100644
index 0000000..c145497
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt
@@ -0,0 +1,22 @@
+NVIDIA Tegra 20 AC97 controller
+
+Required properties:
+- compatible : "nvidia,tegra20-ac97"
+- reg : Should contain AC97 controller registers location and length
+- interrupts : Should contain AC97 interrupt
+- nvidia,dma-request-selector : The Tegra DMA controller's phandle and
+  request selector for the AC97 controller
+- nvidia,codec-reset-gpio : The Tegra GPIO controller's phandle and the number
+  of the GPIO used to reset the external AC97 codec
+- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number
+  of the GPIO corresponding with the AC97 DAP _FS line
+Example:
+
+ac97@70002000 {
+	compatible = "nvidia,tegra20-ac97";
+	reg = <0x70002000 0x200>;
+	interrupts = <0 81 0x04>;
+	nvidia,dma-request-selector = <&apbdma 12>;
+	nvidia,codec-reset-gpio = <&gpio 170 0>;
+	nvidia,codec-sync-gpio = <&gpio 120 0>;
+};
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index b8effa1..b720859 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -177,6 +177,14 @@
 		compatible = "nvidia,tegra20-das";
 		reg = <0x70000c00 0x80>;
 	};
+	
+	tegra_ac97: ac97@70002000 {
+		compatible = "nvidia,tegra20-ac97";
+		reg = <0x70002000 0x200>;
+		interrupts = <0 81 0x04>;
+		nvidia,dma-request-selector = <&apbdma 12>;
+		status = "disabled";
+	};
 
 	tegra_i2s1: i2s@70002800 {
 		compatible = "nvidia,tegra20-i2s";
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index a2f71cf..a2cb89a 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -156,8 +156,10 @@ static inline void tegra20_ac97_start_playback(struct tegra20_ac97 *ac97)
 			   TEGRA20_AC97_FIFO_SCR_PB_QRT_MT_EN);
 
 	regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL,
-			   TEGRA20_AC97_CTRL_PCM_DAC_EN | TEGRA20_AC97_CTRL_STM_EN,
-			   TEGRA20_AC97_CTRL_PCM_DAC_EN | TEGRA20_AC97_CTRL_STM_EN);
+			   TEGRA20_AC97_CTRL_PCM_DAC_EN |
+			   TEGRA20_AC97_CTRL_STM_EN,
+			   TEGRA20_AC97_CTRL_PCM_DAC_EN |
+			   TEGRA20_AC97_CTRL_STM_EN);
 }
 
 static inline void tegra20_ac97_stop_playback(struct tegra20_ac97 *ac97)
diff --git a/sound/soc/tegra/tegra20_ac97.h b/sound/soc/tegra/tegra20_ac97.h
index a805aae..dddc682 100644
--- a/sound/soc/tegra/tegra20_ac97.h
+++ b/sound/soc/tegra/tegra20_ac97.h
@@ -1,5 +1,5 @@
 /*
- * tegra20_ac97.c - Definitions for the Tegra20 AC97 controller driver
+ * tegra20_ac97.h - Definitions for the Tegra20 AC97 controller driver
  *
  * Copyright (c) 2012 Lucas Stach <dev@xxxxxxxxxx>
  *
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux