kernel: refresh patches
[openwrt/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 --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
18 +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
19 @@ -28,6 +28,23 @@
20 status = "okay";
21 };
22
23 + mmc3: mmc@01c12000 {
24 + pinctrl-names = "default", "default";
25 + pinctrl-0 = <&mmc3_pins_a>;
26 + pinctrl-1 = <&wifi_host_wake_pin>;
27 + vmmc-supply = <&reg_vmmc3>;
28 + non-removable;
29 + status = "okay";
30 +
31 + brcmf: bcrmf@0 {
32 + /* out of band interrupt not working */
33 + /* compatible = "broadcom,bcm43362"; */
34 + interrupt-parent = <&pio>;
35 + interrupts = <10 2>; /* EINT10 */
36 + status = "okay";
37 + };
38 + };
39 +
40 usbphy: phy@01c13400 {
41 usb1_vbus-supply = <&reg_usb1_vbus>;
42 usb2_vbus-supply = <&reg_usb2_vbus>;
43 @@ -56,6 +73,18 @@
44 };
45
46 pinctrl@01c20800 {
47 + mmc3_pins_a: mmc3@0 {
48 + /* AP6210 requires pull-up */
49 + allwinner,pull = <1>;
50 + };
51 +
52 + vmmc3_pin_cubietruck: vmmc3_pin@0 {
53 + allwinner,pins = "PH9";
54 + allwinner,function = "gpio_out";
55 + allwinner,drive = <0>;
56 + allwinner,pull = <0>;
57 + };
58 +
59 ahci_pwr_pin_cubietruck: ahci_pwr_pin@1 {
60 allwinner,pins = "PH12";
61 allwinner,function = "gpio_out";
62 @@ -99,6 +128,13 @@
63
64 /include/ "x-powers-axp209.dtsi"
65 };
66 +
67 + wifi_host_wake_pin: wifi_host_wake_pin@0 {
68 + allwinner,pins = "PH10";
69 + allwinner,function = "gpio_in";
70 + allwinner,drive = <0>;
71 + allwinner,pull = <0>;
72 + };
73 };
74
75 i2c0: i2c@01c2ac00 {
76 @@ -189,4 +225,15 @@
77 reg_usb2_vbus: usb2-vbus {
78 status = "okay";
79 };
80 +
81 + reg_vmmc3: vmmc3 {
82 + compatible = "regulator-fixed";
83 + pinctrl-names = "default";
84 + pinctrl-0 = <&vmmc3_pin_cubietruck>;
85 + regulator-name = "vmmc3";
86 + regulator-min-microvolt = <3300000>;
87 + regulator-max-microvolt = <3300000>;
88 + enable-active-high;
89 + gpio = <&pio 7 9 0>;
90 + };
91 };