sunxi: initial 3.14 patchset
[openwrt/staging/luka.git] / target / linux / sunxi / patches-3.14 / 232-2-dt-sun7i-add-bluetooth-to-cubietruck.patch
1 From 7ed66f828ad1ae46226ad7c1b56466d5ae6d67b9 Mon Sep 17 00:00:00 2001
2 From: Chen-Yu Tsai <wens@csie.org>
3 Date: Thu, 26 Dec 2013 17:15:47 +0800
4 Subject: [PATCH] ARM: dts: sun7i: add bluetooth module to CubieTruck DTS
5
6 The CubieTruck has an AMPAK AP6210 WiFi+Bluetooth module. The
7 Bluetooth part is a BCM20710 IC connected to UART2 in the A20
8 SoC. The IC also takes a 32.768 KHz low power clock input, a power
9 enable signal and a wake signal via GPIO.
10
11 The Bluetooth module supports out-of-band interrupt signaling via
12 GPIO, but this is not supported in this patch.
13 ---
14 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 36 ++++++++++++++++++++++++++++++
15 1 file changed, 36 insertions(+)
16
17 diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
18 index 2444806..9a127d1 100644
19 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
20 +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
21 @@ -105,6 +105,20 @@
22 allwinner,drive = <0>;
23 allwinner,pull = <0>;
24 };
25 +
26 + bt_pwr_pin: bt_pwr_pin@0 {
27 + allwinner,pins = "PH18";
28 + allwinner,function = "gpio_out";
29 + allwinner,drive = <0>;
30 + allwinner,pull = <0>;
31 + };
32 +
33 + bt_wake_pin: bt_wake_pin@0 {
34 + allwinner,pins = "PH24";
35 + allwinner,function = "gpio_out";
36 + allwinner,drive = <0>;
37 + allwinner,pull = <0>;
38 + };
39 };
40
41 uart0: serial@01c28000 {
42 @@ -113,6 +127,12 @@
43 status = "okay";
44 };
45
46 + uart2: serial@01c28800 {
47 + pinctrl-names = "default";
48 + pinctrl-0 = <&uart2_pins_a>;
49 + status = "okay";
50 + };
51 +
52 i2c0: i2c@01c2ac00 {
53 pinctrl-names = "default";
54 pinctrl-0 = <&i2c0_pins_a>;
55 @@ -194,4 +214,20 @@
56 enable-active-high;
57 gpio = <&pio 7 9 0>;
58 };
59 +
60 + rfkill-switches {
61 + compatible = "simple-bus";
62 + pinctrl-names = "default";
63 +
64 + rfkill_bt {
65 + compatible = "rfkill-gpio";
66 + pinctrl-0 = <&bt_pwr_pin>, <&clk_out_a_pins_a>;
67 + rfkill-name = "bt";
68 + rfkill-type = <2>;
69 + bt_shutdown-gpios = <0>, <&pio 7 18 0>; /* PH18 */
70 + bt_reset-gpios = <&pio 7 24 0>; /* PH24 */
71 + clocks = <&clk_out_a>;
72 + clock-frequency = <32768>;
73 + };
74 + };
75 };
76 --
77 2.0.3
78