]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: dts: sun8i: a83t: bananapi-m3: Enable AP6212 WiFi on mmc1
authorChen-Yu Tsai <wens@csie.org>
Wed, 18 Oct 2017 08:31:38 +0000 (16:31 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 2 Nov 2017 08:04:57 +0000 (09:04 +0100)
The WiFi side of the AP6212 WiFi/BT combo module is connected to
mmc1. There are also GPIOs for enable and interrupts. An external
clock from the AC100 RTC is also used.

Enable WiFi on this board by enabling mmc1 and adding the power
sequencing clocks and GPIO, as well as the chip's interrupt line.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts

index 78036b2f2ab43f2ec9045af88fb9da586ef432ef..c606af3dbfedf9351aed99313917b3f9e85e98c4 100644 (file)
@@ -68,6 +68,17 @@ reg_usb1_vbus: reg-usb1-vbus {
                enable-active-high;
                gpio = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
        };
+
+       wifi_pwrseq: wifi_pwrseq {
+               compatible = "mmc-pwrseq-simple";
+               clocks = <&ac100_rtc 1>;
+               clock-names = "ext_clock";
+               /* The WiFi low power clock must be 32768 Hz */
+               assigned-clocks = <&ac100_rtc 1>;
+               assigned-clock-rates = <32768>;
+               /* enables internal regulator and de-asserts reset */
+               reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 WL-PMU-EN */
+       };
 };
 
 &ehci0 {
@@ -87,6 +98,23 @@ &mmc0 {
        status = "okay";
 };
 
+&mmc1 {
+       vmmc-supply = <&reg_dldo1>;
+       vqmmc-supply = <&reg_dldo1>;
+       mmc-pwrseq = <&wifi_pwrseq>;
+       bus-width = <4>;
+       non-removable;
+       status = "okay";
+
+       brcmf: wifi@1 {
+               reg = <1>;
+               compatible = "brcm,bcm4329-fmac";
+               interrupt-parent = <&r_pio>;
+               interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-names = "host-wake";
+       };
+};
+
 &mmc2 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc2_8bit_emmc_pins>;