ARM: dts: am437x-gp-evm: Add gpio-hog for configuring the display/audio mux
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 2 Jul 2015 14:06:24 +0000 (17:06 +0300)
committerTony Lindgren <tony@atomide.com>
Tue, 14 Jul 2015 11:26:03 +0000 (04:26 -0700)
GPIO5_8 is used as a mux switch between LCD and HDMI displays. This mux
affects audio routing as well since in LCD mode HDMI audio is not possible
and when HDMI is selected analog audio is not working.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/am437x-gp-evm.dts

index 84aa30c3235af1a14fcbeebe0622a54be6c6d3d9..e2fb2713333d549435fb72dd1fe7cf653dd01c46 100644 (file)
                compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
                label = "lcd";
 
-               pinctrl-names = "default";
-               pinctrl-0 = <&lcd_pins>;
-
-               /*
-                * SelLCDorHDMI, LOW to select HDMI. This is not really the
-                * panel's enable GPIO, but we don't have HDMI driver support nor
-                * support to switch between two displays, so using this gpio as
-                * panel's enable should be safe.
-                */
-               enable-gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>;
-
                panel-timing {
                        clock-frequency = <33000000>;
                        hactive = <800>;
                >;
        };
 
-       lcd_pins: lcd_pins {
+       display_mux_pins: display_mux_pins {
                pinctrl-single,pins = <
                        /* GPIO 5_8 to select LCD / HDMI */
                        0x238 (PIN_OUTPUT_PULLUP | MUX_MODE7)
 };
 
 &gpio5 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&display_mux_pins>;
        status = "okay";
        ti,no-reset-on-init;
+
+       p8 {
+               /*
+                * SelLCDorHDMI selects between display and audio paths:
+                * Low: HDMI display with audio via HDMI
+                * High: LCD display with analog audio via aic3111 codec
+                */
+               gpio-hog;
+               gpios = <8 GPIO_ACTIVE_HIGH>;
+               output-high;
+               line-name = "SelLCDorHDMI";
+       };
 };
 
 &mmc1 {