Skip to contentSkip to conversation

linux-firmware: add options to install more Mediatek firmwares.

PATCH New Nicolas Cavallari 3 participants 5 messages Jan 4, 2019 – Jun 23, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-firmware: add options to install more Mediatek firmwares.

Add option to install the MT7650 bluetooth firmware and the MT76x2e wifi firmware.

---
 package/linux-firmware/Config.in         | 10 ++++++++++
 package/linux-firmware/linux-firmware.mk | 12 ++++++++++++
 2 files changed, 22 insertions(+)
package/linux-firmware/Config.in +10 -0
index dcc8d4bade..3efb3d9050 100644
@@ -59,6 +59,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174A_BT
 	help
 	  Firmware files for QCA Rome 6174A bluetooth support.
 
+config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7650
+	bool "MediaTek MT7650"
+	help
+	  Firmware files for MediaTek MT7650 bluetooth support
+
 endmenu # Bluetooth
 
 menu "WiFi firmware"
@@ -242,6 +247,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U
 	help
 	  MediaTek MT7601U
 
+config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT76X2E
+	bool "MediaTek MT76x2e"
+	help
+	  MediaTek MT76x2e
+
 config BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174
 	bool "Qualcomm Atheros 6174"
 	help
package/linux-firmware/linux-firmware.mk +12 -0
index ee02c7a030..c238d9f01b 100644
@@ -243,6 +243,18 @@ LINUX_FIRMWARE_FILES += mt7601u.bin
 LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink_a_mediatek_company_firmware
 endif
 
+# MT7650
+ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7650),y)
+LINUX_FIRMWARE_FILES += mt7650.bin
+LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink_a_mediatek_company_firmware
+endif
+
+# MT76x2e
+ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT76X2E),y)
+LINUX_FIRMWARE_FILES += mt7662.bin mt7662_rom_patch.bin
+LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink_a_mediatek_company_firmware
+endif
+
 # qca6174
 ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174),y)
 LINUX_FIRMWARE_FILES += ath10k/QCA6174
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 linux-firmware: add options to install more Mediatek firmwares.

Nicolas, All,

On 2019-01-04 16:49 +0100, Nicolas Cavallari spake thusly:

Quoted 26 lines

Add option to install the MT7650 bluetooth firmware and the MT76x2e wifi firmware.

---
 package/linux-firmware/Config.in         | 10 ++++++++++
 package/linux-firmware/linux-firmware.mk | 12 ++++++++++++
 2 files changed, 22 insertions(+)
package/linux-firmware/Config.in +5 -0
index dcc8d4bade..3efb3d9050 100644
@@ -59,6 +59,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174A_BT
 	help
 	  Firmware files for QCA Rome 6174A bluetooth support.
 
+config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7650
+	bool "MediaTek MT7650"
+	help
+	  Firmware files for MediaTek MT7650 bluetooth support
+
 endmenu # Bluetooth
 
 menu "WiFi firmware"

package/linux-firmware/Config.in config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U · line 253

Quoted 7 lines
package/linux-firmware/Config.in +4 -0
@@ -242,6 +247,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U
 	help
 	  MediaTek MT7601U
 
+config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT76X2E
+	bool "MediaTek MT76x2e"
+	help
+	  MediaTek MT76x2e

We're trying to limit the number of options in each category, and given there already is a wifi mediatek entry above, can we just make it install all the mediatek wifi firmwares?

You'll need to:

- rename the option to BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_WIFI_MT7xxx; note that I added 'WIfI' in the option name, because we can forsee we'll have the same issue with BT firmwares, as they too are named mt7*;

- add the old BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U option to

    Config.in.legacy, and select the new one;

- use the new option in linux-firmware.mk to install all the WiFi firmware blobs.

Thanks! :-)

Regards,
Yann E. MORIN.

Quoted 29 lines
package/linux-firmware/Config.in +0 -0
 config BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174
 	bool "Qualcomm Atheros 6174"
 	help
package/linux-firmware/linux-firmware.mk +12 -0
index ee02c7a030..c238d9f01b 100644
@@ -243,6 +243,18 @@ LINUX_FIRMWARE_FILES += mt7601u.bin
 LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink_a_mediatek_company_firmware
 endif
 
+# MT7650
+ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7650),y)
+LINUX_FIRMWARE_FILES += mt7650.bin
+LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink_a_mediatek_company_firmware
+endif
+
+# MT76x2e
+ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT76X2E),y)
+LINUX_FIRMWARE_FILES += mt7662.bin mt7662_rom_patch.bin
+LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink_a_mediatek_company_firmware
+endif
+
 # qca6174
 ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_6174),y)
 LINUX_FIRMWARE_FILES += ath10k/QCA6174
Signature · 1 line
2.20.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 linux-firmware: add options to install more Mediatek firmwares.

Hello,

Quoted 3 lines · Yann E. MORIN

We're trying to limit the number of options in each category, and given there already is a wifi mediatek entry above, can we just make it install all the mediatek wifi firmwares?

I'm not sure I agree here. For other devices, we have a separate option for each device. In addition, when you have a given WiFi device in a system, you most likely only have this one, so the need for installing one specific firmware is kind of the normal situationo.

Quoted 4 lines

- rename the option to BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_WIFI_MT7xxx; note that I added 'WIfI' in the option name, because we can forsee we'll have the same issue with BT firmwares, as they too are named mt7*;

If you have a WiFi/BT combo chip, it's pretty likely that you will want to install both the WiFi and BT firmwares, so having a single option for both doesn't look that crazy.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 linux-firmware: add options to install more Mediatek firmwares.

Quoted 9 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · Yann E. MORIN

We're trying to limit the number of options in each category, and given there already is a wifi mediatek entry above, can we just make it install all the mediatek wifi firmwares?

I'm not sure I agree here.

(I probably should have waited before writing a patch doing exactly that, hopefully i didn't tested it

I will just mention that "all the mediatek firmwares" also include more files in linux-firmware's mediatek/ directory. But the situation there is more complicated. the mt76/btmtk drivers are still under active development, and they will stop using some firmware files.)

Quoted 8 lines
Quoted 4 lines

- rename the option to BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_WIFI_MT7xxx; note that I added 'WIfI' in the option name, because we can forsee we'll have the same issue with BT firmwares, as they too are named mt7*;

If you have a WiFi/BT combo chip, it's pretty likely that you will want to install both the WiFi and BT firmwares, so having a single option for both doesn't look that crazy.

Well, currently the menuconfig for bluetooth and wifi are splitted.

And in this case, there is no firmware that is specific to a WiFi/BT combo chip. The mt7662.bin file is used by both wifi and wifi/bt combos and so is mt7650.bin for bt and wifi/bt.

#4 lore raw

PATCH 1/1 linux-firmware: add options to install more Mediatek firmwares.

In reply to Nicolas Cavallari
Quoted 8 lines · On Fri, 4 Jan 2019 16:49:51 +0100 Nicolas Cavallari…

Add option to install the MT7650 bluetooth firmware and the MT76x2e wifi firmware.

---
 package/linux-firmware/Config.in         | 10 ++++++++++
 package/linux-firmware/linux-firmware.mk | 12 ++++++++++++
 2 files changed, 22 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com