ARM: dts: omap3-gta04a5: add support for ti,wl1837 module
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / omap3-gta04a5.dts
1 /*
2  * Copyright (C) 2014-18 H. Nikolaus Schaller <hns@goldelico.com>
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
9 #include "omap3-gta04.dtsi"
10
11 / {
12         model = "Goldelico GTA04A5/Letux 2804";
13
14         sound {
15                 ti,jack-det-gpio = <&twl_gpio 2 GPIO_ACTIVE_HIGH>;      /* GTA04A5 only */
16         };
17
18         wlan_en: wlan_en_regulator {
19                 compatible = "regulator-fixed";
20                 pinctrl-names = "default";
21                 pinctrl-0 = <&wlan_pins>;
22                 regulator-name = "wlan-en-regulator";
23                 regulator-min-microvolt = <1800000>;
24                 regulator-max-microvolt = <1800000>;
25
26                 gpio = <&gpio5 10 GPIO_ACTIVE_HIGH>;    /* GPIO_138 */
27
28                 startup-delay-us = <70000>;
29                 enable-active-high;
30         };
31
32         pps {
33                 compatible = "pps-gpio";
34                 pinctrl-names = "default";
35                 pinctrl-0 = <&pps_pins>;
36
37                 gpios = <&gpio4 18 GPIO_ACTIVE_HIGH>; /* GPIN_114 */
38         };
39
40 };
41
42 &gpio5 {
43         irda_en {
44                 gpio-hog;
45                 gpios = <(175-160) GPIO_ACTIVE_HIGH>;
46                 output-high;    /* activate gpio_175 to disable IrDA receiver */
47         };
48 };
49
50 &omap3_pmx_core {
51         wlan_pins: pinmux_wlan_pins {
52                 pinctrl-single,pins = <
53                         OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT | MUX_MODE4)       /* mmc2_dat6 = mmc3_dat2 = gpio138 */
54                 >;
55         };
56
57         wlan_irq_pin: pinmux_wlan_irq_pin {
58                 pinctrl-single,pins = <
59                         OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE4) /* mmc2_dat7 = mmc3_dat3 = gpio139 */
60                 >;
61         };
62
63         irda_pins: pinmux_irda {
64                 pinctrl-single,pins = <
65                         OMAP3_CORE1_IOPAD(0x21d0, PIN_OUTPUT_PULLUP | MUX_MODE4)        /* mcspi1_cs1 = gpio175 */
66                 >;
67         };
68
69         pps_pins: pinmux_pps_pins {
70                 pinctrl-single,pins = <
71                         OMAP3_CORE1_IOPAD(0x2138, PIN_INPUT | MUX_MODE4) /* gpin114 */
72                 >;
73         };
74
75 };
76
77 /*
78  * for WL183x module see
79  * http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/net/wireless/ti,wlcore.txt
80  */
81
82 &wifi_pwrseq {
83         /delete-property/ reset-gpios;
84 };
85
86 &mmc2 {
87         vmmc-supply = <&wlan_en>;
88         bus-width = <4>;
89         cap-power-off-card;
90         non-removable;
91
92         pinctrl-names = "default";
93         pinctrl-0 = <&wlan_irq_pin>;
94
95         #address-cells = <1>;
96         #size-cells = <0>;
97
98         /delete-property/ mmc-pwrseq;
99
100         wlcore: wlcore@2 {
101                 compatible = "ti,wl1837";
102                 reg = <2>;
103                 interrupt-parent = <&gpio5>;
104                 interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;  /* GPIO_139 */
105                 ref-clock-frequency = <26000000>;
106         };
107 };