sunxi: initial 3.14 patchset
[openwrt.git] / target / linux / sunxi / patches-3.14 / 232-1-dt-sun7i-add-wifi-to-cubietruck.patch
1 From 3e7fc7d394db0783996519f2d5affde5152a628e Mon Sep 17 00:00:00 2001
2 From: Chen-Yu Tsai <wens@csie.org>
3 Date: Thu, 26 Dec 2013 17:14:33 +0800
4 Subject: [PATCH] ARM: dts: sun7i: add WiFi module to Cubietruck DTS
5
6 The CubieTruck has an AMPAK AP6210 WiFi+Bluetooth module. The WiFi
7 part is a BCM43362 IC connected to MMC2 in the A20 SoC via SDIO.
8 The IC also takes a 32.768 KHz low power clock input, and a power
9 enable signal via GPIO.
10
11 The WiFi module supports out-of-band interrupt signaling via GPIO,
12 but this is not supported in this patch.
13 ---
14  arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 47 ++++++++++++++++++++++++++++++
15  1 file changed, 47 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 66bb3ef..2444806 100644
19 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
20 +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
21 @@ -28,6 +28,23 @@
22                         status = "okay";
23                 };
24  
25 +               mmc3: mmc@01c12000 {
26 +                       pinctrl-names = "default", "default";
27 +                       pinctrl-0 = <&mmc3_pins_a>;
28 +                       pinctrl-1 = <&wifi_host_wake_pin>;
29 +                       vmmc-supply = <&reg_vmmc3>;
30 +                       non-removable;
31 +                       status = "okay";
32 +
33 +                       brcmf: bcrmf@0 {
34 +                               /* out of band interrupt not working */
35 +                               /* compatible = "broadcom,bcm43362"; */
36 +                               interrupt-parent = <&pio>;
37 +                               interrupts = <10 2>; /* EINT10 */
38 +                               status = "okay";
39 +                       };
40 +               };
41 +
42                 usbphy: phy@01c13400 {
43                         usb1_vbus-supply = <&reg_usb1_vbus>;
44                         usb2_vbus-supply = <&reg_usb2_vbus>;
45 @@ -56,6 +73,18 @@
46                 };
47  
48                 pinctrl@01c20800 {
49 +                       mmc3_pins_a: mmc3@0 {
50 +                               /* AP6210 requires pull-up */
51 +                               allwinner,pull = <1>;
52 +                       };
53 +
54 +                       vmmc3_pin_cubietruck: vmmc3_pin@0 {
55 +                               allwinner,pins = "PH9";
56 +                               allwinner,function = "gpio_out";
57 +                               allwinner,drive = <0>;
58 +                               allwinner,pull = <0>;
59 +                       };
60 +
61                         ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
62                                 allwinner,pins = "PH12";
63                                 allwinner,function = "gpio_out";
64 @@ -69,6 +98,13 @@
65                                 allwinner,drive = <0>;
66                                 allwinner,pull = <0>;
67                         };
68 +
69 +                       wifi_host_wake_pin: wifi_host_wake_pin@0 {
70 +                               allwinner,pins = "PH10";
71 +                               allwinner,function = "gpio_in";
72 +                               allwinner,drive = <0>;
73 +                               allwinner,pull = <0>;
74 +                       };
75                 };
76  
77                 uart0: serial@01c28000 {
78 @@ -147,4 +183,15 @@
79         reg_usb2_vbus: usb2-vbus {
80                 status = "okay";
81         };
82 +
83 +       reg_vmmc3: vmmc3 {
84 +               compatible = "regulator-fixed";
85 +               pinctrl-names = "default";
86 +               pinctrl-0 = <&vmmc3_pin_cubietruck>;
87 +               regulator-name = "vmmc3";
88 +               regulator-min-microvolt = <3300000>;
89 +               regulator-max-microvolt = <3300000>;
90 +               enable-active-high;
91 +               gpio = <&pio 7 9 0>;
92 +       };
93  };
94 -- 
95 2.0.3
96