Skip to content

Instantly share code, notes, and snippets.

@zerog2k
Created July 15, 2023 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zerog2k/75e6e27aeef0494504ae9d56bf690097 to your computer and use it in GitHub Desktop.
Save zerog2k/75e6e27aeef0494504ae9d56bf690097 to your computer and use it in GitHub Desktop.
Downloads QCA9377 sdio wifi & bluetooth uart firmware for Armbian. Run as root.
#!/bin/bash
echo "Downloading QCA9377 firmware..."
# qca9377-sdio-wifi firmware
mkdir -p /lib/firmware/ath10k/QCA9377/hw1.0/
cd /lib/firmware/ath10k/QCA9377/hw1.0/
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA9377/hw1.0/board.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA9377/hw1.0/board-2.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA9377/hw1.0/firmware-sdio-5.bin
ln -s firmware-sdio-5.bin firmware-5.bin
# qca9377-bt firmware
cd /lib/firmware/qca/
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/rampatch_00230302.bin
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/nvm_00230302.bin
cd
echo "Reboot to take effect."
@ortegafernando
Copy link

Hi, I have a Mini MXIII II that I am trying to make work with Armbian. I have managed to get almost all working by editing a bit this dts file: meson-gxl-s905x-khadas-vim.dtb
But I have still bluetooth not working. Wifi yes.
Inside I have seen a LMT8830 ic.

I have seen several of your post, is this script working? how could I get the correct information to change this piece of actual dts file?
How is it possible to have wifi working but BT not? Thanks a lot

			serial@84c0 {
				compatible = "amlogic,meson-gx-uart";
				reg = <0x00 0x84c0 0x00 0x18>;
				interrupts = <0x00 0x1a 0x01>;
				status = "okay";
				fifo-size = <0x80>;
				clocks = <0x12 0x03 0x1a 0x12>;
				clock-names = "xtal\0pclk\0baud";
				pinctrl-0 = <0x13 0x14>;
				pinctrl-names = "default";
				uart-has-rtscts;
				phandle = <0x54>;

				bluetooth {
					compatible = "brcm,bcm43438-bt";
					shutdown-gpios = <0x15 0x60 0x00>;
					max-speed = <0x1e8480>;
					clocks = <0x16>;
					clock-names = "lpo";
				};
			};

@zerog2k
Copy link
Author

zerog2k commented Jan 9, 2024

A change was approved to armbian edge (6.4+ kernels) that adds /boot/dtb/amlogic/meson-gxm-mini-m8s-pro.dtb to the build.
It should be in board type aml-s9xx-box, for edge kernel.
Also with that DTB, the firmware was added to recent armbian-firmware releases, so correct firmware should load automatically. So if using latest (edge) release of armbian for aml-s9xx-box board type, with fdt meson-gxm-mini-m8s-pro.dtb, it should just work

@zerog2k
Copy link
Author

zerog2k commented Jan 9, 2024

sorry, maybe you have a different version of hardware, but QCA9377/LTM8830
The issue is that the correct fw for QCA9377 bt doesnt load unless

				bluetooth {
					compatible = "brcm,bcm43438-bt";

is actually

				bluetooth {
					compatible = "qcom,qca9377-bt";

i.e. https://github.com/armbian/build/pull/6014/files#diff-8ef15df5363e890e27dba320d674e7fd463f635c99cd049db1e9a15fd55e9122R85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment