kernel: update 3.18 to 3.18.14
[openwrt/svn-archive/archive.git] / target / linux / sunxi / patches-3.18 / 202-dt-sun7i-add-bluetooth-to-cubietruck.patch
1 From c6e2b7dad39a7887f935458d1c8de84db06243e1 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 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
18 +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
19 @@ -103,6 +103,20 @@
20 allwinner,drive = <0>;
21 allwinner,pull = <0>;
22 };
23 +
24 + bt_pwr_pin: bt_pwr_pin@0 {
25 + allwinner,pins = "PH18";
26 + allwinner,function = "gpio_out";
27 + allwinner,drive = <0>;
28 + allwinner,pull = <0>;
29 + };
30 +
31 + bt_wake_pin: bt_wake_pin@0 {
32 + allwinner,pins = "PH24";
33 + allwinner,function = "gpio_out";
34 + allwinner,drive = <0>;
35 + allwinner,pull = <0>;
36 + };
37 };
38
39 pwm: pwm@01c20e00 {
40 @@ -123,6 +137,12 @@
41 status = "okay";
42 };
43
44 + uart2: serial@01c28800 {
45 + pinctrl-names = "default";
46 + pinctrl-0 = <&uart2_pins_a>;
47 + status = "okay";
48 + };
49 +
50 i2c0: i2c@01c2ac00 {
51 pinctrl-names = "default";
52 pinctrl-0 = <&i2c0_pins_a>;
53 @@ -214,4 +234,20 @@
54 enable-active-high;
55 gpio = <&pio 7 9 0>;
56 };
57 +
58 + rfkill-switches {
59 + compatible = "simple-bus";
60 + pinctrl-names = "default";
61 +
62 + rfkill_bt {
63 + compatible = "rfkill-gpio";
64 + pinctrl-0 = <&bt_pwr_pin>, <&clk_out_a_pins_a>;
65 + rfkill-name = "bt";
66 + rfkill-type = <2>;
67 + bt_shutdown-gpios = <0>, <&pio 7 18 0>; /* PH18 */
68 + bt_reset-gpios = <&pio 7 24 0>; /* PH24 */
69 + clocks = <&clk_out_a>;
70 + clock-frequency = <32768>;
71 + };
72 + };
73 };