[linux-sunxi][PATCH] ARM: dts: sun8i-h3: orange-pi-2: Enable audio codec

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

 




From: Marcus Cooper <codekipper@xxxxxxxxx>

The Orange Pi 2 routes the LINEOUT pins through a SGM8900 PA which
needs to be enabled. The onboard microphone is routed to MIC1, with
MBIAS providing power.

Signed-off-by: Marcus Cooper <codekipper@xxxxxxxxx>
---
 arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
index 047e9e1c6093..b0d2b99990cc 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
@@ -105,6 +105,16 @@
 	};
 };
 
+&codec {
+	pinctrl-0 = <&codec_pa_pin>;
+	allwinner,pa-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */
+	allwinner,audio-routing =
+		"Speaker", "LINEOUT",
+		"MIC1", "Mic",
+		"Mic",  "MBIAS";
+	status = "okay";
+};
+
 &ehci1 {
 	status = "okay";
 };
@@ -144,6 +154,11 @@
 };
 
 &pio {
+	codec_pa_pin: codec_pa_pin@0 {
+		pins = "PA16";
+		function = "gpio_out";
+	};
+
 	leds_opc: led_pins@0 {
 		pins = "PA15";
 		function = "gpio_out";
-- 
2.11.1

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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux