* [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding
@ 2012-01-11 23:09 Stephen Warren
2012-01-11 23:09 ` [PATCH V2 2/4] ARM: dt: tegra: Modify I2S nodes to match binding Stephen Warren
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Stephen Warren @ 2012-01-11 23:09 UTC (permalink / raw)
To: linux-arm-kernel
Document binding, and add the node to tegra*.dtsi.
The driver isn't actually instantiated from this node yet, but the I2S
binding will rely on being able to refer to the APB DMA node using a
phandle.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: Added this to tegra30.dtsi too. Fixed interrupt IDs. Fixed reg to
include all the per-channel registers.
---
.../devicetree/bindings/dma/tegra20-apbdma.txt | 30 ++++++++++++++++
arch/arm/boot/dts/tegra20.dtsi | 21 +++++++++++
arch/arm/boot/dts/tegra30.dtsi | 37 ++++++++++++++++++++
3 files changed, 88 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/dma/tegra20-apbdma.txt
diff --git a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt
new file mode 100644
index 0000000..90fa7da
--- /dev/null
+++ b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt
@@ -0,0 +1,30 @@
+* NVIDIA Tegra APB DMA controller
+
+Required properties:
+- compatible: Should be "nvidia,<chip>-apbdma"
+- reg: Should contain DMA registers location and length. This shuld include
+ all of the per-channel registers.
+- interrupts: Should contain all of the per-channel DMA interrupts.
+
+Examples:
+
+apbdma: dma at 6000a000 {
+ compatible = "nvidia,tegra20-apbdma";
+ reg = <0x6000a000 0x1200>;
+ interrupts = < 0 136 0x04
+ 0 137 0x04
+ 0 138 0x04
+ 0 139 0x04
+ 0 140 0x04
+ 0 141 0x04
+ 0 142 0x04
+ 0 143 0x04
+ 0 144 0x04
+ 0 145 0x04
+ 0 146 0x04
+ 0 147 0x04
+ 0 148 0x04
+ 0 149 0x04
+ 0 150 0x04
+ 0 151 0x04 >;
+};
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 853a5c6..0a5d092 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -12,6 +12,27 @@
< 0x50040100 0x0100 >;
};
+ apbdma: dma at 6000a000 {
+ compatible = "nvidia,tegra20-apbdma";
+ reg = <0x6000a000 0x1200>;
+ interrupts = < 0 104 0x04
+ 0 105 0x04
+ 0 106 0x04
+ 0 107 0x04
+ 0 108 0x04
+ 0 109 0x04
+ 0 110 0x04
+ 0 111 0x04
+ 0 112 0x04
+ 0 113 0x04
+ 0 114 0x04
+ 0 115 0x04
+ 0 116 0x04
+ 0 117 0x04
+ 0 118 0x04
+ 0 119 0x04 >;
+ };
+
i2c at 7000c000 {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 368cbb3..537953a 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -12,6 +12,43 @@
< 0x50040100 0x0100 >;
};
+ apbdma: dma at 6000a000 {
+ compatible = "nvidia,tegra30-apbdma", "nvidia,tegra20-apbdma";
+ reg = <0x6000a000 0x1400>;
+ interrupts = < 0 104 0x04
+ 0 105 0x04
+ 0 106 0x04
+ 0 107 0x04
+ 0 108 0x04
+ 0 109 0x04
+ 0 110 0x04
+ 0 111 0x04
+ 0 112 0x04
+ 0 113 0x04
+ 0 114 0x04
+ 0 115 0x04
+ 0 116 0x04
+ 0 117 0x04
+ 0 118 0x04
+ 0 119 0x04
+ 0 128 0x04
+ 0 129 0x04
+ 0 130 0x04
+ 0 131 0x04
+ 0 132 0x04
+ 0 133 0x04
+ 0 134 0x04
+ 0 135 0x04
+ 0 136 0x04
+ 0 137 0x04
+ 0 138 0x04
+ 0 139 0x04
+ 0 140 0x04
+ 0 141 0x04
+ 0 142 0x04
+ 0 143 0x04 >;
+ };
+
i2c at 7000c000 {
#address-cells = <1>;
#size-cells = <0>;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH V2 2/4] ARM: dt: tegra: Modify I2S nodes to match binding 2012-01-11 23:09 [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Stephen Warren @ 2012-01-11 23:09 ` Stephen Warren 2012-01-11 23:09 ` [PATCH V2 3/4] ARM: dt: tegra: Add labels for I2S controllers Stephen Warren ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Stephen Warren @ 2012-01-11 23:09 UTC (permalink / raw) To: linux-arm-kernel Adjust the dma-channel property name to match the binding implemented by the driver. The binding was implemented and documented in a separate change to the ASoC tree. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- v2: Adjusted property name to match comments during review of ASoC-side changes. --- arch/arm/boot/dts/tegra20.dtsi | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 0a5d092..b8e27a3 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi @@ -69,14 +69,14 @@ compatible = "nvidia,tegra20-i2s"; reg = <0x70002800 0x200>; interrupts = < 0 13 0x04 >; - dma-channel = < 2 >; + nvidia,dma-request-selector = < &apbdma 2 >; }; i2s at 70002a00 { compatible = "nvidia,tegra20-i2s"; reg = <0x70002a00 0x200>; interrupts = < 0 3 0x04 >; - dma-channel = < 1 >; + nvidia,dma-request-selector = < &apbdma 1 >; }; das at 70000c00 { -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 3/4] ARM: dt: tegra: Add labels for I2S controllers 2012-01-11 23:09 [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Stephen Warren 2012-01-11 23:09 ` [PATCH V2 2/4] ARM: dt: tegra: Modify I2S nodes to match binding Stephen Warren @ 2012-01-11 23:09 ` Stephen Warren 2012-01-11 23:09 ` [PATCH V2 4/4] ARM: dt: tegra: Enable audio on WM8903 boards, disable others Stephen Warren 2012-01-24 8:42 ` [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Olof Johansson 3 siblings, 0 replies; 5+ messages in thread From: Stephen Warren @ 2012-01-11 23:09 UTC (permalink / raw) To: linux-arm-kernel This will allow the sound node to refer to the I2S controllers by name when creating phandles. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- arch/arm/boot/dts/tegra20.dtsi | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index b8e27a3..f1c2a8b 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi @@ -65,14 +65,14 @@ interrupts = < 0 53 0x04 >; }; - i2s at 70002800 { + tegra_i2s1: i2s at 70002800 { compatible = "nvidia,tegra20-i2s"; reg = <0x70002800 0x200>; interrupts = < 0 13 0x04 >; nvidia,dma-request-selector = < &apbdma 2 >; }; - i2s at 70002a00 { + tegra_i2s2: i2s at 70002a00 { compatible = "nvidia,tegra20-i2s"; reg = <0x70002a00 0x200>; interrupts = < 0 3 0x04 >; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 4/4] ARM: dt: tegra: Enable audio on WM8903 boards, disable others 2012-01-11 23:09 [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Stephen Warren 2012-01-11 23:09 ` [PATCH V2 2/4] ARM: dt: tegra: Modify I2S nodes to match binding Stephen Warren 2012-01-11 23:09 ` [PATCH V2 3/4] ARM: dt: tegra: Add labels for I2S controllers Stephen Warren @ 2012-01-11 23:09 ` Stephen Warren 2012-01-24 8:42 ` [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Olof Johansson 3 siblings, 0 replies; 5+ messages in thread From: Stephen Warren @ 2012-01-11 23:09 UTC (permalink / raw) To: linux-arm-kernel Add complete bindings to instantiate and configure the codec and top-level audio complex on all currently supported boards using the Tegra+WM8903 audio driver. On those boards, disable the I2S2 controller since it isn't used. On boards not using the WM8903 codec, disable all the audio devices; they can be re-enabled once the relevant codec and ASoC machine drivers have been ported to device-tree. Signed-off-by: Stephen Warren <swarren@nvidia.com> --- v2: Adjusted DT content based on comments during review of ASoC-side changes. --- arch/arm/boot/dts/tegra-harmony.dts | 41 ++++++++++++++++++++++++-------- arch/arm/boot/dts/tegra-paz00.dts | 12 +++++++++ arch/arm/boot/dts/tegra-seaboard.dts | 40 +++++++++++++++++++++++++++++++ arch/arm/boot/dts/tegra-trimslice.dts | 12 +++++++++ arch/arm/boot/dts/tegra-ventana.dts | 42 +++++++++++++++++++++++++++++++++ 5 files changed, 137 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/tegra-harmony.dts b/arch/arm/boot/dts/tegra-harmony.dts index 80afa1b..9a52615 100644 --- a/arch/arm/boot/dts/tegra-harmony.dts +++ b/arch/arm/boot/dts/tegra-harmony.dts @@ -13,16 +13,18 @@ i2c at 7000c000 { clock-frequency = <400000>; - codec: wm8903 at 1a { + wm8903: wm8903 at 1a { compatible = "wlf,wm8903"; reg = <0x1a>; - interrupts = < 347 >; + interrupt-parent = <&gpio>; + interrupts = < 187 0x04 >; gpio-controller; #gpio-cells = <2>; - /* 0x8000 = Not configured */ - gpio-cfg = < 0x8000 0x8000 0 0x8000 0x8000 >; + micdet-cfg = <0>; + micdet-delay = <100>; + gpio-cfg = < 0xffffffff 0xffffffff 0 0xffffffff 0xffffffff >; }; }; @@ -38,13 +40,32 @@ clock-frequency = <400000>; }; - sound { - compatible = "nvidia,harmony-sound", "nvidia,tegra-wm8903"; + i2s at 70002a00 { + status = "disable"; + }; - spkr-en-gpios = <&codec 2 0>; - hp-det-gpios = <&gpio 178 0>; - int-mic-en-gpios = <&gpio 184 0>; - ext-mic-en-gpios = <&gpio 185 0>; + sound { + compatible = "nvidia,tegra-audio-wm8903-harmony", + "nvidia,tegra-audio-wm8903"; + nvidia,model = "NVIDIA Tegra Harmony"; + + nvidia,audio-routing = + "Headphone Jack", "HPOUTR", + "Headphone Jack", "HPOUTL", + "Int Spk", "ROP", + "Int Spk", "RON", + "Int Spk", "LOP", + "Int Spk", "LON", + "Mic Jack", "MICBIAS", + "IN1L", "Mic Jack"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&wm8903>; + + nvidia,spkr-en-gpios = <&wm8903 2 0>; + nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ + nvidia,int-mic-en-gpios = <&gpio 184 0>; /*gpio PX0 */ + nvidia,ext-mic-en-gpios = <&gpio 185 0>; /* gpio PX1 */ }; serial at 70006000 { diff --git a/arch/arm/boot/dts/tegra-paz00.dts b/arch/arm/boot/dts/tegra-paz00.dts index 1a1d702..4d1bcdc 100644 --- a/arch/arm/boot/dts/tegra-paz00.dts +++ b/arch/arm/boot/dts/tegra-paz00.dts @@ -37,6 +37,18 @@ clock-frequency = <400000>; }; + i2s at 70002800 { + status = "disable"; + }; + + i2s at 70002a00 { + status = "disable"; + }; + + das at 70000c00 { + status = "disable"; + }; + serial at 70006000 { clock-frequency = <216000000>; }; diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index b55a02e..898084e 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts @@ -13,6 +13,20 @@ i2c at 7000c000 { clock-frequency = <400000>; + + wm8903: wm8903 at 1a { + compatible = "wlf,wm8903"; + reg = <0x1a>; + interrupt-parent = <&gpio>; + interrupts = < 187 0x04 >; + + gpio-controller; + #gpio-cells = <2>; + + micdet-cfg = <0>; + micdet-delay = <100>; + gpio-cfg = < 0xffffffff 0xffffffff 0 0xffffffff 0xffffffff >; + }; }; i2c at 7000c400 { @@ -32,6 +46,32 @@ }; }; + i2s at 70002a00 { + status = "disable"; + }; + + sound { + compatible = "nvidia,tegra-audio-wm8903-seaboard", + "nvidia,tegra-audio-wm8903"; + nvidia,model = "NVIDIA Tegra Seaboard"; + + nvidia,audio-routing = + "Headphone Jack", "HPOUTR", + "Headphone Jack", "HPOUTL", + "Int Spk", "ROP", + "Int Spk", "RON", + "Int Spk", "LOP", + "Int Spk", "LON", + "Mic Jack", "MICBIAS", + "IN1R", "Mic Jack"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&wm8903>; + + nvidia,spkr-en-gpios = <&wm8903 2 0>; + nvidia,hp-det-gpios = <&gpio 185 0>; /* gpio PX1 */ + }; + serial at 70006000 { status = "disable"; }; diff --git a/arch/arm/boot/dts/tegra-trimslice.dts b/arch/arm/boot/dts/tegra-trimslice.dts index 3b3ee7d..2524768 100644 --- a/arch/arm/boot/dts/tegra-trimslice.dts +++ b/arch/arm/boot/dts/tegra-trimslice.dts @@ -26,6 +26,18 @@ status = "disable"; }; + i2s at 70002800 { + status = "disable"; + }; + + i2s at 70002a00 { + status = "disable"; + }; + + das at 70000c00 { + status = "disable"; + }; + serial at 70006000 { clock-frequency = < 216000000 >; }; diff --git a/arch/arm/boot/dts/tegra-ventana.dts b/arch/arm/boot/dts/tegra-ventana.dts index c7d3b87..2dcff87 100644 --- a/arch/arm/boot/dts/tegra-ventana.dts +++ b/arch/arm/boot/dts/tegra-ventana.dts @@ -12,6 +12,20 @@ i2c at 7000c000 { clock-frequency = <400000>; + + wm8903: wm8903 at 1a { + compatible = "wlf,wm8903"; + reg = <0x1a>; + interrupt-parent = <&gpio>; + interrupts = < 187 0x04 >; + + gpio-controller; + #gpio-cells = <2>; + + micdet-cfg = <0>; + micdet-delay = <100>; + gpio-cfg = < 0xffffffff 0xffffffff 0 0xffffffff 0xffffffff >; + }; }; i2c at 7000c400 { @@ -26,6 +40,34 @@ clock-frequency = <400000>; }; + i2s at 70002a00 { + status = "disable"; + }; + + sound { + compatible = "nvidia,tegra-audio-wm8903-ventana", + "nvidia,tegra-audio-wm8903"; + nvidia,model = "NVIDIA Tegra Ventana"; + + nvidia,audio-routing = + "Headphone Jack", "HPOUTR", + "Headphone Jack", "HPOUTL", + "Int Spk", "ROP", + "Int Spk", "RON", + "Int Spk", "LOP", + "Int Spk", "LON", + "Mic Jack", "MICBIAS", + "IN1L", "Mic Jack"; + + nvidia,i2s-controller = <&tegra_i2s1>; + nvidia,audio-codec = <&wm8903>; + + nvidia,spkr-en-gpios = <&wm8903 2 0>; + nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */ + nvidia,int-mic-en-gpios = <&gpio 184 0>; /*gpio PX0 */ + nvidia,ext-mic-en-gpios = <&gpio 185 0>; /* gpio PX1 */ + }; + serial at 70006000 { status = "disable"; }; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding 2012-01-11 23:09 [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Stephen Warren ` (2 preceding siblings ...) 2012-01-11 23:09 ` [PATCH V2 4/4] ARM: dt: tegra: Enable audio on WM8903 boards, disable others Stephen Warren @ 2012-01-24 8:42 ` Olof Johansson 3 siblings, 0 replies; 5+ messages in thread From: Olof Johansson @ 2012-01-24 8:42 UTC (permalink / raw) To: linux-arm-kernel Hi, On Wed, Jan 11, 2012 at 04:09:54PM -0700, Stephen Warren wrote: > Document binding, and add the node to tegra*.dtsi. > > The driver isn't actually instantiated from this node yet, but the I2S > binding will rely on being able to refer to the APB DMA node using a > phandle. > > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > v2: Added this to tegra30.dtsi too. Fixed interrupt IDs. Fixed reg to > include all the per-channel registers. Thanks, applied 1-4. -Olof ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-24 8:42 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-01-11 23:09 [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Stephen Warren 2012-01-11 23:09 ` [PATCH V2 2/4] ARM: dt: tegra: Modify I2S nodes to match binding Stephen Warren 2012-01-11 23:09 ` [PATCH V2 3/4] ARM: dt: tegra: Add labels for I2S controllers Stephen Warren 2012-01-11 23:09 ` [PATCH V2 4/4] ARM: dt: tegra: Enable audio on WM8903 boards, disable others Stephen Warren 2012-01-24 8:42 ` [PATCH V2 1/4] ARM: dt: tegra: Add Tegra APB DMA device tree binding Olof Johansson
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).