// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/interrupt-controller/irq.h>
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
&{/chosen} {
overlays {
BB-BBGW-WL1835-00A0.kernel = __TIMESTAMP__;
wl1835_bt = "S3-texas-300000";
};
};
/*
* Free up the pins used by the cape from the pinmux helpers.
*/
&ocp {
P9_12_pinmux { status = "disabled"; }; /* gpmc_ad12.gpio1_28 BT_EN */
P8_12_pinmux { status = "disabled"; }; /* gpmc_ad12.mmc2_dat0 */
P8_11_pinmux { status = "disabled"; }; /* gpmc_ad13.mmc2_dat1 */
P8_16_pinmux { status = "disabled"; }; /* gpmc_ad14.mmc2_dat2 */
P8_15_pinmux { status = "disabled"; }; /* gpmc_ad15.mmc2_dat3 */
P8_18_pinmux { status = "disabled"; }; /* gpmc_clk.mmc2_clk */
//Audio...
P9_28_pinmux { status = "disabled"; };
P9_29_pinmux { status = "disabled"; };
P9_31_pinmux { status = "disabled"; };
/* wl1835 */
P8_14_pinmux { status = "disabled"; }; /* wl1835: wl_en */
P8_17_pinmux { status = "disabled"; }; /* wl1835: wl_irq */
P8_26_pinmux { status = "disabled"; }; /* wl1835: LS_BUF_EN */
P9_30_pinmux { status = "disabled"; }; /* wl1835: MCASP0_AHCLKR */
};
&{/} {
model = "TI AM335x BeagleBone Green Wireless";
compatible = "ti,am335x-bone-green-wireless", "ti,am335x-bone-green", "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;
};
leds {
pinctrl-names = "default";
//pinctrl-0 = <&user_leds_s0>;
pinctrl-0 = <&user_leds_s0 &bt_pins>;
compatible = "gpio-leds";
led2 {
label = "beaglebone:green:usr0";
gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
default-state = "off";
};
led3 {
label = "beaglebone:green:usr1";
gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc0";
default-state = "off";
};
led4 {
label = "beaglebone:green:usr2";
gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "cpu0";
default-state = "off";
};
led5 {
label = "beaglebone:green:usr3";
gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "mmc1";
default-state = "off";
};
wl18xx_bt_en: led7 {
label = "wl18xx_bt_en";
gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
};
&am33xx_pinmux {
user_leds_s0: user_leds_s0 {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_A5, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a5.gpio1_21 */
AM33XX_PADCONF(AM335X_PIN_GPMC_A6, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a6.gpio1_22 */
AM33XX_PADCONF(AM335X_PIN_GPMC_A7, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a7.gpio1_23 */
AM33XX_PADCONF(AM335X_PIN_GPMC_A8, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_a8.gpio1_24 */
>;
};
bt_pins: pinmux_bt_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_OUTPUT_PULLUP, MUX_MODE7) /* gpmc_ad12.gpio1_28 BT_EN */
>;
};
mmc3_pins: pinmux_mmc3_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_AD12, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad12.mmc2_dat0 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD13, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad13.mmc2_dat1 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD14, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad14.mmc2_dat2 */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD15, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_ad15.mmc2_dat3 */
AM33XX_PADCONF(AM335X_PIN_GPMC_CSN3, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_csn3.mmc2_cmd */
AM33XX_PADCONF(AM335X_PIN_GPMC_CLK, PIN_INPUT_PULLUP, MUX_MODE3) /* gpmc_clk.mmc2_clk */
>;
};
uart3_pins: pinmux_uart3_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLUP, MUX_MODE1) /* gmii1_rxd3.uart3_rxd */
AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE1) /* gmii1_rxd2.uart3_txd */
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT, MUX_MODE3) /* mdio_data.uart3_ctsn */
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLDOWN, MUX_MODE3) /* mdio_clk.uart3_rtsn */
>;
};
wl18xx_pins: pinmux_wl18xx_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_AD10, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad10.gpio0_26 WL_EN */
AM33XX_PADCONF(AM335X_PIN_GPMC_AD11, PIN_INPUT_PULLDOWN, MUX_MODE7) /* gpmc_ad11.gpio0_27 WL_IRQ */
AM33XX_PADCONF(AM335X_PIN_GPMC_CSN0, 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;
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>;
//pinctrl-0 = <&uart3_pins &bt_pins>;
status = "okay";
//bluetooth {
// compatible = "ti,wl1835-st";
// enable-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
//};
};
&gpio1 {
ls-buf-en-hog {
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-hog {
gpio-hog;
gpios = <16 GPIO_ACTIVE_HIGH>;
output-low;
line-name = "MCASP0_AHCLKR";
};
};
That is a BB-BBGW-WL1835-00A0.dts
file in /opt/source/dtb-5.10-ti/src/arm/overlays/
.
Also, /etc/udev/rules.d/
has some interesting files in them…
- 82-SoftAp0-start-hostpad.rules
- 81-add-SoftAp0-interface.rules
The reason I bring up DTS and udev…
It seems one can alter the DTS file to suit the needs of the user and that specific DTS file calls normal pins with offsets at regular file locations.
And…the reason I call to udev
is because there seems to be a relation between the build and how userspace gets allocated from udev
from DTS. I could be wrong. Just trying to help more than not here.