Skip to content

Commit

Permalink
ARM: dts: am335x-boneblack: enable wl1835mod cape support
Browse files Browse the repository at this point in the history
Add in support for the WL1835MOD cape. Note that this cape conflicts
with the eMMC and HDMI on board the BeagleBone Black. This change
requires that the board be booted from the SD card slot by holding
the user/boot button down at power on and reset.

Most of the changes are isolated to the wl1835mod cape dtsi but
it's necessary to remove the standard mmc2 and hdmi configuration
in am335x-boneblack.dts. Note that the out-of-tree gpio hogs mechanism
is used to allow the eMMC to be held in reset and also to drive the
buffers' output enables.

Both WLAN and Bluetooth are supported on the cape.

Signed-off-by: Matt Porter <mporter@linaro.org>
  • Loading branch information
Matt Porter committed Nov 12, 2014
1 parent 21178c5 commit cf22339
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 8 deletions.
123 changes: 123 additions & 0 deletions arch/arm/boot/dts/am335x-boneblack-wl1835mod-cape.dtsi
@@ -0,0 +1,123 @@
/*
* Copyright 2014 Linaro Limited
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/ {
wlan_en_reg: fixedregulator@2 {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;

/* WL_EN */
gpio = <&gpio0 26 0>;

/* Magic delay */
startup-delay-us = <70000>;
enable-active-high;
};

wlcore {
compatible = "wlcore";
/*
* FIXME: The following is complete CRAP since
* the vendor driver doesn't follow the gpio
* binding. Passing in a magic Linux gpio number
* here until we fix the vendor driver.
*/
/* WL_IRQ */
gpio = <27>;

/* Use edge irqs for suspend/resume */
platform-quirks = <1>;

/* WL12XX_REFCLOCK_38_XTAL */
board-ref-clock = <4>;
};

kim {
compatible = "kim";
pinctrl-names = "default";
pinctrl-0 = <&bt_pins>;
/*
* FIXME: The following is complete CRAP since
* the vendor driver doesn't follow the gpio
* binding. Passing in a magic Linux gpio number
* here until we fix the vendor driver.
*/
/* BT_EN */
nshutdown_gpio = <44>;
dev_name = "/dev/ttyO4";
flow_cntrl = <1>;
baud_rate = <3000000>;
};

btwilink {
compatible = "btwilink";
};
};

&am33xx_pinmux {
bt_pins: pinmux_bt_pins {
pinctrl-single,pins = <
0x30 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_ad12.gpio1_12 */
>;
};

wlan_pins: pinmux_wlan_pins {
pinctrl-single,pins = <
0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
>;
};

uart4_pins: uart4_pins {
pinctrl-single,pins = <
0x70 (PIN_INPUT | MUX_MODE6) /* gpmc_wait0.uart4_rxd */
0x74 (PIN_OUTPUT | MUX_MODE6) /* gpmc_wpn.uart4_txd */
0xd0 (PIN_OUTPUT | MUX_MODE6) /* lcd_data12.uart4_ctsn */
0xd4 (PIN_INPUT | MUX_MODE6) /* lcd_data13.uart4_rtsn */
>;
};
};

&gpio1 {
gpio-hogs = <&emmc_rst &wlan_oe>;

emmc_rst: emmc_rst {
gpios = <20 0>;
output-high;
line-name = "EMMC ResetN";
};

wlan_oe: wlan_oe {
gpios = <29 0>;
output-high;
line-name = "WLAN OE";
};
};

&mmc2 {
vmmc-supply = <&wlan_en_reg>;
pinctrl-names = "default";
pinctrl-0 = <&wlan_pins>;
bus-width = <4>;
cap-power-off-card;
keep-power-in-suspend;
ti,non-removable;
ti,needs-special-hs-handling;
status = "okay";
};

&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&uart4_pins>;
status = "okay";
};
12 changes: 4 additions & 8 deletions arch/arm/boot/dts/am335x-boneblack.dts
Expand Up @@ -25,13 +25,8 @@
vmmc-supply = <&vmmcsd_fixed>;
};

&mmc2 {
vmmc-supply = <&vmmcsd_fixed>;
pinctrl-names = "default";
pinctrl-0 = <&emmc_pins>;
bus-width = <8>;
status = "okay";
};
/* BeagleBone WL1835MOD cape support */
#include "am335x-boneblack-wl1835mod-cape.dtsi"

&am33xx_pinmux {
nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
Expand Down Expand Up @@ -77,6 +72,7 @@
pinctrl-names = "default", "off";
pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
status = "okay";
/* Disabled to avoid pin conflicts with WL1835MOD cape */
status = "disabled";
};
};

0 comments on commit cf22339

Please sign in to comment.