build_wl18xx: add patch mechanism and bluetooth components
[wilink8-wlan/build-utilites.git] / patches / kernel_patches / imx-3.10.53 / 0001-imx6q-sabresd-add-support-for-wilink8-wlan-and-bluet.patch
1 From e53032e6ab7e3498e8d9f6539a96f3cda6f35aa8 Mon Sep 17 00:00:00 2001
2 From: Eyal Reizer <eyalr@ti.com>
3 Date: Wed, 4 Mar 2015 14:08:59 +0200
4 Subject: [PATCH 1/7] imx6q-sabresd: add support for wilink8 wlan and
5  bluetooth
7 * enable uart5 used for bluetooth with wilink8 with flow control
8 * configure SD2 to be used for sdio communication to wilink8 wlan
9 * configure gpios used for wlan/bt enables and wlan_irq
10 * setup voltage regulator used for wl8 wlan power control
11 * disable SPI1 as it pins are routed to J13 for connecting to wilink8
13 Signed-off-by: Eyal Reizer <eyalr@ti.com>
14 ---
15  arch/arm/boot/dts/imx6qdl-sabresd.dtsi |   56 ++++++++++++++++++++++++++++++--
16  1 file changed, 53 insertions(+), 3 deletions(-)
18 diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
19 index b5394f3..57b468a 100644
20 --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
21 +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
22 @@ -22,6 +22,32 @@
23                 reg = <0x10000000 0x40000000>;
24         };
25  
26 +       wlan_en_reg: fixedregulator@2 {
27 +               compatible = "regulator-fixed";
28 +               regulator-name = "wlan-en-regulator";
29 +               regulator-min-microvolt = <1800000>;
30 +               regulator-max-microvolt = <1800000>;
31 +
32 +               /* WLAN_EN GPIO for this board – Bank4, pin7 */
33 +               gpio = <&gpio4 7 0>;
34 +
35 +               /* WLAN card specific delay */
36 +               startup-delay-us = <70000>;
37 +               enable-active-high;
38 +       };
39 +
40 +        kim {
41 +                compatible = "kim";
42 +                nshutdown_gpio = <2>;  /* GPIO_2 */
43 +                dev_name = "/dev/ttymxc4";
44 +                flow_cntrl = <1>;
45 +                baud_rate = <3000000>;
46 +        };
47 +
48 +        btwilink {
49 +                compatible = "btwilink";
50 +        };
51 +
52         battery: max8903@0 {
53                 compatible = "fsl,max8903-charger";
54                 pinctrl-names = "default";
55 @@ -253,6 +279,7 @@
56         pu-supply = <&pu_dummy>; /* use pu_dummy if VDDSOC share with VDDPU */
57  };
58  
59 +/* the spi pins (inctrl_ecspi1_2) are used for connecting to WL8 using J13 so we disable it
60  &ecspi1 {
61         fsl,spi-num-chipselects = <1>;
62         cs-gpios = <&gpio4 9 0>;
63 @@ -268,6 +295,7 @@
64                 reg = <0>;
65         };
66  };
67 +*/
68  
69  &fec {
70         pinctrl-names = "default";
71 @@ -506,6 +534,8 @@
72                                 MX6QDL_PAD_GPIO_1__WDOG2_B 0x80000000
73                                 MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x80000000
74                                 MX6QDL_PAD_SD1_CMD__GPIO1_IO18 0x80000000
75 +                               MX6QDL_PAD_KEY_ROW0__GPIO4_IO07 0x13059 // reserve two pins wl8 gpio, this is pulled low at reset for WL_EN
76 +                               MX6QDL_PAD_KEY_COL0__GPIO4_IO06 0x13059 // this is for WL_IRQ which driver will configure as an input with a pull down
77                         >;
78                 };
79         };
80 @@ -611,6 +641,15 @@
81         status = "okay";
82  };
83  
84 +&uart5 {
85 +       pinctrl-names = "default";
86 +       pinctrl-0 = <&pinctrl_uart5_1>;
87 +       status = "okay";
88 +
89 +       /* enable rts/cts usage on uart5 */
90 +       fsl,uart-has-rtscts;
91 +};
92 +
93  &usbh1 {
94         vbus-supply = <&reg_usb_h1_vbus>;
95         status = "okay";
96 @@ -626,13 +665,24 @@
97  
98  &usdhc2 {
99         pinctrl-names = "default";
100 -       pinctrl-0 = <&pinctrl_usdhc2_1>;
101 -       cd-gpios = <&gpio2 2 0>;
102 -       wp-gpios = <&gpio2 3 0>;
103 +       pinctrl-0 = <&pinctrl_usdhc2_2>;
104         no-1-8-v;
105         keep-power-in-suspend;
106         enable-sdio-wakeup;
107 +       vmmc-supply = <&wlan_en_reg>;
108 +       non-removable;    /* non-removable is not a variable, the fact it is */
109 +                         /* listed is all that is used by driver  */
110 +       cap-power-off-card;
111         status = "okay";
112 +       #address-cells = <1>;
113 +       #size-cells = <0>;
114 +       wlcore: wlcore@0 {
115 +               compatible = "ti,wlcore";
116 +               reg = <2>;
117 +               interrupt-parent = <&gpio4>;
118 +               interrupts = <6 0>;
119 +               platform-quirks = <1>;
120 +       };
121  };
122  
123  &usdhc3 {
124 -- 
125 1.7.9.5