Skip to contentSkip to conversation

ARM: DTS: omap5-uevm: Enable audio (for 3.17)

PATCH New Peter Ujfalusi 2 participants 5 messages Jul 10, 2014 – Jul 15, 2014 Device tree bindings

lore
Share & tools
lore
#0 lore raw

cover ARM: DTS: omap5-uevm: Enable audio (for 3.17)

Hi,

This set is to enable audio (finally) on the omap5-uevm. We have been waiting for the palmas 32K clock driver to make it to upstream, which it did and it is already in linux-next.

With the three patch we can have audio working on omap5-uevm with linux-next.

Regards,
Peter
---
Peter Ujfalusi (3):
ARM: DTS: omap5-uevm: Enable palmas clk32kgaudio clock
ARM: DTS: omap5-uevm: Add node for twl6040 audio codec
ARM: DTS: omap5-uevm: Enable basic audio (McPDM <-> twl6040)

 arch/arm/boot/dts/omap5-uevm.dts | 68 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 62 insertions(+), 6 deletions(-)
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/3 ARM: DTS: omap5-uevm: Enable palmas clk32kgaudio clock

clk32kg-audio clock is needed for twl6040 codec.

---
 arch/arm/boot/dts/omap5-uevm.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/boot/dts/omap5-uevm.dts +5 -0
index 1e1b05768cec..9166d479ac1b 100644
@@ -306,6 +306,11 @@
 			ti,wakeup;
 		};
 
+		clk32kgaudio: palmas_clk32k at 1 {
+			compatible = "ti,palmas-clk32kgaudio";
+			#clock-cells = <0>;
+		};
+
 		palmas_pmic {
 			compatible = "ti,palmas-pmic";
 			interrupt-parent = <&palmas>;
Signature · 1 line
2.0.0
#2 lore raw

PATCH 2/3 ARM: DTS: omap5-uevm: Add node for twl6040 audio codec

In reply to Peter Ujfalusi

The board uses twl6040 as audio codec. Move the corresponding pinctrl as well under the node.
twl6040 needs 32k clock from palams.

---
 arch/arm/boot/dts/omap5-uevm.dts | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap5-uevm.dts +19 -1
index 9166d479ac1b..c9286166fad5 100644
@@ -105,7 +105,6 @@
 &omap5_pmx_core {
 	pinctrl-names = "default";
 	pinctrl-0 = <
-			&twl6040_pins
 			&mcpdm_pins
 			&mcbsp1_pins
 			&mcbsp2_pins
@@ -494,6 +493,25 @@
 			};
 		};
 	};
+
+	twl6040: twl@4b {
+		compatible = "ti,twl6040";
+		reg = <0x4b>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&twl6040_pins>;
+
+		interrupts = <GIC_SPI 119 IRQ_TYPE_NONE>; /* IRQ_SYS_2N cascaded to gic */
+		interrupt-parent = <&gic>;
+		ti,audpwron-gpio = <&gpio5 13 0>;  /* gpio line 141 */
+
+		vio-supply = <&smps7_reg>;
+		v2v1-supply = <&smps9_reg>;
+		enable-active-high;
+
+		clocks = <&clk32kgaudio>;
+		clock-names = "clk32k";
+	};
 };
 
 &i2c5 {
Signature · 1 line
2.0.0
#3 lore raw

PATCH 3/3 ARM: DTS: omap5-uevm: Enable basic audio (McPDM <-> twl6040)

In reply to Peter Ujfalusi

The board uses twl6040 codec connected via McPDM link. McBSP1 and McBSP2 can be used for FM/BT.
At the same time move the pinctrl handling to the correct place - under the corresponding nodes.
Audio connectors on the board:
Headset in/out
Stereo Line out
Stereo Line in.

---
 arch/arm/boot/dts/omap5-uevm.dts | 43 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 38 insertions(+), 5 deletions(-)
arch/arm/boot/dts/omap5-uevm.dts +38 -5
index c9286166fad5..159720d6c956 100644
@@ -100,14 +100,33 @@
 			};
 		};
 	};
+
+	sound: sound {
+		compatible = "ti,abe-twl6040";
+		ti,model = "omap5-uevm";
+
+		ti,mclk-freq = <19200000>;
+
+		ti,mcpdm = <&mcpdm>;
+
+		ti,twl6040 = <&twl6040>;
+
+		/* Audio routing */
+		ti,audio-routing =
+			"Headset Stereophone", "HSOL",
+			"Headset Stereophone", "HSOR",
+			"Line Out", "AUXL",
+			"Line Out", "AUXR",
+			"HSMIC", "Headset Mic",
+			"Headset Mic", "Headset Mic Bias",
+			"AFML", "Line In",
+			"AFMR", "Line In";
+	};
 };
 
 &omap5_pmx_core {
 	pinctrl-names = "default";
 	pinctrl-0 = <
-			&mcpdm_pins
-			&mcbsp1_pins
-			&mcbsp2_pins
 			&usbhost_pins
 			&led_gpio_pins
 	>;
@@ -528,8 +547,22 @@
 	};
 };
 
-&mcbsp3 {
-	status = "disabled";
+&mcpdm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcpdm_pins>;
+	status = "okay";
+};
+
+&mcbsp1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcbsp1_pins>;
+	status = "okay";
+};
+
+&mcbsp2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mcbsp2_pins>;
+	status = "okay";
 };
 
 &usbhshost {
Signature · 1 line
2.0.0
#4 lore raw

cover ARM: DTS: omap5-uevm: Enable audio (for 3.17)

In reply to Peter Ujfalusi
Quoted 16 lines · Peter Ujfalusi

Hi,

This set is to enable audio (finally) on the omap5-uevm. We have been waiting for the palmas 32K clock driver to make it to upstream, which it did and it is already in linux-next.

With the three patch we can have audio working on omap5-uevm with linux-next.

Regards,
Peter
---
Peter Ujfalusi (3):
ARM: DTS: omap5-uevm: Enable palmas clk32kgaudio clock
ARM: DTS: omap5-uevm: Add node for twl6040 audio codec
ARM: DTS: omap5-uevm: Enable basic audio (McPDM <-> twl6040)

Quoted 2 lines
 arch/arm/boot/dts/omap5-uevm.dts | 68 ++++++++++++++++++++++++++++++++++++----
 1 file changed, 62 insertions(+), 6 deletions(-)

Applying into omap-for-v3.17/dt thanks.

Tony