Interfacing Realtek 8822CE With iMX8QXPC0MEK & L5.15.71_2.2.1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interfacing Realtek 8822CE With iMX8QXPC0MEK & L5.15.71_2.2.1

777 Views
fasilyousaf
Contributor I

Hi,

I have been trying to validate WiFi & Bluetooth in iMX8QXPC0MEK with a Realtek 8822CE PCIe module. I have loaded the driver for the module as well as the firmware binary files and validated WiFi successfully. However, I am still getting some issues with Bluetooth connection. As per the User's Guide, I need to run the command for hciattach but I am getting some issues while doing this. I am still working out what the issue might be. Adding the logs below.

root@imx8qxpc0mek:~# hciattach /dev/ttyLP1 any 115200 flow
Setting TTY to N_HCI line discipline
Device setup complete
root@imx8qxpc0mek:~# [ 27.759812] Bluetooth: hci0: command 0x1003 tx timeout
[ 29.775806] Bluetooth: hci0: command 0x1001 tx timeout
[ 31.791809] Bluetooth: hci0: command 0x1009 tx timeout

root@imx8qxpc0mek:~# hciconfig hci0 up
[ 41.039808] Bluetooth: hci0: command 0x1003 tx timeout
[ 43.055814] Bluetooth: hci0: command 0x1001 tx timeout
[ 45.071806] Bluetooth: hci0: command 0x1009 tx timeout
Can't init device hci0: Connection timed out (110)

I have tried with all the available nodes in the /dev directory(ttyLP0, ttyLP1 and ttyLP2). When trying with ttyLP0, there will be no response from the device and it hangs which can be recovered only by a power cycle.  LP1 and LP2 shows the same output which is given above. Some additional dmesg logs are attached below. I am using SDK with kernel version L5.15.71_2.2.1. Any idea what this might be about? 

0 Kudos
Reply
4 Replies

763 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @fasilyousaf 

How do your modify the device tree about bluetooth?

 

0 Kudos
Reply

731 Views
fasilyousaf
Contributor I

Hi @Zhiming_Liu 

I have not made any modifications to the device tree files previously. I tried adding the following in the dts file imx8x-mek.dtsi under the lpuart1 node.

bluetooth {
    compatible = "brcm,bcm4330-bt";
    host-wakeup-gpios = <&lsio_gpio0 3 GPIO_ACTIVE_LOW>;
    shutdown-gpios = <&pca9557_a 1 GPIO_ACTIVE_LOW>;
};

The reference for the above are taken from other device tree files that had Bluetooth nodes. I am not sure these are the correct entries or not. However the following prints were shown in dmesg when I tried with this configuration.

[ 5.213076] Bluetooth: hci0: command 0x0c03 tx timeout
[ 13.213081] Bluetooth: hci0: BCM: Reset failed (-110)

 

 

0 Kudos
Reply

725 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @fasilyousaf 

You need add pinctrl about lsio_gpio0_io3 in iomux

Zhiming_Liu_0-1697010057166.png

 

0 Kudos
Reply

685 Views
fasilyousaf
Contributor I

Hi @Zhiming_Liu 

Sorry for the delayed reply. As you suggested I have added pinctrl for the GPIO. The changes I have made to the devicetree are as follows:

&lpuart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_lpuart1>, <&pinctrl_lpuart1_lsio_gpio>;
    resets = <&modem_reset>;
    status = "okay";
    bluetooth {
        compatible = "brcm,bcm4330-bt";
        host-wakeup-gpios = <&lsio_gpio0 3 GPIO_ACTIVE_LOW>;
        shutdown-gpios = <&pca9557_a 1 GPIO_ACTIVE_LOW>;
    };

};

pinctrl changes are:

pinctrl_lpuart1_lsio_gpio: lpuart1_lsio_gpiogrp {
    fsl,pins = <
        IMX8QXP_ESAI0_SCKT_LSIO_GPIO0_IO03 0x41
    >;
};

The parts in blue color are added by me. The dts file I am editing is imx8x-mek.dtsi. I have referred the schematics as well as i.MX 8DualX/8DualXPlus/8QuadXPlus Applications Processor Reference Manual.

The results are the same. I am still getting the timeout error mentioned in the original post. Is there any correction I could make here? I am not at all sure that the values, pin numbers and names are selected are correct or not. Is there any documents I can refer which mention the Bluetooth device tree modification for this platform?

 

0 Kudos
Reply