ARM: dts: Add power button support for igepv5
[cascardo/linux.git] / arch / arm / boot / dts / omap5-igep0050.dts
1 /*
2  * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz/
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8 /dts-v1/;
9
10 #include <dt-bindings/input/input.h>
11 #include "omap5-board-common.dtsi"
12
13 / {
14         model = "IGEPv5";
15         compatible = "isee,omap5-igep0050", "ti,omap5";
16
17         memory@80000000 {
18                 device_type = "memory";
19                 reg = <0x80000000 0x7f000000>; /* 2032 MB */
20         };
21
22         gpio_keys {
23                 compatible = "gpio-keys";
24                 pinctrl-0 = <&power_button_pin>;
25                 pinctrl-names = "default";
26
27                 power-button {
28                         label = "Power Button";
29                         linux,code = <KEY_POWER>;
30                         gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>;
31                 };
32         };
33 };
34
35 &hdmi {
36         vdda-supply = <&ldo7_reg>;
37 };
38
39 &i2c4 {
40         pinctrl-names = "default";
41         pinctrl-0 = <&i2c4_pins>;
42
43         tca6416: tca6416@21 {
44                 compatible = "ti,tca6416";
45                 reg = <0x21>;
46                 gpio-controller;
47                 #gpio-cells = <2>;
48         };
49 };
50
51 /* LDO4 is VPP1 - ball AD9 */
52 &ldo4_reg {
53         regulator-min-microvolt = <2000000>;
54         regulator-max-microvolt = <2000000>;
55 };
56
57 /*
58  * LDO7 is used for HDMI: VDDA_DSIPORTA - ball AA33, VDDA_DSIPORTC - ball AE33,
59  * VDDA_HDMI - ball AN25
60  */
61 &ldo7_reg {
62         status = "okay";
63         regulator-min-microvolt = <1800000>;
64         regulator-max-microvolt = <1800000>;
65 };
66
67 &omap5_pmx_core {
68         i2c4_pins: pinmux_i2c4_pins {
69                 pinctrl-single,pins = <
70                         OMAP5_IOPAD(0x0f8, PIN_INPUT | MUX_MODE0)       /* i2c4_scl */
71                         OMAP5_IOPAD(0x0fa, PIN_INPUT | MUX_MODE0)       /* i2c4_sda */
72                 >;
73         };
74
75         power_button_pin: pinctrl_power_button_pin {
76                 pinctrl-single,pins = <
77                         OMAP5_IOPAD(0x086, PIN_INPUT | MUX_MODE6)       /* gpio4_118 */
78                 >;
79         };
80 };
81
82 &tpd12s015 {
83         gpios = <&tca6416 11 0>,        /* TCA6416 P01, CT_CP_HDP */
84                 <&tca6416 12 0>,        /* TCA6416 P00, LS_OE*/
85                 <&gpio7 1 0>,           /* 193, HPD */
86                 <&gpio7 2 0>,           /* 194, SCL */
87                 <&gpio7 3 0>;           /* 195, SDA */
88 };
89
90 &twl6040 {
91         ti,audpwron-gpio = <&gpio5 16 GPIO_ACTIVE_HIGH>;  /* gpio line 144 */
92 };
93
94 &twl6040_pins {
95         pinctrl-single,pins = <
96                 OMAP5_IOPAD(0x1c4, PIN_OUTPUT | MUX_MODE6)      /* mcspi1_somi.gpio5_144 */
97                 OMAP5_IOPAD(0x1ca, PIN_OUTPUT | MUX_MODE6)      /* perslimbus2_clock.gpio5_145 */
98         >;
99 };