Commit Graph
20 Commits
Author SHA1 Message Date
Andy ShevchenkoandFelix Fietkau 02846a5d0f wifi: mt76: mt7915: Remove unused of_gpio.h
of_gpio.h is deprecated and subject to remove.
The driver doesn't use it, simply remove the unused header.

Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-04-03 12:58:27 +02:00
Peter ChiuandFelix Fietkau f771881604 wifi: mt76: mt7915: update mt798x_wmac_adie_patch_7976
Add support for a newer ADIE version

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2024-01-18 16:15:43 +01:00
Jinjie RuanandFelix Fietkau 8ccc841111 wifi: mt76: Use PTR_ERR_OR_ZERO() to simplify code
Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
simplify code.

Signed-off-by: Jinjie Ruan <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-09-16 14:12:29 +02:00
Alexander CouzensandFelix Fietkau eeb60eb9a5 wifi: mt76: mt7915: add support for MT7981 [sync with upstream]
Add support for the MediaTek MT7981 SoC which is similar to the MT7986
but with a newer IP cores and only 2x ARM Cortex-A53 instead of 4x.
Unlike MT7986 the MT7981 can only connect a single wireless frontend,
usually MT7976 is used for DBDC.

Signed-off-by: Alexander Couzens <[email protected]>
Signed-off-by: Daniel Golle <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-06-22 17:51:47 +02:00
Alexander CouzensandDaniel Golle 969b7b5ebd wifi: mt76: mt7915: add support for MT7981
Add support for the MediaTek MT7981 SoC which is similar to the MT7986
but with a newer IP cores and only 2x ARM Cortex-A53 instead of 4x.
Unlike MT7986 the MT7981 can only connect a single wireless frontend,
usually MT7976 is used for DBDC.

Signed-off-by: Alexander Couzens <[email protected]>
Signed-off-by: Daniel Golle <[email protected]>
2023-05-13 12:17:26 +02:00
Lorenz BrunandFelix Fietkau ab2d3650a4 wifi: mt76: mt7915: expose device tree match table
On MT7986 the WiFi driver currently does not get automatically loaded,
requiring manual modprobing because the device tree compatibles are not
exported into metadata.

Add the missing MODULE_DEVICE_TABLE macro to fix this.

Fixes: 99ad32a4ca3a2 ("mt76: mt7915: add support for MT7986")
Signed-off-by: Lorenz Brun <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-02-28 11:19:52 +01:00
Peter ChiuandFelix Fietkau ddbf4e933d wifi: mt76: mt7915: set sku initial value to zero
Set sku initial value before mcu starts to prevent mcu from getting an
invalid value.

Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2023-01-23 10:50:59 +01:00
Wang YufenandFelix Fietkau 194cb33928 mt76: mt7915: add missing of_node_put()
Add missing of_node_put() after of_reserved_mem_lookup()

Fixes: 99ad32a4ca3a ("mt76: mt7915: add support for MT7986")
Signed-off-by: Wang Yufen <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-10 13:11:04 +01:00
Felix Fietkau ec46d7486a sync with upstream
Signed-off-by: Felix Fietkau <[email protected]>
2022-12-10 13:11:04 +01:00
Lorenzo BianconiandFelix Fietkau 584a96ec4a wifi: mt76: mt7915: enable wed for mt7986-wmac chipset
Enable WED tx support for mt7986-wmac chipset available on mt7986 board.

Tested-by: Daniel Golle <[email protected]>
Co-developed-by: Bo Jiao <[email protected]>
Signed-off-by: Bo Jiao <[email protected]>
Co-developed-by: Sujuan Chen <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-10-01 14:59:42 +02:00
Ryder LeeandFelix Fietkau 8152406768 mt76: mt7915: move MT_INT_MASK_CSR to init.c
To avoid redundant MT_INT_MASK_CSR settings.

Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-05-05 14:27:56 +02:00
Peter ChiuandFelix Fietkau e98f588150 mt76: mt7915: update mt7986 patch in mt7986_wmac_adie_patch_7976()
Update mt7976 adie patch for different adie version.

Reviewed-by: Ryder Lee <[email protected]>
Reviewed-by: Shayne Chen <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-05-05 12:52:34 +02:00
Lorenzo BianconiandFelix Fietkau 079e41dc71 mt76: mt7915: configure soc clocks in mt7986_wmac_init
Configure mt7986 wmac soc clocks in mt7986_wmac_init routine.

Tested-by: Peter Chiu <[email protected]>
Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-05-04 12:46:19 +02:00
Lorenzo BianconiandFelix Fietkau ec0e9f4da3 mt76: mt7915: fix possible uninitialized pointer dereference in mt7986_wmac_gpio_setup
Add default case for type switch in mt7986_wmac_gpio_setup routine in
order to avoid a possible uninitialized pointer dereference.

Fixes: 99ad32a4ca3a2 ("mt76: mt7915: add support for MT7986")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-04-07 12:22:27 +02:00
Peter ChiuandFelix Fietkau 2accb74e6b mt76: mt7915: fix using null pointer when wfsys on
Signed-off-by: Felix Fietkau <[email protected]>
2022-04-07 12:11:11 +02:00
Felix Fietkau 6b1efcd729 mt76: mt7915: fix wfsys reset regression
Reset needs to be performed before hif2 initialization

Signed-off-by: Felix Fietkau <[email protected]>
2022-03-27 21:18:58 +02:00
Dan CarpenterandFelix Fietkau 9fee1faf60 mt76: mt7915: check for devm_pinctrl_get() failure
If devm_pinctrl_get() fails then it leads to an error pointer
dereference.  Add a check to prevent that.

Fixes: 99ad32a4ca3a ("mt76: mt7915: add support for MT7986")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-03-14 15:53:26 +01:00
Felix Fietkau 4f43095428 mt76: mt7915: only use u32_get_bits with constant value
Fixes invalid unresolved symbols when built on ARM and avoids unnecessary
divisions

Signed-off-by: Felix Fietkau <[email protected]>
2022-02-23 11:33:24 +01:00
Bo JiaoandFelix Fietkau bbbbafb67b mt76: mt7915: fix compiler warning
fix warning: variable 'temp' set but not used and
cast from pointer to integer of different size

Fixes: 91eeaef2523f ("mt76: mt7915: add support for MT7986")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Bo Jiao <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-02-15 13:56:25 +01:00
Bo JiaoandFelix Fietkau 6ef22f4dc4 mt76: mt7915: add support for MT7986
This adds MT7986 SoC integrated multi-band 4x4 WiFi 6/6E.

Co-developed-by: Peter Chiu <[email protected]>
Signed-off-by: Peter Chiu <[email protected]>
Co-developed-by: Ryder Lee <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Sujuan Chen <[email protected]>
Signed-off-by: Bo Jiao <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
2022-02-14 15:08:04 +01:00