How to configure USART2/BT with no hardware flow control

Forums Reference, Evaluation, and Development Boards OSD32MP1-RED How to configure USART2/BT with no hardware flow control

Viewing 2 reply threads
  • Author
    Posts
    • #12871
      Farid AzharFarid Azhar
      Participant

      We are using MuRata Module LBEE5HY1MW on our custom board based on OSD32MP157. Wi-Fi is working ok, but BT fails to initialize.

      Here are the hardware pin connections between 1MW BT module and SiP:

      1MW BT module  OSD32MP157F SiP

      BT_UART_RTS => USART2_RTS (PA1)

      BT_UART_CTS => USART2_CTS (PE15)

      BT_UART_RXD => USART2_TX (PA2)

      BT_UART_TXD => USART2_RX (PA3)

      We noticed that RTS/CTS pin connection is wrong and we can not change it on the current board version.

      We want to configure the USART2/BT with “no hardware flow control” which require RTS/CTS signals has to be pulled active low.

      I’ve made following changes in kernel device-tree, removed RTS/CTS from pinctrl block and applied pull-down in bluetooth block.

      &pinctrl {

      usart2_pins_mx: usart2_mx-0 {

      pins1 {

      pinmux = <STM32_PINMUX(‘A’, 3, AF7)>; /* USART2_RX */

      bias-disable;

      };

      pins2 {

      pinmux = <STM32_PINMUX(‘A’, 2, AF7)>; /* USART2_TX */

      bias-disable;

      drive-push-pull;

      slew-rate = <0>;

      };

      };

      usart2_sleep_pins_mx: usart2_sleep_mx-0 {

      pins {

      pinmux = <STM32_PINMUX(‘A’, 2, ANALOG)>, /* USART2_TX */

      <STM32_PINMUX(‘A’, 3, ANALOG)>; /* USART2_RX */

      };

      };

      };

      /* Bluetooth */

      &usart2{

      pinctrl-names = “default”, “sleep”;

      pinctrl-0 = <&usart2_pins_mx>;

      pinctrl-1 = <&usart2_sleep_pins_mx>;

      status = “okay”;

      bluetooth {

      shutdown-gpios = <&gpioe 10 GPIO_ACTIVE_HIGH>;

      gpios = <&gpioe 15 GPIO_PULL_DOWN>, /* PE15 USART2_CTS apply pull-down*/

      <&gpioa 1 GPIO_PULL_DOWN>; /* PA1 USART2_RTS apply pull-down */

      compatible = “brcm,bcm4345c5”;

      max-speed = <3000000>;

      vbat-supply = <&v3v3_eth>;

      vddio-supply = <&v3v3>;

      };

      };

      Using following firmware from murata github.

      BCM4345C0_003.001.025.0172.0344.1MW.hcd

      cyfmac43455-sdio.1MW.txt

      cyfmac43455-sdio.bin

      cyfmac43455-sdio.1MW.clm_blob

       

      Getting following timeout error during BT initialization.

      debian@device123:~$ dmesg | grep -i blue

      [   16.922303] Bluetooth: Core ver 2.22

      [   16.928872] Bluetooth: HCI device and connection manager initialized

      [   17.020394] Bluetooth: HCI socket layer initialized

      [   17.023853] Bluetooth: L2CAP socket layer initialized

      [   17.028934] Bluetooth: SCO socket layer initialized

      [   18.018175] Bluetooth: HCI UART driver ver 2.3

      [   18.021322] Bluetooth: HCI UART protocol H4 registered

      [   18.045556] Bluetooth: HCI UART protocol Broadcom registered

      [   20.410427] Bluetooth: hci0: command 0xfc18 tx timeout

      [   28.650237] Bluetooth: hci0: BCM: failed to write update baudrate (-110)

      [   28.655497] Bluetooth: hci0: Failed to set baudrate

      [   30.730307] Bluetooth: hci0: command 0x0c03 tx timeout

      [   38.890247] Bluetooth: hci0: BCM: Reset failed (-110)

      Would appreciate any help resolving this issue.

      /Farid

    • #12887
      Neeraj Dantu
      Moderator

      Farid,

       

      Few things to check:

      1. For the device tree compatible property see https://www.kernel.org/doc/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt for the appropriate naming scheme.

      2. I would set pull-up/pull-down for pins in the pinmux section of the device tree

      3. Make sure the driver is finding the right firmware file BCM43xx.hcd and that the file is named correctly. Looks like your file name is “BCM4345C0_003.001.025.0172.0344.1MW.hcd”, not sure this is what the driver is looking for..

      4. The bootlog for a working board with Bluetooth should look something like this:

      [   13.887871] Bluetooth: HCI device and connection manager initialized

      [   13.892812] Bluetooth: HCI socket layer initialized

      [   13.897656] Bluetooth: L2CAP socket layer initialized

      [   13.956382] Bluetooth: SCO socket layer initialized

      [   14.024362] Bluetooth: HCI UART driver ver 2.3

      [   14.027388] Bluetooth: HCI UART protocol H4 registered

      [   14.065541] Bluetooth: HCI UART protocol Broadcom registered

      [   14.444703] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1

      [   14.479055] Bluetooth: hci0: BCM: chip id 94

      [   14.482570] Bluetooth: hci0: BCM: features 0x2e

      [   14.488523] Bluetooth: hci0: BCM43430A1

      [   14.490927] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0000

      [   14.498956] Bluetooth: hci0: BCM43430A1 ‘brcm/BCM43430A1.hcd’ Patch

      [   14.678856] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1

      [   14.768279] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Feb 16 2020 22:39:24 version 7.45.98.97 (r724416 CY) FWID 01-bf41ed64

      [   15.240495] Bluetooth: hci0: BCM4343WA1 37.4MHz Murata Type-1DX BT4.2-0093

      [   15.245961] Bluetooth: hci0: BCM43430A1 (001.002.009) build 0395

      This is from bootlog for OSD32MP1-RED with CY4343W chipset. Comparing this to t=your log, it does seem like there bluetooth firmware file is not being loaded. Folks at Murata should be of more help on the chipset you are using.

      Hope this helps.

      Best,

      Neeraj

       

    • #12890
      Farid AzharFarid Azhar
      Participant

      Hi Neeraj,

      Thanks for your response, it really helped.

      Setting the pull-down for RTS/CTS pins in the pinmux section fixed the problem. Bluetooth is working now.

      The BT Firmware ver is correct, I’ve checked it with Murata earlier.

      “BCM4345C0_003.001.025.0172.0344.1MW.hcd” is renamed to “BCM4345C0.hcd” on the device as expected by the driver.

      Regards,

      /Farid

       

Viewing 2 reply threads
  • You must be logged in to reply to this topic.