Advertisement
Guest User

BBB-wireless-DTS

a guest
Nov 26th, 2021
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.32 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3.  * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
  4.  */
  5. /dts-v1/;
  6.  
  7. #include "am33xx.dtsi"
  8. #include "am335x-bone-common.dtsi"
  9. #include "am335x-boneblack-common.dtsi"
  10. #include <dt-bindings/interrupt-controller/irq.h>
  11.  
  12. / {
  13.     model = "TI AM335x BeagleBone Black Wireless";
  14.     compatible = "ti,am335x-bone-black-wireless", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
  15.  
  16.     wlan_en_reg: fixedregulator@2 {
  17.         compatible = "regulator-fixed";
  18.         regulator-name = "wlan-en-regulator";
  19.         regulator-min-microvolt = <1800000>;
  20.         regulator-max-microvolt = <1800000>;
  21.         startup-delay-us= <70000>;
  22.  
  23.         /* WL_EN */
  24.         gpio = <&gpio3 9 0>;
  25.         enable-active-high;
  26.     };
  27. };
  28.  
  29. &am33xx_pinmux {
  30.     bt_pins: pinmux_bt_pins {
  31.         pinctrl-single,pins = <
  32.             AM33XX_PADCONF(AM335X_PIN_MII1_TXD0, PIN_OUTPUT_PULLUP, MUX_MODE7)  /* gmii1_txd0.gpio0_28 - BT_EN */
  33.         >;
  34.     };
  35.  
  36.     mmc3_pins: pinmux_mmc3_pins {
  37.         pinctrl-single,pins = <
  38.             AM33XX_PADCONF(AM335X_PIN_MII1_RXD1, PIN_INPUT_PULLUP, MUX_MODE6 ) /* (L15) gmii1_rxd1.mmc2_clk */
  39.             AM33XX_PADCONF(AM335X_PIN_MII1_TX_EN, PIN_INPUT_PULLUP, MUX_MODE6 ) /* (J16) gmii1_txen.mmc2_cmd */
  40.             AM33XX_PADCONF(AM335X_PIN_MII1_RX_DV, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (J17) gmii1_rxdv.mmc2_dat0 */
  41.             AM33XX_PADCONF(AM335X_PIN_MII1_TXD3, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (J18) gmii1_txd3.mmc2_dat1 */
  42.             AM33XX_PADCONF(AM335X_PIN_MII1_TXD2, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (K15) gmii1_txd2.mmc2_dat2 */
  43.             AM33XX_PADCONF(AM335X_PIN_MII1_COL, PIN_INPUT_PULLUP, MUX_MODE5 ) /* (H16) gmii1_col.mmc2_dat3 */
  44.         >;
  45.     };
  46.  
  47.     uart3_pins: pinmux_uart3_pins {
  48.         pinctrl-single,pins = <
  49.             AM33XX_PADCONF(AM335X_PIN_MII1_RXD3, PIN_INPUT_PULLUP, MUX_MODE1)   /* gmii1_rxd3.uart3_rxd */
  50.             AM33XX_PADCONF(AM335X_PIN_MII1_RXD2, PIN_OUTPUT_PULLDOWN, MUX_MODE1)    /* gmii1_rxd2.uart3_txd */
  51.             AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT, MUX_MODE3)       /* mdio_data.uart3_ctsn */
  52.             AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLDOWN, MUX_MODE3)  /* mdio_clk.uart3_rtsn */
  53.         >;
  54.     };
  55.  
  56.     wl18xx_pins: pinmux_wl18xx_pins {
  57.         pinctrl-single,pins = <
  58.             AM33XX_PADCONF(AM335X_PIN_MII1_TX_CLK, PIN_OUTPUT_PULLDOWN, MUX_MODE7)  /* gmii1_txclk.gpio3_9 WL_EN */
  59.             AM33XX_PADCONF(AM335X_PIN_RMII1_REF_CLK, PIN_INPUT_PULLDOWN, MUX_MODE7) /* rmii1_refclk.gpio0_29 WL_IRQ */
  60.             AM33XX_PADCONF(AM335X_PIN_MII1_RX_CLK, PIN_OUTPUT_PULLUP, MUX_MODE7)    /* gmii1_rxclk.gpio3_10 LS_BUF_EN */
  61.         >;
  62.     };
  63.     spi0_pins: pinmux_spi0_pins{
  64.         pinctrl-single,pins = < 0x150 0x30 0x154 0x30 0x158 0x10 0x15c 0x10 >;
  65.     };
  66.     spi1_pins: pinmux_spi1_pins{
  67.         pinctrl-single,pins = < 0x190 0x33 0x194 0x33 0x198 0x13 0x19c 0x13 >;
  68.     };
  69.     uart1_pins: pinmux_uart1_pins {
  70.         pinctrl-single,pins = < 0x180 0x30 0x00 0x184 0x00 0x00 >;
  71.         phandle = < 0x34 >;
  72.     };
  73. };
  74.  
  75. &mac {
  76.     status = "disabled";
  77. };
  78.  
  79. &mmc3 {
  80.     dmas = <&edma_xbar 12 0 1
  81.         &edma_xbar 13 0 2>;
  82.     dma-names = "tx", "rx";
  83.     status = "okay";
  84.     vmmc-supply = <&wlan_en_reg>;
  85.     bus-width = <4>;
  86.     non-removable;
  87.     cap-power-off-card;
  88.     keep-power-in-suspend;
  89.     pinctrl-names = "default";
  90.     pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
  91.  
  92.     #address-cells = <1>;
  93.     #size-cells = <0>;
  94.     wlcore: wlcore@2 {
  95.         compatible = "ti,wl1835";
  96.         reg = <2>;
  97.         interrupt-parent = <&gpio0>;
  98.         interrupts = <29 IRQ_TYPE_EDGE_RISING>;
  99.     };
  100. };
  101.  
  102. &uart3 {
  103.     pinctrl-names = "default";
  104.     pinctrl-0 = <&uart3_pins &bt_pins>;
  105.     status = "okay";
  106.  
  107.     bluetooth {
  108.         compatible = "ti,wl1835-st";
  109.         enable-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
  110.     };
  111. };
  112.  
  113. &gpio3 {
  114.     ls_buf_en {
  115.         gpio-hog;
  116.         gpios = <10 GPIO_ACTIVE_HIGH>;
  117.         output-high;
  118.         line-name = "LS_BUF_EN";
  119.         };
  120.     };
  121. &spi0 {
  122.     status="okay";
  123.     pinctrl-names = "default";
  124.     pinctrl-0 = <&spi0_pins>;
  125.     };
  126.  
  127. &spi1 {
  128.     status="okay";
  129.     pinctrl-names = "default";
  130.     pinctrl-0 = <&spi1_pins>;
  131.     };
  132.  
  133. &uart1 {
  134.     status="okay";
  135.     pinctrl-names = "default";
  136.     pinctrl-0 = <&uart1_pins>;
  137.     };
  138.  
  139. &spi0 {
  140.     // NOTE: consider giving the node a descriptive name like flash@0
  141.  
  142.     spidev@0 {
  143.         reg = <0>;
  144.         compatible = "spidev";
  145.  
  146.         // create symlink (using /etc/udev/rules.d/10-of-symlink.rules)
  147.         // NOTE: again, consider using something more descriptive
  148.  
  149.         // XXX replace by actual max frequency supported by device
  150.         spi-max-frequency = <48000000>;
  151.  
  152.         // XXX this selects SPI mode 3 by default, adjust as appropriate
  153.         spi-cpol;
  154.         spi-cpha;
  155.     };
  156.  
  157.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement