aboutsummaryrefslogtreecommitdiffstats
blob: 5d082ed49be2f3cef0e761b20a8f6ad86ca71b54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
From 5e454b707f5c4e89091351bdbbd533331296713c Mon Sep 17 00:00:00 2001
From: Saurabh Narang <saurabhlocal@ULA0876477>
Date: Sun, 11 Dec 2016 23:45:47 -0600
Subject: [PATCH 2/2] Enable TI Bluetooth am335x-boneblack WL1837

---
 arch/arm/boot/dts/am335x-bone-e14-wl1837.dtsi |  153 +++++++++++++++++++++++++
 arch/arm/boot/dts/am335x-boneblack.dts        |    4 +
 2 files changed, 157 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-bone-e14-wl1837.dtsi

diff --git a/arch/arm/boot/dts/am335x-bone-e14-wl1837.dtsi b/arch/arm/boot/dts/am335x-bone-e14-wl1837.dtsi
new file mode 100644
index 0000000..315f96f
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-bone-e14-wl1837.dtsi
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	model = "TI AM335x BeagleBone Black";
+	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
+
+	wlan_en_reg: fixedregulator@1 {
+		compatible = "regulator-fixed";
+		regulator-name = "wlan-en-regulator";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		gpio = <&gpio0 2 0>;
+		enable-active-high;
+	};
+
+	tibt {
+		compatible = "tibt";
+		nshutdown_gpio = <3>; /* Bank0, pin3 */
+		dev_name = "/dev/ttyS1";
+		flow_cntrl = <1>;
+		baud_rate = <3000000>;
+	};
+
+};
+
+&am33xx_pinmux {
+	pinctrl-0 = <&clkout2_pin>;
+
+	uart1_pins_default: pinmux_uart1_pins_default {
+		pinctrl-single,pins = <
+			0x180 ( PIN_INPUT  | MUX_MODE0 ) /* (D16) uart1_rxd.uart1_rxd */
+			0x184 ( PIN_OUTPUT | MUX_MODE0 ) /* (D15) uart1_txd.uart1_txd */
+			0x178 ( PIN_INPUT  | MUX_MODE0 ) /* (D18) uart1_ctsn.uart1_ctsn */
+			0x17c ( PIN_OUTPUT_PULLDOWN | MUX_MODE0 ) /* (D17) uart1_rtsn.uart1_rtsn */
+		>;
+	};
+
+	uart1_pins_sleep: pinmux_uart1_pins_sleep {
+		pinctrl-single,pins = <
+			0x180 ( PIN_INPUT  | MUX_MODE0 ) /* (D16) uart1_rxd.uart1_rxd */
+			0x184 ( PIN_OUTPUT | MUX_MODE0 ) /* (D15) uart1_txd.uart1_txd */
+			0x178 ( PIN_INPUT  | MUX_MODE0 ) /* (D18) uart1_ctsn.uart1_ctsn */
+			0x17c ( PIN_OUTPUT | MUX_MODE0 ) /* (D17) uart1_rtsn.uart1_rtsn  */
+		>;
+	};
+
+	bt_pins_default: pinmux_bt_pins_default {
+		pinctrl-single,pins = <
+			0x154 (PIN_OUTPUT_PULLUP   | MUX_MODE7) /* gpio0_3 BT_EN*/
+		>;
+	};
+
+	bt_pins_sleep: pinmux_bt_pins_sleep {
+		pinctrl-single,pins = <
+			0x154 (PIN_OUTPUT_PULLUP   | MUX_MODE7) /* gpio0_3 BT_EN*/
+		>;
+	};
+
+	mmc2_pins: pinmux_mmc2_pins {
+		pinctrl-single,pins = <
+			0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
+			0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
+			0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
+			0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
+			0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
+			0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
+		>;
+	};
+
+	mmc2_pins_sleep: pinmux_mmc2_pins_sleep {
+		pinctrl-single,pins = <
+			0x80 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn1.mmc1_clk */
+			0x84 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn2.mmc1_cmd */
+			0x00 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad0.mmc1_dat0 */
+			0x04 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad1.mmc1_dat1 */
+			0x08 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad2.mmc1_dat2 */
+			0x0c (PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad3.mmc1_dat3 */
+		>;
+	};
+
+	wlan_pins_default: pinmux_wlan_pins_default {
+		pinctrl-single,pins = <
+			0x150 (PIN_OUTPUT_PULLUP   | MUX_MODE7) /* gpio0_2 WL_EN*/
+			0x164 (PIN_INPUT_PULLUP    | MUX_MODE7) /* gpio0_7 WL_IRQ*/
+			0x7C  (PIN_OUTPUT_PULLUP   | MUX_MODE0) /* gpmc_csn0.gpio1_29 Cape_Buffer_EN*/
+			0x90  (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_advn_ale.gpio2_2  Audio_sync*/
+		>;
+	};
+
+	wlan_pins_sleep: pinmux_wlan_pins_sleep {
+		pinctrl-single,pins = <
+			0x150 (PIN_OUTPUT_PULLUP   | MUX_MODE7) /* gpio0_2 WL_EN*/
+			0x164 (PIN_INPUT_PULLUP    | MUX_MODE7) /* gpio0_7 WL_IRQ*/
+			0x7C  (PIN_OUTPUT_PULLUP   | MUX_MODE0) /* gpmc_csn0.gpio1_29 Cape_Buffer_EN*/
+			0x90  (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_advn_ale.gpio2_2  Audio_sync*/
+		>;
+	};
+
+	i2c1_pins: pinmux_i2c1_pins {
+		pinctrl-single,pins = <
+			0x15c (PIN_INPUT_PULLUP | MUX_MODE2)	/* i2c1 */
+			0x158 (PIN_INPUT_PULLUP | MUX_MODE2)	/* i2c1 */
+		>;
+	};
+};
+
+&uart1 {
+	pinctrl-names = "default","sleep";
+	pinctrl-0 = <&uart1_pins_default &bt_pins_default>;
+	pinctrl-1 = <&uart1_pins_sleep &bt_pins_sleep>;
+	status = "okay";
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tps1: tps@24 {
+		reg = <0x24>;
+	};
+};
+
+&mmc2 {
+	status = "okay";
+	vmmc-supply = <&wlan_en_reg>;
+	bus-width = <4>;
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&mmc2_pins &wlan_pins_default>;
+	pinctrl-1 = <&mmc2_pins_sleep &wlan_pins_sleep>;
+	ti,non-removable;
+	ti,needs-special-hs-handling;
+	cap-power-off-card;
+	keep-power-in-suspend;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+	wlcore: wlcore@0 {
+		compatible = "ti,wl1835";
+		reg = <2>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <7 IRQ_TYPE_EDGE_RISING>;
+	};
+};
diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index 3d993ae..bf755b2c 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -171,4 +171,8 @@
 			sound-dai = <&tda19988>;
 		};
 	};
+
 };
+
+/* Overlay the wilink8 based cape support */
+#include "am335x-bone-e14-wl1837.dtsi"
-- 
1.7.9.5