Skip to contentSkip to conversation

Add sound in SAM9x5 DTS

PATCH In review Richard Genoud 2 participants 6 messages Aug 12, 2013 – Aug 21, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add sound in SAM9x5 DTS

As the sam9x5-wm8731 machine driver has been merged, we have now to add the device tree nodes...
And here they are !

(Based on next-20130812)
Tested on at91sam9g35-ek

[I didn't add the DT list, as far as there's no new binding, we don't have to bother themi, right ?]

Richard Genoud (4):
ARM: AT91: DTS: sam9x5: add SSC DMA parameters
ARM: AT91: DTS: sam9x5ek: add WM8731 codec
ARM: AT91: DTS: sam9x5ek: enable SSC
ARM: AT91: DTS: sam9x5ek: add sound configuration

 arch/arm/boot/dts/at91sam9x5.dtsi   |    3 +++
 arch/arm/boot/dts/at91sam9x5ek.dtsi |   24 ++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/4 ARM: AT91: DTS: sam9x5: add SSC DMA parameters

---
 arch/arm/boot/dts/at91sam9x5.dtsi |    3 +++
 1 file changed, 3 insertions(+)
arch/arm/boot/dts/at91sam9x5.dtsi +3 -0
index 57d45f5..cf78ac0 100644
@@ -542,6 +542,9 @@
 				compatible = "atmel,at91sam9g45-ssc";
 				reg = <0xf0010000 0x4000>;
 				interrupts = <28 IRQ_TYPE_LEVEL_HIGH 5>;
+				dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(13)>,
+				       <&dma0 1 AT91_DMA_CFG_PER_ID(14)>;
+				dma-names = "tx", "rx";
 				pinctrl-names = "default";
 				pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
 				status = "disabled";
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/4 ARM: AT91: DTS: sam9x5ek: add WM8731 codec

In reply to Richard Genoud

The WM8731 codec on sam9x5ek board is on i2c, address 1A

---
 arch/arm/boot/dts/at91sam9x5ek.dtsi |    5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/at91sam9x5ek.dtsi +5 -0
index d107241..e6fb309 100644
@@ -59,6 +59,11 @@
 
 			i2c0: i2c at f8010000 {
 				status = "okay";
+
+				wm8731: wm8731 at 1a {
+					compatible = "wm8731";
+					reg = <0x1a>;
+				};
 			};
 
 			pinctrl at fffff400 {
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 3/4 ARM: AT91: DTS: sam9x5ek: enable SSC

In reply to Richard Genoud

Enable the SSC needed for the WM8731 codec

---
 arch/arm/boot/dts/at91sam9x5ek.dtsi |    4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/at91sam9x5ek.dtsi +4 -0
index e6fb309..f3e83f7 100644
@@ -95,6 +95,10 @@
 			watchdog at fffffe40 {
 				status = "okay";
 			};
+
+			ssc0: ssc at f0010000 {
+				status = "okay";
+			};
 		};
 
 		usb0: ohci at 00600000 {
Signature · 1 line
1.7.10.4
#4 lore raw

PATCH 4/4 ARM: AT91: DTS: sam9x5ek: add sound configuration

In reply to Richard Genoud

The sam9x5ek board has 2 jacks:
headphone wired on RHPOUT/LHPOUT of the wm8731
line in wired on LLINEIN/RLINEIN of the wm8731

---
 arch/arm/boot/dts/at91sam9x5ek.dtsi |   15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/at91sam9x5ek.dtsi +15 -0
index f3e83f7..9afe15b 100644
@@ -113,4 +113,19 @@
 			status = "okay";
 		};
 	};
+
+	sound {
+		compatible = "atmel,sam9x5-wm8731-audio";
+
+		atmel,model = "wm8731 @ AT91SAM9X5EK";
+
+		atmel,audio-routing =
+			"Headphone Jack", "RHPOUT",
+			"Headphone Jack", "LHPOUT",
+			"LLINEIN", "Line In Jack",
+			"RLINEIN", "Line In Jack";
+
+		atmel,ssc-controller = <&ssc0>;
+		atmel,audio-codec = <&wm8731>;
+	};
 };
Signature · 1 line
1.7.10.4
Acked-by on the v1 series
#5 lore raw
In reply to Richard Genoud

On 12/08/2013 14:30, Richard Genoud :

Quoted 9 lines

As the sam9x5-wm8731 machine driver has been merged, we have now to add the device tree nodes...
And here they are !

(Based on next-20130812)
Tested on at91sam9g35-ek

[I didn't add the DT list, as far as there's no new binding, we don't have to bother themi, right ?]

Yep!

On the whole series:

Stacked on top of at91-3.12-dt

Thanks a lot Richard!

Quoted 10 lines

Richard Genoud (4):
ARM: AT91: DTS: sam9x5: add SSC DMA parameters
ARM: AT91: DTS: sam9x5ek: add WM8731 codec
ARM: AT91: DTS: sam9x5ek: enable SSC
ARM: AT91: DTS: sam9x5ek: add sound configuration

  arch/arm/boot/dts/at91sam9x5.dtsi   |    3 +++
  arch/arm/boot/dts/at91sam9x5ek.dtsi |   24 ++++++++++++++++++++++++
  2 files changed, 27 insertions(+)
Signature · 1 line
Nicolas Ferre