From patchwork Tue Dec 27 17:58:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Nelson X-Patchwork-Id: 9489773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5D5F262AAF for ; Tue, 27 Dec 2016 18:01:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54FDF2094F for ; Tue, 27 Dec 2016 18:01:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 49F4E25E13; Tue, 27 Dec 2016 18:01:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B749C2094F for ; Tue, 27 Dec 2016 18:01:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cLw2P-0000M4-DZ; Tue, 27 Dec 2016 17:59:49 +0000 Received: from mail-it0-x242.google.com ([2607:f8b0:4001:c0b::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cLw1s-0008Vx-5X for linux-arm-kernel@lists.infradead.org; Tue, 27 Dec 2016 17:59:19 +0000 Received: by mail-it0-x242.google.com with SMTP id b123so34247503itb.2 for ; Tue, 27 Dec 2016 09:58:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2J7FyxOTAf+blpUcqmssO6wkCQOYR6GQPdSYpy47trg=; b=W+fuwGhrbD3+Gl/PxsUrWxWy+BcMWknU9wuf/KmZ+UebX+ldPRJgRllzKfuy3VyJGC Q+H2j1sMtEoeBDcZOEoAJqTNvxS4hHSjp7WyLJ3KQouxif3qIefYot4oy1aDpWqudc+f ZVvQDgXl/cdIDpZ+x33mj/McS89J9urjXgrV9CvRPLDAeJ6xqGLto3UOviXGS4apmKNg psZJH2ycDlCJym2uBlKXCkPa37LgN88YABu2AEU299hnkJaFZwoRCnXr5KRJyDXQsoSm 4gLnaNh6kVvmLYjtaawzvOkK2TfarCby9G1W2Lf9nvLCc6eo8bcNF4c0Y3qPhlhN8voT Bb+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2J7FyxOTAf+blpUcqmssO6wkCQOYR6GQPdSYpy47trg=; b=gwTk40wX9+t5R38HBFyP1kf2ZSDuEjWZUqWC5nczoarEjHsMY+xUiFnKADeQMIDYEb vGH8Uj3DvYvgx6jV/zR3L2D7V7yjdauBGiGnj3DOQ7D97mSvg93L7MPYZNSG6EKYcrjj kaI3h9Ri0fH5NSRVe2/kciYdcPOXP/dcMFdyCxAhvuQEhCq+ihBiR6iRKlp6MLgOv5aZ x3Hj7IaiyrcPsVrYDBfAZGnIEHufEF8NwBHVMw0N8bNRY/uD9NggC0qelxe55XW1zToC x6idMA426u7SYh+0fnQiE9Rw/0CR01p6jZBQ/Vwh87rTFk/bsCq6VNtkUSOv2qKJLCTO ODRg== X-Gm-Message-State: AIkVDXL7UCLTPuV0CSkVc/ADlezrVNc8GUJ41YurnQIByKNGih06VBoB50JoRWp5Tp2lEg== X-Received: by 10.36.46.132 with SMTP id i126mr27054134ita.44.1482861535003; Tue, 27 Dec 2016 09:58:55 -0800 (PST) Received: from localhost.localdomain ([64.77.213.245]) by smtp.gmail.com with ESMTPSA id u63sm8445860ita.1.2016.12.27.09.58.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 09:58:54 -0800 (PST) From: Robert Nelson To: tony@atomide.com Subject: [PATCH 4/4] ARM: dts: Add am335x-bonegreen-wireless Date: Tue, 27 Dec 2016 11:58:37 -0600 Message-Id: <20161227175837.28970-4-robertcnelson@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20161227175837.28970-1-robertcnelson@gmail.com> References: <20161227175837.28970-1-robertcnelson@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161227_095916_520269_615443D3 X-CRM114-Status: GOOD ( 18.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-omap@vger.kernel.org, Robert Nelson , linux-arm-kernel@lists.infradead.org, Jason Kridner MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP SeeedStudio BeagleBone Green Wireless (BBGW) is an expansion of the SeeedStudio Green (BBG) with the Ethernet replaced by a TI wl1835 wireless module. This board can be indentified by the GW1x value after A335BNLT (BBB) in the at24 eeprom: GW1x [aa 55 33 ee 41 33 33 35 42 4e 4c 54 47 57 31 41 |.U3.A335BNLTGW1A|] http://beagleboard.org/green-wireless http://wiki.seeed.cc/BeagleBone_Green_Wireless/ firmware: https://github.com/beagleboard/beaglebone-black-wireless/tree/master/firmware wl18xx mac address: Stored in at24 eeprom at address 5-16: hexdump -e '8/1 "%c"' /sys/bus/i2c/devices/0-0050/eeprom | cut -b 5-16 Signed-off-by: Robert Nelson CC: Tony Lindgren CC: Jason Kridner --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/am335x-bonegreen-wireless.dts | 126 ++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-bonegreen-wireless.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 9415a49bd11b..6c0a3e3fdf30 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -565,6 +565,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \ am335x-boneblack.dtb \ am335x-boneblack-wireless.dtb \ am335x-bonegreen.dtb \ + am335x-bonegreen-wireless.dtb \ am335x-chiliboard.dtb \ am335x-cm-t335.dtb \ am335x-evm.dtb \ diff --git a/arch/arm/boot/dts/am335x-bonegreen-wireless.dts b/arch/arm/boot/dts/am335x-bonegreen-wireless.dts new file mode 100644 index 000000000000..9d1a0fd555f3 --- /dev/null +++ b/arch/arm/boot/dts/am335x-bonegreen-wireless.dts @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * 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. + */ +/dts-v1/; + +#include "am33xx.dtsi" +#include "am335x-bone-common.dtsi" +#include "am335x-bonegreen-common.dtsi" +#include + +/ { + model = "TI AM335x BeagleBone Green Wireless"; + compatible = "ti,am335x-bone-green-wireless", "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; + + wlan_en_reg: fixedregulator@2 { + compatible = "regulator-fixed"; + regulator-name = "wlan-en-regulator"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + startup-delay-us= <70000>; + + /* WL_EN */ + gpio = <&gpio0 26 0>; + enable-active-high; + }; +}; + +&am33xx_pinmux { + bt_pins: pinmux_bt_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x878, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_ad12.gpio1_28 BT_EN */ + >; + }; + + mmc3_pins: pinmux_mmc3_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x830, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad12.mmc2_dat0 */ + AM33XX_IOPAD(0x834, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad13.mmc2_dat1 */ + AM33XX_IOPAD(0x838, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad14.mmc2_dat2 */ + AM33XX_IOPAD(0x83c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_ad15.mmc2_dat3 */ + AM33XX_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_csn3.mmc2_cmd */ + AM33XX_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_clk.mmc2_clk */ + >; + }; + + uart3_pins: pinmux_uart3_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1) /* gmii1_rxd3.uart3_rxd */ + AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gmii1_rxd2.uart3_txd */ + AM33XX_IOPAD(0x948, PIN_INPUT | MUX_MODE3) /* mdio_data.uart3_ctsn */ + AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* mdio_clk.uart3_rtsn */ + >; + }; + + wl18xx_pins: pinmux_wl18xx_pins { + pinctrl-single,pins = < + AM33XX_IOPAD(0x828, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad10.gpio0_26 WL_EN */ + AM33XX_IOPAD(0x82C, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad11.gpio0_27 WL_IRQ */ + AM33XX_IOPAD(0x87C, PIN_OUTPUT_PULLUP | MUX_MODE7) /* gpmc_csn0.gpio1_29 LS_BUF_EN */ + >; + }; +}; + +&mac { + status = "disabled"; +}; + +&mmc3 { + dmas = <&edma_xbar 12 0 1 + &edma_xbar 13 0 2>; + dma-names = "tx", "rx"; + status = "okay"; + vmmc-supply = <&wlan_en_reg>; + bus-width = <4>; + non-removable; + cap-power-off-card; + ti,needs-special-hs-handling; + keep-power-in-suspend; + pinctrl-names = "default"; + pinctrl-0 = <&mmc3_pins &wl18xx_pins>; + + #address-cells = <1>; + #size-cells = <0>; + wlcore: wlcore@2 { + compatible = "ti,wl1835"; + reg = <2>; + interrupt-parent = <&gpio0>; + interrupts = <27 IRQ_TYPE_EDGE_RISING>; + }; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins &bt_pins>; + status = "okay"; +}; + +&gpio1 { + ls_buf_en { + gpio-hog; + gpios = <29 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "LS_BUF_EN"; + }; +}; + +/* BT_AUD_OUT from wl1835 has to be pulled low when WL_EN is activated.*/ +/* in case it isn't, wilink8 ends up in one of the test modes that */ +/* intruces various issues (elp wkaeup timeouts etc.) */ +/* On the BBGW this pin is routed through the level shifter (U21) that */ +/* introduces a pullup on the line and wilink8 ends up in a bad state. */ +/* use a gpio hog to force this pin low. An alternative may be adding */ +/* an external pulldown on U21 pin 4. */ + +&gpio3 { + bt_aud_in { + gpio-hog; + gpios = <16 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "MCASP0_AHCLKR"; + }; +};