Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
0004  */
0005 /dts-v1/;
0006 
0007 #include "am33xx.dtsi"
0008 #include "am335x-bone-common.dtsi"
0009 #include "am335x-bonegreen-common.dtsi"
0010 #include <dt-bindings/interrupt-controller/irq.h>
0011 
0012 / {
0013         model = "TI AM335x BeagleBone Green Wireless";
0014         compatible = "ti,am335x-bone-green-wireless", "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
0015 
0016         wlan_en_reg: fixedregulator@2 {
0017                 compatible = "regulator-fixed";
0018                 regulator-name = "wlan-en-regulator";
0019                 regulator-min-microvolt = <1800000>;
0020                 regulator-max-microvolt = <1800000>;
0021                 startup-delay-us = <70000>;
0022 
0023                 /* WL_EN */
0024                 gpio = <&gpio0 26 0>;
0025                 enable-active-high;
0026         };
0027 };
0028 
0029 &am33xx_pinmux {
0030         bt_pins: pinmux_bt_pins {
0031                 pinctrl-single,pins = <
0032                         AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_OUTPUT_PULLUP, MUX_MODE7)      /* gpmc_ad12.gpio1_28 BT_EN */
0033                 >;
0034         };
0035 
0036         mmc3_pins: pinmux_mmc3_pins {
0037                 pinctrl-single,pins = <
0038                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLUP, MUX_MODE3)       /* gpmc_ad12.mmc2_dat0 */
0039                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLUP, MUX_MODE3)       /* gpmc_ad13.mmc2_dat1 */
0040                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE3)       /* gpmc_ad14.mmc2_dat2 */
0041                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE3)       /* gpmc_ad15.mmc2_dat3 */
0042                         AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLUP, MUX_MODE3)       /* gpmc_csn3.mmc2_cmd */
0043                         AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLUP, MUX_MODE3)        /* gpmc_clk.mmc2_clk */
0044                 >;
0045         };
0046 
0047         uart3_pins: pinmux_uart3_pins {
0048                 pinctrl-single,pins = <
0049                         AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLUP, MUX_MODE1)       /* gmii1_rxd3.uart3_rxd */
0050                         AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE1)    /* gmii1_rxd2.uart3_txd */
0051                         AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT, MUX_MODE3)           /* mdio_data.uart3_ctsn */
0052                         AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLDOWN, MUX_MODE3)  /* mdio_clk.uart3_rtsn */
0053                 >;
0054         };
0055 
0056         wl18xx_pins: pinmux_wl18xx_pins {
0057                 pinctrl-single,pins = <
0058                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD10, PIN_OUTPUT_PULLDOWN, MUX_MODE7)    /* gpmc_ad10.gpio0_26 WL_EN */
0059                         AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_INPUT_PULLDOWN, MUX_MODE7)     /* gpmc_ad11.gpio0_27 WL_IRQ */
0060                         AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, PIN_OUTPUT_PULLUP, MUX_MODE7)      /* gpmc_csn0.gpio1_29 LS_BUF_EN */
0061                 >;
0062         };
0063 };
0064 
0065 &mac_sw {
0066         status = "disabled";
0067 };
0068 
0069 &mmc3 {
0070         dmas = <&edma_xbar 12 0 1
0071                 &edma_xbar 13 0 2>;
0072         dma-names = "tx", "rx";
0073         status = "okay";
0074         vmmc-supply = <&wlan_en_reg>;
0075         bus-width = <4>;
0076         non-removable;
0077         cap-power-off-card;
0078         keep-power-in-suspend;
0079         pinctrl-names = "default";
0080         pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
0081 
0082         #address-cells = <1>;
0083         #size-cells = <0>;
0084         wlcore: wlcore@2 {
0085                 compatible = "ti,wl1835";
0086                 reg = <2>;
0087                 interrupt-parent = <&gpio0>;
0088                 interrupts = <27 IRQ_TYPE_EDGE_RISING>;
0089         };
0090 };
0091 
0092 &uart3 {
0093         pinctrl-names = "default";
0094         pinctrl-0 = <&uart3_pins &bt_pins>;
0095         status = "okay";
0096 
0097         bluetooth {
0098                 compatible = "ti,wl1835-st";
0099                 enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
0100         };
0101 };
0102 
0103 &gpio1 {
0104         ls-buf-en-hog {
0105                 gpio-hog;
0106                 gpios = <29 GPIO_ACTIVE_HIGH>;
0107                 output-high;
0108                 line-name = "LS_BUF_EN";
0109         };
0110 };
0111 
0112 /* BT_AUD_OUT from wl1835 has to be pulled low when WL_EN is activated.*/
0113 /* in case it isn't, wilink8 ends up in one of the test modes that     */
0114 /* intruces various issues (elp wkaeup timeouts etc.)                  */
0115 /* On the BBGW this pin is routed through the level shifter (U21) that */
0116 /* introduces a pullup on the line and wilink8 ends up in a bad state. */
0117 /* use a gpio hog to force this pin low. An alternative may be adding  */
0118 /* an external pulldown on U21 pin 4.                                  */
0119 
0120 &gpio3 {
0121         bt-aud-in-hog {
0122                 gpio-hog;
0123                 gpios = <16 GPIO_ACTIVE_HIGH>;
0124                 output-low;
0125                 line-name = "MCASP0_AHCLKR";
0126         };
0127 };