ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
6.03k stars 1.93k forks source link

X96 Max Plus Q1(s905x3)4G+32G Bluetooth not working #870

Closed tv4you2016 closed 1 year ago

tv4you2016 commented 1 year ago

Hello @ophub

my box is an X96 Max PlusQ1

Used DTB file: meson-sm1-x96-max-plus-q1.dtb

https://github.com/ophub/amlogic-s9xxx-armbian/issues/788#issue-1485054003

everything is working so far except the Bluetooth it will be possible to get it working

ophub commented 1 year ago

meson-sm1-x96-max-plus-q1.dtb.zip

Download, unzip, overwrite the file with the same name(/boot/dtb/amlogic/meson-sm1-x96-max-plus-q1.dtb), install Bluetooth in armbian-config, and reboot

see: dmesg | grep Bluetooth

Snip20221228_2

Snip20221228_1

tv4you2016 commented 1 year ago

image

ophub commented 1 year ago

What Bluetooth chip? Isn't cdtech 4761743, qca6174-bt?

https://github.com/ophub/firmware/tree/main/firmware/ath10k/QCA6174

tv4you2016 commented 1 year ago

I don't know what my Bluetooth chip is, how can I find out?? cdtech 4761743 is the my wifi chip

ophub commented 1 year ago

The result I found on the Internet is this, you can look for information and see what the code of the Bluetooth chip of your box is.

tv4you2016 commented 1 year ago

image

image

image

image

image

I can't connect to any bt device, I've tried the cell phone, a colona and without success

ophub commented 1 year ago

You check the information to find out what your bluetooth chip code is, just modify the code here(qca6174-bt) and compile it.

meson-sm1-x96-max-plus-q1.dts.zip

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (c) 2019 BayLibre SAS. All rights reserved.
 * Copyright (c) 2020 Christian Hewitt <christianshewitt@gmail.com>
 * Copyright (c) 2022 Flippy
 */

/dts-v1/;

#include "meson-sm1-x96-air.dts"

/ {
    compatible = "amediatech,x96-max", "amlogic,sm1";
    model = "X96 Max Plus Q1";

    aliases {
        serial0 = &uart_AO;
        ethernet0 = &ethmac;
    };

    memory@0 {
        device_type = "memory";
        reg = <0x0 0x0 0x0 0xf0800000>;
    };
};

/* This is connected to the Bluetooth module: */
&uart_A {
    status = "okay";
    pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
    pinctrl-names = "default";
    uart-has-rtscts;

    bluetooth {
        compatible = "qcom,qca6174-bt";
        enable-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
        max-speed = <2000000>;
        clocks = <&wifi32k>;
        clock-names = "lpo";
    };
};

&uart_AO {
    status = "okay";
    pinctrl-0 = <&uart_ao_a_pins>;
    pinctrl-names = "default";
};

&ethmac {
    status = "okay";
    phy-handle = <&internal_ephy>;
    phy-mode = "rmii";
};

&internal_ephy  {
    max-speed = <100>;
};
tv4you2016 commented 1 year ago

https://github.com/ophub/amlogic-s9xxx-armbian/issues/870#issuecomment-1366656950

it detects the devices but does not connect is that why?

ophub commented 1 year ago

meson-sm1-x96-max-plus-q1.dtb.zip

  1. Download, unzip, overwrite the file with the same name(/boot/dtb/amlogic/meson-sm1-x96-max-plus-q1.dtb

  2. Add qca firmware svn export https://github.com/ophub/firmware/trunk/firmware/qca /usr/lib/firmware/qca

image

According to the startup log you made above, try replacing it with qca6390 now.

compatible = "qcom,qca6390-bt";

tv4you2016 commented 1 year ago

Hello @ophub

these days I didn't have time to test but today I will test and give feedback

tv4you2016 commented 1 year ago

view https://github.com/EmuELEC/EmuELEC/issues/323#issuecomment-791497939

I opened the case of my X96 Max Plus and found the same chip Cdtech 4761743. It's interesting. According to some info I found on 4pda.ru (transalted to English from Russian, cited below): https://jbxpgt7fabdpg2ikfwmq5nxn7i--4pda-ru.translate.goog/forum/index.php?showtopic=1013103&st=140#entry103421297 I'm just going to buy this console while I'm studying the topic. I downloaded the firmware just in case. But I searched a little on the Internet about cdtech 4761743. On the site http://www.cdtech.cn/ there is information only on cdtech 4761741 on Chipsete : QCA6174A-1. Judging by the name of cdtech and QCA6174A-1, I can assume that cdtech 4761743 may have Chipsete : QCA6174A-3. on the website www.qualcomm.com about this Chipsete they write what it is: High-performance dual-band Wi-Fi 802.11ac 2x2 with MU-MIMO and Bluetooth 5.0 radio modules in a single-chip solution and it has three versions: QCA6174A-1: Supports PCIe 2.1 Low Energy (L1 Subsystem) for WLAN and UART / PCM for Bluetooth QCA6174A-3: Supports SDIO 3.0 Low Energy for WLAN and UART / PCM for Bluetooth QCA6174A-5: Supports PCIe 2.1 Low Energy (with L1 subsystem) for WLAN and USB 1.1 for Bluetooth. We already have a description of the characteristics of the X96 Max Plus on one site: from the above info, I guess Cdtech 4761743 is a product of Qualcomm solution QCA6174A. If it's correct, ath10k driver support QCA6174A device. It should be available for Linux.

FYI.

ophub commented 1 year ago

Snip20221230_1

image

The information I also read on the Internet before is QCA6174, the code of the first version is this, you did not connect to the device successfully in the test. From your dmesg log, you are QCA6390, and the system is looking for the qca/rampatch_00440302.bin driver

According to the official kernel documentation, the available options are the options in the picture above, and I see that there is a version corresponding to the log.

The qca driver is also specially added for you. https://github.com/ophub/firmware/tree/main/firmware/qca

There is no accurate description of the Bluetooth chip model. Guess is the only way to solve the problem. If not, forget it.