Message ID | 1355959056-6009-6-git-send-email-dev@lynxeye.de |
---|---|
State | Not Applicable, archived |
Headers | show |
On 12/19/2012 04:17 PM, Lucas Stach wrote: > This adds the DT bindings and a default entry for the Tegra 2x > AC97 host controller. Everything here except the .dtsi file should be part of the previous patch. > diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-ac97.txt > +- nvidia,codec-sync-gpio : The Tegra GPIO controller's phandle and the number > + of the GPIO corresponding with the AC97 DAP _FS line Hmm, for I2S at least, FS (frame sync I assume) definitely is something that the audio controller itself drives. Are you absolutely sure that this should be represented as a GPIO here? > diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi > + tegra_ac97: ac97@70002000 { There's only 1 node named ac97, so you can leave out the unit address since it's not required to generate a unique node name. In other words just "ac97". -- 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
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@lynxeye.de> *
This adds the DT bindings and a default entry for the Tegra 2x AC97 host controller. Signed-off-by: Lucas Stach <dev@lynxeye.de> --- .../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