ARM: dts: sun5i: q8-common: Enable audio codec
authorChen-Yu Tsai <wens@csie.org>
Tue, 17 May 2016 15:56:10 +0000 (23:56 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 4 Jul 2016 19:17:50 +0000 (21:17 +0200)
The Q8 tablets use the audio codec to provide audio output via a
headphone jack or a small mono speaker. A GPIO output is used to
control speaker amp.

The tablets may or may not have an internal microphone.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun5i-q8-common.dtsi

index 0f7ec6331d05aecc9622209791298f34bcad0f31..471d46dbadc10119fde548bd5d8f87a876c9044f 100644 (file)
        };
 };
 
+&codec {
+       pinctrl-names = "default";
+       pinctrl-0 = <&codec_pa_pin>;
+       allwinner,pa-gpios = <&pio 6 10 GPIO_ACTIVE_HIGH>; /* PG10 */
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&reg_dcdc2>;
 };
 };
 
 &pio {
+       codec_pa_pin: codec_pa_pin@0 {
+               allwinner,pins = "PG10";
+               allwinner,function = "gpio_out";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
        mmc0_cd_pin_q8: mmc0_cd_pin@0 {
                allwinner,pins = "PG0";
                allwinner,function = "gpio_in";