mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #8943 from chewitt/amlogic-upstream
amlogic: bump kernel and misc. bits
This commit is contained in:
commit
11c322ea93
@ -2,8 +2,8 @@
|
||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="brcmfmac_sdio-firmware"
|
||||
PKG_VERSION="d4382f99141ef7bc0a9a9e65ab5fa3d90e8fe968"
|
||||
PKG_SHA256="2bbe39941c97ae3713f219002e5d6d692e3d47fc167fe642be1d9f2f014d4f05"
|
||||
PKG_VERSION="88e46425ef489513c0b8bf7c2747d262367be1cc"
|
||||
PKG_SHA256="53a264536cd9531e94117f8fe2906bcb85efd201612f5f7e467bf4fbf2d6d864"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://github.com/LibreELEC/brcmfmac_sdio-firmware"
|
||||
PKG_URL="https://github.com/LibreELEC/brcmfmac_sdio-firmware/archive/${PKG_VERSION}.tar.gz"
|
||||
|
@ -16,8 +16,8 @@ PKG_PATCH_DIRS="${LINUX}"
|
||||
|
||||
case "${LINUX}" in
|
||||
amlogic)
|
||||
PKG_VERSION="e8f897f4afef0031fe618a8e94127a0934896aba" # 6.8.0
|
||||
PKG_SHA256="52608771cc42196f0a7a71a93270a27ca5f7ba1d9280fb398e521b0620a7a3ac"
|
||||
PKG_VERSION="1b4861e32e461b6fae14dc49ed0f1c7f20af5146" # 6.9.3
|
||||
PKG_SHA256="2502f1858175fc03ba38198df6b7ac62e167c9d2ee9b08b157bff66c73130e2c"
|
||||
PKG_URL="https://github.com/torvalds/linux/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_SOURCE_NAME="linux-${LINUX}-${PKG_VERSION}.tar.gz"
|
||||
PKG_PATCH_DIRS="default"
|
||||
|
@ -17,6 +17,8 @@ rtw88/rtw8822c_fw.bin
|
||||
rtw88/rtw8822c_wow_fw.bin
|
||||
rtl_bt/rtl8723bs_fw.bin
|
||||
rtl_bt/rtl8723bs_config-OBDA8723.bin
|
||||
rtl_bt/rtl8761bu_config.bin
|
||||
rtl_bt/rtl8761bu_fw.bin
|
||||
rtl_bt/rtl8821c_config.bin
|
||||
rtl_bt/rtl8821c_fw.bin
|
||||
rtl_bt/rtl8822cs_config.bin
|
||||
|
@ -1,7 +1,7 @@
|
||||
From fa91cacc8756959b9b04b2cd3d369888b9a19e82 Mon Sep 17 00:00:00 2001
|
||||
From 623a57187a4893a78bf818f7852b0c4e40936b30 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sat, 13 Apr 2019 05:41:51 +0000
|
||||
Subject: [PATCH 01/53] LOCAL: set meson-gx cma pool to 896MB
|
||||
Subject: [PATCH 01/69] LOCAL: set meson-gx cma pool to 896MB
|
||||
|
||||
This change sets the CMA pool to a larger 896MB! value for vdec use
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
From db61fd1f5ac1a4b39f7699ef5583db1464f2a419 Mon Sep 17 00:00:00 2001
|
||||
From 927f228f7bff9640c8f848202401a24be426c8b7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 14 Aug 2019 19:58:14 +0000
|
||||
Subject: [PATCH 02/53] LOCAL: set meson-g12 cma pool to 896MB
|
||||
Subject: [PATCH 02/69] LOCAL: set meson-g12 cma pool to 896MB
|
||||
|
||||
This change sets the CMA pool to a larger 896MB! value for vdec use
|
||||
|
||||
@ -11,7 +11,7 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
index ff68b911b729..f7f8df88d464 100644
|
||||
index 9d5eab6595d0..a960d07f9af3 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
@@ -117,7 +117,7 @@ secmon_reserved_bl32: secmon@5300000 {
|
||||
|
@ -1,7 +1,7 @@
|
||||
From ee6ecf00c056184730623b0a09f8e1ce0adb3d24 Mon Sep 17 00:00:00 2001
|
||||
From 1cb9ad61f678caced45a9b84f19e55fb97add9d1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sat, 13 Apr 2019 05:45:18 +0000
|
||||
Subject: [PATCH 03/53] LOCAL: arm64: fix Kodi sysinfo CPU information
|
||||
Subject: [PATCH 03/69] LOCAL: arm64: fix Kodi sysinfo CPU information
|
||||
|
||||
This allows the CPU information to show in the Kodi sysinfo screen, e.g.
|
||||
|
||||
@ -13,10 +13,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
|
||||
index 47043c0d95ec..03410a9fac77 100644
|
||||
index 09eeaa24d456..b7bf422ce536 100644
|
||||
--- a/arch/arm64/kernel/cpuinfo.c
|
||||
+++ b/arch/arm64/kernel/cpuinfo.c
|
||||
@@ -190,8 +190,7 @@ static int c_show(struct seq_file *m, void *v)
|
||||
@@ -205,8 +205,7 @@ static int c_show(struct seq_file *m, void *v)
|
||||
* "processor". Give glibc what it expects.
|
||||
*/
|
||||
seq_printf(m, "processor\t: %d\n", i);
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 18375f3ce86dcec9a07f711b696aefb6fcb79829 Mon Sep 17 00:00:00 2001
|
||||
From bd0e5a715d103bb88d73ae280655a849f7762ecc Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Thu, 3 Nov 2016 15:29:23 +0100
|
||||
Subject: [PATCH 04/53] LOCAL: arm64: meson: add Amlogic Meson GX PM Suspend
|
||||
Subject: [PATCH 04/69] LOCAL: arm64: meson: add Amlogic Meson GX PM Suspend
|
||||
|
||||
The Amlogic Meson GX SoCs uses a non-standard argument to the
|
||||
PSCI CPU_SUSPEND call to enter system suspend.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 346f8f56697d21901ca2c5d48c7beecc654131c0 Mon Sep 17 00:00:00 2001
|
||||
From 2e207659c996f765749e32d3ff932ab673965b42 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Thu, 3 Nov 2016 15:29:25 +0100
|
||||
Subject: [PATCH 05/53] LOCAL: arm64: dts: meson: add support for GX PM and
|
||||
Subject: [PATCH 05/69] LOCAL: arm64: dts: meson: add support for GX PM and
|
||||
Virtual RTC
|
||||
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
|
@ -1,7 +1,7 @@
|
||||
From e288d4c79fb45f1af148b279bcfd091f770e9070 Mon Sep 17 00:00:00 2001
|
||||
From 4c9bfede767b2c1e1ff43eda7fbb2b9b7d938761 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Thu, 21 Jan 2021 01:35:36 +0000
|
||||
Subject: [PATCH 06/53] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
|
||||
Subject: [PATCH 06/69] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
|
||||
Khadas VIM
|
||||
|
||||
Add aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 1ebc6f1a726d896fb8c72ed5e86423ad2485eea1 Mon Sep 17 00:00:00 2001
|
||||
From 36f210099326720a267df7108ef0ea7fb9ae88a7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sat, 6 Nov 2021 13:01:08 +0000
|
||||
Subject: [PATCH 07/53] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
|
||||
Subject: [PATCH 07/69] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to
|
||||
Khadas VIM2
|
||||
|
||||
Add aliases to ensure the vrtc time (which normally proves first) is /dev/rtc1
|
||||
@ -13,7 +13,7 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
index 860f307494c5..cee27e7222c8 100644
|
||||
index 07e7c3bedea0..a03269a00486 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
|
||||
@@ -18,6 +18,8 @@ / {
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 83e3e72c22bd9261d248c2dda723d5fb3abd4ab9 Mon Sep 17 00:00:00 2001
|
||||
From 2ca029008c662f81a80a7e694229d1950efe0d9a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 1 Feb 2021 19:27:40 +0000
|
||||
Subject: [PATCH 08/53] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to Minix
|
||||
Subject: [PATCH 08/69] LOCAL: arm64: dts: meson: add rtc/vrtc aliases to Minix
|
||||
NEO U9-H
|
||||
|
||||
Add node aliases to prevent meson-vrtc from claiming /dev/rtc0
|
||||
|
@ -1,7 +1,7 @@
|
||||
From b419174ce9cd28aa55673140319aa4317922d0d7 Mon Sep 17 00:00:00 2001
|
||||
From 465c8694439773f00bc9088e41354e6d348366ab Mon Sep 17 00:00:00 2001
|
||||
From: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Date: Sun, 17 Apr 2022 04:37:48 +0000
|
||||
Subject: [PATCH 09/53] LOCAL: ASoC: meson: assign internal PCM
|
||||
Subject: [PATCH 09/69] LOCAL: ASoC: meson: assign internal PCM
|
||||
chmap/ELD/IEC958 kctls to device 0
|
||||
|
||||
On SoC sound devices utilizing codec2codec DAI links with an HDMI codec the kctls
|
||||
@ -24,10 +24,10 @@ Tested-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
|
||||
index 41103e5c43ce..0db7fe63911e 100644
|
||||
index 6f73b3c2c205..4653351cc4b9 100644
|
||||
--- a/sound/core/pcm_lib.c
|
||||
+++ b/sound/core/pcm_lib.c
|
||||
@@ -2581,7 +2581,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
|
||||
@@ -2577,7 +2577,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
|
||||
knew.name = "Playback Channel Map";
|
||||
else
|
||||
knew.name = "Capture Channel Map";
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 9787871fe1e00af9f915237be4474a3b1f1e0887 Mon Sep 17 00:00:00 2001
|
||||
From 1bdbf76d2a7e0c715469d3bc67f71f8c41c323f1 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Thu, 5 Jan 2023 15:16:46 +0000
|
||||
Subject: [PATCH 10/53] LOCAL: media: meson: vdec: disable MPEG1/MPEG2 hardware
|
||||
Subject: [PATCH 10/69] LOCAL: media: meson: vdec: disable MPEG1/MPEG2 hardware
|
||||
decoding
|
||||
|
||||
The MPEG1/2 decoder is broken and nobody has volunteered to poke
|
||||
|
@ -0,0 +1,43 @@
|
||||
From b51a3b582d9626e5b896141c9b9edbf0d49d147d Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 25 Apr 2024 21:09:21 +0300
|
||||
Subject: [PATCH 11/69] FROMGIT(6.10): wifi: rtlwifi: rtl8192de: Fix 5 GHz TX
|
||||
power
|
||||
|
||||
Different channels have different TX power settings. rtl8192de is using
|
||||
the TX power setting from the wrong channel in the 5 GHz band because
|
||||
_rtl92c_phy_get_rightchnlplace expects an array which includes all the
|
||||
channel numbers, but it's using an array which includes only the 5 GHz
|
||||
channel numbers.
|
||||
|
||||
Use the array channel_all (defined in rtl8192de/phy.c) instead of
|
||||
the incorrect channel5g (defined in core.c).
|
||||
|
||||
Tested only with rtl8192du, which will use the same TX power code.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://msgid.link/c7653517-cf88-4f57-b79a-8edb0a8b32f0@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
|
||||
index d835a27429f0..56b5cd032a9a 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/phy.c
|
||||
@@ -892,8 +892,8 @@ static u8 _rtl92c_phy_get_rightchnlplace(u8 chnl)
|
||||
u8 place = chnl;
|
||||
|
||||
if (chnl > 14) {
|
||||
- for (place = 14; place < ARRAY_SIZE(channel5g); place++) {
|
||||
- if (channel5g[place] == chnl) {
|
||||
+ for (place = 14; place < ARRAY_SIZE(channel_all); place++) {
|
||||
+ if (channel_all[place] == chnl) {
|
||||
place++;
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,31 +0,0 @@
|
||||
From f376bb7ba1afbca87fba7b98f31697cba6776b1b Mon Sep 17 00:00:00 2001
|
||||
From: Tomeu Vizoso <tomeu@tomeuvizoso.net>
|
||||
Date: Mon, 16 Oct 2023 10:02:03 +0200
|
||||
Subject: [PATCH 11/53] FROMGIT(6.9): arm64: dts: meson-g12-common: Set the
|
||||
rates of the clocks for the NPU
|
||||
|
||||
Otherwise they are left at 24MHz and the NPU runs very slowly.
|
||||
|
||||
Signed-off-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
|
||||
Suggested-by: Lucas Stach <l.stach@pengutronix.de>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
index f7f8df88d464..a960d07f9af3 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
|
||||
@@ -2502,6 +2502,9 @@ npu: npu@ff100000 {
|
||||
clocks = <&clkc CLKID_NNA_CORE_CLK>,
|
||||
<&clkc CLKID_NNA_AXI_CLK>;
|
||||
clock-names = "core", "bus";
|
||||
+ assigned-clocks = <&clkc CLKID_NNA_CORE_CLK>,
|
||||
+ <&clkc CLKID_NNA_AXI_CLK>;
|
||||
+ assigned-clock-rates = <800000000>, <800000000>;
|
||||
resets = <&reset RESET_NNA>;
|
||||
status = "disabled";
|
||||
};
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From 93f781bf3955bd65a73ad8878c6f76439cdd4aaf Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 25 Apr 2024 21:12:38 +0300
|
||||
Subject: [PATCH 12/69] FROMGIT(6.10): wifi: rtlwifi: rtl8192de: Fix low speed
|
||||
with WPA3-SAE
|
||||
|
||||
Some (all?) management frames are incorrectly reported to mac80211 as
|
||||
decrypted when actually the hardware did not decrypt them. This results
|
||||
in speeds 3-5 times lower than expected, 20-30 Mbps instead of 100
|
||||
Mbps.
|
||||
|
||||
Fix this by checking the encryption type field of the RX descriptor.
|
||||
rtw88 does the same thing.
|
||||
|
||||
This fix was tested only with rtl8192du, which will use the same code.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://msgid.link/4d600435-f0ea-46b0-bdb4-e60f173da8dd@gmail.com
|
||||
---
|
||||
.../net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 5 ++---
|
||||
.../net/wireless/realtek/rtlwifi/rtl8192de/trx.h | 14 ++++++++++++++
|
||||
2 files changed, 16 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
index 192982ec8152..30b262c3f6d0 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
@@ -413,7 +413,8 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
stats->icv = (u16)get_rx_desc_icv(pdesc);
|
||||
stats->crc = (u16)get_rx_desc_crc32(pdesc);
|
||||
stats->hwerror = (stats->crc | stats->icv);
|
||||
- stats->decrypted = !get_rx_desc_swdec(pdesc);
|
||||
+ stats->decrypted = !get_rx_desc_swdec(pdesc) &&
|
||||
+ get_rx_desc_enc_type(pdesc) != RX_DESC_ENC_NONE;
|
||||
stats->rate = (u8)get_rx_desc_rxmcs(pdesc);
|
||||
stats->shortpreamble = (u16)get_rx_desc_splcp(pdesc);
|
||||
stats->isampdu = (bool)(get_rx_desc_paggr(pdesc) == 1);
|
||||
@@ -426,8 +427,6 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
rx_status->band = hw->conf.chandef.chan->band;
|
||||
if (get_rx_desc_crc32(pdesc))
|
||||
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
- if (!get_rx_desc_swdec(pdesc))
|
||||
- rx_status->flag |= RX_FLAG_DECRYPTED;
|
||||
if (get_rx_desc_bw(pdesc))
|
||||
rx_status->bw = RATE_INFO_BW_40;
|
||||
if (get_rx_desc_rxht(pdesc))
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h
|
||||
index 2992668c156c..f189ee2d9be2 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h
|
||||
@@ -14,6 +14,15 @@
|
||||
#define USB_HWDESC_HEADER_LEN 32
|
||||
#define CRCLENGTH 4
|
||||
|
||||
+enum rtl92d_rx_desc_enc {
|
||||
+ RX_DESC_ENC_NONE = 0,
|
||||
+ RX_DESC_ENC_WEP40 = 1,
|
||||
+ RX_DESC_ENC_TKIP_WO_MIC = 2,
|
||||
+ RX_DESC_ENC_TKIP_MIC = 3,
|
||||
+ RX_DESC_ENC_AES = 4,
|
||||
+ RX_DESC_ENC_WEP104 = 5,
|
||||
+};
|
||||
+
|
||||
/* macros to read/write various fields in RX or TX descriptors */
|
||||
|
||||
static inline void set_tx_desc_pkt_size(__le32 *__pdesc, u32 __val)
|
||||
@@ -246,6 +255,11 @@ static inline u32 get_rx_desc_drv_info_size(__le32 *__pdesc)
|
||||
return le32_get_bits(*__pdesc, GENMASK(19, 16));
|
||||
}
|
||||
|
||||
+static inline u32 get_rx_desc_enc_type(__le32 *__pdesc)
|
||||
+{
|
||||
+ return le32_get_bits(*__pdesc, GENMASK(22, 20));
|
||||
+}
|
||||
+
|
||||
static inline u32 get_rx_desc_shift(__le32 *__pdesc)
|
||||
{
|
||||
return le32_get_bits(*__pdesc, GENMASK(25, 24));
|
||||
--
|
||||
2.34.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,174 @@
|
||||
From 91b01523927c0e78c0c53c0c8347ee9d194d34f0 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 25 Apr 2024 21:13:12 +0300
|
||||
Subject: [PATCH 13/69] FROMGIT(6.10): wifi: rtlwifi: rtl8192de: Fix endianness
|
||||
issue in RX path
|
||||
|
||||
Structs rx_desc_92d and rx_fwinfo_92d will not work for big endian
|
||||
systems.
|
||||
|
||||
Delete rx_desc_92d because it's big and barely used, and instead use
|
||||
the get_rx_desc_rxmcs and get_rx_desc_rxht functions, which work on big
|
||||
endian systems too.
|
||||
|
||||
Fix rx_fwinfo_92d by duplicating four of its members in the correct
|
||||
order.
|
||||
|
||||
Tested only with RTL8192DU, which will use the same code.
|
||||
Tested only on a little endian system.
|
||||
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://msgid.link/698463da-5ef1-40c7-b744-fa51ad847caf@gmail.com
|
||||
---
|
||||
.../wireless/realtek/rtlwifi/rtl8192de/trx.c | 16 ++---
|
||||
.../wireless/realtek/rtlwifi/rtl8192de/trx.h | 65 ++-----------------
|
||||
2 files changed, 15 insertions(+), 66 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
index 30b262c3f6d0..cbc7b4dbea9a 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
@@ -35,7 +35,7 @@ static long _rtl92de_translate_todbm(struct ieee80211_hw *hw,
|
||||
|
||||
static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
struct rtl_stats *pstats,
|
||||
- struct rx_desc_92d *pdesc,
|
||||
+ __le32 *pdesc,
|
||||
struct rx_fwinfo_92d *p_drvinfo,
|
||||
bool packet_match_bssid,
|
||||
bool packet_toself,
|
||||
@@ -50,8 +50,10 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
u8 i, max_spatial_stream;
|
||||
u32 rssi, total_rssi = 0;
|
||||
bool is_cck_rate;
|
||||
+ u8 rxmcs;
|
||||
|
||||
- is_cck_rate = RX_HAL_IS_CCK_RATE(pdesc->rxmcs);
|
||||
+ rxmcs = get_rx_desc_rxmcs(pdesc);
|
||||
+ is_cck_rate = rxmcs <= DESC_RATE11M;
|
||||
pstats->packet_matchbssid = packet_match_bssid;
|
||||
pstats->packet_toself = packet_toself;
|
||||
pstats->packet_beacon = packet_beacon;
|
||||
@@ -157,8 +159,8 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
pstats->rx_pwdb_all = pwdb_all;
|
||||
pstats->rxpower = rx_pwr_all;
|
||||
pstats->recvsignalpower = rx_pwr_all;
|
||||
- if (pdesc->rxht && pdesc->rxmcs >= DESC_RATEMCS8 &&
|
||||
- pdesc->rxmcs <= DESC_RATEMCS15)
|
||||
+ if (get_rx_desc_rxht(pdesc) && rxmcs >= DESC_RATEMCS8 &&
|
||||
+ rxmcs <= DESC_RATEMCS15)
|
||||
max_spatial_stream = 2;
|
||||
else
|
||||
max_spatial_stream = 1;
|
||||
@@ -364,7 +366,7 @@ static void _rtl92de_process_phyinfo(struct ieee80211_hw *hw,
|
||||
static void _rtl92de_translate_rx_signal_stuff(struct ieee80211_hw *hw,
|
||||
struct sk_buff *skb,
|
||||
struct rtl_stats *pstats,
|
||||
- struct rx_desc_92d *pdesc,
|
||||
+ __le32 *pdesc,
|
||||
struct rx_fwinfo_92d *p_drvinfo)
|
||||
{
|
||||
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
|
||||
@@ -440,9 +442,7 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
if (phystatus) {
|
||||
p_drvinfo = (struct rx_fwinfo_92d *)(skb->data +
|
||||
stats->rx_bufshift);
|
||||
- _rtl92de_translate_rx_signal_stuff(hw,
|
||||
- skb, stats,
|
||||
- (struct rx_desc_92d *)pdesc,
|
||||
+ _rtl92de_translate_rx_signal_stuff(hw, skb, stats, pdesc,
|
||||
p_drvinfo);
|
||||
}
|
||||
/*rx_status->qual = stats->signal; */
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h
|
||||
index f189ee2d9be2..2d4887490f00 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.h
|
||||
@@ -394,10 +394,17 @@ struct rx_fwinfo_92d {
|
||||
u8 csi_target[2];
|
||||
u8 sigevm;
|
||||
u8 max_ex_pwr;
|
||||
+#ifdef __LITTLE_ENDIAN
|
||||
u8 ex_intf_flag:1;
|
||||
u8 sgi_en:1;
|
||||
u8 rxsc:2;
|
||||
u8 reserve:4;
|
||||
+#else
|
||||
+ u8 reserve:4;
|
||||
+ u8 rxsc:2;
|
||||
+ u8 sgi_en:1;
|
||||
+ u8 ex_intf_flag:1;
|
||||
+#endif
|
||||
} __packed;
|
||||
|
||||
struct tx_desc_92d {
|
||||
@@ -502,64 +509,6 @@ struct tx_desc_92d {
|
||||
u32 reserve_pass_pcie_mm_limit[4];
|
||||
} __packed;
|
||||
|
||||
-struct rx_desc_92d {
|
||||
- u32 length:14;
|
||||
- u32 crc32:1;
|
||||
- u32 icverror:1;
|
||||
- u32 drv_infosize:4;
|
||||
- u32 security:3;
|
||||
- u32 qos:1;
|
||||
- u32 shift:2;
|
||||
- u32 phystatus:1;
|
||||
- u32 swdec:1;
|
||||
- u32 lastseg:1;
|
||||
- u32 firstseg:1;
|
||||
- u32 eor:1;
|
||||
- u32 own:1;
|
||||
-
|
||||
- u32 macid:5;
|
||||
- u32 tid:4;
|
||||
- u32 hwrsvd:5;
|
||||
- u32 paggr:1;
|
||||
- u32 faggr:1;
|
||||
- u32 a1_fit:4;
|
||||
- u32 a2_fit:4;
|
||||
- u32 pam:1;
|
||||
- u32 pwr:1;
|
||||
- u32 moredata:1;
|
||||
- u32 morefrag:1;
|
||||
- u32 type:2;
|
||||
- u32 mc:1;
|
||||
- u32 bc:1;
|
||||
-
|
||||
- u32 seq:12;
|
||||
- u32 frag:4;
|
||||
- u32 nextpktlen:14;
|
||||
- u32 nextind:1;
|
||||
- u32 rsvd:1;
|
||||
-
|
||||
- u32 rxmcs:6;
|
||||
- u32 rxht:1;
|
||||
- u32 amsdu:1;
|
||||
- u32 splcp:1;
|
||||
- u32 bandwidth:1;
|
||||
- u32 htc:1;
|
||||
- u32 tcpchk_rpt:1;
|
||||
- u32 ipcchk_rpt:1;
|
||||
- u32 tcpchk_valid:1;
|
||||
- u32 hwpcerr:1;
|
||||
- u32 hwpcind:1;
|
||||
- u32 iv0:16;
|
||||
-
|
||||
- u32 iv1;
|
||||
-
|
||||
- u32 tsfl;
|
||||
-
|
||||
- u32 bufferaddress;
|
||||
- u32 bufferaddress64;
|
||||
-
|
||||
-} __packed;
|
||||
-
|
||||
void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
|
||||
struct ieee80211_hdr *hdr, u8 *pdesc,
|
||||
u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
|
||||
--
|
||||
2.34.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,683 @@
|
||||
From 7335e62025a7cfe186aab54609b23c4f24d838e0 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 25 Apr 2024 21:15:20 +0300
|
||||
Subject: [PATCH 16/69] FROMGIT(6.10): wifi: rtlwifi: Adjust rtl8192d-common
|
||||
for USB
|
||||
|
||||
A few of the shared functions need small changes for the USB driver:
|
||||
- firmware loading
|
||||
- efuse reading
|
||||
- rate mask updating
|
||||
- rf register reading
|
||||
- initial gain for scanning
|
||||
|
||||
Also, add a few macros to wifi.h and initialise rtlhal.interfaceindex
|
||||
for USB devices.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
Link: https://msgid.link/28100330-f421-4b85-b41b-f1045380cef2@gmail.com
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/efuse.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtlwifi/efuse.h | 2 +-
|
||||
.../realtek/rtlwifi/rtl8192d/fw_common.c | 23 ++-
|
||||
.../realtek/rtlwifi/rtl8192d/fw_common.h | 10 ++
|
||||
.../realtek/rtlwifi/rtl8192d/hw_common.c | 61 +++++--
|
||||
.../realtek/rtlwifi/rtl8192d/phy_common.c | 22 ++-
|
||||
.../realtek/rtlwifi/rtl8192d/phy_common.h | 24 +++
|
||||
.../wireless/realtek/rtlwifi/rtl8192d/reg.h | 160 +++++++++++++++---
|
||||
drivers/net/wireless/realtek/rtlwifi/usb.c | 3 +
|
||||
drivers/net/wireless/realtek/rtlwifi/wifi.h | 5 +
|
||||
10 files changed, 268 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/efuse.c b/drivers/net/wireless/realtek/rtlwifi/efuse.c
|
||||
index c1fbc29d5ca1..82cf5fb5175f 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/efuse.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/efuse.c
|
||||
@@ -1211,7 +1211,7 @@ static u8 efuse_calculate_word_cnts(u8 word_en)
|
||||
}
|
||||
|
||||
int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv,
|
||||
- int max_size, u8 *hwinfo, int *params)
|
||||
+ int max_size, u8 *hwinfo, const int *params)
|
||||
{
|
||||
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
|
||||
struct rtl_pci_priv *rtlpcipriv = rtl_pcipriv(hw);
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/efuse.h b/drivers/net/wireless/realtek/rtlwifi/efuse.h
|
||||
index 4821625ad1e5..e250ffb0f4b2 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/efuse.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/efuse.h
|
||||
@@ -89,7 +89,7 @@ void efuse_force_write_vendor_id(struct ieee80211_hw *hw);
|
||||
void efuse_re_pg_section(struct ieee80211_hw *hw, u8 section_idx);
|
||||
void efuse_power_switch(struct ieee80211_hw *hw, u8 write, u8 pwrstate);
|
||||
int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv,
|
||||
- int max_size, u8 *hwinfo, int *params);
|
||||
+ int max_size, u8 *hwinfo, const int *params);
|
||||
void rtl_fill_dummy(u8 *pfwbuf, u32 *pfwlen);
|
||||
void rtl_fw_page_write(struct ieee80211_hw *hw, u32 page, u8 *buffer,
|
||||
u32 size);
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
|
||||
index ecdbe3cd5161..aa54dbde6ea8 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
|
||||
@@ -98,24 +98,45 @@ int rtl92d_fw_free_to_go(struct ieee80211_hw *hw)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rtl92d_fw_free_to_go);
|
||||
|
||||
+#define RTL_USB_DELAY_FACTOR 60
|
||||
+
|
||||
void rtl92d_firmware_selfreset(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
|
||||
u8 u1b_tmp;
|
||||
u8 delay = 100;
|
||||
|
||||
+ if (rtlhal->interface == INTF_USB) {
|
||||
+ delay *= RTL_USB_DELAY_FACTOR;
|
||||
+
|
||||
+ rtl_write_byte(rtlpriv, REG_FSIMR, 0);
|
||||
+
|
||||
+ /* We need to disable other HRCV INT to influence 8051 reset. */
|
||||
+ rtl_write_byte(rtlpriv, REG_FWIMR, 0x20);
|
||||
+
|
||||
+ /* Close mask to prevent incorrect FW write operation. */
|
||||
+ rtl_write_byte(rtlpriv, REG_FTIMR, 0);
|
||||
+ }
|
||||
+
|
||||
/* Set (REG_HMETFR + 3) to 0x20 is reset 8051 */
|
||||
rtl_write_byte(rtlpriv, REG_HMETFR + 3, 0x20);
|
||||
|
||||
u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
|
||||
|
||||
- while (u1b_tmp & BIT(2)) {
|
||||
+ while (u1b_tmp & (FEN_CPUEN >> 8)) {
|
||||
delay--;
|
||||
if (delay == 0)
|
||||
break;
|
||||
udelay(50);
|
||||
u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
|
||||
}
|
||||
+
|
||||
+ if (rtlhal->interface == INTF_USB) {
|
||||
+ if ((u1b_tmp & (FEN_CPUEN >> 8)) && delay == 0)
|
||||
+ rtl_write_byte(rtlpriv, REG_FWIMR, 0);
|
||||
+ }
|
||||
+
|
||||
WARN_ONCE((delay <= 0), "rtl8192de: 8051 reset failed!\n");
|
||||
rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
|
||||
"=====> 8051 reset success (%d)\n", delay);
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.h
|
||||
index 4e8e2b716f88..4b73e0bd4ac4 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.h
|
||||
@@ -25,6 +25,16 @@
|
||||
#define GET_FIRMWARE_HDR_SUB_VER(__fwhdr) \
|
||||
le32_get_bits(*(__le32 *)((__fwhdr) + 4), GENMASK(23, 16))
|
||||
|
||||
+#define RAID_MASK GENMASK(31, 28)
|
||||
+#define RATE_MASK_MASK GENMASK(27, 0)
|
||||
+#define SHORT_GI_MASK BIT(5)
|
||||
+#define MACID_MASK GENMASK(4, 0)
|
||||
+
|
||||
+struct rtl92d_rate_mask_h2c {
|
||||
+ __le32 rate_mask_and_raid;
|
||||
+ u8 macid_and_short_gi;
|
||||
+} __packed;
|
||||
+
|
||||
bool rtl92d_is_fw_downloaded(struct rtl_priv *rtlpriv);
|
||||
void rtl92d_enable_fw_download(struct ieee80211_hw *hw, bool enable);
|
||||
void rtl92d_write_fw(struct ieee80211_hw *hw,
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
|
||||
index 40aadb9c4609..920bfb4eaaef 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
|
||||
@@ -618,9 +618,14 @@ static void _rtl92de_read_macphymode_from_prom(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
- u8 macphy_crvalue = content[EEPROM_MAC_FUNCTION];
|
||||
+ bool is_single_mac = true;
|
||||
|
||||
- if (macphy_crvalue & BIT(3)) {
|
||||
+ if (rtlhal->interface == INTF_PCI)
|
||||
+ is_single_mac = !!(content[EEPROM_MAC_FUNCTION] & BIT(3));
|
||||
+ else if (rtlhal->interface == INTF_USB)
|
||||
+ is_single_mac = !(content[EEPROM_ENDPOINT_SETTING] & BIT(0));
|
||||
+
|
||||
+ if (is_single_mac) {
|
||||
rtlhal->macphymode = SINGLEMAC_SINGLEPHY;
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
"MacPhyMode SINGLEMAC_SINGLEPHY\n");
|
||||
@@ -659,6 +664,7 @@ static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw)
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "D-CUT!!!\n");
|
||||
break;
|
||||
case 0xCC33:
|
||||
+ case 0x33CC:
|
||||
chipver |= CHIP_92D_E_CUT;
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "E-CUT!!!\n");
|
||||
break;
|
||||
@@ -672,15 +678,27 @@ static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw)
|
||||
|
||||
static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
|
||||
{
|
||||
+ static const int params_pci[] = {
|
||||
+ RTL8190_EEPROM_ID, EEPROM_VID, EEPROM_DID,
|
||||
+ EEPROM_SVID, EEPROM_SMID, EEPROM_MAC_ADDR_MAC0_92D,
|
||||
+ EEPROM_CHANNEL_PLAN, EEPROM_VERSION, EEPROM_CUSTOMER_ID,
|
||||
+ COUNTRY_CODE_WORLD_WIDE_13
|
||||
+ };
|
||||
+ static const int params_usb[] = {
|
||||
+ RTL8190_EEPROM_ID, EEPROM_VID_USB, EEPROM_PID_USB,
|
||||
+ EEPROM_VID_USB, EEPROM_PID_USB, EEPROM_MAC_ADDR_MAC0_92DU,
|
||||
+ EEPROM_CHANNEL_PLAN, EEPROM_VERSION, EEPROM_CUSTOMER_ID,
|
||||
+ COUNTRY_CODE_WORLD_WIDE_13
|
||||
+ };
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
- int params[] = {RTL8190_EEPROM_ID, EEPROM_VID, EEPROM_DID,
|
||||
- EEPROM_SVID, EEPROM_SMID, EEPROM_MAC_ADDR_MAC0_92D,
|
||||
- EEPROM_CHANNEL_PLAN, EEPROM_VERSION, EEPROM_CUSTOMER_ID,
|
||||
- COUNTRY_CODE_WORLD_WIDE_13};
|
||||
+ const int *params = params_pci;
|
||||
u8 *hwinfo;
|
||||
|
||||
+ if (rtlhal->interface == INTF_USB)
|
||||
+ params = params_usb;
|
||||
+
|
||||
hwinfo = kzalloc(HWSET_MAX_SIZE, GFP_KERNEL);
|
||||
if (!hwinfo)
|
||||
return;
|
||||
@@ -842,6 +860,7 @@ static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw,
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
||||
struct rtl_sta_info *sta_entry = NULL;
|
||||
+ struct rtl92d_rate_mask_h2c rate_mask;
|
||||
enum wireless_mode wirelessmode;
|
||||
bool shortgi = false;
|
||||
u8 curshortgi_40mhz;
|
||||
@@ -849,7 +868,6 @@ static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw,
|
||||
u8 curtxbw_40mhz;
|
||||
u32 ratr_bitmap;
|
||||
u8 ratr_index;
|
||||
- u32 value[2];
|
||||
u8 macid = 0;
|
||||
u8 mimo_ps;
|
||||
|
||||
@@ -965,12 +983,28 @@ static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw,
|
||||
break;
|
||||
}
|
||||
|
||||
- value[0] = (ratr_bitmap & 0x0fffffff) | (ratr_index << 28);
|
||||
- value[1] = macid | (shortgi ? 0x20 : 0x00) | 0x80;
|
||||
+ le32p_replace_bits(&rate_mask.rate_mask_and_raid, ratr_bitmap, RATE_MASK_MASK);
|
||||
+ le32p_replace_bits(&rate_mask.rate_mask_and_raid, ratr_index, RAID_MASK);
|
||||
+ u8p_replace_bits(&rate_mask.macid_and_short_gi, macid, MACID_MASK);
|
||||
+ u8p_replace_bits(&rate_mask.macid_and_short_gi, shortgi, SHORT_GI_MASK);
|
||||
+ u8p_replace_bits(&rate_mask.macid_and_short_gi, 1, BIT(7));
|
||||
+
|
||||
rtl_dbg(rtlpriv, COMP_RATR, DBG_DMESG,
|
||||
- "ratr_bitmap :%x value0:%x value1:%x\n",
|
||||
- ratr_bitmap, value[0], value[1]);
|
||||
- rtl92d_fill_h2c_cmd(hw, H2C_RA_MASK, 5, (u8 *)value);
|
||||
+ "Rate_index:%x, ratr_val:%x, %5phC\n",
|
||||
+ ratr_index, ratr_bitmap, &rate_mask);
|
||||
+
|
||||
+ if (rtlhal->interface == INTF_PCI) {
|
||||
+ rtl92d_fill_h2c_cmd(hw, H2C_RA_MASK, sizeof(rate_mask),
|
||||
+ (u8 *)&rate_mask);
|
||||
+ } else {
|
||||
+ /* rtl92d_fill_h2c_cmd() does USB I/O and will result in a
|
||||
+ * "scheduled while atomic" if called directly
|
||||
+ */
|
||||
+ memcpy(rtlpriv->rate_mask, &rate_mask,
|
||||
+ sizeof(rtlpriv->rate_mask));
|
||||
+ schedule_work(&rtlpriv->works.fill_h2c_cmd);
|
||||
+ }
|
||||
+
|
||||
if (macid != 0)
|
||||
sta_entry->ratr_index = ratr_index;
|
||||
}
|
||||
@@ -1014,7 +1048,8 @@ bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
|
||||
bool actuallyset = false;
|
||||
unsigned long flag;
|
||||
|
||||
- if (rtlpci->being_init_adapter)
|
||||
+ if (rtlpriv->rtlhal.interface == INTF_PCI &&
|
||||
+ rtlpci->being_init_adapter)
|
||||
return false;
|
||||
if (ppsc->swrf_processing)
|
||||
return false;
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c
|
||||
index dbc8ea39d6fc..228c84ab5b90 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c
|
||||
@@ -89,11 +89,11 @@ u32 rtl92d_phy_query_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
|
||||
rtl_dbg(rtlpriv, COMP_RF, DBG_TRACE,
|
||||
"regaddr(%#x), rfpath(%#x), bitmask(%#x)\n",
|
||||
regaddr, rfpath, bitmask);
|
||||
- spin_lock(&rtlpriv->locks.rf_lock);
|
||||
+ rtl92d_pci_lock(rtlpriv);
|
||||
original_value = _rtl92d_phy_rf_serial_read(hw, rfpath, regaddr);
|
||||
bitshift = calculate_bit_shift(bitmask);
|
||||
readback_value = (original_value & bitmask) >> bitshift;
|
||||
- spin_unlock(&rtlpriv->locks.rf_lock);
|
||||
+ rtl92d_pci_unlock(rtlpriv);
|
||||
rtl_dbg(rtlpriv, COMP_RF, DBG_TRACE,
|
||||
"regaddr(%#x), rfpath(%#x), bitmask(%#x), original_value(%#x)\n",
|
||||
regaddr, rfpath, bitmask, original_value);
|
||||
@@ -113,7 +113,7 @@ void rtl92d_phy_set_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
|
||||
regaddr, bitmask, data, rfpath);
|
||||
if (bitmask == 0)
|
||||
return;
|
||||
- spin_lock(&rtlpriv->locks.rf_lock);
|
||||
+ rtl92d_pci_lock(rtlpriv);
|
||||
if (rtlphy->rf_mode != RF_OP_BY_FW) {
|
||||
if (bitmask != RFREG_OFFSET_MASK) {
|
||||
original_value = _rtl92d_phy_rf_serial_read(hw,
|
||||
@@ -125,7 +125,7 @@ void rtl92d_phy_set_rf_reg(struct ieee80211_hw *hw, enum radio_path rfpath,
|
||||
}
|
||||
_rtl92d_phy_rf_serial_write(hw, rfpath, regaddr, data);
|
||||
}
|
||||
- spin_unlock(&rtlpriv->locks.rf_lock);
|
||||
+ rtl92d_pci_unlock(rtlpriv);
|
||||
rtl_dbg(rtlpriv, COMP_RF, DBG_TRACE,
|
||||
"regaddr(%#x), bitmask(%#x), data(%#x), rfpath(%#x)\n",
|
||||
regaddr, bitmask, data, rfpath);
|
||||
@@ -650,6 +650,8 @@ static void rtl92d_phy_set_io(struct ieee80211_hw *hw)
|
||||
case IO_CMD_PAUSE_DM_BY_SCAN:
|
||||
rtlphy->initgain_backup.xaagccore1 = de_digtable->cur_igvalue;
|
||||
de_digtable->cur_igvalue = 0x37;
|
||||
+ if (rtlpriv->rtlhal.interface == INTF_USB)
|
||||
+ de_digtable->cur_igvalue = 0x17;
|
||||
rtl92d_dm_write_dig(hw);
|
||||
break;
|
||||
default:
|
||||
@@ -710,22 +712,28 @@ void rtl92d_phy_config_macphymode(struct ieee80211_hw *hw)
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
u8 offset = REG_MAC_PHY_CTRL_NORMAL;
|
||||
+ u8 phy_ctrl = 0xf0;
|
||||
+
|
||||
+ if (rtlhal->interface == INTF_USB) {
|
||||
+ phy_ctrl = rtl_read_byte(rtlpriv, offset);
|
||||
+ phy_ctrl &= ~(BIT(0) | BIT(1) | BIT(2));
|
||||
+ }
|
||||
|
||||
switch (rtlhal->macphymode) {
|
||||
case DUALMAC_DUALPHY:
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
"MacPhyMode: DUALMAC_DUALPHY\n");
|
||||
- rtl_write_byte(rtlpriv, offset, 0xF3);
|
||||
+ rtl_write_byte(rtlpriv, offset, phy_ctrl | BIT(0) | BIT(1));
|
||||
break;
|
||||
case SINGLEMAC_SINGLEPHY:
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
"MacPhyMode: SINGLEMAC_SINGLEPHY\n");
|
||||
- rtl_write_byte(rtlpriv, offset, 0xF4);
|
||||
+ rtl_write_byte(rtlpriv, offset, phy_ctrl | BIT(2));
|
||||
break;
|
||||
case DUALMAC_SINGLEPHY:
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
"MacPhyMode: DUALMAC_SINGLEPHY\n");
|
||||
- rtl_write_byte(rtlpriv, offset, 0xF1);
|
||||
+ rtl_write_byte(rtlpriv, offset, phy_ctrl | BIT(0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.h
|
||||
index f9b5d0d3a7e6..0f794557af47 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.h
|
||||
@@ -32,6 +32,9 @@ static inline void rtl92d_acquire_cckandrw_pagea_ctl(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
||||
+ if (rtlpriv->rtlhal.interface == INTF_USB)
|
||||
+ return;
|
||||
+
|
||||
if (rtlpriv->rtlhal.interfaceindex == 1)
|
||||
spin_lock_irqsave(&rtlpriv->locks.cck_and_rw_pagea_lock, *flag);
|
||||
}
|
||||
@@ -41,6 +44,9 @@ static inline void rtl92d_release_cckandrw_pagea_ctl(struct ieee80211_hw *hw,
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
||||
+ if (rtlpriv->rtlhal.interface == INTF_USB)
|
||||
+ return;
|
||||
+
|
||||
if (rtlpriv->rtlhal.interfaceindex == 1)
|
||||
spin_unlock_irqrestore(&rtlpriv->locks.cck_and_rw_pagea_lock,
|
||||
*flag);
|
||||
@@ -84,4 +90,22 @@ void rtl92d_acquire_cckandrw_pagea_ctl(struct ieee80211_hw *hw,
|
||||
void rtl92d_release_cckandrw_pagea_ctl(struct ieee80211_hw *hw,
|
||||
unsigned long *flag);
|
||||
|
||||
+/* Without these helpers and the declarations sparse warns about
|
||||
+ * context imbalance.
|
||||
+ */
|
||||
+static inline void rtl92d_pci_lock(struct rtl_priv *rtlpriv)
|
||||
+{
|
||||
+ if (rtlpriv->rtlhal.interface == INTF_PCI)
|
||||
+ spin_lock(&rtlpriv->locks.rf_lock);
|
||||
+}
|
||||
+
|
||||
+static inline void rtl92d_pci_unlock(struct rtl_priv *rtlpriv)
|
||||
+{
|
||||
+ if (rtlpriv->rtlhal.interface == INTF_PCI)
|
||||
+ spin_unlock(&rtlpriv->locks.rf_lock);
|
||||
+}
|
||||
+
|
||||
+void rtl92d_pci_lock(struct rtl_priv *rtlpriv);
|
||||
+void rtl92d_pci_unlock(struct rtl_priv *rtlpriv);
|
||||
+
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/reg.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/reg.h
|
||||
index 1dc52abe3d0d..b5b906b799cb 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/reg.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/reg.h
|
||||
@@ -52,6 +52,8 @@
|
||||
#define REG_HMEBOX_EXT_3 0x008E
|
||||
#define SIZE_OF_REG_HMEBOX_EXT 2
|
||||
|
||||
+#define REG_EFUSE_ACCESS 0x00CF
|
||||
+
|
||||
#define REG_BIST_SCAN 0x00D0
|
||||
#define REG_BIST_RPT 0x00D4
|
||||
#define REG_BIST_ROM_RPT 0x00D8
|
||||
@@ -87,6 +89,7 @@
|
||||
#define REG_CPWM 0x012F
|
||||
#define REG_FWIMR 0x0130
|
||||
#define REG_FWISR 0x0134
|
||||
+#define REG_FTIMR 0x0138
|
||||
#define REG_PKTBUF_DBG_CTRL 0x0140
|
||||
#define REG_PKTBUF_DBG_DATA_L 0x0144
|
||||
#define REG_PKTBUF_DBG_DATA_H 0x0148
|
||||
@@ -199,6 +202,8 @@
|
||||
#define REG_POWER_STAGE1 0x04B4
|
||||
#define REG_POWER_STAGE2 0x04B8
|
||||
#define REG_PKT_LIFE_TIME 0x04C0
|
||||
+#define REG_PKT_VO_VI_LIFE_TIME 0x04C0
|
||||
+#define REG_PKT_BE_BK_LIFE_TIME 0x04C2
|
||||
#define REG_STBC_SETTING 0x04C4
|
||||
#define REG_PROT_MODE_CTRL 0x04C8
|
||||
#define REG_MAX_AGGR_NUM 0x04CA
|
||||
@@ -235,6 +240,7 @@
|
||||
#define REG_RD_NAV_NXT 0x0544
|
||||
#define REG_NAV_PROT_LEN 0x0546
|
||||
#define REG_BCN_CTRL 0x0550
|
||||
+#define REG_BCN_CTRL_1 0x0551
|
||||
#define REG_MBID_NUM 0x0552
|
||||
#define REG_DUAL_TSF_RST 0x0553
|
||||
#define REG_BCN_INTERVAL 0x0554
|
||||
@@ -321,6 +327,8 @@
|
||||
#define REG_BT_COEX_TABLE 0x06C0
|
||||
#define REG_WMAC_RESP_TXINFO 0x06D8
|
||||
|
||||
+#define REG_USB_Queue_Select_MAC0 0xFE44
|
||||
+#define REG_USB_Queue_Select_MAC1 0xFE47
|
||||
|
||||
/* ----------------------------------------------------- */
|
||||
/* Redifine 8192C register definition for compatibility */
|
||||
@@ -357,27 +365,27 @@
|
||||
#define RRSR_RSC_UPSUBCHNL 0x400000
|
||||
#define RRSR_RSC_LOWSUBCHNL 0x200000
|
||||
#define RRSR_SHORT 0x800000
|
||||
-#define RRSR_1M BIT0
|
||||
-#define RRSR_2M BIT1
|
||||
-#define RRSR_5_5M BIT2
|
||||
-#define RRSR_11M BIT3
|
||||
-#define RRSR_6M BIT4
|
||||
-#define RRSR_9M BIT5
|
||||
-#define RRSR_12M BIT6
|
||||
-#define RRSR_18M BIT7
|
||||
-#define RRSR_24M BIT8
|
||||
-#define RRSR_36M BIT9
|
||||
-#define RRSR_48M BIT10
|
||||
-#define RRSR_54M BIT11
|
||||
-#define RRSR_MCS0 BIT12
|
||||
-#define RRSR_MCS1 BIT13
|
||||
-#define RRSR_MCS2 BIT14
|
||||
-#define RRSR_MCS3 BIT15
|
||||
-#define RRSR_MCS4 BIT16
|
||||
-#define RRSR_MCS5 BIT17
|
||||
-#define RRSR_MCS6 BIT18
|
||||
-#define RRSR_MCS7 BIT19
|
||||
-#define BRSR_ACKSHORTPMB BIT23
|
||||
+#define RRSR_1M BIT(0)
|
||||
+#define RRSR_2M BIT(1)
|
||||
+#define RRSR_5_5M BIT(2)
|
||||
+#define RRSR_11M BIT(3)
|
||||
+#define RRSR_6M BIT(4)
|
||||
+#define RRSR_9M BIT(5)
|
||||
+#define RRSR_12M BIT(6)
|
||||
+#define RRSR_18M BIT(7)
|
||||
+#define RRSR_24M BIT(8)
|
||||
+#define RRSR_36M BIT(9)
|
||||
+#define RRSR_48M BIT(10)
|
||||
+#define RRSR_54M BIT(11)
|
||||
+#define RRSR_MCS0 BIT(12)
|
||||
+#define RRSR_MCS1 BIT(13)
|
||||
+#define RRSR_MCS2 BIT(14)
|
||||
+#define RRSR_MCS3 BIT(15)
|
||||
+#define RRSR_MCS4 BIT(16)
|
||||
+#define RRSR_MCS5 BIT(17)
|
||||
+#define RRSR_MCS6 BIT(18)
|
||||
+#define RRSR_MCS7 BIT(19)
|
||||
+#define BRSR_ACKSHORTPMB BIT(23)
|
||||
|
||||
/* ----------------------------------------------------- */
|
||||
/* 8192C Rate Definition */
|
||||
@@ -602,7 +610,11 @@
|
||||
#define EEPROM_SVID 0x2C /* SE Vendor ID.E-F */
|
||||
#define EEPROM_SMID 0x2E /* SE PCI Subsystem ID. 10-11 */
|
||||
|
||||
+#define EEPROM_VID_USB 0xC
|
||||
+#define EEPROM_PID_USB 0xE
|
||||
+#define EEPROM_ENDPOINT_SETTING 0x10
|
||||
#define EEPROM_MAC_ADDR 0x16 /* SEMAC Address. 12-17 */
|
||||
+#define EEPROM_MAC_ADDR_MAC0_92DU 0x19
|
||||
#define EEPROM_MAC_ADDR_MAC0_92D 0x55
|
||||
#define EEPROM_MAC_ADDR_MAC1_92D 0x5B
|
||||
|
||||
@@ -917,6 +929,42 @@
|
||||
#define BD_HCI_SEL BIT(26)
|
||||
#define TYPE_ID BIT(27)
|
||||
|
||||
+#define HCI_TXDMA_EN BIT(0)
|
||||
+#define HCI_RXDMA_EN BIT(1)
|
||||
+#define TXDMA_EN BIT(2)
|
||||
+#define RXDMA_EN BIT(3)
|
||||
+#define PROTOCOL_EN BIT(4)
|
||||
+#define SCHEDULE_EN BIT(5)
|
||||
+#define MACTXEN BIT(6)
|
||||
+#define MACRXEN BIT(7)
|
||||
+#define ENSWBCN BIT(8)
|
||||
+#define ENSEC BIT(9)
|
||||
+
|
||||
+#define HQSEL_VOQ BIT(0)
|
||||
+#define HQSEL_VIQ BIT(1)
|
||||
+#define HQSEL_BEQ BIT(2)
|
||||
+#define HQSEL_BKQ BIT(3)
|
||||
+#define HQSEL_MGTQ BIT(4)
|
||||
+#define HQSEL_HIQ BIT(5)
|
||||
+
|
||||
+#define TXDMA_HIQ_MAP GENMASK(15, 14)
|
||||
+#define TXDMA_MGQ_MAP GENMASK(13, 12)
|
||||
+#define TXDMA_BKQ_MAP GENMASK(11, 10)
|
||||
+#define TXDMA_BEQ_MAP GENMASK(9, 8)
|
||||
+#define TXDMA_VIQ_MAP GENMASK(7, 6)
|
||||
+#define TXDMA_VOQ_MAP GENMASK(5, 4)
|
||||
+
|
||||
+#define QUEUE_LOW 1
|
||||
+#define QUEUE_NORMAL 2
|
||||
+#define QUEUE_HIGH 3
|
||||
+
|
||||
+#define HPQ_MASK GENMASK(7, 0)
|
||||
+#define LPQ_MASK GENMASK(15, 8)
|
||||
+#define PUBQ_MASK GENMASK(23, 16)
|
||||
+#define LD_RQPN BIT(31)
|
||||
+
|
||||
+#define DROP_DATA_EN BIT(9)
|
||||
+
|
||||
/* LLT_INIT */
|
||||
#define _LLT_NO_ACTIVE 0x0
|
||||
#define _LLT_WRITE_ACCESS 0x1
|
||||
@@ -931,6 +979,10 @@
|
||||
/* ----------------------------------------------------- */
|
||||
/* 0x0400h ~ 0x047Fh Protocol Configuration */
|
||||
/* ----------------------------------------------------- */
|
||||
+/* FWHW_TXQ_CTRL */
|
||||
+#define EN_AMPDU_RTY_NEW BIT(7)
|
||||
+#define EN_BCNQ_DL BIT(22)
|
||||
+
|
||||
#define RETRY_LIMIT_SHORT_SHIFT 8
|
||||
#define RETRY_LIMIT_LONG_SHIFT 0
|
||||
|
||||
@@ -944,6 +996,13 @@
|
||||
#define AC_PARAM_ECW_MIN_OFFSET 8
|
||||
#define AC_PARAM_AIFS_OFFSET 0
|
||||
|
||||
+/* REG_RD_CTRL */
|
||||
+#define DIS_EDCA_CNT_DWN BIT(11)
|
||||
+
|
||||
+/* REG_BCN_CTRL */
|
||||
+#define EN_BCN_FUNCTION BIT(3)
|
||||
+#define DIS_TSF_UDT BIT(4)
|
||||
+
|
||||
/* ACMHWCTRL */
|
||||
#define ACMHW_HWEN BIT(0)
|
||||
#define ACMHW_BEQEN BIT(1)
|
||||
@@ -1075,6 +1134,11 @@
|
||||
#define RCCK0_FACOUNTERLOWER 0xa5c
|
||||
#define RCCK0_FACOUNTERUPPER 0xa58
|
||||
|
||||
+#define RPDP_ANTA 0xb00
|
||||
+#define RCONFIG_ANTA 0xb68
|
||||
+#define RCONFIG_ANTB 0xb6c
|
||||
+#define RPDP_ANTB 0xb70
|
||||
+
|
||||
/* 6. PageC(0xC00) */
|
||||
#define ROFDM0_LSTF 0xc00
|
||||
|
||||
@@ -1128,6 +1192,7 @@
|
||||
#define ROFDM0_TXPSEUDONOISEWGT 0xce4
|
||||
#define ROFDM0_FRAMESYNC 0xcf0
|
||||
#define ROFDM0_DFSREPORT 0xcf4
|
||||
+#define ROFDM0_RXIQEXTANTA 0xca0
|
||||
#define ROFDM0_TXCOEFF1 0xca4
|
||||
#define ROFDM0_TXCOEFF2 0xca8
|
||||
#define ROFDM0_TXCOEFF3 0xcac
|
||||
@@ -1186,17 +1251,70 @@
|
||||
#define RTXAGC_B_MCS15_MCS12 0x868
|
||||
#define RTXAGC_B_CCK11_A_CCK2_11 0x86c
|
||||
|
||||
+#define RFPGA0_IQK 0xe28
|
||||
+#define RTX_IQK_TONE_A 0xe30
|
||||
+#define RRX_IQK_TONE_A 0xe34
|
||||
+#define RTX_IQK_PI_A 0xe38
|
||||
+#define RRX_IQK_PI_A 0xe3c
|
||||
+
|
||||
+#define RTX_IQK 0xe40
|
||||
+#define RRX_IQK 0xe44
|
||||
+#define RIQK_AGC_PTS 0xe48
|
||||
+#define RIQK_AGC_RSP 0xe4c
|
||||
+#define RTX_IQK_TONE_B 0xe50
|
||||
+#define RRX_IQK_TONE_B 0xe54
|
||||
+#define RTX_IQK_PI_B 0xe58
|
||||
+#define RRX_IQK_PI_B 0xe5c
|
||||
+#define RIQK_AGC_CONT 0xe60
|
||||
+
|
||||
+#define RBLUE_TOOTH 0xe6c
|
||||
+#define RRX_WAIT_CCA 0xe70
|
||||
+#define RTX_CCK_RFON 0xe74
|
||||
+#define RTX_CCK_BBON 0xe78
|
||||
+#define RTX_OFDM_RFON 0xe7c
|
||||
+#define RTX_OFDM_BBON 0xe80
|
||||
+#define RTX_TO_RX 0xe84
|
||||
+#define RTX_TO_TX 0xe88
|
||||
+#define RRX_CCK 0xe8c
|
||||
+
|
||||
+#define RTX_POWER_BEFORE_IQK_A 0xe94
|
||||
+#define RTX_POWER_AFTER_IQK_A 0xe9c
|
||||
+
|
||||
+#define RRX_POWER_BEFORE_IQK_A 0xea0
|
||||
+#define RRX_POWER_BEFORE_IQK_A_2 0xea4
|
||||
+#define RRX_POWER_AFTER_IQK_A 0xea8
|
||||
+#define RRX_POWER_AFTER_IQK_A_2 0xeac
|
||||
+
|
||||
+#define RTX_POWER_BEFORE_IQK_B 0xeb4
|
||||
+#define RTX_POWER_AFTER_IQK_B 0xebc
|
||||
+
|
||||
+#define RRX_POWER_BEFORE_IQK_B 0xec0
|
||||
+#define RRX_POWER_BEFORE_IQK_B_2 0xec4
|
||||
+#define RRX_POWER_AFTER_IQK_B 0xec8
|
||||
+#define RRX_POWER_AFTER_IQK_B_2 0xecc
|
||||
+
|
||||
+#define MASK_IQK_RESULT 0x03ff0000
|
||||
+
|
||||
+#define RRX_OFDM 0xed0
|
||||
+#define RRX_WAIT_RIFS 0xed4
|
||||
+#define RRX_TO_RX 0xed8
|
||||
+#define RSTANDBY 0xedc
|
||||
+#define RSLEEP 0xee0
|
||||
+#define RPMPD_ANAEN 0xeec
|
||||
+
|
||||
/* RL6052 Register definition */
|
||||
#define RF_AC 0x00
|
||||
|
||||
#define RF_IQADJ_G1 0x01
|
||||
#define RF_IQADJ_G2 0x02
|
||||
+#define RF_BS_PA_APSET_G1_G4 0x03
|
||||
#define RF_POW_TRSW 0x05
|
||||
|
||||
#define RF_GAIN_RX 0x06
|
||||
#define RF_GAIN_TX 0x07
|
||||
|
||||
#define RF_TXM_IDAC 0x08
|
||||
+#define RF_TXPA_AG 0x0B
|
||||
#define RF_BS_IQGEN 0x0F
|
||||
|
||||
#define RF_MODE1 0x10
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
|
||||
index 6e8c87a2fae4..2ea72d9e3957 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
|
||||
@@ -979,6 +979,9 @@ int rtl_usb_probe(struct usb_interface *intf,
|
||||
usb_priv->dev.intf = intf;
|
||||
usb_priv->dev.udev = udev;
|
||||
usb_set_intfdata(intf, hw);
|
||||
+ /* For dual MAC RTL8192DU, which has two interfaces. */
|
||||
+ rtlpriv->rtlhal.interfaceindex =
|
||||
+ intf->altsetting[0].desc.bInterfaceNumber;
|
||||
/* init cfg & intf_ops */
|
||||
rtlpriv->rtlhal.interface = INTF_USB;
|
||||
rtlpriv->cfg = rtl_hal_cfg;
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
index 098db85e381c..4f1c21c130f4 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
@@ -20,6 +20,7 @@
|
||||
#define MASKBYTE1 0xff00
|
||||
#define MASKBYTE2 0xff0000
|
||||
#define MASKBYTE3 0xff000000
|
||||
+#define MASKH3BYTES 0xffffff00
|
||||
#define MASKHWORD 0xffff0000
|
||||
#define MASKLWORD 0x0000ffff
|
||||
#define MASKDWORD 0xffffffff
|
||||
@@ -48,6 +49,10 @@
|
||||
#define MASK20BITS 0xfffff
|
||||
#define RFREG_OFFSET_MASK 0xfffff
|
||||
|
||||
+/* For dual MAC RTL8192DU */
|
||||
+#define MAC0_ACCESS_PHY1 0x4000
|
||||
+#define MAC1_ACCESS_PHY0 0x2000
|
||||
+
|
||||
#define RF_CHANGE_BY_INIT 0
|
||||
#define RF_CHANGE_BY_IPS BIT(28)
|
||||
#define RF_CHANGE_BY_PS BIT(29)
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,52 @@
|
||||
From d34a7e456b723f5b5b11834abd39f46352d2b776 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Wed, 29 May 2024 20:19:47 +0300
|
||||
Subject: [PATCH 17/69] FROMGIT(6.10): wifi: rtlwifi: Ignore
|
||||
IEEE80211_CONF_CHANGE_RETRY_LIMITS
|
||||
|
||||
Since commit 0a44dfc07074 ("wifi: mac80211: simplify non-chanctx
|
||||
drivers") ieee80211_hw_config() is no longer called with changed = ~0.
|
||||
rtlwifi relied on ~0 in order to ignore the default retry limits of
|
||||
4/7, preferring 48/48 in station mode and 7/7 in AP/IBSS.
|
||||
|
||||
RTL8192DU has a lot of packet loss with the default limits from
|
||||
mac80211. Fix it by ignoring IEEE80211_CONF_CHANGE_RETRY_LIMITS
|
||||
completely, because it's the simplest solution.
|
||||
|
||||
Link: https://lore.kernel.org/linux-wireless/cedd13d7691f4692b2a2fa5a24d44a22@realtek.com/
|
||||
Cc: stable@vger.kernel.org # 6.9.x
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/core.c | 15 ---------------
|
||||
1 file changed, 15 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
index 2e60a6991ca1..42b7db12b1bd 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
|
||||
@@ -633,21 +633,6 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
}
|
||||
|
||||
- if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
|
||||
- rtl_dbg(rtlpriv, COMP_MAC80211, DBG_LOUD,
|
||||
- "IEEE80211_CONF_CHANGE_RETRY_LIMITS %x\n",
|
||||
- hw->conf.long_frame_max_tx_count);
|
||||
- /* brought up everything changes (changed == ~0) indicates first
|
||||
- * open, so use our default value instead of that of wiphy.
|
||||
- */
|
||||
- if (changed != ~0) {
|
||||
- mac->retry_long = hw->conf.long_frame_max_tx_count;
|
||||
- mac->retry_short = hw->conf.long_frame_max_tx_count;
|
||||
- rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RETRY_LIMIT,
|
||||
- (u8 *)(&hw->conf.long_frame_max_tx_count));
|
||||
- }
|
||||
- }
|
||||
-
|
||||
if (changed & IEEE80211_CONF_CHANGE_CHANNEL &&
|
||||
!rtlpriv->proximity.proxim_on) {
|
||||
struct ieee80211_channel *channel = hw->conf.chandef.chan;
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,701 @@
|
||||
From dec5fc45e4b69ac5c4c628fa9e482199d6e5ad71 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:43:37 +0300
|
||||
Subject: [PATCH 18/69] FROMGIT(6.11): wifi: rtlwifi: rtl8192d: Use "rtl92d"
|
||||
prefix
|
||||
|
||||
Some functions moved from rtl8192de still use the "rtl92de" prefix.
|
||||
Rename them.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
.../realtek/rtlwifi/rtl8192d/hw_common.c | 94 +++++++++----------
|
||||
.../realtek/rtlwifi/rtl8192d/hw_common.h | 28 +++---
|
||||
.../realtek/rtlwifi/rtl8192d/trx_common.c | 92 +++++++++---------
|
||||
.../realtek/rtlwifi/rtl8192d/trx_common.h | 16 ++--
|
||||
.../wireless/realtek/rtlwifi/rtl8192de/hw.c | 18 ++--
|
||||
.../wireless/realtek/rtlwifi/rtl8192de/sw.c | 20 ++--
|
||||
.../wireless/realtek/rtlwifi/rtl8192de/trx.c | 2 +-
|
||||
7 files changed, 135 insertions(+), 135 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
|
||||
index 920bfb4eaaef..3b14eec08b64 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "hw_common.h"
|
||||
#include "phy_common.h"
|
||||
|
||||
-void rtl92de_stop_tx_beacon(struct ieee80211_hw *hw)
|
||||
+void rtl92d_stop_tx_beacon(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
u8 tmp1byte;
|
||||
@@ -27,9 +27,9 @@ void rtl92de_stop_tx_beacon(struct ieee80211_hw *hw)
|
||||
tmp1byte &= ~(BIT(0));
|
||||
rtl_write_byte(rtlpriv, REG_TBTT_PROHIBIT + 2, tmp1byte);
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_stop_tx_beacon);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_stop_tx_beacon);
|
||||
|
||||
-void rtl92de_resume_tx_beacon(struct ieee80211_hw *hw)
|
||||
+void rtl92d_resume_tx_beacon(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
u8 tmp1byte;
|
||||
@@ -42,7 +42,7 @@ void rtl92de_resume_tx_beacon(struct ieee80211_hw *hw)
|
||||
tmp1byte |= BIT(0);
|
||||
rtl_write_byte(rtlpriv, REG_TBTT_PROHIBIT + 2, tmp1byte);
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_resume_tx_beacon);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_resume_tx_beacon);
|
||||
|
||||
void rtl92d_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
|
||||
{
|
||||
@@ -285,7 +285,7 @@ void rtl92d_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rtl92d_set_hw_reg);
|
||||
|
||||
-bool rtl92de_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
|
||||
+bool rtl92d_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
bool status = true;
|
||||
@@ -307,9 +307,9 @@ bool rtl92de_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
|
||||
} while (++count);
|
||||
return status;
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_llt_write);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_llt_write);
|
||||
|
||||
-void rtl92de_enable_hw_security_config(struct ieee80211_hw *hw)
|
||||
+void rtl92d_enable_hw_security_config(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
u8 sec_reg_value;
|
||||
@@ -334,16 +334,16 @@ void rtl92de_enable_hw_security_config(struct ieee80211_hw *hw)
|
||||
"The SECR-value %x\n", sec_reg_value);
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_WPA_CONFIG, &sec_reg_value);
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_enable_hw_security_config);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_enable_hw_security_config);
|
||||
|
||||
/* don't set REG_EDCA_BE_PARAM here because
|
||||
* mac80211 will send pkt when scan
|
||||
*/
|
||||
-void rtl92de_set_qos(struct ieee80211_hw *hw, int aci)
|
||||
+void rtl92d_set_qos(struct ieee80211_hw *hw, int aci)
|
||||
{
|
||||
rtl92d_dm_init_edca_turbo(hw);
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_set_qos);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_set_qos);
|
||||
|
||||
static enum version_8192d _rtl92d_read_chip_version(struct ieee80211_hw *hw)
|
||||
{
|
||||
@@ -362,8 +362,8 @@ static enum version_8192d _rtl92d_read_chip_version(struct ieee80211_hw *hw)
|
||||
return version;
|
||||
}
|
||||
|
||||
-static void _rtl92de_readpowervalue_fromprom(struct txpower_info *pwrinfo,
|
||||
- u8 *efuse, bool autoloadfail)
|
||||
+static void _rtl92d_readpowervalue_fromprom(struct txpower_info *pwrinfo,
|
||||
+ u8 *efuse, bool autoloadfail)
|
||||
{
|
||||
u32 rfpath, eeaddr, group, offset, offset1, offset2;
|
||||
u8 i, val8;
|
||||
@@ -500,8 +500,8 @@ static void _rtl92de_readpowervalue_fromprom(struct txpower_info *pwrinfo,
|
||||
}
|
||||
}
|
||||
|
||||
-static void _rtl92de_read_txpower_info(struct ieee80211_hw *hw,
|
||||
- bool autoload_fail, u8 *hwinfo)
|
||||
+static void _rtl92d_read_txpower_info(struct ieee80211_hw *hw,
|
||||
+ bool autoload_fail, u8 *hwinfo)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
|
||||
@@ -509,7 +509,7 @@ static void _rtl92de_read_txpower_info(struct ieee80211_hw *hw,
|
||||
u8 tempval[2], i, pwr, diff;
|
||||
u32 ch, rfpath, group;
|
||||
|
||||
- _rtl92de_readpowervalue_fromprom(&pwrinfo, hwinfo, autoload_fail);
|
||||
+ _rtl92d_readpowervalue_fromprom(&pwrinfo, hwinfo, autoload_fail);
|
||||
if (!autoload_fail) {
|
||||
/* bit0~2 */
|
||||
rtlefuse->eeprom_regulatory = (hwinfo[EEPROM_RF_OPT1] & 0x7);
|
||||
@@ -613,8 +613,8 @@ static void _rtl92de_read_txpower_info(struct ieee80211_hw *hw,
|
||||
}
|
||||
}
|
||||
|
||||
-static void _rtl92de_read_macphymode_from_prom(struct ieee80211_hw *hw,
|
||||
- u8 *content)
|
||||
+static void _rtl92d_read_macphymode_from_prom(struct ieee80211_hw *hw,
|
||||
+ u8 *content)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
@@ -636,15 +636,15 @@ static void _rtl92de_read_macphymode_from_prom(struct ieee80211_hw *hw,
|
||||
}
|
||||
}
|
||||
|
||||
-static void _rtl92de_read_macphymode_and_bandtype(struct ieee80211_hw *hw,
|
||||
- u8 *content)
|
||||
+static void _rtl92d_read_macphymode_and_bandtype(struct ieee80211_hw *hw,
|
||||
+ u8 *content)
|
||||
{
|
||||
- _rtl92de_read_macphymode_from_prom(hw, content);
|
||||
+ _rtl92d_read_macphymode_from_prom(hw, content);
|
||||
rtl92d_phy_config_macphymode(hw);
|
||||
rtl92d_phy_config_macphymode_info(hw);
|
||||
}
|
||||
|
||||
-static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw)
|
||||
+static void _rtl92d_efuse_update_chip_version(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
enum version_8192d chipver = rtlpriv->rtlhal.version;
|
||||
@@ -676,7 +676,7 @@ static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw)
|
||||
rtlpriv->rtlhal.version = chipver;
|
||||
}
|
||||
|
||||
-static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
|
||||
+static void _rtl92d_read_adapter_info(struct ieee80211_hw *hw)
|
||||
{
|
||||
static const int params_pci[] = {
|
||||
RTL8190_EEPROM_ID, EEPROM_VID, EEPROM_DID,
|
||||
@@ -706,8 +706,8 @@ static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
|
||||
if (rtl_get_hwinfo(hw, rtlpriv, HWSET_MAX_SIZE, hwinfo, params))
|
||||
goto exit;
|
||||
|
||||
- _rtl92de_efuse_update_chip_version(hw);
|
||||
- _rtl92de_read_macphymode_and_bandtype(hw, hwinfo);
|
||||
+ _rtl92d_efuse_update_chip_version(hw);
|
||||
+ _rtl92d_read_macphymode_and_bandtype(hw, hwinfo);
|
||||
|
||||
/* Read Permanent MAC address for 2nd interface */
|
||||
if (rtlhal->interfaceindex != 0)
|
||||
@@ -717,7 +717,7 @@ static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR,
|
||||
rtlefuse->dev_addr);
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG, "%pM\n", rtlefuse->dev_addr);
|
||||
- _rtl92de_read_txpower_info(hw, rtlefuse->autoload_failflag, hwinfo);
|
||||
+ _rtl92d_read_txpower_info(hw, rtlefuse->autoload_failflag, hwinfo);
|
||||
|
||||
/* Read Channel Plan */
|
||||
switch (rtlhal->bandset) {
|
||||
@@ -739,7 +739,7 @@ static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
|
||||
kfree(hwinfo);
|
||||
}
|
||||
|
||||
-void rtl92de_read_eeprom_info(struct ieee80211_hw *hw)
|
||||
+void rtl92d_read_eeprom_info(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
|
||||
@@ -760,15 +760,15 @@ void rtl92de_read_eeprom_info(struct ieee80211_hw *hw)
|
||||
rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "Autoload OK\n");
|
||||
|
||||
rtlefuse->autoload_failflag = false;
|
||||
- _rtl92de_read_adapter_info(hw);
|
||||
+ _rtl92d_read_adapter_info(hw);
|
||||
} else {
|
||||
pr_err("Autoload ERR!!\n");
|
||||
}
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_read_eeprom_info);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_read_eeprom_info);
|
||||
|
||||
-static void rtl92de_update_hal_rate_table(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_sta *sta)
|
||||
+static void rtl92d_update_hal_rate_table(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_sta *sta)
|
||||
{
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
|
||||
@@ -851,9 +851,9 @@ static void rtl92de_update_hal_rate_table(struct ieee80211_hw *hw,
|
||||
rtl_read_dword(rtlpriv, REG_ARFR0));
|
||||
}
|
||||
|
||||
-static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_sta *sta,
|
||||
- u8 rssi_level, bool update_bw)
|
||||
+static void rtl92d_update_hal_rate_mask(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_sta *sta,
|
||||
+ u8 rssi_level, bool update_bw)
|
||||
{
|
||||
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
|
||||
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
|
||||
@@ -1009,20 +1009,20 @@ static void rtl92de_update_hal_rate_mask(struct ieee80211_hw *hw,
|
||||
sta_entry->ratr_index = ratr_index;
|
||||
}
|
||||
|
||||
-void rtl92de_update_hal_rate_tbl(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_sta *sta,
|
||||
- u8 rssi_level, bool update_bw)
|
||||
+void rtl92d_update_hal_rate_tbl(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_sta *sta,
|
||||
+ u8 rssi_level, bool update_bw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
||||
if (rtlpriv->dm.useramask)
|
||||
- rtl92de_update_hal_rate_mask(hw, sta, rssi_level, update_bw);
|
||||
+ rtl92d_update_hal_rate_mask(hw, sta, rssi_level, update_bw);
|
||||
else
|
||||
- rtl92de_update_hal_rate_table(hw, sta);
|
||||
+ rtl92d_update_hal_rate_table(hw, sta);
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_update_hal_rate_tbl);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_update_hal_rate_tbl);
|
||||
|
||||
-void rtl92de_update_channel_access_setting(struct ieee80211_hw *hw)
|
||||
+void rtl92d_update_channel_access_setting(struct ieee80211_hw *hw)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
|
||||
@@ -1036,9 +1036,9 @@ void rtl92de_update_channel_access_setting(struct ieee80211_hw *hw)
|
||||
sifs_timer = 0x1010;
|
||||
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SIFS, (u8 *)&sifs_timer);
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_update_channel_access_setting);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_update_channel_access_setting);
|
||||
|
||||
-bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
|
||||
+bool rtl92d_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
|
||||
@@ -1093,11 +1093,11 @@ bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
|
||||
*valid = 1;
|
||||
return !ppsc->hwradiooff;
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_gpio_radio_on_off_checking);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_gpio_radio_on_off_checking);
|
||||
|
||||
-void rtl92de_set_key(struct ieee80211_hw *hw, u32 key_index,
|
||||
- u8 *p_macaddr, bool is_group, u8 enc_algo,
|
||||
- bool is_wepkey, bool clear_all)
|
||||
+void rtl92d_set_key(struct ieee80211_hw *hw, u32 key_index,
|
||||
+ u8 *p_macaddr, bool is_group, u8 enc_algo,
|
||||
+ bool is_wepkey, bool clear_all)
|
||||
{
|
||||
static const u8 cam_const_addr[4][6] = {
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
@@ -1222,4 +1222,4 @@ void rtl92de_set_key(struct ieee80211_hw *hw, u32 key_index,
|
||||
}
|
||||
}
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_set_key);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_set_key);
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.h
|
||||
index 2c07f5cc5766..4da1bab15f36 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.h
|
||||
@@ -4,21 +4,21 @@
|
||||
#ifndef __RTL92D_HW_COMMON_H__
|
||||
#define __RTL92D_HW_COMMON_H__
|
||||
|
||||
-void rtl92de_stop_tx_beacon(struct ieee80211_hw *hw);
|
||||
-void rtl92de_resume_tx_beacon(struct ieee80211_hw *hw);
|
||||
+void rtl92d_stop_tx_beacon(struct ieee80211_hw *hw);
|
||||
+void rtl92d_resume_tx_beacon(struct ieee80211_hw *hw);
|
||||
void rtl92d_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
|
||||
void rtl92d_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val);
|
||||
-bool rtl92de_llt_write(struct ieee80211_hw *hw, u32 address, u32 data);
|
||||
-void rtl92de_enable_hw_security_config(struct ieee80211_hw *hw);
|
||||
-void rtl92de_set_qos(struct ieee80211_hw *hw, int aci);
|
||||
-void rtl92de_read_eeprom_info(struct ieee80211_hw *hw);
|
||||
-void rtl92de_update_hal_rate_tbl(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_sta *sta,
|
||||
- u8 rssi_level, bool update_bw);
|
||||
-void rtl92de_update_channel_access_setting(struct ieee80211_hw *hw);
|
||||
-bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid);
|
||||
-void rtl92de_set_key(struct ieee80211_hw *hw, u32 key_index,
|
||||
- u8 *p_macaddr, bool is_group, u8 enc_algo,
|
||||
- bool is_wepkey, bool clear_all);
|
||||
+bool rtl92d_llt_write(struct ieee80211_hw *hw, u32 address, u32 data);
|
||||
+void rtl92d_enable_hw_security_config(struct ieee80211_hw *hw);
|
||||
+void rtl92d_set_qos(struct ieee80211_hw *hw, int aci);
|
||||
+void rtl92d_read_eeprom_info(struct ieee80211_hw *hw);
|
||||
+void rtl92d_update_hal_rate_tbl(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_sta *sta,
|
||||
+ u8 rssi_level, bool update_bw);
|
||||
+void rtl92d_update_channel_access_setting(struct ieee80211_hw *hw);
|
||||
+bool rtl92d_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid);
|
||||
+void rtl92d_set_key(struct ieee80211_hw *hw, u32 key_index,
|
||||
+ u8 *p_macaddr, bool is_group, u8 enc_algo,
|
||||
+ bool is_wepkey, bool clear_all);
|
||||
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c
|
||||
index 72d2b7426d82..9f9a34492030 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c
|
||||
@@ -7,8 +7,8 @@
|
||||
#include "def.h"
|
||||
#include "trx_common.h"
|
||||
|
||||
-static long _rtl92de_translate_todbm(struct ieee80211_hw *hw,
|
||||
- u8 signal_strength_index)
|
||||
+static long _rtl92d_translate_todbm(struct ieee80211_hw *hw,
|
||||
+ u8 signal_strength_index)
|
||||
{
|
||||
long signal_power;
|
||||
|
||||
@@ -17,13 +17,13 @@ static long _rtl92de_translate_todbm(struct ieee80211_hw *hw,
|
||||
return signal_power;
|
||||
}
|
||||
|
||||
-static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
- struct rtl_stats *pstats,
|
||||
- __le32 *pdesc,
|
||||
- struct rx_fwinfo_92d *p_drvinfo,
|
||||
- bool packet_match_bssid,
|
||||
- bool packet_toself,
|
||||
- bool packet_beacon)
|
||||
+static void _rtl92d_query_rxphystatus(struct ieee80211_hw *hw,
|
||||
+ struct rtl_stats *pstats,
|
||||
+ __le32 *pdesc,
|
||||
+ struct rx_fwinfo_92d *p_drvinfo,
|
||||
+ bool packet_match_bssid,
|
||||
+ bool packet_toself,
|
||||
+ bool packet_beacon)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_phy *rtlphy = &rtlpriv->phy;
|
||||
@@ -203,8 +203,8 @@ static void rtl92d_loop_over_paths(struct ieee80211_hw *hw,
|
||||
}
|
||||
}
|
||||
|
||||
-static void _rtl92de_process_ui_rssi(struct ieee80211_hw *hw,
|
||||
- struct rtl_stats *pstats)
|
||||
+static void _rtl92d_process_ui_rssi(struct ieee80211_hw *hw,
|
||||
+ struct rtl_stats *pstats)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rt_smooth_data *ui_rssi;
|
||||
@@ -226,15 +226,15 @@ static void _rtl92de_process_ui_rssi(struct ieee80211_hw *hw,
|
||||
if (ui_rssi->index >= PHY_RSSI_SLID_WIN_MAX)
|
||||
ui_rssi->index = 0;
|
||||
tmpval = ui_rssi->total_val / ui_rssi->total_num;
|
||||
- rtlpriv->stats.signal_strength = _rtl92de_translate_todbm(hw, (u8)tmpval);
|
||||
+ rtlpriv->stats.signal_strength = _rtl92d_translate_todbm(hw, (u8)tmpval);
|
||||
pstats->rssi = rtlpriv->stats.signal_strength;
|
||||
|
||||
if (!pstats->is_cck && pstats->packet_toself)
|
||||
rtl92d_loop_over_paths(hw, pstats);
|
||||
}
|
||||
|
||||
-static void _rtl92de_update_rxsignalstatistics(struct ieee80211_hw *hw,
|
||||
- struct rtl_stats *pstats)
|
||||
+static void _rtl92d_update_rxsignalstatistics(struct ieee80211_hw *hw,
|
||||
+ struct rtl_stats *pstats)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
int weighting = 0;
|
||||
@@ -249,8 +249,8 @@ static void _rtl92de_update_rxsignalstatistics(struct ieee80211_hw *hw,
|
||||
5 + pstats->recvsignalpower + weighting) / 6;
|
||||
}
|
||||
|
||||
-static void _rtl92de_process_pwdb(struct ieee80211_hw *hw,
|
||||
- struct rtl_stats *pstats)
|
||||
+static void _rtl92d_process_pwdb(struct ieee80211_hw *hw,
|
||||
+ struct rtl_stats *pstats)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
|
||||
@@ -276,7 +276,7 @@ static void _rtl92de_process_pwdb(struct ieee80211_hw *hw,
|
||||
(pstats->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
|
||||
}
|
||||
rtlpriv->dm.undec_sm_pwdb = undec_sm_pwdb;
|
||||
- _rtl92de_update_rxsignalstatistics(hw, pstats);
|
||||
+ _rtl92d_update_rxsignalstatistics(hw, pstats);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,8 +301,8 @@ static void rtl92d_loop_over_streams(struct ieee80211_hw *hw,
|
||||
}
|
||||
}
|
||||
|
||||
-static void _rtl92de_process_ui_link_quality(struct ieee80211_hw *hw,
|
||||
- struct rtl_stats *pstats)
|
||||
+static void _rtl92d_process_ui_link_quality(struct ieee80211_hw *hw,
|
||||
+ struct rtl_stats *pstats)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
struct rt_smooth_data *ui_link_quality;
|
||||
@@ -330,24 +330,24 @@ static void _rtl92de_process_ui_link_quality(struct ieee80211_hw *hw,
|
||||
rtl92d_loop_over_streams(hw, pstats);
|
||||
}
|
||||
|
||||
-static void _rtl92de_process_phyinfo(struct ieee80211_hw *hw,
|
||||
- u8 *buffer,
|
||||
- struct rtl_stats *pcurrent_stats)
|
||||
+static void _rtl92d_process_phyinfo(struct ieee80211_hw *hw,
|
||||
+ u8 *buffer,
|
||||
+ struct rtl_stats *pcurrent_stats)
|
||||
{
|
||||
if (!pcurrent_stats->packet_matchbssid &&
|
||||
!pcurrent_stats->packet_beacon)
|
||||
return;
|
||||
|
||||
- _rtl92de_process_ui_rssi(hw, pcurrent_stats);
|
||||
- _rtl92de_process_pwdb(hw, pcurrent_stats);
|
||||
- _rtl92de_process_ui_link_quality(hw, pcurrent_stats);
|
||||
+ _rtl92d_process_ui_rssi(hw, pcurrent_stats);
|
||||
+ _rtl92d_process_pwdb(hw, pcurrent_stats);
|
||||
+ _rtl92d_process_ui_link_quality(hw, pcurrent_stats);
|
||||
}
|
||||
|
||||
-static void _rtl92de_translate_rx_signal_stuff(struct ieee80211_hw *hw,
|
||||
- struct sk_buff *skb,
|
||||
- struct rtl_stats *pstats,
|
||||
- __le32 *pdesc,
|
||||
- struct rx_fwinfo_92d *p_drvinfo)
|
||||
+static void _rtl92d_translate_rx_signal_stuff(struct ieee80211_hw *hw,
|
||||
+ struct sk_buff *skb,
|
||||
+ struct rtl_stats *pstats,
|
||||
+ __le32 *pdesc,
|
||||
+ struct rx_fwinfo_92d *p_drvinfo)
|
||||
{
|
||||
struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
|
||||
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
|
||||
@@ -375,15 +375,15 @@ static void _rtl92de_translate_rx_signal_stuff(struct ieee80211_hw *hw,
|
||||
packet_toself = packet_matchbssid &&
|
||||
ether_addr_equal(praddr, rtlefuse->dev_addr);
|
||||
packet_beacon = ieee80211_is_beacon(fc);
|
||||
- _rtl92de_query_rxphystatus(hw, pstats, pdesc, p_drvinfo,
|
||||
- packet_matchbssid, packet_toself,
|
||||
- packet_beacon);
|
||||
- _rtl92de_process_phyinfo(hw, tmp_buf, pstats);
|
||||
+ _rtl92d_query_rxphystatus(hw, pstats, pdesc, p_drvinfo,
|
||||
+ packet_matchbssid, packet_toself,
|
||||
+ packet_beacon);
|
||||
+ _rtl92d_process_phyinfo(hw, tmp_buf, pstats);
|
||||
}
|
||||
|
||||
-bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
- struct ieee80211_rx_status *rx_status,
|
||||
- u8 *pdesc8, struct sk_buff *skb)
|
||||
+bool rtl92d_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
+ struct ieee80211_rx_status *rx_status,
|
||||
+ u8 *pdesc8, struct sk_buff *skb)
|
||||
{
|
||||
__le32 *pdesc = (__le32 *)pdesc8;
|
||||
struct rx_fwinfo_92d *p_drvinfo;
|
||||
@@ -423,17 +423,17 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
if (phystatus) {
|
||||
p_drvinfo = (struct rx_fwinfo_92d *)(skb->data +
|
||||
stats->rx_bufshift);
|
||||
- _rtl92de_translate_rx_signal_stuff(hw, skb, stats, pdesc,
|
||||
- p_drvinfo);
|
||||
+ _rtl92d_translate_rx_signal_stuff(hw, skb, stats, pdesc,
|
||||
+ p_drvinfo);
|
||||
}
|
||||
/*rx_status->qual = stats->signal; */
|
||||
rx_status->signal = stats->recvsignalpower + 10;
|
||||
return true;
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_rx_query_desc);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_rx_query_desc);
|
||||
|
||||
-void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc8, bool istx,
|
||||
- u8 desc_name, u8 *val)
|
||||
+void rtl92d_set_desc(struct ieee80211_hw *hw, u8 *pdesc8, bool istx,
|
||||
+ u8 desc_name, u8 *val)
|
||||
{
|
||||
__le32 *pdesc = (__le32 *)pdesc8;
|
||||
|
||||
@@ -473,10 +473,10 @@ void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc8, bool istx,
|
||||
}
|
||||
}
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_set_desc);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_set_desc);
|
||||
|
||||
-u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
||||
- u8 *p_desc8, bool istx, u8 desc_name)
|
||||
+u64 rtl92d_get_desc(struct ieee80211_hw *hw,
|
||||
+ u8 *p_desc8, bool istx, u8 desc_name)
|
||||
{
|
||||
__le32 *p_desc = (__le32 *)p_desc8;
|
||||
u32 ret = 0;
|
||||
@@ -513,4 +513,4 @@ u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
-EXPORT_SYMBOL_GPL(rtl92de_get_desc);
|
||||
+EXPORT_SYMBOL_GPL(rtl92d_get_desc);
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.h
|
||||
index 87d956d771eb..528182b1eba6 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.h
|
||||
@@ -393,13 +393,13 @@ struct rx_fwinfo_92d {
|
||||
#endif
|
||||
} __packed;
|
||||
|
||||
-bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
|
||||
- struct rtl_stats *stats,
|
||||
- struct ieee80211_rx_status *rx_status,
|
||||
- u8 *pdesc, struct sk_buff *skb);
|
||||
-void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
|
||||
- u8 desc_name, u8 *val);
|
||||
-u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
||||
- u8 *p_desc, bool istx, u8 desc_name);
|
||||
+bool rtl92d_rx_query_desc(struct ieee80211_hw *hw,
|
||||
+ struct rtl_stats *stats,
|
||||
+ struct ieee80211_rx_status *rx_status,
|
||||
+ u8 *pdesc, struct sk_buff *skb);
|
||||
+void rtl92d_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
|
||||
+ u8 desc_name, u8 *val);
|
||||
+u64 rtl92d_get_desc(struct ieee80211_hw *hw,
|
||||
+ u8 *p_desc, bool istx, u8 desc_name);
|
||||
|
||||
#endif
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
|
||||
index 73b81e60cfa9..03f4314bdb2e 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
|
||||
@@ -181,7 +181,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
|
||||
u8 btype_ibss = val[0];
|
||||
|
||||
if (btype_ibss)
|
||||
- rtl92de_stop_tx_beacon(hw);
|
||||
+ rtl92d_stop_tx_beacon(hw);
|
||||
_rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(3));
|
||||
rtl_write_dword(rtlpriv, REG_TSFTR,
|
||||
(u32) (mac->tsf & 0xffffffff));
|
||||
@@ -189,7 +189,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
|
||||
(u32) ((mac->tsf >> 32) & 0xffffffff));
|
||||
_rtl92de_set_bcn_ctrl_reg(hw, BIT(3), 0);
|
||||
if (btype_ibss)
|
||||
- rtl92de_resume_tx_beacon(hw);
|
||||
+ rtl92d_resume_tx_beacon(hw);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -295,13 +295,13 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
|
||||
|
||||
/* 18. LLT_table_init(Adapter); */
|
||||
for (i = 0; i < (txpktbuf_bndy - 1); i++) {
|
||||
- status = rtl92de_llt_write(hw, i, i + 1);
|
||||
+ status = rtl92d_llt_write(hw, i, i + 1);
|
||||
if (!status)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* end of list */
|
||||
- status = rtl92de_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
|
||||
+ status = rtl92d_llt_write(hw, (txpktbuf_bndy - 1), 0xFF);
|
||||
if (!status)
|
||||
return status;
|
||||
|
||||
@@ -310,13 +310,13 @@ static bool _rtl92de_llt_table_init(struct ieee80211_hw *hw)
|
||||
/* config this MAC as two MAC transfer. */
|
||||
/* Otherwise used as local loopback buffer. */
|
||||
for (i = txpktbuf_bndy; i < maxpage; i++) {
|
||||
- status = rtl92de_llt_write(hw, i, (i + 1));
|
||||
+ status = rtl92d_llt_write(hw, i, (i + 1));
|
||||
if (!status)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Let last entry point to the start entry of ring buffer */
|
||||
- status = rtl92de_llt_write(hw, maxpage, txpktbuf_bndy);
|
||||
+ status = rtl92d_llt_write(hw, maxpage, txpktbuf_bndy);
|
||||
if (!status)
|
||||
return status;
|
||||
|
||||
@@ -688,7 +688,7 @@ int rtl92de_hw_init(struct ieee80211_hw *hw)
|
||||
|
||||
/* reset hw sec */
|
||||
rtl_cam_reset_all_entry(hw);
|
||||
- rtl92de_enable_hw_security_config(hw);
|
||||
+ rtl92d_enable_hw_security_config(hw);
|
||||
|
||||
/* Read EEPROM TX power index and PHY_REG_PG.txt to capture correct */
|
||||
/* TX power index for different rate set. */
|
||||
@@ -742,11 +742,11 @@ static int _rtl92de_set_media_status(struct ieee80211_hw *hw,
|
||||
|
||||
if (type == NL80211_IFTYPE_UNSPECIFIED ||
|
||||
type == NL80211_IFTYPE_STATION) {
|
||||
- rtl92de_stop_tx_beacon(hw);
|
||||
+ rtl92d_stop_tx_beacon(hw);
|
||||
_rtl92de_enable_bcn_sub_func(hw);
|
||||
} else if (type == NL80211_IFTYPE_ADHOC ||
|
||||
type == NL80211_IFTYPE_AP) {
|
||||
- rtl92de_resume_tx_beacon(hw);
|
||||
+ rtl92d_resume_tx_beacon(hw);
|
||||
_rtl92de_disable_bcn_sub_func(hw);
|
||||
} else {
|
||||
rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
|
||||
index 5f6311c2aac4..f5ce4889523e 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/sw.c
|
||||
@@ -187,7 +187,7 @@ static void rtl92d_deinit_sw_vars(struct ieee80211_hw *hw)
|
||||
static struct rtl_hal_ops rtl8192de_hal_ops = {
|
||||
.init_sw_vars = rtl92d_init_sw_vars,
|
||||
.deinit_sw_vars = rtl92d_deinit_sw_vars,
|
||||
- .read_eeprom_info = rtl92de_read_eeprom_info,
|
||||
+ .read_eeprom_info = rtl92d_read_eeprom_info,
|
||||
.interrupt_recognized = rtl92de_interrupt_recognized,
|
||||
.hw_init = rtl92de_hw_init,
|
||||
.hw_disable = rtl92de_card_disable,
|
||||
@@ -197,30 +197,30 @@ static struct rtl_hal_ops rtl8192de_hal_ops = {
|
||||
.disable_interrupt = rtl92de_disable_interrupt,
|
||||
.set_network_type = rtl92de_set_network_type,
|
||||
.set_chk_bssid = rtl92de_set_check_bssid,
|
||||
- .set_qos = rtl92de_set_qos,
|
||||
+ .set_qos = rtl92d_set_qos,
|
||||
.set_bcn_reg = rtl92de_set_beacon_related_registers,
|
||||
.set_bcn_intv = rtl92de_set_beacon_interval,
|
||||
.update_interrupt_mask = rtl92de_update_interrupt_mask,
|
||||
.get_hw_reg = rtl92de_get_hw_reg,
|
||||
.set_hw_reg = rtl92de_set_hw_reg,
|
||||
- .update_rate_tbl = rtl92de_update_hal_rate_tbl,
|
||||
+ .update_rate_tbl = rtl92d_update_hal_rate_tbl,
|
||||
.fill_tx_desc = rtl92de_tx_fill_desc,
|
||||
.fill_tx_cmddesc = rtl92de_tx_fill_cmddesc,
|
||||
- .query_rx_desc = rtl92de_rx_query_desc,
|
||||
- .set_channel_access = rtl92de_update_channel_access_setting,
|
||||
- .radio_onoff_checking = rtl92de_gpio_radio_on_off_checking,
|
||||
+ .query_rx_desc = rtl92d_rx_query_desc,
|
||||
+ .set_channel_access = rtl92d_update_channel_access_setting,
|
||||
+ .radio_onoff_checking = rtl92d_gpio_radio_on_off_checking,
|
||||
.set_bw_mode = rtl92d_phy_set_bw_mode,
|
||||
.switch_channel = rtl92d_phy_sw_chnl,
|
||||
.dm_watchdog = rtl92de_dm_watchdog,
|
||||
.scan_operation_backup = rtl_phy_scan_operation_backup,
|
||||
.set_rf_power_state = rtl92d_phy_set_rf_power_state,
|
||||
.led_control = rtl92de_led_control,
|
||||
- .set_desc = rtl92de_set_desc,
|
||||
- .get_desc = rtl92de_get_desc,
|
||||
+ .set_desc = rtl92d_set_desc,
|
||||
+ .get_desc = rtl92d_get_desc,
|
||||
.is_tx_desc_closed = rtl92de_is_tx_desc_closed,
|
||||
.tx_polling = rtl92de_tx_polling,
|
||||
- .enable_hw_sec = rtl92de_enable_hw_security_config,
|
||||
- .set_key = rtl92de_set_key,
|
||||
+ .enable_hw_sec = rtl92d_enable_hw_security_config,
|
||||
+ .set_key = rtl92d_set_key,
|
||||
.get_bbreg = rtl92d_phy_query_bb_reg,
|
||||
.set_bbreg = rtl92d_phy_set_bb_reg,
|
||||
.get_rfreg = rtl92d_phy_query_rf_reg,
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
index 2b9b352f7783..91bf399c9ef1 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
|
||||
@@ -292,7 +292,7 @@ bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw,
|
||||
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
|
||||
struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
|
||||
u8 *entry = (u8 *)(&ring->desc[ring->idx]);
|
||||
- u8 own = (u8)rtl92de_get_desc(hw, entry, true, HW_DESC_OWN);
|
||||
+ u8 own = (u8)rtl92d_get_desc(hw, entry, true, HW_DESC_OWN);
|
||||
|
||||
/* a beacon packet will only use the first
|
||||
* descriptor by defaut, and the own bit may not
|
||||
--
|
||||
2.34.1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,39 @@
|
||||
From 34ddbe7398b1e23d78192999dcc88a7f57bcaae5 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:44:39 +0300
|
||||
Subject: [PATCH 20/69] FROMGIT(6.11): wifi: rtlwifi: Add new members to struct
|
||||
rtl_priv for RTL8192DU
|
||||
|
||||
These are needed for the dual MAC version of RTL8192DU.
|
||||
|
||||
The two mutexes are used to avoid concurrent access to the hardware
|
||||
from the two USB interfaces.
|
||||
|
||||
The two arrays are filled by one interface during LC calibration and
|
||||
accessed by the other interface during channel switching.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/wifi.h | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
index 4f1c21c130f4..2e88359ba917 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
@@ -2773,6 +2773,12 @@ struct rtl_priv {
|
||||
*/
|
||||
bool use_new_trx_flow;
|
||||
|
||||
+ /* For dual MAC RTL8192DU, things shared by the 2 USB interfaces */
|
||||
+ u32 *curveindex_2g;
|
||||
+ u32 *curveindex_5g;
|
||||
+ struct mutex *mutex_for_power_on_off; /* for power on/off */
|
||||
+ struct mutex *mutex_for_hw_init; /* for hardware init */
|
||||
+
|
||||
#ifdef CONFIG_PM
|
||||
struct wiphy_wowlan_support wowlan;
|
||||
#endif
|
||||
--
|
||||
2.34.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,462 @@
|
||||
From 8125d619567b9a3620244251b8eab25074cafcfa Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:46:26 +0300
|
||||
Subject: [PATCH 23/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/trx.{c,h}
|
||||
|
||||
These contain routines related to sending frames to the chip.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/trx.c | 372 ++++++++++++++++++
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/trx.h | 60 +++
|
||||
2 files changed, 432 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.c
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.h
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.c
|
||||
new file mode 100644
|
||||
index 000000000000..743ce0cfffe6
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.c
|
||||
@@ -0,0 +1,372 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#include "../wifi.h"
|
||||
+#include "../base.h"
|
||||
+#include "../usb.h"
|
||||
+#include "../rtl8192d/reg.h"
|
||||
+#include "../rtl8192d/def.h"
|
||||
+#include "../rtl8192d/trx_common.h"
|
||||
+#include "trx.h"
|
||||
+
|
||||
+void rtl92du_tx_cleanup(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int rtl92du_tx_post_hdl(struct ieee80211_hw *hw, struct urb *urb,
|
||||
+ struct sk_buff *skb)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+struct sk_buff *rtl92du_tx_aggregate_hdl(struct ieee80211_hw *hw,
|
||||
+ struct sk_buff_head *list)
|
||||
+{
|
||||
+ return skb_dequeue(list);
|
||||
+}
|
||||
+
|
||||
+static enum rtl_desc_qsel _rtl92du_hwq_to_descq(u16 queue_index)
|
||||
+{
|
||||
+ switch (queue_index) {
|
||||
+ case RTL_TXQ_BCN:
|
||||
+ return QSLT_BEACON;
|
||||
+ case RTL_TXQ_MGT:
|
||||
+ return QSLT_MGNT;
|
||||
+ case RTL_TXQ_VO:
|
||||
+ return QSLT_VO;
|
||||
+ case RTL_TXQ_VI:
|
||||
+ return QSLT_VI;
|
||||
+ case RTL_TXQ_BK:
|
||||
+ return QSLT_BK;
|
||||
+ default:
|
||||
+ case RTL_TXQ_BE:
|
||||
+ return QSLT_BE;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* For HW recovery information */
|
||||
+static void _rtl92du_tx_desc_checksum(__le32 *txdesc)
|
||||
+{
|
||||
+ __le16 *ptr = (__le16 *)txdesc;
|
||||
+ u16 checksum = 0;
|
||||
+ u32 index;
|
||||
+
|
||||
+ /* Clear first */
|
||||
+ set_tx_desc_tx_desc_checksum(txdesc, 0);
|
||||
+ for (index = 0; index < 16; index++)
|
||||
+ checksum = checksum ^ le16_to_cpu(*(ptr + index));
|
||||
+ set_tx_desc_tx_desc_checksum(txdesc, checksum);
|
||||
+}
|
||||
+
|
||||
+void rtl92du_tx_fill_desc(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_hdr *hdr, u8 *pdesc_tx,
|
||||
+ u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
|
||||
+ struct ieee80211_sta *sta,
|
||||
+ struct sk_buff *skb,
|
||||
+ u8 queue_index,
|
||||
+ struct rtl_tcb_desc *tcb_desc)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_ps_ctl *ppsc = rtl_psc(rtlpriv);
|
||||
+ struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
|
||||
+ struct rtl_mac *mac = rtl_mac(rtlpriv);
|
||||
+ struct rtl_sta_info *sta_entry;
|
||||
+ __le16 fc = hdr->frame_control;
|
||||
+ u8 agg_state = RTL_AGG_STOP;
|
||||
+ u16 pktlen = skb->len;
|
||||
+ u32 rts_en, hw_rts_en;
|
||||
+ u8 ampdu_density = 0;
|
||||
+ u16 seq_number;
|
||||
+ __le32 *txdesc;
|
||||
+ u8 rate_flag;
|
||||
+ u8 tid;
|
||||
+
|
||||
+ rtl_get_tcb_desc(hw, info, sta, skb, tcb_desc);
|
||||
+
|
||||
+ txdesc = (__le32 *)skb_push(skb, RTL_TX_HEADER_SIZE);
|
||||
+ memset(txdesc, 0, RTL_TX_HEADER_SIZE);
|
||||
+
|
||||
+ set_tx_desc_pkt_size(txdesc, pktlen);
|
||||
+ set_tx_desc_linip(txdesc, 0);
|
||||
+ set_tx_desc_pkt_offset(txdesc, RTL_DUMMY_OFFSET);
|
||||
+ set_tx_desc_offset(txdesc, RTL_TX_HEADER_SIZE);
|
||||
+ /* 5G have no CCK rate */
|
||||
+ if (rtlhal->current_bandtype == BAND_ON_5G)
|
||||
+ if (tcb_desc->hw_rate < DESC_RATE6M)
|
||||
+ tcb_desc->hw_rate = DESC_RATE6M;
|
||||
+
|
||||
+ set_tx_desc_tx_rate(txdesc, tcb_desc->hw_rate);
|
||||
+ if (tcb_desc->use_shortgi || tcb_desc->use_shortpreamble)
|
||||
+ set_tx_desc_data_shortgi(txdesc, 1);
|
||||
+
|
||||
+ if (rtlhal->macphymode == DUALMAC_DUALPHY &&
|
||||
+ tcb_desc->hw_rate == DESC_RATEMCS7)
|
||||
+ set_tx_desc_data_shortgi(txdesc, 1);
|
||||
+
|
||||
+ if (sta) {
|
||||
+ sta_entry = (struct rtl_sta_info *)sta->drv_priv;
|
||||
+ tid = ieee80211_get_tid(hdr);
|
||||
+ agg_state = sta_entry->tids[tid].agg.agg_state;
|
||||
+ ampdu_density = sta->deflink.ht_cap.ampdu_density;
|
||||
+ }
|
||||
+
|
||||
+ if (agg_state == RTL_AGG_OPERATIONAL &&
|
||||
+ info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||
+ set_tx_desc_agg_enable(txdesc, 1);
|
||||
+ set_tx_desc_max_agg_num(txdesc, 0x14);
|
||||
+ set_tx_desc_ampdu_density(txdesc, ampdu_density);
|
||||
+ tcb_desc->rts_enable = 1;
|
||||
+ tcb_desc->rts_rate = DESC_RATE24M;
|
||||
+ } else {
|
||||
+ set_tx_desc_agg_break(txdesc, 1);
|
||||
+ }
|
||||
+ seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
|
||||
+ set_tx_desc_seq(txdesc, seq_number);
|
||||
+
|
||||
+ rts_en = tcb_desc->rts_enable && !tcb_desc->cts_enable;
|
||||
+ hw_rts_en = tcb_desc->rts_enable || tcb_desc->cts_enable;
|
||||
+ set_tx_desc_rts_enable(txdesc, rts_en);
|
||||
+ set_tx_desc_hw_rts_enable(txdesc, hw_rts_en);
|
||||
+ set_tx_desc_cts2self(txdesc, tcb_desc->cts_enable);
|
||||
+ set_tx_desc_rts_stbc(txdesc, tcb_desc->rts_stbc);
|
||||
+ /* 5G have no CCK rate */
|
||||
+ if (rtlhal->current_bandtype == BAND_ON_5G)
|
||||
+ if (tcb_desc->rts_rate < DESC_RATE6M)
|
||||
+ tcb_desc->rts_rate = DESC_RATE6M;
|
||||
+ set_tx_desc_rts_rate(txdesc, tcb_desc->rts_rate);
|
||||
+ set_tx_desc_rts_bw(txdesc, 0);
|
||||
+ set_tx_desc_rts_sc(txdesc, tcb_desc->rts_sc);
|
||||
+ set_tx_desc_rts_short(txdesc, tcb_desc->rts_use_shortpreamble);
|
||||
+
|
||||
+ rate_flag = info->control.rates[0].flags;
|
||||
+ if (mac->bw_40) {
|
||||
+ if (rate_flag & IEEE80211_TX_RC_DUP_DATA) {
|
||||
+ set_tx_desc_data_bw(txdesc, 1);
|
||||
+ set_tx_desc_tx_sub_carrier(txdesc, 3);
|
||||
+ } else if (rate_flag & IEEE80211_TX_RC_40_MHZ_WIDTH) {
|
||||
+ set_tx_desc_data_bw(txdesc, 1);
|
||||
+ set_tx_desc_tx_sub_carrier(txdesc, mac->cur_40_prime_sc);
|
||||
+ } else {
|
||||
+ set_tx_desc_data_bw(txdesc, 0);
|
||||
+ set_tx_desc_tx_sub_carrier(txdesc, 0);
|
||||
+ }
|
||||
+ } else {
|
||||
+ set_tx_desc_data_bw(txdesc, 0);
|
||||
+ set_tx_desc_tx_sub_carrier(txdesc, 0);
|
||||
+ }
|
||||
+
|
||||
+ if (info->control.hw_key) {
|
||||
+ struct ieee80211_key_conf *keyconf = info->control.hw_key;
|
||||
+
|
||||
+ switch (keyconf->cipher) {
|
||||
+ case WLAN_CIPHER_SUITE_WEP40:
|
||||
+ case WLAN_CIPHER_SUITE_WEP104:
|
||||
+ case WLAN_CIPHER_SUITE_TKIP:
|
||||
+ set_tx_desc_sec_type(txdesc, 0x1);
|
||||
+ break;
|
||||
+ case WLAN_CIPHER_SUITE_CCMP:
|
||||
+ set_tx_desc_sec_type(txdesc, 0x3);
|
||||
+ break;
|
||||
+ default:
|
||||
+ set_tx_desc_sec_type(txdesc, 0x0);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ set_tx_desc_pkt_id(txdesc, 0);
|
||||
+ set_tx_desc_queue_sel(txdesc, _rtl92du_hwq_to_descq(queue_index));
|
||||
+ set_tx_desc_data_rate_fb_limit(txdesc, 0x1F);
|
||||
+ set_tx_desc_rts_rate_fb_limit(txdesc, 0xF);
|
||||
+ set_tx_desc_disable_fb(txdesc, 0);
|
||||
+ set_tx_desc_use_rate(txdesc, tcb_desc->use_driver_rate);
|
||||
+
|
||||
+ if (ieee80211_is_data_qos(fc)) {
|
||||
+ if (mac->rdg_en) {
|
||||
+ rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE,
|
||||
+ "Enable RDG function\n");
|
||||
+ set_tx_desc_rdg_enable(txdesc, 1);
|
||||
+ set_tx_desc_htc(txdesc, 1);
|
||||
+ }
|
||||
+ set_tx_desc_qos(txdesc, 1);
|
||||
+ }
|
||||
+
|
||||
+ if (rtlpriv->dm.useramask) {
|
||||
+ set_tx_desc_rate_id(txdesc, tcb_desc->ratr_index);
|
||||
+ set_tx_desc_macid(txdesc, tcb_desc->mac_id);
|
||||
+ } else {
|
||||
+ set_tx_desc_rate_id(txdesc, 0xC + tcb_desc->ratr_index);
|
||||
+ set_tx_desc_macid(txdesc, tcb_desc->ratr_index);
|
||||
+ }
|
||||
+
|
||||
+ if (!ieee80211_is_data_qos(fc) && ppsc->leisure_ps &&
|
||||
+ ppsc->fwctrl_lps) {
|
||||
+ set_tx_desc_hwseq_en(txdesc, 1);
|
||||
+ set_tx_desc_pkt_id(txdesc, 8);
|
||||
+ }
|
||||
+
|
||||
+ if (ieee80211_has_morefrags(fc))
|
||||
+ set_tx_desc_more_frag(txdesc, 1);
|
||||
+ if (is_multicast_ether_addr(ieee80211_get_DA(hdr)) ||
|
||||
+ is_broadcast_ether_addr(ieee80211_get_DA(hdr)))
|
||||
+ set_tx_desc_bmc(txdesc, 1);
|
||||
+
|
||||
+ set_tx_desc_own(txdesc, 1);
|
||||
+ set_tx_desc_last_seg(txdesc, 1);
|
||||
+ set_tx_desc_first_seg(txdesc, 1);
|
||||
+ _rtl92du_tx_desc_checksum(txdesc);
|
||||
+
|
||||
+ rtl_dbg(rtlpriv, COMP_SEND, DBG_TRACE, "==>\n");
|
||||
+}
|
||||
+
|
||||
+static void _rtl92du_config_out_ep(struct ieee80211_hw *hw, u8 num_out_pipe)
|
||||
+{
|
||||
+ struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
|
||||
+ u16 ep_cfg;
|
||||
+
|
||||
+ rtlusb->out_queue_sel = 0;
|
||||
+ rtlusb->out_ep_nums = 0;
|
||||
+
|
||||
+ if (rtlhal->interfaceindex == 0)
|
||||
+ ep_cfg = rtl_read_word(rtlpriv, REG_USB_Queue_Select_MAC0);
|
||||
+ else
|
||||
+ ep_cfg = rtl_read_word(rtlpriv, REG_USB_Queue_Select_MAC1);
|
||||
+
|
||||
+ if (ep_cfg & 0x00f) {
|
||||
+ rtlusb->out_queue_sel |= TX_SELE_HQ;
|
||||
+ rtlusb->out_ep_nums++;
|
||||
+ }
|
||||
+ if (ep_cfg & 0x0f0) {
|
||||
+ rtlusb->out_queue_sel |= TX_SELE_NQ;
|
||||
+ rtlusb->out_ep_nums++;
|
||||
+ }
|
||||
+ if (ep_cfg & 0xf00) {
|
||||
+ rtlusb->out_queue_sel |= TX_SELE_LQ;
|
||||
+ rtlusb->out_ep_nums++;
|
||||
+ }
|
||||
+
|
||||
+ switch (num_out_pipe) {
|
||||
+ case 3:
|
||||
+ rtlusb->out_queue_sel = TX_SELE_HQ | TX_SELE_NQ | TX_SELE_LQ;
|
||||
+ rtlusb->out_ep_nums = 3;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ rtlusb->out_queue_sel = TX_SELE_HQ | TX_SELE_NQ;
|
||||
+ rtlusb->out_ep_nums = 2;
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ rtlusb->out_queue_sel = TX_SELE_HQ;
|
||||
+ rtlusb->out_ep_nums = 1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void _rtl92du_one_out_ep_mapping(struct rtl_usb *rtlusb,
|
||||
+ struct rtl_ep_map *ep_map)
|
||||
+{
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0];
|
||||
+}
|
||||
+
|
||||
+static void _rtl92du_two_out_ep_mapping(struct rtl_usb *rtlusb,
|
||||
+ struct rtl_ep_map *ep_map)
|
||||
+{
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[1];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[1];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0];
|
||||
+}
|
||||
+
|
||||
+static void _rtl92du_three_out_ep_mapping(struct rtl_usb *rtlusb,
|
||||
+ struct rtl_ep_map *ep_map)
|
||||
+{
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BE] = rtlusb->out_eps[2];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BK] = rtlusb->out_eps[2];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_VI] = rtlusb->out_eps[1];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_VO] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_MGT] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_BCN] = rtlusb->out_eps[0];
|
||||
+ ep_map->ep_mapping[RTL_TXQ_HI] = rtlusb->out_eps[0];
|
||||
+}
|
||||
+
|
||||
+static int _rtl92du_out_ep_mapping(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
|
||||
+ struct rtl_ep_map *ep_map = &rtlusb->ep_map;
|
||||
+
|
||||
+ switch (rtlusb->out_ep_nums) {
|
||||
+ case 1:
|
||||
+ _rtl92du_one_out_ep_mapping(rtlusb, ep_map);
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ _rtl92du_two_out_ep_mapping(rtlusb, ep_map);
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ _rtl92du_three_out_ep_mapping(rtlusb, ep_map);
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int rtl92du_endpoint_mapping(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
|
||||
+
|
||||
+ _rtl92du_config_out_ep(hw, rtlusb->out_ep_nums);
|
||||
+
|
||||
+ /* Normal chip with one IN and one OUT doesn't have interrupt IN EP. */
|
||||
+ if (rtlusb->out_ep_nums == 1 && rtlusb->in_ep_nums != 1)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ return _rtl92du_out_ep_mapping(hw);
|
||||
+}
|
||||
+
|
||||
+u16 rtl92du_mq_to_hwq(__le16 fc, u16 mac80211_queue_index)
|
||||
+{
|
||||
+ u16 hw_queue_index;
|
||||
+
|
||||
+ if (unlikely(ieee80211_is_beacon(fc))) {
|
||||
+ hw_queue_index = RTL_TXQ_BCN;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (ieee80211_is_mgmt(fc)) {
|
||||
+ hw_queue_index = RTL_TXQ_MGT;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ switch (mac80211_queue_index) {
|
||||
+ case 0:
|
||||
+ hw_queue_index = RTL_TXQ_VO;
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ hw_queue_index = RTL_TXQ_VI;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ hw_queue_index = RTL_TXQ_BE;
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ hw_queue_index = RTL_TXQ_BK;
|
||||
+ break;
|
||||
+ default:
|
||||
+ hw_queue_index = RTL_TXQ_BE;
|
||||
+ WARN_ONCE(true, "rtl8192du: QSLT_BE queue, skb_queue:%d\n",
|
||||
+ mac80211_queue_index);
|
||||
+ break;
|
||||
+ }
|
||||
+out:
|
||||
+ return hw_queue_index;
|
||||
+}
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.h
|
||||
new file mode 100644
|
||||
index 000000000000..8c3d24622fa7
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/trx.h
|
||||
@@ -0,0 +1,60 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#ifndef __RTL92DU_TRX_H__
|
||||
+#define __RTL92DU_TRX_H__
|
||||
+
|
||||
+#define TX_SELE_HQ BIT(0) /* High Queue */
|
||||
+#define TX_SELE_LQ BIT(1) /* Low Queue */
|
||||
+#define TX_SELE_NQ BIT(2) /* Normal Queue */
|
||||
+
|
||||
+#define TX_TOTAL_PAGE_NUMBER_92DU 0xF8
|
||||
+#define TEST_PAGE_NUM_PUBQ_92DU 0x89
|
||||
+#define TX_TOTAL_PAGE_NUMBER_92D_DUAL_MAC 0x7A
|
||||
+#define NORMAL_PAGE_NUM_PUBQ_92D_DUAL_MAC 0x5A
|
||||
+#define NORMAL_PAGE_NUM_HPQ_92D_DUAL_MAC 0x10
|
||||
+#define NORMAL_PAGE_NUM_LPQ_92D_DUAL_MAC 0x10
|
||||
+#define NORMAL_PAGE_NUM_NORMALQ_92D_DUAL_MAC 0
|
||||
+
|
||||
+#define WMM_NORMAL_TX_TOTAL_PAGE_NUMBER 0xF5
|
||||
+
|
||||
+#define WMM_NORMAL_PAGE_NUM_PUBQ_92D 0x65
|
||||
+#define WMM_NORMAL_PAGE_NUM_HPQ_92D 0x30
|
||||
+#define WMM_NORMAL_PAGE_NUM_LPQ_92D 0x30
|
||||
+#define WMM_NORMAL_PAGE_NUM_NPQ_92D 0x30
|
||||
+
|
||||
+#define WMM_NORMAL_PAGE_NUM_PUBQ_92D_DUAL_MAC 0x32
|
||||
+#define WMM_NORMAL_PAGE_NUM_HPQ_92D_DUAL_MAC 0x18
|
||||
+#define WMM_NORMAL_PAGE_NUM_LPQ_92D_DUAL_MAC 0x18
|
||||
+#define WMM_NORMAL_PAGE_NUM_NPQ_92D_DUAL_MAC 0x18
|
||||
+
|
||||
+static inline void set_tx_desc_bmc(__le32 *__txdesc, u32 __value)
|
||||
+{
|
||||
+ le32p_replace_bits(__txdesc, __value, BIT(24));
|
||||
+}
|
||||
+
|
||||
+static inline void set_tx_desc_agg_break(__le32 *__txdesc, u32 __value)
|
||||
+{
|
||||
+ le32p_replace_bits((__txdesc + 1), __value, BIT(6));
|
||||
+}
|
||||
+
|
||||
+static inline void set_tx_desc_tx_desc_checksum(__le32 *__txdesc, u32 __value)
|
||||
+{
|
||||
+ le32p_replace_bits((__txdesc + 7), __value, GENMASK(15, 0));
|
||||
+}
|
||||
+
|
||||
+void rtl92du_tx_fill_desc(struct ieee80211_hw *hw,
|
||||
+ struct ieee80211_hdr *hdr, u8 *pdesc,
|
||||
+ u8 *pbd_desc_tx, struct ieee80211_tx_info *info,
|
||||
+ struct ieee80211_sta *sta,
|
||||
+ struct sk_buff *skb, u8 hw_queue,
|
||||
+ struct rtl_tcb_desc *ptcb_desc);
|
||||
+int rtl92du_endpoint_mapping(struct ieee80211_hw *hw);
|
||||
+u16 rtl92du_mq_to_hwq(__le16 fc, u16 mac80211_queue_index);
|
||||
+struct sk_buff *rtl92du_tx_aggregate_hdl(struct ieee80211_hw *hw,
|
||||
+ struct sk_buff_head *list);
|
||||
+void rtl92du_tx_cleanup(struct ieee80211_hw *hw, struct sk_buff *skb);
|
||||
+int rtl92du_tx_post_hdl(struct ieee80211_hw *hw, struct urb *urb,
|
||||
+ struct sk_buff *skb);
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,282 @@
|
||||
From f42c4cb0031563e684a66ea2e21072387d9fcc7f Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:46:51 +0300
|
||||
Subject: [PATCH 24/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/rf.{c,h}
|
||||
|
||||
These contain one RF configuration function and some functions related
|
||||
to dual MAC operation.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/rf.c | 240 ++++++++++++++++++
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/rf.h | 11 +
|
||||
2 files changed, 251 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.c
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.h
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.c
|
||||
new file mode 100644
|
||||
index 000000000000..044dd65eafd0
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.c
|
||||
@@ -0,0 +1,240 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#include "../wifi.h"
|
||||
+#include "../rtl8192d/reg.h"
|
||||
+#include "../rtl8192d/phy_common.h"
|
||||
+#include "phy.h"
|
||||
+#include "rf.h"
|
||||
+
|
||||
+bool rtl92du_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_hal *rtlhal = &rtlpriv->rtlhal;
|
||||
+ u8 mac_on_bit = bmac0 ? MAC1_ON : MAC0_ON;
|
||||
+ u8 mac_reg = bmac0 ? REG_MAC1 : REG_MAC0;
|
||||
+ bool bresult = true; /* true: need to enable BB/RF power */
|
||||
+ u32 maskforphyset = 0;
|
||||
+ u16 val16;
|
||||
+ u8 u1btmp;
|
||||
+
|
||||
+ rtlhal->during_mac0init_radiob = false;
|
||||
+ rtlhal->during_mac1init_radioa = false;
|
||||
+ rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "===>\n");
|
||||
+
|
||||
+ /* MAC0 Need PHY1 load radio_b.txt . Driver use DBI to write. */
|
||||
+ u1btmp = rtl_read_byte(rtlpriv, mac_reg);
|
||||
+ if (!(u1btmp & mac_on_bit)) {
|
||||
+ rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "enable BB & RF\n");
|
||||
+ /* Enable BB and RF power */
|
||||
+
|
||||
+ maskforphyset = bmac0 ? MAC0_ACCESS_PHY1 : MAC1_ACCESS_PHY0;
|
||||
+
|
||||
+ val16 = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN | maskforphyset);
|
||||
+ val16 &= 0xfffc;
|
||||
+ rtl_write_word(rtlpriv, REG_SYS_FUNC_EN | maskforphyset, val16);
|
||||
+
|
||||
+ val16 = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN | maskforphyset);
|
||||
+ val16 |= BIT(13) | BIT(0) | BIT(1);
|
||||
+ rtl_write_word(rtlpriv, REG_SYS_FUNC_EN | maskforphyset, val16);
|
||||
+ } else {
|
||||
+ /* We think if MAC1 is ON,then radio_a.txt
|
||||
+ * and radio_b.txt has been load.
|
||||
+ */
|
||||
+ bresult = false;
|
||||
+ }
|
||||
+ rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "<===\n");
|
||||
+ return bresult;
|
||||
+}
|
||||
+
|
||||
+void rtl92du_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_hal *rtlhal = &rtlpriv->rtlhal;
|
||||
+ u8 mac_on_bit = bmac0 ? MAC1_ON : MAC0_ON;
|
||||
+ u8 mac_reg = bmac0 ? REG_MAC1 : REG_MAC0;
|
||||
+ u32 maskforphyset = 0;
|
||||
+ u8 u1btmp;
|
||||
+
|
||||
+ rtlhal->during_mac0init_radiob = false;
|
||||
+ rtlhal->during_mac1init_radioa = false;
|
||||
+ rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "====>\n");
|
||||
+
|
||||
+ /* check MAC0 enable or not again now, if
|
||||
+ * enabled, not power down radio A.
|
||||
+ */
|
||||
+ u1btmp = rtl_read_byte(rtlpriv, mac_reg);
|
||||
+ if (!(u1btmp & mac_on_bit)) {
|
||||
+ rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD, "power down\n");
|
||||
+ /* power down RF radio A according to YuNan's advice. */
|
||||
+ maskforphyset = bmac0 ? MAC0_ACCESS_PHY1 : MAC1_ACCESS_PHY0;
|
||||
+ rtl_write_dword(rtlpriv, RFPGA0_XA_LSSIPARAMETER | maskforphyset,
|
||||
+ 0x00000000);
|
||||
+ }
|
||||
+ rtl_dbg(rtlpriv, COMP_RF, DBG_LOUD, "<====\n");
|
||||
+}
|
||||
+
|
||||
+bool rtl92du_phy_rf6052_config(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ bool mac1_initradioa_first = false, mac0_initradiob_first = false;
|
||||
+ bool need_pwrdown_radioa = false, need_pwrdown_radiob = false;
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_hal *rtlhal = &rtlpriv->rtlhal;
|
||||
+ struct rtl_phy *rtlphy = &rtlpriv->phy;
|
||||
+ struct bb_reg_def *pphyreg;
|
||||
+ bool true_bpath = false;
|
||||
+ bool rtstatus = true;
|
||||
+ u32 u4_regvalue = 0;
|
||||
+ u8 rfpath;
|
||||
+
|
||||
+ if (rtlphy->rf_type == RF_1T1R)
|
||||
+ rtlphy->num_total_rfpath = 1;
|
||||
+ else
|
||||
+ rtlphy->num_total_rfpath = 2;
|
||||
+
|
||||
+ /* Single phy mode: use radio_a radio_b config path_A path_B
|
||||
+ * separately by MAC0, and MAC1 needn't configure RF;
|
||||
+ * Dual PHY mode: MAC0 use radio_a config 1st phy path_A,
|
||||
+ * MAC1 use radio_b config 2nd PHY path_A.
|
||||
+ * DMDP, MAC0 on G band, MAC1 on A band.
|
||||
+ */
|
||||
+ if (rtlhal->macphymode == DUALMAC_DUALPHY) {
|
||||
+ if (rtlhal->current_bandtype == BAND_ON_2_4G &&
|
||||
+ rtlhal->interfaceindex == 0) {
|
||||
+ /* MAC0 needs PHY1 load radio_b.txt. */
|
||||
+ if (rtl92du_phy_enable_anotherphy(hw, true)) {
|
||||
+ rtlphy->num_total_rfpath = 2;
|
||||
+ mac0_initradiob_first = true;
|
||||
+ } else {
|
||||
+ /* We think if MAC1 is ON,then radio_a.txt and
|
||||
+ * radio_b.txt has been load.
|
||||
+ */
|
||||
+ return rtstatus;
|
||||
+ }
|
||||
+ } else if (rtlhal->current_bandtype == BAND_ON_5G &&
|
||||
+ rtlhal->interfaceindex == 1) {
|
||||
+ /* MAC1 needs PHY0 load radio_a.txt. */
|
||||
+ if (rtl92du_phy_enable_anotherphy(hw, false)) {
|
||||
+ rtlphy->num_total_rfpath = 2;
|
||||
+ mac1_initradioa_first = true;
|
||||
+ } else {
|
||||
+ /* We think if MAC0 is ON, then radio_a.txt and
|
||||
+ * radio_b.txt has been load.
|
||||
+ */
|
||||
+ return rtstatus;
|
||||
+ }
|
||||
+ } else if (rtlhal->interfaceindex == 1) {
|
||||
+ /* MAC0 enabled, only init radia B. */
|
||||
+ true_bpath = true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (rfpath = 0; rfpath < rtlphy->num_total_rfpath; rfpath++) {
|
||||
+ /* Mac1 use PHY0 write */
|
||||
+ if (mac1_initradioa_first) {
|
||||
+ if (rfpath == RF90_PATH_A) {
|
||||
+ rtlhal->during_mac1init_radioa = true;
|
||||
+ need_pwrdown_radioa = true;
|
||||
+ } else if (rfpath == RF90_PATH_B) {
|
||||
+ rtlhal->during_mac1init_radioa = false;
|
||||
+ mac1_initradioa_first = false;
|
||||
+ rfpath = RF90_PATH_A;
|
||||
+ true_bpath = true;
|
||||
+ rtlphy->num_total_rfpath = 1;
|
||||
+ }
|
||||
+ } else if (mac0_initradiob_first) {
|
||||
+ /* Mac0 use PHY1 write */
|
||||
+ if (rfpath == RF90_PATH_A)
|
||||
+ rtlhal->during_mac0init_radiob = false;
|
||||
+ if (rfpath == RF90_PATH_B) {
|
||||
+ rtlhal->during_mac0init_radiob = true;
|
||||
+ mac0_initradiob_first = false;
|
||||
+ need_pwrdown_radiob = true;
|
||||
+ rfpath = RF90_PATH_A;
|
||||
+ true_bpath = true;
|
||||
+ rtlphy->num_total_rfpath = 1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ pphyreg = &rtlphy->phyreg_def[rfpath];
|
||||
+
|
||||
+ switch (rfpath) {
|
||||
+ case RF90_PATH_A:
|
||||
+ case RF90_PATH_C:
|
||||
+ u4_regvalue = rtl_get_bbreg(hw, pphyreg->rfintfs,
|
||||
+ BRFSI_RFENV);
|
||||
+ break;
|
||||
+ case RF90_PATH_B:
|
||||
+ case RF90_PATH_D:
|
||||
+ u4_regvalue = rtl_get_bbreg(hw, pphyreg->rfintfs,
|
||||
+ BRFSI_RFENV << 16);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ rtl_set_bbreg(hw, pphyreg->rfintfe, BRFSI_RFENV << 16, 0x1);
|
||||
+ udelay(1);
|
||||
+ rtl_set_bbreg(hw, pphyreg->rfintfo, BRFSI_RFENV, 0x1);
|
||||
+ udelay(1);
|
||||
+
|
||||
+ /* Set bit number of Address and Data for RF register */
|
||||
+ rtl_set_bbreg(hw, pphyreg->rfhssi_para2,
|
||||
+ B3WIREADDRESSLENGTH, 0x0);
|
||||
+ udelay(1);
|
||||
+ rtl_set_bbreg(hw, pphyreg->rfhssi_para2, B3WIREDATALENGTH, 0x0);
|
||||
+ udelay(1);
|
||||
+
|
||||
+ switch (rfpath) {
|
||||
+ case RF90_PATH_A:
|
||||
+ if (true_bpath)
|
||||
+ rtstatus = rtl92du_phy_config_rf_with_headerfile(
|
||||
+ hw, radiob_txt,
|
||||
+ (enum radio_path)rfpath);
|
||||
+ else
|
||||
+ rtstatus = rtl92du_phy_config_rf_with_headerfile(
|
||||
+ hw, radioa_txt,
|
||||
+ (enum radio_path)rfpath);
|
||||
+ break;
|
||||
+ case RF90_PATH_B:
|
||||
+ rtstatus =
|
||||
+ rtl92du_phy_config_rf_with_headerfile(hw, radiob_txt,
|
||||
+ (enum radio_path)rfpath);
|
||||
+ break;
|
||||
+ case RF90_PATH_C:
|
||||
+ break;
|
||||
+ case RF90_PATH_D:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ switch (rfpath) {
|
||||
+ case RF90_PATH_A:
|
||||
+ case RF90_PATH_C:
|
||||
+ rtl_set_bbreg(hw, pphyreg->rfintfs, BRFSI_RFENV,
|
||||
+ u4_regvalue);
|
||||
+ break;
|
||||
+ case RF90_PATH_B:
|
||||
+ case RF90_PATH_D:
|
||||
+ rtl_set_bbreg(hw, pphyreg->rfintfs, BRFSI_RFENV << 16,
|
||||
+ u4_regvalue);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (!rtstatus) {
|
||||
+ rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE,
|
||||
+ "Radio[%d] Fail!!\n", rfpath);
|
||||
+ return rtstatus;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* check MAC0 enable or not again, if enabled,
|
||||
+ * not power down radio A.
|
||||
+ * check MAC1 enable or not again, if enabled,
|
||||
+ * not power down radio B.
|
||||
+ */
|
||||
+ if (need_pwrdown_radioa)
|
||||
+ rtl92du_phy_powerdown_anotherphy(hw, false);
|
||||
+ else if (need_pwrdown_radiob)
|
||||
+ rtl92du_phy_powerdown_anotherphy(hw, true);
|
||||
+ rtl_dbg(rtlpriv, COMP_INIT, DBG_TRACE, "<---\n");
|
||||
+
|
||||
+ return rtstatus;
|
||||
+}
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.h
|
||||
new file mode 100644
|
||||
index 000000000000..4a92cbdd00c0
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/rf.h
|
||||
@@ -0,0 +1,11 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#ifndef __RTL92DU_RF_H__
|
||||
+#define __RTL92DU_RF_H__
|
||||
+
|
||||
+bool rtl92du_phy_rf6052_config(struct ieee80211_hw *hw);
|
||||
+bool rtl92du_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0);
|
||||
+void rtl92du_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0);
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,139 @@
|
||||
From 07d8e12d4523008675013f91d46a8a8d133a41c2 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:47:19 +0300
|
||||
Subject: [PATCH 25/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/fw.{c,h}
|
||||
and rtl8192du/led.{c,h}
|
||||
|
||||
fw.c contains a function for loading the firmware.
|
||||
led.c contains a function for controlling the LED.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/fw.c | 63 +++++++++++++++++++
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/fw.h | 9 +++
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/led.c | 10 +++
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/led.h | 9 +++
|
||||
4 files changed, 91 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.c
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.h
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.c
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.h
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.c
|
||||
new file mode 100644
|
||||
index 000000000000..f74e4e84fe39
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.c
|
||||
@@ -0,0 +1,63 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#include "../wifi.h"
|
||||
+#include "../rtl8192d/reg.h"
|
||||
+#include "../rtl8192d/def.h"
|
||||
+#include "../rtl8192d/fw_common.h"
|
||||
+#include "fw.h"
|
||||
+
|
||||
+int rtl92du_download_fw(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
|
||||
+ enum version_8192d version = rtlhal->version;
|
||||
+ u8 *pfwheader;
|
||||
+ u8 *pfwdata;
|
||||
+ u32 fwsize;
|
||||
+ int err;
|
||||
+
|
||||
+ if (rtlpriv->max_fw_size == 0 || !rtlhal->pfirmware)
|
||||
+ return 1;
|
||||
+
|
||||
+ fwsize = rtlhal->fwsize;
|
||||
+ pfwheader = rtlhal->pfirmware;
|
||||
+ pfwdata = rtlhal->pfirmware;
|
||||
+ rtlhal->fw_version = (u16)GET_FIRMWARE_HDR_VERSION(pfwheader);
|
||||
+ rtlhal->fw_subversion = (u16)GET_FIRMWARE_HDR_SUB_VER(pfwheader);
|
||||
+
|
||||
+ rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
+ "FirmwareVersion(%d), FirmwareSubVersion(%d), Signature(%#x)\n",
|
||||
+ rtlhal->fw_version, rtlhal->fw_subversion,
|
||||
+ GET_FIRMWARE_HDR_SIGNATURE(pfwheader));
|
||||
+
|
||||
+ if (IS_FW_HEADER_EXIST(pfwheader)) {
|
||||
+ rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
|
||||
+ "Shift 32 bytes for FW header!!\n");
|
||||
+ pfwdata = pfwdata + 32;
|
||||
+ fwsize = fwsize - 32;
|
||||
+ }
|
||||
+
|
||||
+ if (rtl92d_is_fw_downloaded(rtlpriv))
|
||||
+ goto exit;
|
||||
+
|
||||
+ /* If 8051 is running in RAM code, driver should
|
||||
+ * inform Fw to reset by itself, or it will cause
|
||||
+ * download Fw fail.
|
||||
+ */
|
||||
+ if (rtl_read_byte(rtlpriv, REG_MCUFWDL) & BIT(7)) {
|
||||
+ rtl92d_firmware_selfreset(hw);
|
||||
+ rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x00);
|
||||
+ }
|
||||
+
|
||||
+ rtl92d_enable_fw_download(hw, true);
|
||||
+ rtl92d_write_fw(hw, version, pfwdata, fwsize);
|
||||
+ rtl92d_enable_fw_download(hw, false);
|
||||
+
|
||||
+ err = rtl92d_fw_free_to_go(hw);
|
||||
+ if (err)
|
||||
+ pr_err("fw is not ready to run!\n");
|
||||
+exit:
|
||||
+ err = rtl92d_fw_init(hw);
|
||||
+ return err;
|
||||
+}
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.h
|
||||
new file mode 100644
|
||||
index 000000000000..7904bfbda4ba
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/fw.h
|
||||
@@ -0,0 +1,9 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#ifndef __RTL92DU_FW_H__
|
||||
+#define __RTL92DU_FW_H__
|
||||
+
|
||||
+int rtl92du_download_fw(struct ieee80211_hw *hw);
|
||||
+
|
||||
+#endif
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.c
|
||||
new file mode 100644
|
||||
index 000000000000..6c12dfbd6367
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.c
|
||||
@@ -0,0 +1,10 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#include "../wifi.h"
|
||||
+#include "led.h"
|
||||
+
|
||||
+void rtl92du_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction)
|
||||
+{
|
||||
+ /* The hardware has control. */
|
||||
+}
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.h
|
||||
new file mode 100644
|
||||
index 000000000000..d7ebc8afcc7b
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/led.h
|
||||
@@ -0,0 +1,9 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#ifndef __RTL92DU_LED_H__
|
||||
+#define __RTL92DU_LED_H__
|
||||
+
|
||||
+void rtl92du_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction);
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,161 @@
|
||||
From e4592b803eb8ff3eda15c030906cc33226cc794e Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:47:40 +0300
|
||||
Subject: [PATCH 26/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/dm.{c,h}
|
||||
|
||||
These contain functions related to the dynamic mechanism, which runs
|
||||
every two seconds to adjust to changes in the environment.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/dm.c | 120 ++++++++++++++++++
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/dm.h | 10 ++
|
||||
2 files changed, 130 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.h
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c
|
||||
new file mode 100644
|
||||
index 000000000000..dd57707a9184
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c
|
||||
@@ -0,0 +1,120 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#include "../wifi.h"
|
||||
+#include "../core.h"
|
||||
+#include "../rtl8192d/reg.h"
|
||||
+#include "../rtl8192d/def.h"
|
||||
+#include "../rtl8192d/dm_common.h"
|
||||
+#include "../rtl8192d/fw_common.h"
|
||||
+#include "dm.h"
|
||||
+
|
||||
+static void rtl92du_dm_init_1r_cca(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct ps_t *dm_pstable = &rtlpriv->dm_pstable;
|
||||
+
|
||||
+ dm_pstable->pre_ccastate = CCA_MAX;
|
||||
+ dm_pstable->cur_ccasate = CCA_MAX;
|
||||
+}
|
||||
+
|
||||
+static void rtl92du_dm_1r_cca(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct ps_t *dm_pstable = &rtlpriv->dm_pstable;
|
||||
+ struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
|
||||
+ int pwdb = rtlpriv->dm_digtable.min_undec_pwdb_for_dm;
|
||||
+
|
||||
+ if (rtlhal->macphymode != SINGLEMAC_SINGLEPHY ||
|
||||
+ rtlhal->current_bandtype != BAND_ON_5G)
|
||||
+ return;
|
||||
+
|
||||
+ if (pwdb != 0) {
|
||||
+ if (dm_pstable->pre_ccastate == CCA_2R ||
|
||||
+ dm_pstable->pre_ccastate == CCA_MAX)
|
||||
+ dm_pstable->cur_ccasate = (pwdb >= 35) ? CCA_1R : CCA_2R;
|
||||
+ else
|
||||
+ dm_pstable->cur_ccasate = (pwdb <= 30) ? CCA_2R : CCA_1R;
|
||||
+ } else {
|
||||
+ dm_pstable->cur_ccasate = CCA_MAX;
|
||||
+ }
|
||||
+
|
||||
+ if (dm_pstable->pre_ccastate == dm_pstable->cur_ccasate)
|
||||
+ return;
|
||||
+
|
||||
+ rtl_dbg(rtlpriv, COMP_BB_POWERSAVING, DBG_TRACE,
|
||||
+ "Old CCA state: %d new CCA state: %d\n",
|
||||
+ dm_pstable->pre_ccastate, dm_pstable->cur_ccasate);
|
||||
+
|
||||
+ if (dm_pstable->cur_ccasate == CCA_1R) {
|
||||
+ if (rtlpriv->phy.rf_type == RF_2T2R)
|
||||
+ rtl_set_bbreg(hw, ROFDM0_TRXPATHENABLE, MASKBYTE0, 0x13);
|
||||
+ else /* Is this branch reachable? */
|
||||
+ rtl_set_bbreg(hw, ROFDM0_TRXPATHENABLE, MASKBYTE0, 0x23);
|
||||
+ } else { /* CCA_2R or CCA_MAX */
|
||||
+ rtl_set_bbreg(hw, ROFDM0_TRXPATHENABLE, MASKBYTE0, 0x33);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void rtl92du_dm_pwdb_monitor(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ const u32 max_macid = 32;
|
||||
+ u32 temp;
|
||||
+
|
||||
+ /* AP & ADHOC & MESH will return tmp */
|
||||
+ if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION)
|
||||
+ return;
|
||||
+
|
||||
+ /* Indicate Rx signal strength to FW. */
|
||||
+ if (rtlpriv->dm.useramask) {
|
||||
+ temp = rtlpriv->dm.undec_sm_pwdb << 16;
|
||||
+ temp |= max_macid << 8;
|
||||
+
|
||||
+ rtl92d_fill_h2c_cmd(hw, H2C_RSSI_REPORT, 3, (u8 *)(&temp));
|
||||
+ } else {
|
||||
+ rtl_write_byte(rtlpriv, 0x4fe, (u8)rtlpriv->dm.undec_sm_pwdb);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void rtl92du_dm_init(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+
|
||||
+ rtlpriv->dm.dm_type = DM_TYPE_BYDRIVER;
|
||||
+ rtl_dm_diginit(hw, 0x20);
|
||||
+ rtlpriv->dm_digtable.rx_gain_max = DM_DIG_FA_UPPER;
|
||||
+ rtlpriv->dm_digtable.rx_gain_min = DM_DIG_FA_LOWER;
|
||||
+ rtl92d_dm_init_edca_turbo(hw);
|
||||
+ rtl92du_dm_init_1r_cca(hw);
|
||||
+ rtl92d_dm_init_rate_adaptive_mask(hw);
|
||||
+ rtl92d_dm_initialize_txpower_tracking(hw);
|
||||
+}
|
||||
+
|
||||
+void rtl92du_dm_watchdog(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
|
||||
+ bool fw_current_inpsmode = false;
|
||||
+ bool fwps_awake = true;
|
||||
+
|
||||
+ /* 1. RF is OFF. (No need to do DM.)
|
||||
+ * 2. Fw is under power saving mode for FwLPS.
|
||||
+ * (Prevent from SW/FW I/O racing.)
|
||||
+ * 3. IPS workitem is scheduled. (Prevent from IPS sequence
|
||||
+ * to be swapped with DM.
|
||||
+ * 4. RFChangeInProgress is TRUE.
|
||||
+ * (Prevent from broken by IPS/HW/SW Rf off.)
|
||||
+ */
|
||||
+
|
||||
+ if (ppsc->rfpwr_state != ERFON || fw_current_inpsmode ||
|
||||
+ !fwps_awake || ppsc->rfchange_inprogress)
|
||||
+ return;
|
||||
+
|
||||
+ rtl92du_dm_pwdb_monitor(hw);
|
||||
+ rtl92d_dm_false_alarm_counter_statistics(hw);
|
||||
+ rtl92d_dm_find_minimum_rssi(hw);
|
||||
+ rtl92d_dm_dig(hw);
|
||||
+ rtl92d_dm_check_txpower_tracking_thermal_meter(hw);
|
||||
+ rtl92d_dm_check_edca_turbo(hw);
|
||||
+ rtl92du_dm_1r_cca(hw);
|
||||
+}
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.h b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.h
|
||||
new file mode 100644
|
||||
index 000000000000..2f283bf1e4d8
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.h
|
||||
@@ -0,0 +1,10 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0 */
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#ifndef __RTL92DU_DM_H__
|
||||
+#define __RTL92DU_DM_H__
|
||||
+
|
||||
+void rtl92du_dm_init(struct ieee80211_hw *hw);
|
||||
+void rtl92du_dm_watchdog(struct ieee80211_hw *hw);
|
||||
+
|
||||
+#endif
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,106 @@
|
||||
From c791ad6e48ba58f4473b899ba7bf2de1d1536d17 Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:48:02 +0300
|
||||
Subject: [PATCH 27/69] FROMGIT(6.11): wifi: rtlwifi: Constify
|
||||
rtl_hal_cfg.{ops,usb_interface_cfg} and rtl_priv.cfg
|
||||
|
||||
This allows the drivers to declare the structs rtl_hal_cfg, rtl_hal_ops,
|
||||
and rtl_hal_usbint_cfg as const.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/base.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c | 3 +--
|
||||
drivers/net/wireless/realtek/rtlwifi/usb.c | 2 +-
|
||||
drivers/net/wireless/realtek/rtlwifi/usb.h | 2 +-
|
||||
drivers/net/wireless/realtek/rtlwifi/wifi.h | 6 +++---
|
||||
5 files changed, 7 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
|
||||
index 1a8d715b7c07..aab4605de9c4 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
|
||||
@@ -2272,7 +2272,7 @@ static void rtl_c2h_content_parsing(struct ieee80211_hw *hw,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
- struct rtl_hal_ops *hal_ops = rtlpriv->cfg->ops;
|
||||
+ const struct rtl_hal_ops *hal_ops = rtlpriv->cfg->ops;
|
||||
const struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops;
|
||||
u8 cmd_id, cmd_len;
|
||||
u8 *cmd_buf = NULL;
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c
|
||||
index 48be7e346efc..c9b9e2bc90cc 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/sw.c
|
||||
@@ -53,8 +53,6 @@ static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
|
||||
} else {
|
||||
fw_name = "rtlwifi/rtl8192cufw_TMSC.bin";
|
||||
}
|
||||
- /* provide name of alternative file */
|
||||
- rtlpriv->cfg->alt_fw_name = "rtlwifi/rtl8192cufw.bin";
|
||||
pr_info("Loading firmware %s\n", fw_name);
|
||||
rtlpriv->max_fw_size = 0x4000;
|
||||
err = request_firmware_nowait(THIS_MODULE, 1,
|
||||
@@ -160,6 +158,7 @@ static struct rtl_hal_usbint_cfg rtl92cu_interface_cfg = {
|
||||
|
||||
static struct rtl_hal_cfg rtl92cu_hal_cfg = {
|
||||
.name = "rtl92c_usb",
|
||||
+ .alt_fw_name = "rtlwifi/rtl8192cufw.bin",
|
||||
.ops = &rtl8192cu_hal_ops,
|
||||
.mod_params = &rtl92cu_mod_params,
|
||||
.usb_interface_cfg = &rtl92cu_interface_cfg,
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
|
||||
index 2ea72d9e3957..b6d300bec1e9 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
|
||||
@@ -937,7 +937,7 @@ static const struct rtl_intf_ops rtl_usb_ops = {
|
||||
|
||||
int rtl_usb_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id,
|
||||
- struct rtl_hal_cfg *rtl_hal_cfg)
|
||||
+ const struct rtl_hal_cfg *rtl_hal_cfg)
|
||||
{
|
||||
int err;
|
||||
struct ieee80211_hw *hw = NULL;
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.h b/drivers/net/wireless/realtek/rtlwifi/usb.h
|
||||
index 12529afc0510..b66d6f9ae564 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/usb.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.h
|
||||
@@ -136,7 +136,7 @@ struct rtl_usb_priv {
|
||||
|
||||
int rtl_usb_probe(struct usb_interface *intf,
|
||||
const struct usb_device_id *id,
|
||||
- struct rtl_hal_cfg *rtl92cu_hal_cfg);
|
||||
+ const struct rtl_hal_cfg *rtl92cu_hal_cfg);
|
||||
void rtl_usb_disconnect(struct usb_interface *intf);
|
||||
int rtl_usb_suspend(struct usb_interface *pusb_intf, pm_message_t message);
|
||||
int rtl_usb_resume(struct usb_interface *pusb_intf);
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
index 2e88359ba917..940df771a764 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
|
||||
@@ -2383,9 +2383,9 @@ struct rtl_hal_cfg {
|
||||
bool write_readback;
|
||||
char *name;
|
||||
char *alt_fw_name;
|
||||
- struct rtl_hal_ops *ops;
|
||||
+ const struct rtl_hal_ops *ops;
|
||||
struct rtl_mod_params *mod_params;
|
||||
- struct rtl_hal_usbint_cfg *usb_interface_cfg;
|
||||
+ const struct rtl_hal_usbint_cfg *usb_interface_cfg;
|
||||
enum rtl_spec_ver spec_ver;
|
||||
|
||||
/*this map used for some registers or vars
|
||||
@@ -2734,7 +2734,7 @@ struct rtl_priv {
|
||||
/* hal_cfg : for diff cards
|
||||
* intf_ops : for diff interrface usb/pcie
|
||||
*/
|
||||
- struct rtl_hal_cfg *cfg;
|
||||
+ const struct rtl_hal_cfg *cfg;
|
||||
const struct rtl_intf_ops *intf_ops;
|
||||
|
||||
/* this var will be set by set_bit,
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,262 +0,0 @@
|
||||
From 6fd27cae52fb7b81a1a00822cd1e378ebb3de32b Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sun, 18 Feb 2024 18:50:35 +0100
|
||||
Subject: [PATCH 27/53] FROMLIST(v1): drm/meson: improve encoder probe /
|
||||
initialization error handling
|
||||
|
||||
Rename meson_encoder_{cvbs,dsi,hdmi}_init() to
|
||||
meson_encoder_{cvbs,dsi,hdmi}_probe() so it's clear that these functions
|
||||
are used at probe time during driver initialization. Also switch all
|
||||
error prints inside those functions to use dev_err_probe() for
|
||||
consistency.
|
||||
|
||||
This makes the code more straight forward to read and makes the error
|
||||
prints within those functions consistent (by logging all -EPROBE_DEFER
|
||||
with dev_dbg(), while actual errors are logged with dev_err() and get
|
||||
the error value printed).
|
||||
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_drv.c | 6 +++---
|
||||
drivers/gpu/drm/meson/meson_encoder_cvbs.c | 24 ++++++++++------------
|
||||
drivers/gpu/drm/meson/meson_encoder_cvbs.h | 2 +-
|
||||
drivers/gpu/drm/meson/meson_encoder_dsi.c | 23 +++++++++------------
|
||||
drivers/gpu/drm/meson/meson_encoder_dsi.h | 2 +-
|
||||
drivers/gpu/drm/meson/meson_encoder_hdmi.c | 15 +++++++-------
|
||||
drivers/gpu/drm/meson/meson_encoder_hdmi.h | 2 +-
|
||||
7 files changed, 35 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
|
||||
index cb674966e9ac..17a5cca007e2 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_drv.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_drv.c
|
||||
@@ -312,7 +312,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
|
||||
/* Encoder Initialization */
|
||||
|
||||
- ret = meson_encoder_cvbs_init(priv);
|
||||
+ ret = meson_encoder_cvbs_probe(priv);
|
||||
if (ret)
|
||||
goto exit_afbcd;
|
||||
|
||||
@@ -326,12 +326,12 @@ static int meson_drv_bind_master(struct device *dev, bool has_components)
|
||||
}
|
||||
}
|
||||
|
||||
- ret = meson_encoder_hdmi_init(priv);
|
||||
+ ret = meson_encoder_hdmi_probe(priv);
|
||||
if (ret)
|
||||
goto exit_afbcd;
|
||||
|
||||
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A)) {
|
||||
- ret = meson_encoder_dsi_init(priv);
|
||||
+ ret = meson_encoder_dsi_probe(priv);
|
||||
if (ret)
|
||||
goto exit_afbcd;
|
||||
}
|
||||
diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.c b/drivers/gpu/drm/meson/meson_encoder_cvbs.c
|
||||
index 3407450435e2..d1191de855d9 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_encoder_cvbs.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.c
|
||||
@@ -219,7 +219,7 @@ static const struct drm_bridge_funcs meson_encoder_cvbs_bridge_funcs = {
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
};
|
||||
|
||||
-int meson_encoder_cvbs_init(struct meson_drm *priv)
|
||||
+int meson_encoder_cvbs_probe(struct meson_drm *priv)
|
||||
{
|
||||
struct drm_device *drm = priv->drm;
|
||||
struct meson_encoder_cvbs *meson_encoder_cvbs;
|
||||
@@ -240,10 +240,9 @@ int meson_encoder_cvbs_init(struct meson_drm *priv)
|
||||
|
||||
meson_encoder_cvbs->next_bridge = of_drm_find_bridge(remote);
|
||||
of_node_put(remote);
|
||||
- if (!meson_encoder_cvbs->next_bridge) {
|
||||
- dev_err(priv->dev, "Failed to find CVBS Connector bridge\n");
|
||||
- return -EPROBE_DEFER;
|
||||
- }
|
||||
+ if (!meson_encoder_cvbs->next_bridge)
|
||||
+ return dev_err_probe(priv->dev, -EPROBE_DEFER,
|
||||
+ "Failed to find CVBS Connector bridge\n");
|
||||
|
||||
/* CVBS Encoder Bridge */
|
||||
meson_encoder_cvbs->bridge.funcs = &meson_encoder_cvbs_bridge_funcs;
|
||||
@@ -259,10 +258,9 @@ int meson_encoder_cvbs_init(struct meson_drm *priv)
|
||||
/* Encoder */
|
||||
ret = drm_simple_encoder_init(priv->drm, &meson_encoder_cvbs->encoder,
|
||||
DRM_MODE_ENCODER_TVDAC);
|
||||
- if (ret) {
|
||||
- dev_err(priv->dev, "Failed to init CVBS encoder: %d\n", ret);
|
||||
- return ret;
|
||||
- }
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(priv->dev, ret,
|
||||
+ "Failed to init CVBS encoder\n");
|
||||
|
||||
meson_encoder_cvbs->encoder.possible_crtcs = BIT(0);
|
||||
|
||||
@@ -276,10 +274,10 @@ int meson_encoder_cvbs_init(struct meson_drm *priv)
|
||||
|
||||
/* Initialize & attach Bridge Connector */
|
||||
connector = drm_bridge_connector_init(priv->drm, &meson_encoder_cvbs->encoder);
|
||||
- if (IS_ERR(connector)) {
|
||||
- dev_err(priv->dev, "Unable to create CVBS bridge connector\n");
|
||||
- return PTR_ERR(connector);
|
||||
- }
|
||||
+ if (IS_ERR(connector))
|
||||
+ return dev_err_probe(priv->dev, PTR_ERR(connector),
|
||||
+ "Unable to create CVBS bridge connector\n");
|
||||
+
|
||||
drm_connector_attach_encoder(connector, &meson_encoder_cvbs->encoder);
|
||||
|
||||
priv->encoders[MESON_ENC_CVBS] = meson_encoder_cvbs;
|
||||
diff --git a/drivers/gpu/drm/meson/meson_encoder_cvbs.h b/drivers/gpu/drm/meson/meson_encoder_cvbs.h
|
||||
index 09710fec3c66..7b7bc85c03f7 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_encoder_cvbs.h
|
||||
+++ b/drivers/gpu/drm/meson/meson_encoder_cvbs.h
|
||||
@@ -24,7 +24,7 @@ struct meson_cvbs_mode {
|
||||
/* Modes supported by the CVBS output */
|
||||
extern struct meson_cvbs_mode meson_cvbs_modes[MESON_CVBS_MODES_COUNT];
|
||||
|
||||
-int meson_encoder_cvbs_init(struct meson_drm *priv);
|
||||
+int meson_encoder_cvbs_probe(struct meson_drm *priv);
|
||||
void meson_encoder_cvbs_remove(struct meson_drm *priv);
|
||||
|
||||
#endif /* __MESON_VENC_CVBS_H */
|
||||
diff --git a/drivers/gpu/drm/meson/meson_encoder_dsi.c b/drivers/gpu/drm/meson/meson_encoder_dsi.c
|
||||
index 311b91630fbe..7816902f5907 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_encoder_dsi.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_encoder_dsi.c
|
||||
@@ -100,7 +100,7 @@ static const struct drm_bridge_funcs meson_encoder_dsi_bridge_funcs = {
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
};
|
||||
|
||||
-int meson_encoder_dsi_init(struct meson_drm *priv)
|
||||
+int meson_encoder_dsi_probe(struct meson_drm *priv)
|
||||
{
|
||||
struct meson_encoder_dsi *meson_encoder_dsi;
|
||||
struct device_node *remote;
|
||||
@@ -118,10 +118,9 @@ int meson_encoder_dsi_init(struct meson_drm *priv)
|
||||
}
|
||||
|
||||
meson_encoder_dsi->next_bridge = of_drm_find_bridge(remote);
|
||||
- if (!meson_encoder_dsi->next_bridge) {
|
||||
- dev_dbg(priv->dev, "Failed to find DSI transceiver bridge\n");
|
||||
- return -EPROBE_DEFER;
|
||||
- }
|
||||
+ if (!meson_encoder_dsi->next_bridge)
|
||||
+ return dev_err_probe(priv->dev, -EPROBE_DEFER,
|
||||
+ "Failed to find DSI transceiver bridge\n");
|
||||
|
||||
/* DSI Encoder Bridge */
|
||||
meson_encoder_dsi->bridge.funcs = &meson_encoder_dsi_bridge_funcs;
|
||||
@@ -135,19 +134,17 @@ int meson_encoder_dsi_init(struct meson_drm *priv)
|
||||
/* Encoder */
|
||||
ret = drm_simple_encoder_init(priv->drm, &meson_encoder_dsi->encoder,
|
||||
DRM_MODE_ENCODER_DSI);
|
||||
- if (ret) {
|
||||
- dev_err(priv->dev, "Failed to init DSI encoder: %d\n", ret);
|
||||
- return ret;
|
||||
- }
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(priv->dev, ret,
|
||||
+ "Failed to init DSI encoder\n");
|
||||
|
||||
meson_encoder_dsi->encoder.possible_crtcs = BIT(0);
|
||||
|
||||
/* Attach DSI Encoder Bridge to Encoder */
|
||||
ret = drm_bridge_attach(&meson_encoder_dsi->encoder, &meson_encoder_dsi->bridge, NULL, 0);
|
||||
- if (ret) {
|
||||
- dev_err(priv->dev, "Failed to attach bridge: %d\n", ret);
|
||||
- return ret;
|
||||
- }
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(priv->dev, ret,
|
||||
+ "Failed to attach bridge\n");
|
||||
|
||||
/*
|
||||
* We should have now in place:
|
||||
diff --git a/drivers/gpu/drm/meson/meson_encoder_dsi.h b/drivers/gpu/drm/meson/meson_encoder_dsi.h
|
||||
index 9277d7015193..85d5b61805f2 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_encoder_dsi.h
|
||||
+++ b/drivers/gpu/drm/meson/meson_encoder_dsi.h
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef __MESON_ENCODER_DSI_H
|
||||
#define __MESON_ENCODER_DSI_H
|
||||
|
||||
-int meson_encoder_dsi_init(struct meson_drm *priv);
|
||||
+int meson_encoder_dsi_probe(struct meson_drm *priv);
|
||||
void meson_encoder_dsi_remove(struct meson_drm *priv);
|
||||
|
||||
#endif /* __MESON_ENCODER_DSI_H */
|
||||
diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
|
||||
index c4686568c9ca..22e07847a9a7 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
|
||||
@@ -354,7 +354,7 @@ static const struct drm_bridge_funcs meson_encoder_hdmi_bridge_funcs = {
|
||||
.atomic_reset = drm_atomic_helper_bridge_reset,
|
||||
};
|
||||
|
||||
-int meson_encoder_hdmi_init(struct meson_drm *priv)
|
||||
+int meson_encoder_hdmi_probe(struct meson_drm *priv)
|
||||
{
|
||||
struct meson_encoder_hdmi *meson_encoder_hdmi;
|
||||
struct platform_device *pdev;
|
||||
@@ -374,8 +374,8 @@ int meson_encoder_hdmi_init(struct meson_drm *priv)
|
||||
|
||||
meson_encoder_hdmi->next_bridge = of_drm_find_bridge(remote);
|
||||
if (!meson_encoder_hdmi->next_bridge) {
|
||||
- dev_err(priv->dev, "Failed to find HDMI transceiver bridge\n");
|
||||
- ret = -EPROBE_DEFER;
|
||||
+ ret = dev_err_probe(priv->dev, -EPROBE_DEFER,
|
||||
+ "Failed to find HDMI transceiver bridge\n");
|
||||
goto err_put_node;
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ int meson_encoder_hdmi_init(struct meson_drm *priv)
|
||||
ret = drm_simple_encoder_init(priv->drm, &meson_encoder_hdmi->encoder,
|
||||
DRM_MODE_ENCODER_TMDS);
|
||||
if (ret) {
|
||||
- dev_err(priv->dev, "Failed to init HDMI encoder: %d\n", ret);
|
||||
+ dev_err_probe(priv->dev, ret, "Failed to init HDMI encoder\n");
|
||||
goto err_put_node;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ int meson_encoder_hdmi_init(struct meson_drm *priv)
|
||||
ret = drm_bridge_attach(&meson_encoder_hdmi->encoder, &meson_encoder_hdmi->bridge, NULL,
|
||||
DRM_BRIDGE_ATTACH_NO_CONNECTOR);
|
||||
if (ret) {
|
||||
- dev_err(priv->dev, "Failed to attach bridge: %d\n", ret);
|
||||
+ dev_err_probe(priv->dev, ret, "Failed to attach bridge\n");
|
||||
goto err_put_node;
|
||||
}
|
||||
|
||||
@@ -411,8 +411,9 @@ int meson_encoder_hdmi_init(struct meson_drm *priv)
|
||||
meson_encoder_hdmi->connector = drm_bridge_connector_init(priv->drm,
|
||||
&meson_encoder_hdmi->encoder);
|
||||
if (IS_ERR(meson_encoder_hdmi->connector)) {
|
||||
- dev_err(priv->dev, "Unable to create HDMI bridge connector\n");
|
||||
- ret = PTR_ERR(meson_encoder_hdmi->connector);
|
||||
+ ret = dev_err_probe(priv->dev,
|
||||
+ PTR_ERR(meson_encoder_hdmi->connector),
|
||||
+ "Unable to create HDMI bridge connector\n");
|
||||
goto err_put_node;
|
||||
}
|
||||
drm_connector_attach_encoder(meson_encoder_hdmi->connector,
|
||||
diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.h b/drivers/gpu/drm/meson/meson_encoder_hdmi.h
|
||||
index a6cd38eb5f71..fd5485875db8 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_encoder_hdmi.h
|
||||
+++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.h
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef __MESON_ENCODER_HDMI_H
|
||||
#define __MESON_ENCODER_HDMI_H
|
||||
|
||||
-int meson_encoder_hdmi_init(struct meson_drm *priv);
|
||||
+int meson_encoder_hdmi_probe(struct meson_drm *priv);
|
||||
void meson_encoder_hdmi_remove(struct meson_drm *priv);
|
||||
|
||||
#endif /* __MESON_ENCODER_HDMI_H */
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,417 @@
|
||||
From 11fc9ecc1d73fd506a3bd359bf3f8b9a94ca59df Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:48:32 +0300
|
||||
Subject: [PATCH 28/69] FROMGIT(6.11): wifi: rtlwifi: Add rtl8192du/sw.c
|
||||
|
||||
This contains the new module's entry point.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
.../wireless/realtek/rtlwifi/rtl8192du/sw.c | 395 ++++++++++++++++++
|
||||
1 file changed, 395 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
|
||||
new file mode 100644
|
||||
index 000000000000..d069a81ac617
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
|
||||
@@ -0,0 +1,395 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/* Copyright(c) 2024 Realtek Corporation.*/
|
||||
+
|
||||
+#include "../wifi.h"
|
||||
+#include "../core.h"
|
||||
+#include "../usb.h"
|
||||
+#include "../base.h"
|
||||
+#include "../rtl8192d/reg.h"
|
||||
+#include "../rtl8192d/def.h"
|
||||
+#include "../rtl8192d/fw_common.h"
|
||||
+#include "../rtl8192d/hw_common.h"
|
||||
+#include "../rtl8192d/phy_common.h"
|
||||
+#include "../rtl8192d/trx_common.h"
|
||||
+#include "phy.h"
|
||||
+#include "dm.h"
|
||||
+#include "hw.h"
|
||||
+#include "trx.h"
|
||||
+#include "led.h"
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+static struct usb_interface *rtl92du_get_other_intf(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct usb_interface *intf;
|
||||
+ struct usb_device *udev;
|
||||
+ u8 other_interfaceindex;
|
||||
+
|
||||
+ /* See SET_IEEE80211_DEV(hw, &intf->dev); in usb.c */
|
||||
+ intf = container_of_const(wiphy_dev(hw->wiphy), struct usb_interface, dev);
|
||||
+
|
||||
+ if (intf->altsetting[0].desc.bInterfaceNumber == 0)
|
||||
+ other_interfaceindex = 1;
|
||||
+ else
|
||||
+ other_interfaceindex = 0;
|
||||
+
|
||||
+ udev = interface_to_usbdev(intf);
|
||||
+
|
||||
+ return usb_ifnum_to_if(udev, other_interfaceindex);
|
||||
+}
|
||||
+
|
||||
+static int rtl92du_init_shared_data(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct usb_interface *other_intf = rtl92du_get_other_intf(hw);
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ struct rtl_priv *other_rtlpriv = NULL;
|
||||
+ struct ieee80211_hw *other_hw = NULL;
|
||||
+
|
||||
+ if (other_intf)
|
||||
+ other_hw = usb_get_intfdata(other_intf);
|
||||
+
|
||||
+ if (other_hw) {
|
||||
+ /* The other interface was already probed. */
|
||||
+ other_rtlpriv = rtl_priv(other_hw);
|
||||
+ rtlpriv->curveindex_2g = other_rtlpriv->curveindex_2g;
|
||||
+ rtlpriv->curveindex_5g = other_rtlpriv->curveindex_5g;
|
||||
+ rtlpriv->mutex_for_power_on_off = other_rtlpriv->mutex_for_power_on_off;
|
||||
+ rtlpriv->mutex_for_hw_init = other_rtlpriv->mutex_for_hw_init;
|
||||
+
|
||||
+ if (!rtlpriv->curveindex_2g || !rtlpriv->curveindex_5g ||
|
||||
+ !rtlpriv->mutex_for_power_on_off || !rtlpriv->mutex_for_hw_init)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* The other interface doesn't exist or was not probed yet. */
|
||||
+ rtlpriv->curveindex_2g = kcalloc(TARGET_CHNL_NUM_2G,
|
||||
+ sizeof(*rtlpriv->curveindex_2g),
|
||||
+ GFP_KERNEL);
|
||||
+ rtlpriv->curveindex_5g = kcalloc(TARGET_CHNL_NUM_5G,
|
||||
+ sizeof(*rtlpriv->curveindex_5g),
|
||||
+ GFP_KERNEL);
|
||||
+ rtlpriv->mutex_for_power_on_off =
|
||||
+ kzalloc(sizeof(*rtlpriv->mutex_for_power_on_off), GFP_KERNEL);
|
||||
+ rtlpriv->mutex_for_hw_init =
|
||||
+ kzalloc(sizeof(*rtlpriv->mutex_for_hw_init), GFP_KERNEL);
|
||||
+
|
||||
+ if (!rtlpriv->curveindex_2g || !rtlpriv->curveindex_5g ||
|
||||
+ !rtlpriv->mutex_for_power_on_off || !rtlpriv->mutex_for_hw_init) {
|
||||
+ kfree(rtlpriv->curveindex_2g);
|
||||
+ kfree(rtlpriv->curveindex_5g);
|
||||
+ kfree(rtlpriv->mutex_for_power_on_off);
|
||||
+ kfree(rtlpriv->mutex_for_hw_init);
|
||||
+ rtlpriv->curveindex_2g = NULL;
|
||||
+ rtlpriv->curveindex_5g = NULL;
|
||||
+ rtlpriv->mutex_for_power_on_off = NULL;
|
||||
+ rtlpriv->mutex_for_hw_init = NULL;
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ mutex_init(rtlpriv->mutex_for_power_on_off);
|
||||
+ mutex_init(rtlpriv->mutex_for_hw_init);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void rtl92du_deinit_shared_data(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct usb_interface *other_intf = rtl92du_get_other_intf(hw);
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+
|
||||
+ if (!other_intf || !usb_get_intfdata(other_intf)) {
|
||||
+ /* The other interface doesn't exist or was already disconnected. */
|
||||
+ kfree(rtlpriv->curveindex_2g);
|
||||
+ kfree(rtlpriv->curveindex_5g);
|
||||
+ if (rtlpriv->mutex_for_power_on_off)
|
||||
+ mutex_destroy(rtlpriv->mutex_for_power_on_off);
|
||||
+ if (rtlpriv->mutex_for_hw_init)
|
||||
+ mutex_destroy(rtlpriv->mutex_for_hw_init);
|
||||
+ kfree(rtlpriv->mutex_for_power_on_off);
|
||||
+ kfree(rtlpriv->mutex_for_hw_init);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int rtl92du_init_sw_vars(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ const char *fw_name = "rtlwifi/rtl8192dufw.bin";
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+ int err;
|
||||
+
|
||||
+ err = rtl92du_init_shared_data(hw);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
+
|
||||
+ rtlpriv->dm.dm_initialgain_enable = true;
|
||||
+ rtlpriv->dm.dm_flag = 0;
|
||||
+ rtlpriv->dm.disable_framebursting = false;
|
||||
+ rtlpriv->dm.thermalvalue = 0;
|
||||
+ rtlpriv->dm.useramask = true;
|
||||
+
|
||||
+ /* dual mac */
|
||||
+ if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G)
|
||||
+ rtlpriv->phy.current_channel = 36;
|
||||
+ else
|
||||
+ rtlpriv->phy.current_channel = 1;
|
||||
+
|
||||
+ if (rtlpriv->rtlhal.macphymode != SINGLEMAC_SINGLEPHY)
|
||||
+ rtlpriv->rtlhal.disable_amsdu_8k = true;
|
||||
+
|
||||
+ /* for LPS & IPS */
|
||||
+ rtlpriv->psc.inactiveps = rtlpriv->cfg->mod_params->inactiveps;
|
||||
+ rtlpriv->psc.swctrl_lps = rtlpriv->cfg->mod_params->swctrl_lps;
|
||||
+ rtlpriv->psc.fwctrl_lps = rtlpriv->cfg->mod_params->fwctrl_lps;
|
||||
+
|
||||
+ /* for early mode */
|
||||
+ rtlpriv->rtlhal.earlymode_enable = false;
|
||||
+
|
||||
+ /* for firmware buf */
|
||||
+ rtlpriv->rtlhal.pfirmware = kmalloc(0x8000, GFP_KERNEL);
|
||||
+ if (!rtlpriv->rtlhal.pfirmware)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ rtlpriv->max_fw_size = 0x8000;
|
||||
+ pr_info("Driver for Realtek RTL8192DU WLAN interface\n");
|
||||
+ pr_info("Loading firmware file %s\n", fw_name);
|
||||
+
|
||||
+ /* request fw */
|
||||
+ err = request_firmware_nowait(THIS_MODULE, 1, fw_name,
|
||||
+ rtlpriv->io.dev, GFP_KERNEL, hw,
|
||||
+ rtl_fw_cb);
|
||||
+ if (err) {
|
||||
+ pr_err("Failed to request firmware!\n");
|
||||
+ kfree(rtlpriv->rtlhal.pfirmware);
|
||||
+ rtlpriv->rtlhal.pfirmware = NULL;
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void rtl92du_deinit_sw_vars(struct ieee80211_hw *hw)
|
||||
+{
|
||||
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
+
|
||||
+ kfree(rtlpriv->rtlhal.pfirmware);
|
||||
+ rtlpriv->rtlhal.pfirmware = NULL;
|
||||
+
|
||||
+ rtl92du_deinit_shared_data(hw);
|
||||
+}
|
||||
+
|
||||
+static const struct rtl_hal_ops rtl8192du_hal_ops = {
|
||||
+ .init_sw_vars = rtl92du_init_sw_vars,
|
||||
+ .deinit_sw_vars = rtl92du_deinit_sw_vars,
|
||||
+ .read_chip_version = rtl92du_read_chip_version,
|
||||
+ .read_eeprom_info = rtl92d_read_eeprom_info,
|
||||
+ .hw_init = rtl92du_hw_init,
|
||||
+ .hw_disable = rtl92du_card_disable,
|
||||
+ .enable_interrupt = rtl92du_enable_interrupt,
|
||||
+ .disable_interrupt = rtl92du_disable_interrupt,
|
||||
+ .set_network_type = rtl92du_set_network_type,
|
||||
+ .set_chk_bssid = rtl92du_set_check_bssid,
|
||||
+ .set_qos = rtl92d_set_qos,
|
||||
+ .set_bcn_reg = rtl92du_set_beacon_related_registers,
|
||||
+ .set_bcn_intv = rtl92du_set_beacon_interval,
|
||||
+ .update_interrupt_mask = rtl92du_update_interrupt_mask,
|
||||
+ .get_hw_reg = rtl92du_get_hw_reg,
|
||||
+ .set_hw_reg = rtl92du_set_hw_reg,
|
||||
+ .update_rate_tbl = rtl92d_update_hal_rate_tbl,
|
||||
+ .fill_tx_desc = rtl92du_tx_fill_desc,
|
||||
+ .query_rx_desc = rtl92d_rx_query_desc,
|
||||
+ .set_channel_access = rtl92d_update_channel_access_setting,
|
||||
+ .radio_onoff_checking = rtl92d_gpio_radio_on_off_checking,
|
||||
+ .set_bw_mode = rtl92du_phy_set_bw_mode,
|
||||
+ .switch_channel = rtl92du_phy_sw_chnl,
|
||||
+ .dm_watchdog = rtl92du_dm_watchdog,
|
||||
+ .scan_operation_backup = rtl_phy_scan_operation_backup,
|
||||
+ .set_rf_power_state = rtl92du_phy_set_rf_power_state,
|
||||
+ .led_control = rtl92du_led_control,
|
||||
+ .set_desc = rtl92d_set_desc,
|
||||
+ .get_desc = rtl92d_get_desc,
|
||||
+ .enable_hw_sec = rtl92d_enable_hw_security_config,
|
||||
+ .set_key = rtl92d_set_key,
|
||||
+ .get_bbreg = rtl92du_phy_query_bb_reg,
|
||||
+ .set_bbreg = rtl92du_phy_set_bb_reg,
|
||||
+ .get_rfreg = rtl92d_phy_query_rf_reg,
|
||||
+ .set_rfreg = rtl92d_phy_set_rf_reg,
|
||||
+ .linked_set_reg = rtl92du_linked_set_reg,
|
||||
+ .fill_h2c_cmd = rtl92d_fill_h2c_cmd,
|
||||
+ .get_btc_status = rtl_btc_status_false,
|
||||
+ .phy_iq_calibrate = rtl92du_phy_iq_calibrate,
|
||||
+ .phy_lc_calibrate = rtl92du_phy_lc_calibrate,
|
||||
+};
|
||||
+
|
||||
+static struct rtl_mod_params rtl92du_mod_params = {
|
||||
+ .sw_crypto = false,
|
||||
+ .inactiveps = false,
|
||||
+ .swctrl_lps = false,
|
||||
+ .debug_level = 0,
|
||||
+ .debug_mask = 0,
|
||||
+};
|
||||
+
|
||||
+static const struct rtl_hal_usbint_cfg rtl92du_interface_cfg = {
|
||||
+ /* rx */
|
||||
+ .rx_urb_num = 8,
|
||||
+ .rx_max_size = 15360,
|
||||
+ .usb_rx_hdl = NULL,
|
||||
+ .usb_rx_segregate_hdl = NULL,
|
||||
+ /* tx */
|
||||
+ .usb_tx_cleanup = rtl92du_tx_cleanup,
|
||||
+ .usb_tx_post_hdl = rtl92du_tx_post_hdl,
|
||||
+ .usb_tx_aggregate_hdl = rtl92du_tx_aggregate_hdl,
|
||||
+ .usb_endpoint_mapping = rtl92du_endpoint_mapping,
|
||||
+ .usb_mq_to_hwq = rtl92du_mq_to_hwq,
|
||||
+};
|
||||
+
|
||||
+static const struct rtl_hal_cfg rtl92du_hal_cfg = {
|
||||
+ .name = "rtl8192du",
|
||||
+ .ops = &rtl8192du_hal_ops,
|
||||
+ .mod_params = &rtl92du_mod_params,
|
||||
+ .usb_interface_cfg = &rtl92du_interface_cfg,
|
||||
+
|
||||
+ .maps[SYS_ISO_CTRL] = REG_SYS_ISO_CTRL,
|
||||
+ .maps[SYS_FUNC_EN] = REG_SYS_FUNC_EN,
|
||||
+ .maps[SYS_CLK] = REG_SYS_CLKR,
|
||||
+ .maps[MAC_RCR_AM] = RCR_AM,
|
||||
+ .maps[MAC_RCR_AB] = RCR_AB,
|
||||
+ .maps[MAC_RCR_ACRC32] = RCR_ACRC32,
|
||||
+ .maps[MAC_RCR_ACF] = RCR_ACF,
|
||||
+ .maps[MAC_RCR_AAP] = RCR_AAP,
|
||||
+
|
||||
+ .maps[EFUSE_TEST] = REG_EFUSE_TEST,
|
||||
+ .maps[EFUSE_ACCESS] = REG_EFUSE_ACCESS,
|
||||
+ .maps[EFUSE_CTRL] = REG_EFUSE_CTRL,
|
||||
+ .maps[EFUSE_CLK] = 0, /* just for 92se */
|
||||
+ .maps[EFUSE_CLK_CTRL] = REG_EFUSE_CTRL,
|
||||
+ .maps[EFUSE_PWC_EV12V] = PWC_EV12V,
|
||||
+ .maps[EFUSE_FEN_ELDR] = FEN_ELDR,
|
||||
+ .maps[EFUSE_LOADER_CLK_EN] = 0,
|
||||
+ .maps[EFUSE_ANA8M] = 0, /* just for 92se */
|
||||
+ .maps[EFUSE_HWSET_MAX_SIZE] = HWSET_MAX_SIZE,
|
||||
+ .maps[EFUSE_MAX_SECTION_MAP] = EFUSE_MAX_SECTION,
|
||||
+ .maps[EFUSE_REAL_CONTENT_SIZE] = EFUSE_REAL_CONTENT_LEN,
|
||||
+
|
||||
+ .maps[RWCAM] = REG_CAMCMD,
|
||||
+ .maps[WCAMI] = REG_CAMWRITE,
|
||||
+ .maps[RCAMO] = REG_CAMREAD,
|
||||
+ .maps[CAMDBG] = REG_CAMDBG,
|
||||
+ .maps[SECR] = REG_SECCFG,
|
||||
+ .maps[SEC_CAM_NONE] = CAM_NONE,
|
||||
+ .maps[SEC_CAM_WEP40] = CAM_WEP40,
|
||||
+ .maps[SEC_CAM_TKIP] = CAM_TKIP,
|
||||
+ .maps[SEC_CAM_AES] = CAM_AES,
|
||||
+ .maps[SEC_CAM_WEP104] = CAM_WEP104,
|
||||
+
|
||||
+ .maps[RTL_IMR_BCNDMAINT6] = IMR_BCNDMAINT6,
|
||||
+ .maps[RTL_IMR_BCNDMAINT5] = IMR_BCNDMAINT5,
|
||||
+ .maps[RTL_IMR_BCNDMAINT4] = IMR_BCNDMAINT4,
|
||||
+ .maps[RTL_IMR_BCNDMAINT3] = IMR_BCNDMAINT3,
|
||||
+ .maps[RTL_IMR_BCNDMAINT2] = IMR_BCNDMAINT2,
|
||||
+ .maps[RTL_IMR_BCNDMAINT1] = IMR_BCNDMAINT1,
|
||||
+ .maps[RTL_IMR_BCNDOK8] = IMR_BCNDOK8,
|
||||
+ .maps[RTL_IMR_BCNDOK7] = IMR_BCNDOK7,
|
||||
+ .maps[RTL_IMR_BCNDOK6] = IMR_BCNDOK6,
|
||||
+ .maps[RTL_IMR_BCNDOK5] = IMR_BCNDOK5,
|
||||
+ .maps[RTL_IMR_BCNDOK4] = IMR_BCNDOK4,
|
||||
+ .maps[RTL_IMR_BCNDOK3] = IMR_BCNDOK3,
|
||||
+ .maps[RTL_IMR_BCNDOK2] = IMR_BCNDOK2,
|
||||
+ .maps[RTL_IMR_BCNDOK1] = IMR_BCNDOK1,
|
||||
+ .maps[RTL_IMR_TIMEOUT2] = IMR_TIMEOUT2,
|
||||
+ .maps[RTL_IMR_TIMEOUT1] = IMR_TIMEOUT1,
|
||||
+
|
||||
+ .maps[RTL_IMR_TXFOVW] = IMR_TXFOVW,
|
||||
+ .maps[RTL_IMR_PSTIMEOUT] = IMR_PSTIMEOUT,
|
||||
+ .maps[RTL_IMR_BCNINT] = IMR_BCNINT,
|
||||
+ .maps[RTL_IMR_RXFOVW] = IMR_RXFOVW,
|
||||
+ .maps[RTL_IMR_RDU] = IMR_RDU,
|
||||
+ .maps[RTL_IMR_ATIMEND] = IMR_ATIMEND,
|
||||
+ .maps[RTL_IMR_BDOK] = IMR_BDOK,
|
||||
+ .maps[RTL_IMR_MGNTDOK] = IMR_MGNTDOK,
|
||||
+ .maps[RTL_IMR_TBDER] = IMR_TBDER,
|
||||
+ .maps[RTL_IMR_HIGHDOK] = IMR_HIGHDOK,
|
||||
+ .maps[RTL_IMR_TBDOK] = IMR_TBDOK,
|
||||
+ .maps[RTL_IMR_BKDOK] = IMR_BKDOK,
|
||||
+ .maps[RTL_IMR_BEDOK] = IMR_BEDOK,
|
||||
+ .maps[RTL_IMR_VIDOK] = IMR_VIDOK,
|
||||
+ .maps[RTL_IMR_VODOK] = IMR_VODOK,
|
||||
+ .maps[RTL_IMR_ROK] = IMR_ROK,
|
||||
+ .maps[RTL_IBSS_INT_MASKS] = (IMR_BCNINT | IMR_TBDOK | IMR_TBDER),
|
||||
+
|
||||
+ .maps[RTL_RC_CCK_RATE1M] = DESC_RATE1M,
|
||||
+ .maps[RTL_RC_CCK_RATE2M] = DESC_RATE2M,
|
||||
+ .maps[RTL_RC_CCK_RATE5_5M] = DESC_RATE5_5M,
|
||||
+ .maps[RTL_RC_CCK_RATE11M] = DESC_RATE11M,
|
||||
+ .maps[RTL_RC_OFDM_RATE6M] = DESC_RATE6M,
|
||||
+ .maps[RTL_RC_OFDM_RATE9M] = DESC_RATE9M,
|
||||
+ .maps[RTL_RC_OFDM_RATE12M] = DESC_RATE12M,
|
||||
+ .maps[RTL_RC_OFDM_RATE18M] = DESC_RATE18M,
|
||||
+ .maps[RTL_RC_OFDM_RATE24M] = DESC_RATE24M,
|
||||
+ .maps[RTL_RC_OFDM_RATE36M] = DESC_RATE36M,
|
||||
+ .maps[RTL_RC_OFDM_RATE48M] = DESC_RATE48M,
|
||||
+ .maps[RTL_RC_OFDM_RATE54M] = DESC_RATE54M,
|
||||
+
|
||||
+ .maps[RTL_RC_HT_RATEMCS7] = DESC_RATEMCS7,
|
||||
+ .maps[RTL_RC_HT_RATEMCS15] = DESC_RATEMCS15,
|
||||
+};
|
||||
+
|
||||
+module_param_named(swenc, rtl92du_mod_params.sw_crypto, bool, 0444);
|
||||
+module_param_named(debug_level, rtl92du_mod_params.debug_level, int, 0644);
|
||||
+module_param_named(ips, rtl92du_mod_params.inactiveps, bool, 0444);
|
||||
+module_param_named(swlps, rtl92du_mod_params.swctrl_lps, bool, 0444);
|
||||
+module_param_named(debug_mask, rtl92du_mod_params.debug_mask, ullong, 0644);
|
||||
+MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");
|
||||
+MODULE_PARM_DESC(ips, "Set to 0 to not use link power save (default 0)\n");
|
||||
+MODULE_PARM_DESC(swlps, "Set to 1 to use SW control power save (default 0)\n");
|
||||
+MODULE_PARM_DESC(debug_level, "Set debug level (0-5) (default 0)");
|
||||
+MODULE_PARM_DESC(debug_mask, "Set debug mask (default 0)");
|
||||
+
|
||||
+#define USB_VENDOR_ID_REALTEK 0x0bda
|
||||
+
|
||||
+static const struct usb_device_id rtl8192d_usb_ids[] = {
|
||||
+ {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8193, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8194, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8111, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x0193, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0x8171, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(USB_VENDOR_ID_REALTEK, 0xe194, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x2019, 0xab2c, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x2019, 0xab2d, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x2019, 0x4903, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x2019, 0x4904, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x07b8, 0x8193, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x20f4, 0x664b, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x04dd, 0x954f, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x04dd, 0x96a6, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x050d, 0x110a, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x050d, 0x1105, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x050d, 0x120a, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x1668, 0x8102, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x0930, 0x0a0a, rtl92du_hal_cfg)},
|
||||
+ {RTL_USB_DEVICE(0x2001, 0x330c, rtl92du_hal_cfg)},
|
||||
+ {}
|
||||
+};
|
||||
+
|
||||
+MODULE_DEVICE_TABLE(usb, rtl8192d_usb_ids);
|
||||
+
|
||||
+static int rtl8192du_probe(struct usb_interface *intf,
|
||||
+ const struct usb_device_id *id)
|
||||
+{
|
||||
+ return rtl_usb_probe(intf, id, &rtl92du_hal_cfg);
|
||||
+}
|
||||
+
|
||||
+static struct usb_driver rtl8192du_driver = {
|
||||
+ .name = "rtl8192du",
|
||||
+ .probe = rtl8192du_probe,
|
||||
+ .disconnect = rtl_usb_disconnect,
|
||||
+ .id_table = rtl8192d_usb_ids,
|
||||
+ .disable_hub_initiated_lpm = 1,
|
||||
+};
|
||||
+
|
||||
+module_usb_driver(rtl8192du_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("Bitterblue Smith <rtl8821cerfe2@gmail.com>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_DESCRIPTION("Realtek 8192DU 802.11n Dual Mac USB wireless");
|
||||
+MODULE_FIRMWARE("rtlwifi/rtl8192dufw.bin");
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,57 +0,0 @@
|
||||
From 9fa5e4f1d94a0ca01deb5bbe03299e415f0df8c3 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 9 Jan 2024 16:20:14 +0000
|
||||
Subject: [PATCH 28/53] FROMLIST(v1): drm/meson: vclk: fix calculation of 59.94
|
||||
fractional rates
|
||||
|
||||
Playing 4K media with 59.94 fractional rate (typically VP9) causes the screen to lose
|
||||
sync with the following error reported in the system log:
|
||||
|
||||
[ 89.610280] Fatal Error, invalid HDMI vclk freq 593406
|
||||
|
||||
Modetest shows the following:
|
||||
|
||||
3840x2160 59.94 3840 4016 4104 4400 2160 2168 2178 2250 593407 flags: phsync, pvsync; type: driver
|
||||
drm calculated value -------------------------------------^
|
||||
|
||||
Change the fractional rate calculation to stop DIV_ROUND_CLOSEST rounding down which
|
||||
results in vclk freq failing to match correctly.
|
||||
|
||||
Fixes: e5fab2ec9ca4 ("drm/meson: vclk: add support for YUV420 setup")
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_vclk.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c
|
||||
index 2a82119eb58e..2a942dc6a6dc 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_vclk.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_vclk.c
|
||||
@@ -790,13 +790,13 @@ meson_vclk_vic_supported_freq(struct meson_drm *priv, unsigned int phy_freq,
|
||||
FREQ_1000_1001(params[i].pixel_freq));
|
||||
DRM_DEBUG_DRIVER("i = %d phy_freq = %d alt = %d\n",
|
||||
i, params[i].phy_freq,
|
||||
- FREQ_1000_1001(params[i].phy_freq/10)*10);
|
||||
+ FREQ_1000_1001(params[i].phy_freq/1000)*1000);
|
||||
/* Match strict frequency */
|
||||
if (phy_freq == params[i].phy_freq &&
|
||||
vclk_freq == params[i].vclk_freq)
|
||||
return MODE_OK;
|
||||
/* Match 1000/1001 variant */
|
||||
- if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/10)*10) &&
|
||||
+ if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/1000)*1000) &&
|
||||
vclk_freq == FREQ_1000_1001(params[i].vclk_freq))
|
||||
return MODE_OK;
|
||||
}
|
||||
@@ -1070,7 +1070,7 @@ void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
|
||||
|
||||
for (freq = 0 ; params[freq].pixel_freq ; ++freq) {
|
||||
if ((phy_freq == params[freq].phy_freq ||
|
||||
- phy_freq == FREQ_1000_1001(params[freq].phy_freq/10)*10) &&
|
||||
+ phy_freq == FREQ_1000_1001(params[freq].phy_freq/1000)*1000) &&
|
||||
(vclk_freq == params[freq].vclk_freq ||
|
||||
vclk_freq == FREQ_1000_1001(params[freq].vclk_freq))) {
|
||||
if (vclk_freq != params[freq].vclk_freq)
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,92 @@
|
||||
From da2287b41888e02866f1416caa36c148c5723f8b Mon Sep 17 00:00:00 2001
|
||||
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
Date: Thu, 23 May 2024 17:49:00 +0300
|
||||
Subject: [PATCH 29/69] FROMGIT(6.11): wifi: rtlwifi: Enable the new rtl8192du
|
||||
driver
|
||||
|
||||
The RTL8192DU is an older Wifi 4 dual band chip. It comes in two
|
||||
flavours: single MAC single PHY (like most Realtek Wifi 4 USB devices),
|
||||
and dual MAC dual PHY.
|
||||
|
||||
The single MAC single PHY version is 2T2R and can work either in the
|
||||
2.4 GHz band or the 5 GHz band.
|
||||
|
||||
The dual MAC dual PHY version has two USB interfaces and appears to the
|
||||
system as two separate 1T1R Wifi devices, one working in the 2.4 GHz
|
||||
band, the other in the 5 GHz band.
|
||||
|
||||
This was tested only with a single MAC single PHY device, mostly in
|
||||
station mode. The speeds in the 2.4 GHz band with 20 MHz channel width
|
||||
are similar to the out-of-tree driver: 85/51 megabits/second.
|
||||
|
||||
Stefan Lippers-Hollmann tested the speed in the 5 GHz band with 40 MHz
|
||||
channel width: 173/99 megabits/second.
|
||||
|
||||
It was also tested briefly in AP mode. It's emitting beacons and my
|
||||
phone can connect to it.
|
||||
|
||||
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/realtek/rtlwifi/Kconfig | 12 ++++++++++++
|
||||
drivers/net/wireless/realtek/rtlwifi/Makefile | 1 +
|
||||
.../net/wireless/realtek/rtlwifi/rtl8192du/Makefile | 13 +++++++++++++
|
||||
3 files changed, 26 insertions(+)
|
||||
create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/Makefile
|
||||
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/Kconfig b/drivers/net/wireless/realtek/rtlwifi/Kconfig
|
||||
index cfe63f7b28d9..1e66c1bf7c8b 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/Kconfig
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/Kconfig
|
||||
@@ -119,6 +119,18 @@ config RTL8192CU
|
||||
|
||||
If you choose to build it as a module, it will be called rtl8192cu
|
||||
|
||||
+config RTL8192DU
|
||||
+ tristate "Realtek RTL8192DU USB Wireless Network Adapter"
|
||||
+ depends on USB
|
||||
+ select RTLWIFI
|
||||
+ select RTLWIFI_USB
|
||||
+ select RTL8192D_COMMON
|
||||
+ help
|
||||
+ This is the driver for Realtek RTL8192DU 802.11n USB
|
||||
+ wireless network adapters.
|
||||
+
|
||||
+ If you choose to build it as a module, it will be called rtl8192du
|
||||
+
|
||||
config RTLWIFI
|
||||
tristate
|
||||
select FW_LOADER
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/Makefile b/drivers/net/wireless/realtek/rtlwifi/Makefile
|
||||
index 423981b148df..9cf32277c7f1 100644
|
||||
--- a/drivers/net/wireless/realtek/rtlwifi/Makefile
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/Makefile
|
||||
@@ -25,6 +25,7 @@ obj-$(CONFIG_RTL8192CU) += rtl8192cu/
|
||||
obj-$(CONFIG_RTL8192SE) += rtl8192se/
|
||||
obj-$(CONFIG_RTL8192D_COMMON) += rtl8192d/
|
||||
obj-$(CONFIG_RTL8192DE) += rtl8192de/
|
||||
+obj-$(CONFIG_RTL8192DU) += rtl8192du/
|
||||
obj-$(CONFIG_RTL8723AE) += rtl8723ae/
|
||||
obj-$(CONFIG_RTL8723BE) += rtl8723be/
|
||||
obj-$(CONFIG_RTL8188EE) += rtl8188ee/
|
||||
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/Makefile b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/Makefile
|
||||
new file mode 100644
|
||||
index 000000000000..569bfd3d5030
|
||||
--- /dev/null
|
||||
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/Makefile
|
||||
@@ -0,0 +1,13 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0
|
||||
+rtl8192du-objs := \
|
||||
+ dm.o \
|
||||
+ fw.o \
|
||||
+ hw.o \
|
||||
+ led.o \
|
||||
+ phy.o \
|
||||
+ rf.o \
|
||||
+ sw.o \
|
||||
+ table.o \
|
||||
+ trx.o
|
||||
+
|
||||
+obj-$(CONFIG_RTL8192DU) += rtl8192du.o
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,43 +0,0 @@
|
||||
From 5cddc22049efb7e7aa5382ce789379c943170187 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 23 Feb 2024 18:51:07 +0100
|
||||
Subject: [PATCH 29/53] FROMLIST(v1): ASoC: meson: axg-tdm-interface: fix mclk
|
||||
setup without mclk-fs
|
||||
|
||||
By default, when mclk-fs is not provided, the tdm-interface driver
|
||||
requests an MCLK that is 4x the bit clock, SCLK.
|
||||
|
||||
However there is no justification for this:
|
||||
|
||||
* If the codec needs MCLK for its operation, mclk-fs is expected to be set
|
||||
according to the codec requirements.
|
||||
* If the codec does not need MCLK the minimum is 2 * SCLK, because this is
|
||||
minimum the divider between SCLK and MCLK can do.
|
||||
|
||||
Multiplying by 4 may cause problems because the PLL limit may be reached
|
||||
sooner than it should, so use 2x instead.
|
||||
|
||||
Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver")
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/axg-tdm-interface.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c
|
||||
index 1c3d433cefd2..cd5168e826df 100644
|
||||
--- a/sound/soc/meson/axg-tdm-interface.c
|
||||
+++ b/sound/soc/meson/axg-tdm-interface.c
|
||||
@@ -264,8 +264,8 @@ static int axg_tdm_iface_set_sclk(struct snd_soc_dai *dai,
|
||||
srate = iface->slots * iface->slot_width * params_rate(params);
|
||||
|
||||
if (!iface->mclk_rate) {
|
||||
- /* If no specific mclk is requested, default to bit clock * 4 */
|
||||
- clk_set_rate(iface->mclk, 4 * srate);
|
||||
+ /* If no specific mclk is requested, default to bit clock * 2 */
|
||||
+ clk_set_rate(iface->mclk, 2 * srate);
|
||||
} else {
|
||||
/* Check if we can actually get the bit clock from mclk */
|
||||
if (iface->mclk_rate % srate) {
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,80 +0,0 @@
|
||||
From 69a95e8b2be63812ca0b8e3b59786a21f074cfe9 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 23 Feb 2024 18:51:08 +0100
|
||||
Subject: [PATCH 30/53] FROMLIST(v1): ASoC: meson: axg-tdm-interface: add frame
|
||||
rate constraint
|
||||
|
||||
According to Amlogic datasheets for the SoCs supported by this driver, the
|
||||
maximum bit clock rate is 100MHz.
|
||||
|
||||
The tdm interface allows the rates listed by the DAI driver, regardless of
|
||||
the number slots or their width. However, these will impact the bit clock
|
||||
rate.
|
||||
|
||||
Hitting the 100MHz limit is very unlikely for most use cases but it is
|
||||
possible.
|
||||
|
||||
For example with 32 slots / 32 bits wide, the maximum rate is no longer
|
||||
384kHz but ~96kHz.
|
||||
|
||||
Add the constraint accordingly if the component is not already active.
|
||||
If it is active, the rate is already constrained by the first stream rate.
|
||||
|
||||
Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver")
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/axg-tdm-interface.c | 25 ++++++++++++++++++-------
|
||||
1 file changed, 18 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c
|
||||
index cd5168e826df..2cedbce73837 100644
|
||||
--- a/sound/soc/meson/axg-tdm-interface.c
|
||||
+++ b/sound/soc/meson/axg-tdm-interface.c
|
||||
@@ -12,6 +12,9 @@
|
||||
|
||||
#include "axg-tdm.h"
|
||||
|
||||
+/* Maximum bit clock frequency according the datasheets */
|
||||
+#define MAX_SCLK 100000000 /* Hz */
|
||||
+
|
||||
enum {
|
||||
TDM_IFACE_PAD,
|
||||
TDM_IFACE_LOOPBACK,
|
||||
@@ -153,19 +156,27 @@ static int axg_tdm_iface_startup(struct snd_pcm_substream *substream,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- /* Apply component wide rate symmetry */
|
||||
if (snd_soc_component_active(dai->component)) {
|
||||
+ /* Apply component wide rate symmetry */
|
||||
ret = snd_pcm_hw_constraint_single(substream->runtime,
|
||||
SNDRV_PCM_HW_PARAM_RATE,
|
||||
iface->rate);
|
||||
- if (ret < 0) {
|
||||
- dev_err(dai->dev,
|
||||
- "can't set iface rate constraint\n");
|
||||
- return ret;
|
||||
- }
|
||||
+
|
||||
+ } else {
|
||||
+ /* Limit rate according to the slot number and width */
|
||||
+ unsigned int max_rate =
|
||||
+ MAX_SCLK / (iface->slots * iface->slot_width);
|
||||
+ ret = snd_pcm_hw_constraint_minmax(substream->runtime,
|
||||
+ SNDRV_PCM_HW_PARAM_RATE,
|
||||
+ 0, max_rate);
|
||||
}
|
||||
|
||||
- return 0;
|
||||
+ if (ret < 0)
|
||||
+ dev_err(dai->dev, "can't set iface rate constraint\n");
|
||||
+ else
|
||||
+ ret = 0;
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int axg_tdm_iface_set_stream(struct snd_pcm_substream *substream,
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 58d3f1f106febd55da1b5e56016fb8e33fde09bd Mon Sep 17 00:00:00 2001
|
||||
From e72bd54794e45ae480928111c53b03f178d81998 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
|
||||
Date: Sun, 20 Feb 2022 08:23:12 +0000
|
||||
Subject: [PATCH 13/53] FROMLIST(v5): dt-bindings: vendor-prefixes: Add Titan
|
||||
Subject: [PATCH 30/69] FROMLIST(v5): dt-bindings: vendor-prefixes: Add Titan
|
||||
Micro Electronics
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@ -17,10 +17,10 @@ Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
index 1a0dc04f1db4..a3c08f859ab1 100644
|
||||
index b97d298b3eb6..3979d9ebb62a 100644
|
||||
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
|
||||
@@ -1427,6 +1427,8 @@ patternProperties:
|
||||
@@ -1464,6 +1464,8 @@ patternProperties:
|
||||
description: Texas Instruments
|
||||
"^tianma,.*":
|
||||
description: Tianma Micro-electronics Co., Ltd.
|
@ -1,32 +0,0 @@
|
||||
From 9b3d51967fcfe47d82f280e8030aa3dc5fcc5c02 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 23 Feb 2024 18:51:09 +0100
|
||||
Subject: [PATCH 31/53] FROMLIST(v1): ASoC: meson: axg-tdm-interface: update
|
||||
error format error traces
|
||||
|
||||
ASoC stopped using CBS_CFS and CBM_CFM a few years ago but the traces in
|
||||
the amlogic tdm interface driver did not follow.
|
||||
|
||||
Update this to match the new format names
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/axg-tdm-interface.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sound/soc/meson/axg-tdm-interface.c b/sound/soc/meson/axg-tdm-interface.c
|
||||
index 2cedbce73837..bf708717635b 100644
|
||||
--- a/sound/soc/meson/axg-tdm-interface.c
|
||||
+++ b/sound/soc/meson/axg-tdm-interface.c
|
||||
@@ -133,7 +133,7 @@ static int axg_tdm_iface_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
|
||||
case SND_SOC_DAIFMT_BP_FC:
|
||||
case SND_SOC_DAIFMT_BC_FP:
|
||||
- dev_err(dai->dev, "only CBS_CFS and CBM_CFM are supported\n");
|
||||
+ dev_err(dai->dev, "only BP_FP and BC_FC are supported\n");
|
||||
fallthrough;
|
||||
default:
|
||||
return -EINVAL;
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 24712c83de1ef21e7263f7c3bbe4423068070089 Mon Sep 17 00:00:00 2001
|
||||
From 1dd793f369319025118ca526d0fc899cc78eaeae Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Sun, 20 Feb 2022 08:24:47 +0000
|
||||
Subject: [PATCH 14/53] FROMLIST(v5): dt-bindings: auxdisplay: Add Titan Micro
|
||||
Subject: [PATCH 31/69] FROMLIST(v5): dt-bindings: auxdisplay: Add Titan Micro
|
||||
Electronics TM1628
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
@ -1,47 +0,0 @@
|
||||
From b399257ec04a93856fd0f1ebf5b6060dddf6aaed Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 23 Feb 2024 18:51:10 +0100
|
||||
Subject: [PATCH 32/53] FROMLIST(v1): ASoC: meson: axg-spdifin: use max width
|
||||
for rate detection
|
||||
|
||||
Use maximum width between 2 edges to setup spdifin thresholds
|
||||
and detect the input sample rate. This comes from Amlogic SDK and
|
||||
seems to be marginally more reliable than minimum width.
|
||||
|
||||
This is done to align with a future eARC support.
|
||||
No issue was reported with minimum width so far, this is considered
|
||||
to be an update so no Fixes tag is set.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/axg-spdifin.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson/axg-spdifin.c b/sound/soc/meson/axg-spdifin.c
|
||||
index bc2f2849ecfb..e721f579321e 100644
|
||||
--- a/sound/soc/meson/axg-spdifin.c
|
||||
+++ b/sound/soc/meson/axg-spdifin.c
|
||||
@@ -179,9 +179,9 @@ static int axg_spdifin_sample_mode_config(struct snd_soc_dai *dai,
|
||||
SPDIFIN_CTRL1_BASE_TIMER,
|
||||
FIELD_PREP(SPDIFIN_CTRL1_BASE_TIMER, rate / 1000));
|
||||
|
||||
- /* Threshold based on the minimum width between two edges */
|
||||
+ /* Threshold based on the maximum width between two edges */
|
||||
regmap_update_bits(priv->map, SPDIFIN_CTRL0,
|
||||
- SPDIFIN_CTRL0_WIDTH_SEL, SPDIFIN_CTRL0_WIDTH_SEL);
|
||||
+ SPDIFIN_CTRL0_WIDTH_SEL, 0);
|
||||
|
||||
/* Calculate the last timer which has no threshold */
|
||||
t_next = axg_spdifin_mode_timer(priv, i, rate);
|
||||
@@ -199,7 +199,7 @@ static int axg_spdifin_sample_mode_config(struct snd_soc_dai *dai,
|
||||
axg_spdifin_write_timer(priv->map, i, t);
|
||||
|
||||
/* Set the threshold value */
|
||||
- axg_spdifin_write_threshold(priv->map, i, t + t_next);
|
||||
+ axg_spdifin_write_threshold(priv->map, i, 3 * (t + t_next));
|
||||
|
||||
/* Save the current timer for the next threshold calculation */
|
||||
t_next = t;
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 35a48968c689d245bbe3dd2ff5cd9192d3a16e62 Mon Sep 17 00:00:00 2001
|
||||
From 77408aa188572b17c585b3f8a2074e2dad8ad2ed Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Sun, 20 Feb 2022 08:26:27 +0000
|
||||
Subject: [PATCH 15/53] FROMLIST(v5): docs: ABI: document tm1628 attribute
|
||||
Subject: [PATCH 32/69] FROMLIST(v5): docs: ABI: document tm1628 attribute
|
||||
display-text
|
||||
|
||||
Document the attribute for reading / writing the text to be displayed on
|
@ -1,90 +0,0 @@
|
||||
From 453af3a1ee8cea68dfdbdaed7a0a41f4a3743c76 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 23 Feb 2024 18:51:11 +0100
|
||||
Subject: [PATCH 33/53] FROMLIST(v1): ASoC: meson: axg-fifo: take continuous
|
||||
rates
|
||||
|
||||
The rate of the stream does not matter for the fifos of the axg family.
|
||||
Fifos will just push or pull data to/from the DDR according to consumption
|
||||
or production of the downstream element, which is the DPCM backend.
|
||||
|
||||
Drop the rate list and allow continuous rates. The lower and upper rate are
|
||||
set according what is known to work with the different backends
|
||||
|
||||
This allows the PDM input backend to also use continuous rates.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/axg-fifo.h | 2 --
|
||||
sound/soc/meson/axg-frddr.c | 8 ++++++--
|
||||
sound/soc/meson/axg-toddr.c | 8 ++++++--
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson/axg-fifo.h b/sound/soc/meson/axg-fifo.h
|
||||
index df528e8cb7c9..a14c31eb06d8 100644
|
||||
--- a/sound/soc/meson/axg-fifo.h
|
||||
+++ b/sound/soc/meson/axg-fifo.h
|
||||
@@ -21,8 +21,6 @@ struct snd_soc_dai_driver;
|
||||
struct snd_soc_pcm_runtime;
|
||||
|
||||
#define AXG_FIFO_CH_MAX 128
|
||||
-#define AXG_FIFO_RATES (SNDRV_PCM_RATE_5512 | \
|
||||
- SNDRV_PCM_RATE_8000_384000)
|
||||
#define AXG_FIFO_FORMATS (SNDRV_PCM_FMTBIT_S8 | \
|
||||
SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S20_LE | \
|
||||
diff --git a/sound/soc/meson/axg-frddr.c b/sound/soc/meson/axg-frddr.c
|
||||
index 8c166a5f338c..98140f449eb3 100644
|
||||
--- a/sound/soc/meson/axg-frddr.c
|
||||
+++ b/sound/soc/meson/axg-frddr.c
|
||||
@@ -109,7 +109,9 @@ static struct snd_soc_dai_driver axg_frddr_dai_drv = {
|
||||
.stream_name = "Playback",
|
||||
.channels_min = 1,
|
||||
.channels_max = AXG_FIFO_CH_MAX,
|
||||
- .rates = AXG_FIFO_RATES,
|
||||
+ .rates = SNDRV_PCM_RATE_CONTINUOUS,
|
||||
+ .rate_min = 5515,
|
||||
+ .rate_max = 384000,
|
||||
.formats = AXG_FIFO_FORMATS,
|
||||
},
|
||||
.ops = &axg_frddr_ops,
|
||||
@@ -184,7 +186,9 @@ static struct snd_soc_dai_driver g12a_frddr_dai_drv = {
|
||||
.stream_name = "Playback",
|
||||
.channels_min = 1,
|
||||
.channels_max = AXG_FIFO_CH_MAX,
|
||||
- .rates = AXG_FIFO_RATES,
|
||||
+ .rates = SNDRV_PCM_RATE_CONTINUOUS,
|
||||
+ .rate_min = 5515,
|
||||
+ .rate_max = 384000,
|
||||
.formats = AXG_FIFO_FORMATS,
|
||||
},
|
||||
.ops = &g12a_frddr_ops,
|
||||
diff --git a/sound/soc/meson/axg-toddr.c b/sound/soc/meson/axg-toddr.c
|
||||
index 1a0be177b8fe..32ee45cce7f8 100644
|
||||
--- a/sound/soc/meson/axg-toddr.c
|
||||
+++ b/sound/soc/meson/axg-toddr.c
|
||||
@@ -131,7 +131,9 @@ static struct snd_soc_dai_driver axg_toddr_dai_drv = {
|
||||
.stream_name = "Capture",
|
||||
.channels_min = 1,
|
||||
.channels_max = AXG_FIFO_CH_MAX,
|
||||
- .rates = AXG_FIFO_RATES,
|
||||
+ .rates = SNDRV_PCM_RATE_CONTINUOUS,
|
||||
+ .rate_min = 5515,
|
||||
+ .rate_max = 384000,
|
||||
.formats = AXG_FIFO_FORMATS,
|
||||
},
|
||||
.ops = &axg_toddr_ops,
|
||||
@@ -226,7 +228,9 @@ static struct snd_soc_dai_driver g12a_toddr_dai_drv = {
|
||||
.stream_name = "Capture",
|
||||
.channels_min = 1,
|
||||
.channels_max = AXG_FIFO_CH_MAX,
|
||||
- .rates = AXG_FIFO_RATES,
|
||||
+ .rates = SNDRV_PCM_RATE_CONTINUOUS,
|
||||
+ .rate_min = 5515,
|
||||
+ .rate_max = 384000,
|
||||
.formats = AXG_FIFO_FORMATS,
|
||||
},
|
||||
.ops = &g12a_toddr_ops,
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From e7c3f45587cda5b5b445df7434f38a0d751bb197 Mon Sep 17 00:00:00 2001
|
||||
From 41fa0e4796e981b1874233c36af38583a2f9d07d Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Mon, 4 Apr 2022 18:51:20 +0000
|
||||
Subject: [PATCH 16/53] FROMLIST(v5): auxdisplay: add support for Titanmec
|
||||
Subject: [PATCH 33/69] FROMLIST(v5): auxdisplay: add support for Titanmec
|
||||
TM1628 7 segment display controller
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
@ -44,12 +44,12 @@ Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
create mode 100644 drivers/auxdisplay/tm1628.c
|
||||
|
||||
diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig
|
||||
index d944d5298eca..f3d513139e5c 100644
|
||||
index 69d2138d7efb..dca186b9f2c1 100644
|
||||
--- a/drivers/auxdisplay/Kconfig
|
||||
+++ b/drivers/auxdisplay/Kconfig
|
||||
@@ -197,6 +197,17 @@ config ARM_CHARLCD
|
||||
line and the Linux version on the second line, but that's
|
||||
still useful.
|
||||
@@ -525,6 +525,17 @@ config SEG_LED_GPIO
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called seg-led-gpio.
|
||||
|
||||
+config TM1628
|
||||
+ tristate "TM1628 driver for LED 7/11 segment displays"
|
||||
@ -62,17 +62,17 @@ index d944d5298eca..f3d513139e5c 100644
|
||||
+ It's a 3-wire SPI device controlling a two-dimensional grid of
|
||||
+ LEDs. Dimming is applied to all outputs through an internal PWM.
|
||||
+
|
||||
menuconfig PARPORT_PANEL
|
||||
tristate "Parallel port LCD/Keypad Panel support"
|
||||
depends on PARPORT
|
||||
#
|
||||
# Character LCD with non-conforming interface section
|
||||
#
|
||||
diff --git a/drivers/auxdisplay/Makefile b/drivers/auxdisplay/Makefile
|
||||
index 6968ed4d3f0a..7728e17e1c5a 100644
|
||||
index f5c13ed1cd4f..82818251ffaf 100644
|
||||
--- a/drivers/auxdisplay/Makefile
|
||||
+++ b/drivers/auxdisplay/Makefile
|
||||
@@ -14,3 +14,4 @@ obj-$(CONFIG_HT16K33) += ht16k33.o
|
||||
@@ -16,3 +16,4 @@ obj-$(CONFIG_LINEDISP) += line-display.o
|
||||
obj-$(CONFIG_MAX6959) += max6959.o
|
||||
obj-$(CONFIG_PARPORT_PANEL) += panel.o
|
||||
obj-$(CONFIG_LCD2S) += lcd2s.o
|
||||
obj-$(CONFIG_LINEDISP) += line-display.o
|
||||
obj-$(CONFIG_SEG_LED_GPIO) += seg-led-gpio.o
|
||||
+obj-$(CONFIG_TM1628) += tm1628.o
|
||||
diff --git a/drivers/auxdisplay/tm1628.c b/drivers/auxdisplay/tm1628.c
|
||||
new file mode 100644
|
@ -1,176 +0,0 @@
|
||||
From 3e72fee0fba2026ba5c16a4a3f329fc04fcce310 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Brunet <jbrunet@baylibre.com>
|
||||
Date: Fri, 23 Feb 2024 18:51:12 +0100
|
||||
Subject: [PATCH 34/53] FROMLIST(v1): ASoC: meson: axg-fifo: use FIELD helpers
|
||||
|
||||
Use FIELD_GET() and FIELD_PREP() helpers instead of doing it manually.
|
||||
|
||||
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
|
||||
---
|
||||
sound/soc/meson/axg-fifo.c | 24 ++++++++++++------------
|
||||
sound/soc/meson/axg-fifo.h | 12 +++++-------
|
||||
sound/soc/meson/axg-frddr.c | 4 ++--
|
||||
sound/soc/meson/axg-toddr.c | 21 +++++++++------------
|
||||
4 files changed, 28 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
|
||||
index 65541fdb0038..597fd39e6e48 100644
|
||||
--- a/sound/soc/meson/axg-fifo.c
|
||||
+++ b/sound/soc/meson/axg-fifo.c
|
||||
@@ -145,8 +145,8 @@ int axg_fifo_pcm_hw_params(struct snd_soc_component *component,
|
||||
/* Enable irq if necessary */
|
||||
irq_en = runtime->no_period_wakeup ? 0 : FIFO_INT_COUNT_REPEAT;
|
||||
regmap_update_bits(fifo->map, FIFO_CTRL0,
|
||||
- CTRL0_INT_EN(FIFO_INT_COUNT_REPEAT),
|
||||
- CTRL0_INT_EN(irq_en));
|
||||
+ CTRL0_INT_EN,
|
||||
+ FIELD_PREP(CTRL0_INT_EN, irq_en));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -176,9 +176,9 @@ int axg_fifo_pcm_hw_free(struct snd_soc_component *component,
|
||||
{
|
||||
struct axg_fifo *fifo = axg_fifo_data(ss);
|
||||
|
||||
- /* Disable the block count irq */
|
||||
+ /* Disable irqs */
|
||||
regmap_update_bits(fifo->map, FIFO_CTRL0,
|
||||
- CTRL0_INT_EN(FIFO_INT_COUNT_REPEAT), 0);
|
||||
+ CTRL0_INT_EN, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -187,13 +187,13 @@ EXPORT_SYMBOL_GPL(axg_fifo_pcm_hw_free);
|
||||
static void axg_fifo_ack_irq(struct axg_fifo *fifo, u8 mask)
|
||||
{
|
||||
regmap_update_bits(fifo->map, FIFO_CTRL1,
|
||||
- CTRL1_INT_CLR(FIFO_INT_MASK),
|
||||
- CTRL1_INT_CLR(mask));
|
||||
+ CTRL1_INT_CLR,
|
||||
+ FIELD_PREP(CTRL1_INT_CLR, mask));
|
||||
|
||||
/* Clear must also be cleared */
|
||||
regmap_update_bits(fifo->map, FIFO_CTRL1,
|
||||
- CTRL1_INT_CLR(FIFO_INT_MASK),
|
||||
- 0);
|
||||
+ CTRL1_INT_CLR,
|
||||
+ FIELD_PREP(CTRL1_INT_CLR, 0));
|
||||
}
|
||||
|
||||
static irqreturn_t axg_fifo_pcm_irq_block(int irq, void *dev_id)
|
||||
@@ -204,7 +204,7 @@ static irqreturn_t axg_fifo_pcm_irq_block(int irq, void *dev_id)
|
||||
|
||||
regmap_read(fifo->map, FIFO_STATUS1, &status);
|
||||
|
||||
- status = STATUS1_INT_STS(status) & FIFO_INT_MASK;
|
||||
+ status = FIELD_GET(STATUS1_INT_STS, status);
|
||||
if (status & FIFO_INT_COUNT_REPEAT)
|
||||
snd_pcm_period_elapsed(ss);
|
||||
else
|
||||
@@ -254,15 +254,15 @@ int axg_fifo_pcm_open(struct snd_soc_component *component,
|
||||
|
||||
/* Setup status2 so it reports the memory pointer */
|
||||
regmap_update_bits(fifo->map, FIFO_CTRL1,
|
||||
- CTRL1_STATUS2_SEL_MASK,
|
||||
- CTRL1_STATUS2_SEL(STATUS2_SEL_DDR_READ));
|
||||
+ CTRL1_STATUS2_SEL,
|
||||
+ FIELD_PREP(CTRL1_STATUS2_SEL, STATUS2_SEL_DDR_READ));
|
||||
|
||||
/* Make sure the dma is initially disabled */
|
||||
__dma_enable(fifo, false);
|
||||
|
||||
/* Disable irqs until params are ready */
|
||||
regmap_update_bits(fifo->map, FIFO_CTRL0,
|
||||
- CTRL0_INT_EN(FIFO_INT_MASK), 0);
|
||||
+ CTRL0_INT_EN, 0);
|
||||
|
||||
/* Clear any pending interrupt */
|
||||
axg_fifo_ack_irq(fifo, FIFO_INT_MASK);
|
||||
diff --git a/sound/soc/meson/axg-fifo.h b/sound/soc/meson/axg-fifo.h
|
||||
index a14c31eb06d8..4c48c0a08481 100644
|
||||
--- a/sound/soc/meson/axg-fifo.h
|
||||
+++ b/sound/soc/meson/axg-fifo.h
|
||||
@@ -40,21 +40,19 @@ struct snd_soc_pcm_runtime;
|
||||
|
||||
#define FIFO_CTRL0 0x00
|
||||
#define CTRL0_DMA_EN BIT(31)
|
||||
-#define CTRL0_INT_EN(x) ((x) << 16)
|
||||
+#define CTRL0_INT_EN GENMASK(23, 16)
|
||||
#define CTRL0_SEL_MASK GENMASK(2, 0)
|
||||
#define CTRL0_SEL_SHIFT 0
|
||||
#define FIFO_CTRL1 0x04
|
||||
-#define CTRL1_INT_CLR(x) ((x) << 0)
|
||||
-#define CTRL1_STATUS2_SEL_MASK GENMASK(11, 8)
|
||||
-#define CTRL1_STATUS2_SEL(x) ((x) << 8)
|
||||
+#define CTRL1_INT_CLR GENMASK(7, 0)
|
||||
+#define CTRL1_STATUS2_SEL GENMASK(11, 8)
|
||||
#define STATUS2_SEL_DDR_READ 0
|
||||
-#define CTRL1_FRDDR_DEPTH_MASK GENMASK(31, 24)
|
||||
-#define CTRL1_FRDDR_DEPTH(x) ((x) << 24)
|
||||
+#define CTRL1_FRDDR_DEPTH GENMASK(31, 24)
|
||||
#define FIFO_START_ADDR 0x08
|
||||
#define FIFO_FINISH_ADDR 0x0c
|
||||
#define FIFO_INT_ADDR 0x10
|
||||
#define FIFO_STATUS1 0x14
|
||||
-#define STATUS1_INT_STS(x) ((x) << 0)
|
||||
+#define STATUS1_INT_STS GENMASK(7, 0)
|
||||
#define FIFO_STATUS2 0x18
|
||||
#define FIFO_INIT_ADDR 0x24
|
||||
#define FIFO_CTRL2 0x28
|
||||
diff --git a/sound/soc/meson/axg-frddr.c b/sound/soc/meson/axg-frddr.c
|
||||
index 98140f449eb3..97ca0ea5faa5 100644
|
||||
--- a/sound/soc/meson/axg-frddr.c
|
||||
+++ b/sound/soc/meson/axg-frddr.c
|
||||
@@ -59,8 +59,8 @@ static int axg_frddr_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
/* Trim the FIFO depth if the period is small to improve latency */
|
||||
depth = min(period, fifo->depth);
|
||||
val = (depth / AXG_FIFO_BURST) - 1;
|
||||
- regmap_update_bits(fifo->map, FIFO_CTRL1, CTRL1_FRDDR_DEPTH_MASK,
|
||||
- CTRL1_FRDDR_DEPTH(val));
|
||||
+ regmap_update_bits(fifo->map, FIFO_CTRL1, CTRL1_FRDDR_DEPTH,
|
||||
+ FIELD_PREP(CTRL1_FRDDR_DEPTH, val));
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/sound/soc/meson/axg-toddr.c b/sound/soc/meson/axg-toddr.c
|
||||
index 32ee45cce7f8..5b08b4e841ad 100644
|
||||
--- a/sound/soc/meson/axg-toddr.c
|
||||
+++ b/sound/soc/meson/axg-toddr.c
|
||||
@@ -19,12 +19,9 @@
|
||||
#define CTRL0_TODDR_EXT_SIGNED BIT(29)
|
||||
#define CTRL0_TODDR_PP_MODE BIT(28)
|
||||
#define CTRL0_TODDR_SYNC_CH BIT(27)
|
||||
-#define CTRL0_TODDR_TYPE_MASK GENMASK(15, 13)
|
||||
-#define CTRL0_TODDR_TYPE(x) ((x) << 13)
|
||||
-#define CTRL0_TODDR_MSB_POS_MASK GENMASK(12, 8)
|
||||
-#define CTRL0_TODDR_MSB_POS(x) ((x) << 8)
|
||||
-#define CTRL0_TODDR_LSB_POS_MASK GENMASK(7, 3)
|
||||
-#define CTRL0_TODDR_LSB_POS(x) ((x) << 3)
|
||||
+#define CTRL0_TODDR_TYPE GENMASK(15, 13)
|
||||
+#define CTRL0_TODDR_MSB_POS GENMASK(12, 8)
|
||||
+#define CTRL0_TODDR_LSB_POS GENMASK(7, 3)
|
||||
#define CTRL1_TODDR_FORCE_FINISH BIT(25)
|
||||
#define CTRL1_SEL_SHIFT 28
|
||||
|
||||
@@ -76,12 +73,12 @@ static int axg_toddr_dai_hw_params(struct snd_pcm_substream *substream,
|
||||
width = params_width(params);
|
||||
|
||||
regmap_update_bits(fifo->map, FIFO_CTRL0,
|
||||
- CTRL0_TODDR_TYPE_MASK |
|
||||
- CTRL0_TODDR_MSB_POS_MASK |
|
||||
- CTRL0_TODDR_LSB_POS_MASK,
|
||||
- CTRL0_TODDR_TYPE(type) |
|
||||
- CTRL0_TODDR_MSB_POS(TODDR_MSB_POS) |
|
||||
- CTRL0_TODDR_LSB_POS(TODDR_MSB_POS - (width - 1)));
|
||||
+ CTRL0_TODDR_TYPE |
|
||||
+ CTRL0_TODDR_MSB_POS |
|
||||
+ CTRL0_TODDR_LSB_POS,
|
||||
+ FIELD_PREP(CTRL0_TODDR_TYPE, type) |
|
||||
+ FIELD_PREP(CTRL0_TODDR_MSB_POS, TODDR_MSB_POS) |
|
||||
+ FIELD_PREP(CTRL0_TODDR_LSB_POS, TODDR_MSB_POS - (width - 1)));
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 8dd34cfc3fdb2ae31c34492b8b25bdf7d8c3352b Mon Sep 17 00:00:00 2001
|
||||
From c248e93fb876f2131e823757aacb6770a4bb9a57 Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Mon, 4 Apr 2022 18:52:34 +0000
|
||||
Subject: [PATCH 17/53] FROMLIST(v5): arm64: dts: meson-gxl-s905w-tx3-mini: add
|
||||
Subject: [PATCH 34/69] FROMLIST(v5): arm64: dts: meson-gxl-s905w-tx3-mini: add
|
||||
support for the 7 segment display
|
||||
|
||||
This patch adds support for the 7 segment display of the device.
|
@ -1,58 +0,0 @@
|
||||
From 75a8df6a4644ae9399d277c164e591130ee1c776 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 20 Mar 2024 13:28:08 +0000
|
||||
Subject: [PATCH 35/53] FROMLIST(v1): drm/panfrost: fix power transition
|
||||
timeout warnings
|
||||
|
||||
Increase the timeout value to prevent system logs on Amlogic boards flooding
|
||||
with power transition warnings:
|
||||
|
||||
[ 13.047638] panfrost ffe40000.gpu: shader power transition timeout
|
||||
[ 13.048674] panfrost ffe40000.gpu: l2 power transition timeout
|
||||
[ 13.937324] panfrost ffe40000.gpu: shader power transition timeout
|
||||
[ 13.938351] panfrost ffe40000.gpu: l2 power transition timeout
|
||||
...
|
||||
[39829.506904] panfrost ffe40000.gpu: shader power transition timeout
|
||||
[39829.507938] panfrost ffe40000.gpu: l2 power transition timeout
|
||||
[39949.508369] panfrost ffe40000.gpu: shader power transition timeout
|
||||
[39949.509405] panfrost ffe40000.gpu: l2 power transition timeout
|
||||
|
||||
The 2000 value has been found through trial and error testing on Amlogic boards
|
||||
with G52 and G31 GPU's.
|
||||
|
||||
Fixes: 22aa1a209018 ("drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()")
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/panfrost/panfrost_gpu.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c
|
||||
index 9063ce254642..fd8e44992184 100644
|
||||
--- a/drivers/gpu/drm/panfrost/panfrost_gpu.c
|
||||
+++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c
|
||||
@@ -441,19 +441,19 @@ void panfrost_gpu_power_off(struct panfrost_device *pfdev)
|
||||
|
||||
gpu_write(pfdev, SHADER_PWROFF_LO, pfdev->features.shader_present);
|
||||
ret = readl_relaxed_poll_timeout(pfdev->iomem + SHADER_PWRTRANS_LO,
|
||||
- val, !val, 1, 1000);
|
||||
+ val, !val, 1, 2000);
|
||||
if (ret)
|
||||
dev_err(pfdev->dev, "shader power transition timeout");
|
||||
|
||||
gpu_write(pfdev, TILER_PWROFF_LO, pfdev->features.tiler_present);
|
||||
ret = readl_relaxed_poll_timeout(pfdev->iomem + TILER_PWRTRANS_LO,
|
||||
- val, !val, 1, 1000);
|
||||
+ val, !val, 1, 2000);
|
||||
if (ret)
|
||||
dev_err(pfdev->dev, "tiler power transition timeout");
|
||||
|
||||
gpu_write(pfdev, L2_PWROFF_LO, pfdev->features.l2_present);
|
||||
ret = readl_poll_timeout(pfdev->iomem + L2_PWRTRANS_LO,
|
||||
- val, !val, 0, 1000);
|
||||
+ val, !val, 0, 2000);
|
||||
if (ret)
|
||||
dev_err(pfdev->dev, "l2 power transition timeout");
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 3a59c995a56b3802ceb6db413c81e2170fa767cb Mon Sep 17 00:00:00 2001
|
||||
From 4b711a4fa9907a0b0c786619833015bad8940568 Mon Sep 17 00:00:00 2001
|
||||
From: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
Date: Mon, 4 Apr 2022 18:53:32 +0000
|
||||
Subject: [PATCH 18/53] FROMLIST(v5): MAINTAINERS: Add entry for tm1628
|
||||
Subject: [PATCH 35/69] FROMLIST(v5): MAINTAINERS: Add entry for tm1628
|
||||
auxdisplay driver
|
||||
|
||||
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
@ -10,10 +10,10 @@ Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/MAINTAINERS b/MAINTAINERS
|
||||
index 1aabf1c15bb3..ea6d2ff2eb20 100644
|
||||
index 28e20975c26f..82cce970986a 100644
|
||||
--- a/MAINTAINERS
|
||||
+++ b/MAINTAINERS
|
||||
@@ -22155,6 +22155,13 @@ W: http://sourceforge.net/projects/tlan/
|
||||
@@ -22310,6 +22310,13 @@ W: http://sourceforge.net/projects/tlan/
|
||||
F: Documentation/networking/device_drivers/ethernet/ti/tlan.rst
|
||||
F: drivers/net/ethernet/ti/tlan.*
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 665584f98081e481e77286b49b6a0e1ce9fe5655 Mon Sep 17 00:00:00 2001
|
||||
From 6949c51b8190a3ec6c82b0362ce45b9a87acf7b5 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 23 Dec 2018 02:24:38 +0100
|
||||
Subject: [PATCH 19/53] FROMLIST(v1): ASoC: hdmi-codec: reorder channel
|
||||
Subject: [PATCH 36/69] FROMLIST(v1): ASoC: hdmi-codec: reorder channel
|
||||
allocation list
|
||||
|
||||
Wrong channel allocation is selected by hdmi_codec_get_ch_alloc_table_idx().
|
@ -1,7 +1,7 @@
|
||||
From b4b3656688319a77827ce533f8797f317dfaa01c Mon Sep 17 00:00:00 2001
|
||||
From 94cbc52d4336ac9d9db13db90f0f2c7264368c81 Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Mon, 22 Nov 2021 09:15:21 +0000
|
||||
Subject: [PATCH 20/53] FROMLIST(v1): media: meson: vdec: esparser: check
|
||||
Subject: [PATCH 37/69] FROMLIST(v1): media: meson: vdec: esparser: check
|
||||
parsing state with hardware write pointer
|
||||
|
||||
Also check the hardware write pointer to check if ES Parser has stalled.
|
@ -1,7 +1,7 @@
|
||||
From 73aa203801527e081409ead1c5708552ecc5f82b Mon Sep 17 00:00:00 2001
|
||||
From 24058bc29c31131aed9f446b8d207f30e08c77be Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Roszak <benjamin545@gmail.com>
|
||||
Date: Mon, 23 Jan 2023 10:56:46 +0000
|
||||
Subject: [PATCH 21/53] FROMLIST(v2): media: meson: vdec: implement 10bit
|
||||
Subject: [PATCH 38/69] FROMLIST(v2): media: meson: vdec: implement 10bit
|
||||
bitstream handling
|
||||
|
||||
In order to support 10bit bitstream decoding, buffers and MMU
|
||||
@ -453,10 +453,10 @@ index baf0dba3c418..ef6dd05d89c8 100644
|
||||
return -EAGAIN;
|
||||
}
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec.h b/drivers/staging/media/meson/vdec/vdec.h
|
||||
index 0906b8fb5cc6..a48170fe4cff 100644
|
||||
index 258685177700..e1e731b7d431 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec.h
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec.h
|
||||
@@ -244,6 +244,7 @@ struct amvdec_session {
|
||||
@@ -243,6 +243,7 @@ struct amvdec_session {
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 colorspace;
|
@ -1,7 +1,7 @@
|
||||
From 00829e834a4cd6594b076550fd18be30ddba5b0e Mon Sep 17 00:00:00 2001
|
||||
From 024027c2878c87f5ee0963439fae1c24164bc382 Mon Sep 17 00:00:00 2001
|
||||
From: Maxime Jourdan <mjourdan@baylibre.com>
|
||||
Date: Mon, 23 Jan 2023 11:07:04 +0000
|
||||
Subject: [PATCH 22/53] FROMLIST(v2): media: meson: vdec: add HEVC decode codec
|
||||
Subject: [PATCH 39/69] FROMLIST(v2): media: meson: vdec: add HEVC decode codec
|
||||
|
||||
Add initial HEVC codec for the Amlogic GXBB/GXL/GXM SoCs using
|
||||
the common "HEVC" decoder driver.
|
@ -1,7 +1,7 @@
|
||||
From 1283c858520094cb01ff6fc133eab9cad8c7e276 Mon Sep 17 00:00:00 2001
|
||||
From 4663bf7102e82064d156a9a12e24139f516098c3 Mon Sep 17 00:00:00 2001
|
||||
From: Anand Moon <linux.amoon@gmail.com>
|
||||
Date: Wed, 22 Nov 2023 23:53:46 +0530
|
||||
Subject: [PATCH 23/53] FROMLIST(v4): dt-bindings: usb: Add the binding example
|
||||
Subject: [PATCH 40/69] FROMLIST(v4): dt-bindings: usb: Add the binding example
|
||||
for the Genesys Logic GL3523 hub
|
||||
|
||||
Add the binding example for the USB3.1 Genesys Logic GL3523
|
@ -1,7 +1,7 @@
|
||||
From 3b361c7741a8c9a7ba990eda872fcc7817d35b23 Mon Sep 17 00:00:00 2001
|
||||
From bfd238dd418d92920dc5d14c97bb6743a23fe187 Mon Sep 17 00:00:00 2001
|
||||
From: Anand Moon <linux.amoon@gmail.com>
|
||||
Date: Tue, 10 Oct 2023 08:54:43 +0530
|
||||
Subject: [PATCH 24/53] FROMLIST(v4): arm64: dts: amlogic: Used onboard usb hub
|
||||
Subject: [PATCH 41/69] FROMLIST(v4): arm64: dts: amlogic: Used onboard usb hub
|
||||
reset on odroid n2
|
||||
|
||||
On Odroid n2/n2+ previously use gpio-hog to reset the usb hub,
|
@ -1,7 +1,7 @@
|
||||
From 983b5729b97918d6c860bdfd01093cf60b0ea83e Mon Sep 17 00:00:00 2001
|
||||
From fb42c49d5c13762278e961748f99a135b16aa54e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 30 Jan 2023 05:09:18 +0000
|
||||
Subject: [PATCH 25/53] FROMLIST(v1): arm64: dts: meson: radxa-zero2: add
|
||||
Subject: [PATCH 42/69] FROMLIST(v1): arm64: dts: meson: radxa-zero2: add
|
||||
pwm-fan support
|
||||
|
||||
The A311D on Zero2 needs active cooling and the board includes a header to
|
@ -1,7 +1,7 @@
|
||||
From a4c4025275bcce3c13ff2d2b46dfa49ff947804a Mon Sep 17 00:00:00 2001
|
||||
From f88d7a934300717d0098341c27a069d263680f09 Mon Sep 17 00:00:00 2001
|
||||
From: Haoran Liu <liuhaoran14@163.com>
|
||||
Date: Wed, 29 Nov 2023 03:34:05 -0800
|
||||
Subject: [PATCH 26/53] FROMLIST(v2): meson_plane: Add error handling
|
||||
Subject: [PATCH 43/69] FROMLIST(v2): meson_plane: Add error handling
|
||||
|
||||
This patch adds robust error handling to the meson_plane_create
|
||||
function in drivers/gpu/drm/meson/meson_plane.c. The function
|
@ -1,7 +1,7 @@
|
||||
From ff1b40e46c3498843e616b364e8f985b0146255f Mon Sep 17 00:00:00 2001
|
||||
From 0ada604eb1aee519e7014605061c20ef7763763c Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sat, 23 Mar 2024 20:04:49 +0100
|
||||
Subject: [PATCH 36/53] FROMLIST(v1): iio: adc: meson: fix voltage reference
|
||||
Subject: [PATCH 44/69] FROMLIST(v1): iio: adc: meson: fix voltage reference
|
||||
selection field name typo
|
||||
|
||||
The field should be called "vref_voltage", without a typo in the word
|
@ -1,7 +1,7 @@
|
||||
From e75fe79643d8d1be19c91d195b9fa1cc16bfffa8 Mon Sep 17 00:00:00 2001
|
||||
From 590a7fda90807fbf9c58d644145426960a610fcc Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sat, 23 Mar 2024 20:30:02 +0100
|
||||
Subject: [PATCH 37/53] FROMLIST(v1): iio: adc: consistently use bool and enum
|
||||
Subject: [PATCH 45/69] FROMLIST(v1): iio: adc: consistently use bool and enum
|
||||
in struct meson_sar_adc_param
|
||||
|
||||
Consistently use bool for any register bit that enables/disables
|
@ -1,7 +1,7 @@
|
||||
From c6a0829ea93c2460d1fcc79eb59f9704832a073c Mon Sep 17 00:00:00 2001
|
||||
From 37255e6d2fa6341a76518a632ee556813539973f Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sat, 23 Mar 2024 20:35:58 +0100
|
||||
Subject: [PATCH 38/53] FROMLIST(v1): iio: adc: meson: simplify
|
||||
Subject: [PATCH 46/69] FROMLIST(v1): iio: adc: meson: simplify
|
||||
MESON_SAR_ADC_REG11 register access
|
||||
|
||||
Simply check the max_register value to decide whether
|
@ -0,0 +1,73 @@
|
||||
From 6e79b2f5914f98242351d29897c391c8778c2172 Mon Sep 17 00:00:00 2001
|
||||
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
Date: Mon, 29 Apr 2024 13:48:48 +0200
|
||||
Subject: [PATCH 47/69] FROMLIST(v1): ASoC: meson: Constify static
|
||||
snd_pcm_hardware
|
||||
|
||||
Static 'struct snd_pcm_hardware' is not modified by the driver and its
|
||||
copy is passed to the core, so it can be made const for increased code
|
||||
safety.
|
||||
|
||||
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
---
|
||||
sound/soc/meson/aiu-fifo-i2s.c | 2 +-
|
||||
sound/soc/meson/aiu-fifo-spdif.c | 2 +-
|
||||
sound/soc/meson/aiu-fifo.h | 2 +-
|
||||
sound/soc/meson/axg-fifo.c | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson/aiu-fifo-i2s.c b/sound/soc/meson/aiu-fifo-i2s.c
|
||||
index 7d833500c799..eccbc16b293a 100644
|
||||
--- a/sound/soc/meson/aiu-fifo-i2s.c
|
||||
+++ b/sound/soc/meson/aiu-fifo-i2s.c
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#define AIU_FIFO_I2S_BLOCK 256
|
||||
|
||||
-static struct snd_pcm_hardware fifo_i2s_pcm = {
|
||||
+static const struct snd_pcm_hardware fifo_i2s_pcm = {
|
||||
.info = (SNDRV_PCM_INFO_INTERLEAVED |
|
||||
SNDRV_PCM_INFO_MMAP |
|
||||
SNDRV_PCM_INFO_MMAP_VALID |
|
||||
diff --git a/sound/soc/meson/aiu-fifo-spdif.c b/sound/soc/meson/aiu-fifo-spdif.c
|
||||
index fa91f3c53fa4..e0e00ec026dc 100644
|
||||
--- a/sound/soc/meson/aiu-fifo-spdif.c
|
||||
+++ b/sound/soc/meson/aiu-fifo-spdif.c
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#define AIU_FIFO_SPDIF_BLOCK 8
|
||||
|
||||
-static struct snd_pcm_hardware fifo_spdif_pcm = {
|
||||
+static const struct snd_pcm_hardware fifo_spdif_pcm = {
|
||||
.info = (SNDRV_PCM_INFO_INTERLEAVED |
|
||||
SNDRV_PCM_INFO_MMAP |
|
||||
SNDRV_PCM_INFO_MMAP_VALID |
|
||||
diff --git a/sound/soc/meson/aiu-fifo.h b/sound/soc/meson/aiu-fifo.h
|
||||
index 42ce266677cc..84ab4577815a 100644
|
||||
--- a/sound/soc/meson/aiu-fifo.h
|
||||
+++ b/sound/soc/meson/aiu-fifo.h
|
||||
@@ -18,7 +18,7 @@ struct snd_pcm_hw_params;
|
||||
struct platform_device;
|
||||
|
||||
struct aiu_fifo {
|
||||
- struct snd_pcm_hardware *pcm;
|
||||
+ const struct snd_pcm_hardware *pcm;
|
||||
unsigned int mem_offset;
|
||||
unsigned int fifo_block;
|
||||
struct clk *pclk;
|
||||
diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
|
||||
index ecb3eb7a9723..23ce75273da4 100644
|
||||
--- a/sound/soc/meson/axg-fifo.c
|
||||
+++ b/sound/soc/meson/axg-fifo.c
|
||||
@@ -23,7 +23,7 @@
|
||||
* These differences are handled in the respective DAI drivers
|
||||
*/
|
||||
|
||||
-static struct snd_pcm_hardware axg_fifo_hw = {
|
||||
+static const struct snd_pcm_hardware axg_fifo_hw = {
|
||||
.info = (SNDRV_PCM_INFO_INTERLEAVED |
|
||||
SNDRV_PCM_INFO_MMAP |
|
||||
SNDRV_PCM_INFO_MMAP_VALID |
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 6299ce68ab47b2c371cc707402bd1ea6f59e752d Mon Sep 17 00:00:00 2001
|
||||
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
Date: Tue, 30 Apr 2024 16:02:20 +0200
|
||||
Subject: [PATCH 48/69] FROMLIST(v1): ASoC: meson: Use
|
||||
snd_soc_substream_to_rtd() for accessing private_data
|
||||
|
||||
Do not open-code snd_soc_substream_to_rtd().
|
||||
|
||||
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
---
|
||||
sound/soc/meson/aiu-fifo.c | 2 +-
|
||||
sound/soc/meson/axg-fifo.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sound/soc/meson/aiu-fifo.c b/sound/soc/meson/aiu-fifo.c
|
||||
index 4041ff8e437f..b222bde1f61b 100644
|
||||
--- a/sound/soc/meson/aiu-fifo.c
|
||||
+++ b/sound/soc/meson/aiu-fifo.c
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
static struct snd_soc_dai *aiu_fifo_dai(struct snd_pcm_substream *ss)
|
||||
{
|
||||
- struct snd_soc_pcm_runtime *rtd = ss->private_data;
|
||||
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(ss);
|
||||
|
||||
return snd_soc_rtd_to_cpu(rtd, 0);
|
||||
}
|
||||
diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
|
||||
index 23ce75273da4..59abe0b3c59f 100644
|
||||
--- a/sound/soc/meson/axg-fifo.c
|
||||
+++ b/sound/soc/meson/axg-fifo.c
|
||||
@@ -46,7 +46,7 @@ static const struct snd_pcm_hardware axg_fifo_hw = {
|
||||
|
||||
static struct snd_soc_dai *axg_fifo_dai(struct snd_pcm_substream *ss)
|
||||
{
|
||||
- struct snd_soc_pcm_runtime *rtd = ss->private_data;
|
||||
+ struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(ss);
|
||||
|
||||
return snd_soc_rtd_to_cpu(rtd, 0);
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 9bfbedf208542f00d5fcd39d7bee1601c655601b Mon Sep 17 00:00:00 2001
|
||||
From: Da Xue <da@libre.computer>
|
||||
Date: Fri, 24 May 2024 15:17:37 +0000
|
||||
Subject: [PATCH 49/69] FROMLIST(v1): net: mdio: meson-gxl set 28th bit in
|
||||
eth_reg2
|
||||
|
||||
This bit is necessary to enable packets on the interface. Without this
|
||||
bit set, ethernet behaves as if it is working but no activity occurs.
|
||||
|
||||
The vendor SDK sets this bit along with the PHY_ID bits. u-boot will set
|
||||
this bit as well but if u-boot is not compiled with networking, the
|
||||
interface will not work.
|
||||
|
||||
Fixes: 9a24e1ff4326 ("net: mdio: add amlogic gxl mdio mux support");
|
||||
Signed-off-by: Da Xue <da@libre.computer>
|
||||
---
|
||||
drivers/net/mdio/mdio-mux-meson-gxl.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/mdio/mdio-mux-meson-gxl.c b/drivers/net/mdio/mdio-mux-meson-gxl.c
|
||||
index 89554021b5cc..b2bd57f54034 100644
|
||||
--- a/drivers/net/mdio/mdio-mux-meson-gxl.c
|
||||
+++ b/drivers/net/mdio/mdio-mux-meson-gxl.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#define REG2_LEDACT GENMASK(23, 22)
|
||||
#define REG2_LEDLINK GENMASK(25, 24)
|
||||
#define REG2_DIV4SEL BIT(27)
|
||||
+#define REG2_RESERVED_28 BIT(28)
|
||||
#define REG2_ADCBYPASS BIT(30)
|
||||
#define REG2_CLKINSEL BIT(31)
|
||||
#define ETH_REG3 0x4
|
||||
@@ -65,7 +66,7 @@ static void gxl_enable_internal_mdio(struct gxl_mdio_mux *priv)
|
||||
* The only constraint is that it must match the one in
|
||||
* drivers/net/phy/meson-gxl.c to properly match the PHY.
|
||||
*/
|
||||
- writel(FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
|
||||
+ writel(REG2_RESERVED_28 | FIELD_PREP(REG2_PHYID, EPHY_GXL_ID),
|
||||
priv->regs + ETH_REG2);
|
||||
|
||||
/* Enable the internal phy */
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,50 @@
|
||||
From 7fc9e86945350fc1be6e6c28274e2da7b7ec01c3 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Baierl <ichgeh@imkreisrum.de>
|
||||
Date: Tue, 2 Apr 2024 14:22:52 +0000
|
||||
Subject: [PATCH 50/69] WIP: media: meson: vdec: reintroduce wiggle room
|
||||
|
||||
Without the wiggle room, it happens that matching offsets can't be found.
|
||||
This results in non-matches and afterwards in frame drops in userspace apps.
|
||||
Reintroduce this wiggle room again.
|
||||
|
||||
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/vdec_helpers.c | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||
index fef76142f0c5..fbfdbf3ec19d 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
|
||||
@@ -378,7 +378,16 @@ void amvdec_dst_buf_done_offset(struct amvdec_session *sess,
|
||||
|
||||
/* Look for our vififo offset to get the corresponding timestamp. */
|
||||
list_for_each_entry_safe(tmp, n, &sess->timestamps, list) {
|
||||
- if (tmp->offset > offset) {
|
||||
+ s64 delta = (s64)offset - tmp->offset;
|
||||
+
|
||||
+ /* Offsets reported by codecs usually differ slightly,
|
||||
+ * so we need some wiggle room.
|
||||
+ * 4KiB being the minimum packet size, there is no risk here.
|
||||
+ */
|
||||
+ if (delta > (-1 * (s32)SZ_4K) && delta < SZ_4K) {
|
||||
+ match = tmp;
|
||||
+ break;
|
||||
+ } else {
|
||||
/*
|
||||
* Delete any record that remained unused for 32 match
|
||||
* checks
|
||||
@@ -387,10 +396,7 @@ void amvdec_dst_buf_done_offset(struct amvdec_session *sess,
|
||||
list_del(&tmp->list);
|
||||
kfree(tmp);
|
||||
}
|
||||
- break;
|
||||
}
|
||||
-
|
||||
- match = tmp;
|
||||
}
|
||||
|
||||
if (!match) {
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 8d6f4eb8a8a7bd35dd10bb4d942b0e3182042ac1 Mon Sep 17 00:00:00 2001
|
||||
From c63dc0d2975b01f94848480801d32ca9501bae32 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 5 Apr 2021 13:48:34 +0000
|
||||
Subject: [PATCH 39/53] WIP: dt-bindings: arm: amlogic: add support for
|
||||
Subject: [PATCH 51/69] WIP: dt-bindings: arm: amlogic: add support for
|
||||
Dreambox One/Two
|
||||
|
||||
The Dreambox One and Dreambox Two are DVBS/T2 receiver boxes based
|
||||
@ -13,10 +13,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
index caab7ceeda45..922380d6139e 100644
|
||||
index 949537cea6be..0cb0721d83e3 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
@@ -175,6 +175,8 @@ properties:
|
||||
@@ -168,6 +168,8 @@ properties:
|
||||
- azw,gtking
|
||||
- azw,gtking-pro
|
||||
- bananapi,bpi-m2s
|
@ -1,7 +1,7 @@
|
||||
From ffbb462ad7261792d8642717b1d17407afe81d94 Mon Sep 17 00:00:00 2001
|
||||
From 1dc7d697233d1832d222e6e72afe2dcbc9ef19c9 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 5 Apr 2021 13:51:20 +0000
|
||||
Subject: [PATCH 40/53] WIP: arm64: dts: meson: add initial device-trees for
|
||||
Subject: [PATCH 52/69] WIP: arm64: dts: meson: add initial device-trees for
|
||||
Dreambox One/Two
|
||||
|
||||
Dreambox One and Dreambox Two are based on the Amlogic W400 reference
|
||||
@ -40,10 +40,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index cc8b34bd583d..edb22c57f11d 100644
|
||||
index 1ab160bf928a..3b2e11a82df2 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -15,6 +15,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
|
||||
@@ -17,6 +17,8 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-bananapi-m2s.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-bananapi-cm4-cm4io.dtb
|
@ -1,73 +0,0 @@
|
||||
From 75671e34bec14c140e4e81ae742de16b2a29d174 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 1 Jan 2024 07:40:15 +0000
|
||||
Subject: [PATCH 53/53] WIP: arm64: dts: meson: add p271 support
|
||||
|
||||
Add a device-tree for the Amlogic P271 (S905L) reference design board. This is
|
||||
similar to the P212 (S905X) but with silicon differences to omit the VP9 codec
|
||||
and use Mali 450-MP2 not MP3. The SoC is marked with S905L and a "2" (believed
|
||||
to denote the MP2) and is sometimes wrongly described on some distributor stock
|
||||
lists (and box vendor marketing) as an S905L2 chip.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
.../boot/dts/amlogic/meson-gxl-s905l-p271.dts | 47 +++++++++++++++++++
|
||||
1 file changed, 47 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905l-p271.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905l-p271.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905l-p271.dts
|
||||
new file mode 100644
|
||||
index 000000000000..a902e4af7c15
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905l-p271.dts
|
||||
@@ -0,0 +1,47 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2024 Christian Hewitt <christianshewitt@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "meson-gxl-s905x.dtsi"
|
||||
+#include "meson-gx-p23x-q20x.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,p271", "amlogic,s905l", "amlogic,meson-gxl";
|
||||
+ model = "Amlogic Meson GXLX (S905L) P271 Development Board";
|
||||
+
|
||||
+ memory@0 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x0 0x0 0x0 0x40000000>;
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ model = "P271";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&apb {
|
||||
+ mali: gpu@c0000 {
|
||||
+ /* Mali 450-MP2 */
|
||||
+ interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "gp", "gpmmu", "pp", "pmu",
|
||||
+ "pp0", "ppmmu0", "pp1", "ppmmu1";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ compatible = "amlogic,meson-gxlx-saradc", "amlogic,meson-saradc";
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 2fa9dc2253ed3266db28b0a3ebb5d942427ef7a9 Mon Sep 17 00:00:00 2001
|
||||
From afb8fdb7130c6d2a31dba2e0a66e4db299bae4ad Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 1 Jan 2024 06:15:40 +0000
|
||||
Subject: [PATCH 41/53] WIP: arm64: dts: meson: increase SD speeds on Minix Neo
|
||||
Subject: [PATCH 53/69] WIP: arm64: dts: meson: increase SD speeds on Minix Neo
|
||||
U9-H
|
||||
|
||||
Lets see what happens/breaks when all the fancy modes are added
|
@ -1,7 +1,7 @@
|
||||
From 6302dc4b0ec1ce8d343ca620f1fc82e8fa5e1dda Mon Sep 17 00:00:00 2001
|
||||
From df7565c87afd20714c96fbb3f5847ff6c20bd220 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Fri, 5 Jan 2024 03:07:58 +0000
|
||||
Subject: [PATCH 42/53] WIP: arm64: dts: meson: fixup Minix U9-H wifi
|
||||
Subject: [PATCH 54/69] WIP: arm64: dts: meson: fixup Minix U9-H wifi
|
||||
|
||||
I think the 'drop compatible' change conflicted so remove this too.
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 7354c155f1956487683a192e629cda68bcd38bd8 Mon Sep 17 00:00:00 2001
|
||||
From 089ad862d61790d7fca3f372762fd53f684299c0 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 18 Jan 2022 15:09:12 +0000
|
||||
Subject: [PATCH 43/53] WIP: arm64: dts: meson: set p212/p23x/q20x SDIO to
|
||||
Subject: [PATCH 55/69] WIP: arm64: dts: meson: set p212/p23x/q20x SDIO to
|
||||
100MHz
|
||||
|
||||
Amlogic datasheets describe 50MHz max-frequency for SDIO on GXL/GXM but
|
@ -1,7 +1,7 @@
|
||||
From fb6de4d2453abb6e9ff8f0b653eb12e94156958c Mon Sep 17 00:00:00 2001
|
||||
From a1afe83c0d099c5fe033d7e4e74aaae5edc874bd Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 19 Jan 2022 06:45:06 +0000
|
||||
Subject: [PATCH 44/53] WIP: arm64: dts: meson: add UHS SDIO capabilities to
|
||||
Subject: [PATCH 56/69] WIP: arm64: dts: meson: add UHS SDIO capabilities to
|
||||
p212/p23x/q20x
|
||||
|
||||
Add UHS capabilities to the SDIO node to enable 100MHz speeds.
|
@ -1,7 +1,7 @@
|
||||
From 5661824fa83b4eeb182286aa8ad3b97d1025852c Mon Sep 17 00:00:00 2001
|
||||
From 515b6a825199935a85ff27f0778a007f4a582799 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Tue, 18 Jan 2022 15:18:32 +0000
|
||||
Subject: [PATCH 45/53] WIP: arm64: dts: meson: remove SDIO node from Khadas
|
||||
Subject: [PATCH 57/69] WIP: arm64: dts: meson: remove SDIO node from Khadas
|
||||
VIM1
|
||||
|
||||
Now that SDIO 100MHz max-frequency is inherited from the p212 dtsi we
|
@ -1,7 +1,7 @@
|
||||
From e77b259c064cd7b8c672c96834fdb1c4d2a98ff4 Mon Sep 17 00:00:00 2001
|
||||
From 351dffe709349c9c7eee6700e4f57c1d05f08501 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 3 Jan 2024 03:14:06 +0000
|
||||
Subject: [PATCH 46/53] WIP: arm64: dts: meson: drop broadcom compatible from
|
||||
Subject: [PATCH 58/69] WIP: arm64: dts: meson: drop broadcom compatible from
|
||||
reference board SDIO nodes
|
||||
|
||||
Remove the Broadcom compatible to allow Android STB boards using Qualcom QCA9377
|
@ -1,7 +1,7 @@
|
||||
From 642e23b3f8a96c89390eb0ff05a6e46e63f9a98f Mon Sep 17 00:00:00 2001
|
||||
From 8be562d97c6499157ef7940362abeb62c42b8b51 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 19 Jan 2022 02:40:20 +0000
|
||||
Subject: [PATCH 47/53] WIP: dt-bindings: arm: amlogic: add OSMC Vero 4K
|
||||
Subject: [PATCH 59/69] WIP: dt-bindings: arm: amlogic: add OSMC Vero 4K
|
||||
|
||||
Add support for the OSMC Vero 4K
|
||||
|
||||
@ -11,10 +11,10 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
index 922380d6139e..73598f7992fd 100644
|
||||
index 0cb0721d83e3..5d52065abe72 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
@@ -99,6 +99,7 @@ properties:
|
||||
@@ -91,6 +91,7 @@ properties:
|
||||
- libretech,aml-s905x-cc
|
||||
- libretech,aml-s905x-cc-v2
|
||||
- nexbox,a95x
|
@ -1,7 +1,7 @@
|
||||
From e4062d9479c72b37e7093a424f969829018d5a48 Mon Sep 17 00:00:00 2001
|
||||
From f370eaf064a3dd1620d9e47edd6738eff74531fa Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Wed, 19 Jan 2022 04:06:17 +0000
|
||||
Subject: [PATCH 48/53] WIP: arm64: dts: meson: add support for OSMC Vero 4K
|
||||
Subject: [PATCH 60/69] WIP: arm64: dts: meson: add support for OSMC Vero 4K
|
||||
|
||||
The OSMC Vero 4K device is based on the Amlogic S905X (P212) reference
|
||||
design with the following specifications:
|
||||
@ -22,20 +22,19 @@ design with the following specifications:
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 8 +
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 7 +
|
||||
.../dts/amlogic/meson-gxl-s905x-vero4k.dts | 202 ++++++++++++++++++
|
||||
2 files changed, 210 insertions(+)
|
||||
2 files changed, 209 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-vero4k.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index edb22c57f11d..936cd1989463 100644
|
||||
index 3b2e11a82df2..ccfac417ca10 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -49,6 +49,14 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
|
||||
@@ -51,6 +51,13 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-p231.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-sml5442tw.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-vero4k-plus.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905l-p271.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-hwacom-amazetv.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-khadas-vim.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb
|
@ -1,12 +1,12 @@
|
||||
From 1d5c42d5f84a1b022365b4ae00c3c6325a4b8f16 Mon Sep 17 00:00:00 2001
|
||||
From 07f53466522aa22a385caaa7893dc247441d863a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 1 Jan 2024 07:13:19 +0000
|
||||
Subject: [PATCH 49/53] WIP: dt-bindings: arm: amlogic: add S905L and p271
|
||||
Subject: [PATCH 61/69] WIP: dt-bindings: arm: amlogic: add GXLX/S905L/p271
|
||||
reference board
|
||||
|
||||
Add bindings for the Amlogic S905L SoC and reference design board. S905L is similar
|
||||
to P281 (S905W) and derived from P212 (S905X) but with silicon differences to omit
|
||||
VP9 codec support and using a Mali 450-MP2 (not MP3).
|
||||
Add bindings for the Amlogic GXLX based S905L SoC and P271 reference design board. The
|
||||
S905L is a cost engineered design similar to the P281 (S905W) and is derived from P212
|
||||
(S905X). S905L omits VP9 codec support and uses Mali 450-MP2 (not MP3).
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
@ -14,21 +14,21 @@ Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
index 73598f7992fd..515d58587f7c 100644
|
||||
index 5d52065abe72..79deb7bfe698 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
|
||||
@@ -81,6 +81,13 @@ properties:
|
||||
- const: amlogic,s805x
|
||||
@@ -108,6 +108,13 @@ properties:
|
||||
- const: amlogic,s905d
|
||||
- const: amlogic,meson-gxl
|
||||
|
||||
+ - description: Boards with the Amlogic Meson GXL S905L SoC
|
||||
+ - description: Boards with the Amlogic Meson GXLX S905L SoC
|
||||
+ items:
|
||||
+ - enum:
|
||||
+ - amlogic,p271
|
||||
+ - const: amlogic,s905l
|
||||
+ - const: amlogic,meson-gxl
|
||||
+ - const: amlogic,meson-gxlx
|
||||
+
|
||||
- description: Boards with the Amlogic Meson GXL S905W SoC
|
||||
- description: Boards with the Amlogic Meson GXM S912 SoC
|
||||
items:
|
||||
- enum:
|
||||
--
|
@ -1,11 +1,11 @@
|
||||
From f5ab209b7240f1251e100f9e7919f165bdb26f96 Mon Sep 17 00:00:00 2001
|
||||
From 37c40fe68da65de963064481ce98e1fb08ed9d06 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 1 Jan 2024 07:48:39 +0000
|
||||
Subject: [PATCH 50/53] WIP: soc: amlogic: meson-gx-socinfo: Add S905L ID
|
||||
Subject: [PATCH 62/69] WIP: soc: amlogic: meson-gx-socinfo: Add S905L ID
|
||||
|
||||
Add the S905L SoC id observed in several P271 boards:
|
||||
Add the S905L SoC ID observed in several P271 boards:
|
||||
|
||||
LibreELEC kernel: soc soc0: Amlogic Meson GXLX (S905L) Revision 26:a (c1:2) Detected
|
||||
kernel: soc soc0: Amlogic Meson GXLX (S905L) Revision 26:a (c1:2) Detected
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
@ -1,12 +1,11 @@
|
||||
From b2cbf810a3310389b2691797e487396aa1f621da Mon Sep 17 00:00:00 2001
|
||||
From 357f7ec77196b67ef2c467b96b73e3267c9f2b39 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sat, 23 Mar 2024 20:38:59 +0100
|
||||
Subject: [PATCH 51/53] WIP: dt-bindings: iio: adc: amlogic,meson-saradc: Add
|
||||
Subject: [PATCH 63/69] WIP: dt-bindings: iio: adc: amlogic,meson-saradc: add
|
||||
GXLX SoC compatible
|
||||
|
||||
Add a compatible string for the GXLX SoC. It's very similar to GXL but
|
||||
has three additional bits in MESON_SAR_ADC_REG12 for the three MPLL
|
||||
clocks.
|
||||
Add a compatible string for the GXLX SoC. GXLX is very similar to GXL but has three
|
||||
additional bits in MESON_SAR_ADC_REG12 for the three MPLL clocks.
|
||||
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
---
|
@ -1,14 +1,12 @@
|
||||
From a3fe76499d3b186e1b964cc24fe49afc0c12eca7 Mon Sep 17 00:00:00 2001
|
||||
From e807a7ea1ca1eefcb39eafc9d4bfe88226fd93e6 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
Date: Sat, 23 Mar 2024 20:44:41 +0100
|
||||
Subject: [PATCH 52/53] WIP: iio: adc: meson: add support for the GXLX SoC
|
||||
Subject: [PATCH 64/69] WIP: iio: adc: meson: add support for the GXLX SoC
|
||||
|
||||
The SARADC IP on the GXLX SoC itself is identical to the one found on
|
||||
GXL SoCs. However, GXLX SoCs require poking the first three bits in the
|
||||
MESON_SAR_ADC_REG12 register to get the three MPLL clocks (used as clock
|
||||
generators for the audio frequencies) to work.
|
||||
|
||||
WiP: the purpose of these three bits needs to be clarified
|
||||
The SARADC IP on GXLX is identical to the one found on GXL SoCs: except GXLX requires
|
||||
poking the first three bits in the MESON_SAR_ADC_REG12 register to get the three MPLL
|
||||
clocks (used as clock generators for the audio frequencies) to work. Register values
|
||||
are taken from the vendor kernel.
|
||||
|
||||
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
||||
---
|
@ -0,0 +1,31 @@
|
||||
From da8832786aa94197e7bcf420aa78c5283b055dad Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sat, 1 Jun 2024 15:46:42 +0000
|
||||
Subject: [PATCH 65/69] WIP: dt-bindings: media: amlogic,gx-vdec: add the GXLX
|
||||
SoC family
|
||||
|
||||
The GXLX SoC is a GXL variant that omits VP9 codec support. While we are here, add
|
||||
S905W and S905Y as GXL chips and sort the GXL comment.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml b/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml
|
||||
index 55930f6107c9..47dce75aeae6 100644
|
||||
--- a/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml
|
||||
+++ b/Documentation/devicetree/bindings/media/amlogic,gx-vdec.yaml
|
||||
@@ -31,7 +31,8 @@ properties:
|
||||
- items:
|
||||
- enum:
|
||||
- amlogic,gxbb-vdec # GXBB (S905)
|
||||
- - amlogic,gxl-vdec # GXL (S905X, S905D)
|
||||
+ - amlogic,gxl-vdec # GXL (S905D, S905W, S905X, S905Y)
|
||||
+ - amlogic,gxlx-vdec # GXLX (S905L)
|
||||
- amlogic,gxm-vdec # GXM (S912)
|
||||
- const: amlogic,gx-vdec
|
||||
- enum:
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,102 @@
|
||||
From 1b994ed915398729aa50c709628176f928b2f0dc Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sat, 1 Jun 2024 15:51:07 +0000
|
||||
Subject: [PATCH 66/69] WIP: media: meson: vdec: add GXLX SoC platform
|
||||
|
||||
The GXLX SoC is a GXL variant that omits VP9 codec support.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
drivers/staging/media/meson/vdec/vdec.c | 2 ++
|
||||
.../staging/media/meson/vdec/vdec_platform.c | 34 +++++++++++++++++++
|
||||
.../staging/media/meson/vdec/vdec_platform.h | 2 ++
|
||||
3 files changed, 38 insertions(+)
|
||||
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c
|
||||
index de3e0345ab7c..5e5b296f93ba 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec.c
|
||||
@@ -982,6 +982,8 @@ static const struct of_device_id vdec_dt_match[] = {
|
||||
.data = &vdec_platform_gxm },
|
||||
{ .compatible = "amlogic,gxl-vdec",
|
||||
.data = &vdec_platform_gxl },
|
||||
+ { .compatible = "amlogic,gxlx-vdec",
|
||||
+ .data = &vdec_platform_gxlx },
|
||||
{ .compatible = "amlogic,g12a-vdec",
|
||||
.data = &vdec_platform_g12a },
|
||||
{ .compatible = "amlogic,sm1-vdec",
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.c b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
index 083adf0d07d9..870e61dedd81 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_platform.c
|
||||
@@ -82,6 +82,34 @@ static const struct amvdec_format vdec_formats_gxl[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+static const struct amvdec_format vdec_formats_gxlx[] = {
|
||||
+ {
|
||||
+ .pixfmt = V4L2_PIX_FMT_HEVC,
|
||||
+ .min_buffers = 4,
|
||||
+ .max_buffers = 24,
|
||||
+ .max_width = 3840,
|
||||
+ .max_height = 2160,
|
||||
+ .vdec_ops = &vdec_hevc_ops,
|
||||
+ .codec_ops = &codec_hevc_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_hevc.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
|
||||
+ .flags = V4L2_FMT_FLAG_COMPRESSED |
|
||||
+ V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||
+ }, {
|
||||
+ .pixfmt = V4L2_PIX_FMT_H264,
|
||||
+ .min_buffers = 2,
|
||||
+ .max_buffers = 24,
|
||||
+ .max_width = 3840,
|
||||
+ .max_height = 2160,
|
||||
+ .vdec_ops = &vdec_1_ops,
|
||||
+ .codec_ops = &codec_h264_ops,
|
||||
+ .firmware_path = "meson/vdec/gxl_h264.bin",
|
||||
+ .pixfmts_cap = { V4L2_PIX_FMT_NV12M, 0 },
|
||||
+ .flags = V4L2_FMT_FLAG_COMPRESSED |
|
||||
+ V4L2_FMT_FLAG_DYN_RESOLUTION,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
static const struct amvdec_format vdec_formats_gxm[] = {
|
||||
{
|
||||
.pixfmt = V4L2_PIX_FMT_VP9,
|
||||
@@ -190,6 +218,12 @@ const struct vdec_platform vdec_platform_gxl = {
|
||||
.revision = VDEC_REVISION_GXL,
|
||||
};
|
||||
|
||||
+const struct vdec_platform vdec_platform_gxlx = {
|
||||
+ .formats = vdec_formats_gxlx,
|
||||
+ .num_formats = ARRAY_SIZE(vdec_formats_gxlx),
|
||||
+ .revision = VDEC_REVISION_GXLX,
|
||||
+};
|
||||
+
|
||||
const struct vdec_platform vdec_platform_gxm = {
|
||||
.formats = vdec_formats_gxm,
|
||||
.num_formats = ARRAY_SIZE(vdec_formats_gxm),
|
||||
diff --git a/drivers/staging/media/meson/vdec/vdec_platform.h b/drivers/staging/media/meson/vdec/vdec_platform.h
|
||||
index 731877a771f4..88ca4a9db8a8 100644
|
||||
--- a/drivers/staging/media/meson/vdec/vdec_platform.h
|
||||
+++ b/drivers/staging/media/meson/vdec/vdec_platform.h
|
||||
@@ -14,6 +14,7 @@ struct amvdec_format;
|
||||
enum vdec_revision {
|
||||
VDEC_REVISION_GXBB,
|
||||
VDEC_REVISION_GXL,
|
||||
+ VDEC_REVISION_GXLX,
|
||||
VDEC_REVISION_GXM,
|
||||
VDEC_REVISION_G12A,
|
||||
VDEC_REVISION_SM1,
|
||||
@@ -28,6 +29,7 @@ struct vdec_platform {
|
||||
extern const struct vdec_platform vdec_platform_gxbb;
|
||||
extern const struct vdec_platform vdec_platform_gxm;
|
||||
extern const struct vdec_platform vdec_platform_gxl;
|
||||
+extern const struct vdec_platform vdec_platform_gxlx;
|
||||
extern const struct vdec_platform vdec_platform_g12a;
|
||||
extern const struct vdec_platform vdec_platform_sm1;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,90 @@
|
||||
From 85fd969f38153362aa6859fdd28f71367f4ee53e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Mon, 1 Jan 2024 07:40:15 +0000
|
||||
Subject: [PATCH 67/69] WIP: arm64: dts: meson: add p271 support
|
||||
|
||||
Add a device-tree for the GXLX Amlogic P271 (S905L) reference design board. This
|
||||
is a low-cost design similar to P281 (S905W) and P212 (S905X) but with silicon
|
||||
differences to omit VP9 and use Mali 450-MP2 (not MP3). The SoC is marked with
|
||||
S905L and "2" (believed to denote MP2) resulting in some chip distributor stock
|
||||
lists (and subsequent box vendor marketing) describing it as an S905L2 chip.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 1 +
|
||||
.../dts/amlogic/meson-gxlx-s905l-p271.dts | 51 +++++++++++++++++++
|
||||
2 files changed, 52 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxlx-s905l-p271.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index ccfac417ca10..d106a18c39a8 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -67,6 +67,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc-v2.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxlx-s905l-p271.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-gt1-ultimate.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb
|
||||
dtb-$(CONFIG_ARCH_MESON) += meson-gxm-mecool-kiii-pro.dtb
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxlx-s905l-p271.dts b/arch/arm64/boot/dts/amlogic/meson-gxlx-s905l-p271.dts
|
||||
new file mode 100644
|
||||
index 000000000000..1221f4545130
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxlx-s905l-p271.dts
|
||||
@@ -0,0 +1,51 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2024 Christian Hewitt <christianshewitt@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "meson-gxl-s905x.dtsi"
|
||||
+#include "meson-gx-p23x-q20x.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "amlogic,p271", "amlogic,s905l", "amlogic,meson-gxlx";
|
||||
+ model = "Amlogic Meson GXLX (S905L) P271 Development Board";
|
||||
+
|
||||
+ memory@0 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x0 0x0 0x0 0x40000000>;
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ model = "P271";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&apb {
|
||||
+ mali: gpu@c0000 {
|
||||
+ /* Mali 450-MP2 */
|
||||
+ interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 166 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ interrupt-names = "gp", "gpmmu", "pp", "pmu",
|
||||
+ "pp0", "ppmmu0", "pp1", "ppmmu1";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ compatible = "amlogic,meson-gxlx-saradc", "amlogic,meson-saradc";
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ dr_mode = "host";
|
||||
+};
|
||||
+
|
||||
+&vdec {
|
||||
+ compatible = "amlogic,gxlx-vdec", "amlogic,gx-vdec";
|
||||
+};
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,51 @@
|
||||
From c502027cafd182fd76467b76c7c271706ceab466 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 26 May 2024 12:08:54 +0000
|
||||
Subject: [PATCH 68/69] WIP: ASoC: Add support for ti,pcm5242 to the pcm512x
|
||||
driver
|
||||
|
||||
Add compatibles to enable support for the ti,pcm5242 DAC chip in the
|
||||
pcm512x driver.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/sound/pcm512x.txt | 2 +-
|
||||
sound/soc/codecs/pcm512x-i2c.c | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/sound/pcm512x.txt b/Documentation/devicetree/bindings/sound/pcm512x.txt
|
||||
index 77006a4aec4a..47878a6df608 100644
|
||||
--- a/Documentation/devicetree/bindings/sound/pcm512x.txt
|
||||
+++ b/Documentation/devicetree/bindings/sound/pcm512x.txt
|
||||
@@ -6,7 +6,7 @@ on the board). The TAS575x devices only support I2C.
|
||||
Required properties:
|
||||
|
||||
- compatible : One of "ti,pcm5121", "ti,pcm5122", "ti,pcm5141",
|
||||
- "ti,pcm5142", "ti,tas5754" or "ti,tas5756"
|
||||
+ "ti,pcm5142", "ti,pcm5242", "ti,tas5754" or "ti,tas5756"
|
||||
|
||||
- reg : the I2C address of the device for I2C, the chip select
|
||||
number for SPI.
|
||||
diff --git a/sound/soc/codecs/pcm512x-i2c.c b/sound/soc/codecs/pcm512x-i2c.c
|
||||
index 4be476a280e1..92bcf5179779 100644
|
||||
--- a/sound/soc/codecs/pcm512x-i2c.c
|
||||
+++ b/sound/soc/codecs/pcm512x-i2c.c
|
||||
@@ -39,6 +39,7 @@ static const struct i2c_device_id pcm512x_i2c_id[] = {
|
||||
{ "pcm5122", },
|
||||
{ "pcm5141", },
|
||||
{ "pcm5142", },
|
||||
+ { "pcm5242", },
|
||||
{ "tas5754", },
|
||||
{ "tas5756", },
|
||||
{ }
|
||||
@@ -51,6 +52,7 @@ static const struct of_device_id pcm512x_of_match[] = {
|
||||
{ .compatible = "ti,pcm5122", },
|
||||
{ .compatible = "ti,pcm5141", },
|
||||
{ .compatible = "ti,pcm5142", },
|
||||
+ { .compatible = "ti,pcm5242", },
|
||||
{ .compatible = "ti,tas5754", },
|
||||
{ .compatible = "ti,tas5756", },
|
||||
{ }
|
||||
--
|
||||
2.34.1
|
||||
|
@ -0,0 +1,935 @@
|
||||
From 81f79be44cb62b75eadf9acdb61f877d97ee9f7c Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hewitt <christianshewitt@gmail.com>
|
||||
Date: Sun, 26 May 2024 12:53:07 +0000
|
||||
Subject: [PATCH 69/69] WIP: arm64: dts: meson: add Odroid-C2 HiFi-Shield
|
||||
boards
|
||||
|
||||
Add experimental device-tree files for Odroid C2 with HiFi-Shield+ (pcm5102a)
|
||||
and HiFi-Shield2 (pcm5242) mezzanine boards.
|
||||
|
||||
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/amlogic/Makefile | 4 +
|
||||
.../meson-gxbb-odroidc2-hifishield.dts | 443 +++++++++++++++++
|
||||
.../meson-gxbb-odroidc2-hifishield2.dts | 447 ++++++++++++++++++
|
||||
3 files changed, 894 insertions(+)
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield.dts
|
||||
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield2.dts
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
index d106a18c39a8..e634b37a5af1 100644
|
||||
--- a/arch/arm64/boot/dts/amlogic/Makefile
|
||||
+++ b/arch/arm64/boot/dts/amlogic/Makefile
|
||||
@@ -96,3 +96,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air.dtb
|
||||
# Overlays
|
||||
meson-g12a-fbx8am-brcm-dtbs := meson-g12a-fbx8am.dtb meson-g12a-fbx8am-brcm.dtbo
|
||||
meson-g12a-fbx8am-realtek-dtbs := meson-g12a-fbx8am.dtb meson-g12a-fbx8am-realtek.dtbo
|
||||
+
|
||||
+# Experimental
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2-hifishield.dtb
|
||||
+dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-odroidc2-hifishield2.dtb
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield.dts
|
||||
new file mode 100644
|
||||
index 000000000000..906adc1f622b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield.dts
|
||||
@@ -0,0 +1,443 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2016 Andreas Färber
|
||||
+ * Copyright (c) 2016 BayLibre, Inc.
|
||||
+ * Author: Kevin Hilman <khilman@kernel.org>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "meson-gxbb.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/sound/meson-aiu.h>
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
|
||||
+ model = "Hardkernel ODROID-C2";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart_AO;
|
||||
+ ethernet0 = ðmac;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ memory@0 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x0 0x0 0x0 0x80000000>;
|
||||
+ };
|
||||
+
|
||||
+ spdif_dit: audio-codec-0 {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "linux,spdif-dit";
|
||||
+ status = "okay";
|
||||
+ sound-name-prefix = "DIT";
|
||||
+ };
|
||||
+
|
||||
+ usb_otg_pwr: regulator-usb-pwrs {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "USB_OTG_PWR";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+
|
||||
+ /*
|
||||
+ * signal name from schematics: PWREN
|
||||
+ */
|
||||
+ gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ /*
|
||||
+ * signal name from schematics: USB_POWER
|
||||
+ */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ led-blue {
|
||||
+ label = "c2:blue:alive";
|
||||
+ gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ p5v0: regulator-p5v0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "P5V0";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ hdmi_p5v0: regulator-hdmi-p5v0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "HDMI_P5V0";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ /* AP2331SA-7 */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ tflash_vdd: regulator-tflash-vdd {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "TFLASH_VDD";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ /*
|
||||
+ * signal name from schematics: TFLASH_VDD_EN
|
||||
+ */
|
||||
+ gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ /* U16 RT9179GB */
|
||||
+ vin-supply = <&vddio_ao3v3>;
|
||||
+ };
|
||||
+
|
||||
+ tf_io: gpio-regulator-tf-io {
|
||||
+ compatible = "regulator-gpio";
|
||||
+
|
||||
+ regulator-name = "TF_IO";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ /*
|
||||
+ * signal name from schematics: TF_3V3N_1V8_EN
|
||||
+ */
|
||||
+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios-states = <0>;
|
||||
+
|
||||
+ states = <3300000 0>,
|
||||
+ <1800000 1>;
|
||||
+ /* U12/U13 RT9179GB */
|
||||
+ vin-supply = <&vddio_ao3v3>;
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8: regulator-vcc1v8 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VCC1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U18 RT9179GB */
|
||||
+ vin-supply = <&vddio_ao3v3>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3: regulator-vcc3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VCC3V3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ vddio_ao1v8: regulator-vddio-ao1v8 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VDDIO_AO1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U17 RT9179GB */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ vddio_ao3v3: regulator-vddio-ao3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VDDIO_AO3V3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U11 MP2161GJ-C499 */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ ddr3_1v5: regulator-ddr3-1v5 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "DDR3_1V5";
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U15 MP2161GJ-C499 */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ emmc_pwrseq: emmc-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-emmc";
|
||||
+ reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi-connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_connector_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_tx_tmds_out>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "amlogic,gx-sound-card";
|
||||
+ model = "ODROID-C2";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>,
|
||||
+ <&clkc CLKID_MPLL2>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ dai-link-0 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-1 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-2 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
|
||||
+ dai-format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dai-link-3 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&spdif_dit>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dai-link-4 {
|
||||
+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&aiu {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&spdif_out_ao_6_pins &i2s_am_clk_pins &i2s_out_ao_clk_pins &i2s_out_lr_clk_pins &i2s_out_ch01_ao_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&cec_AO {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&ao_cec_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ hdmi-phandle = <&hdmi_tx>;
|
||||
+};
|
||||
+
|
||||
+ðmac {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <ð_rgmii_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ phy-handle = <ð_phy0>;
|
||||
+ phy-mode = "rgmii";
|
||||
+
|
||||
+ amlogic,tx-delay-ns = <2>;
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ eth_phy0: ethernet-phy@0 {
|
||||
+ /* Realtek RTL8211F (0x001cc916) */
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
+ reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ interrupt-parent = <&gpio_intc>;
|
||||
+ /* MAC_INTR on GPIOZ_15 */
|
||||
+ interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_tx {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ hdmi-supply = <&hdmi_p5v0>;
|
||||
+};
|
||||
+
|
||||
+&hdmi_tx_tmds_port {
|
||||
+ hdmi_tx_tmds_out: endpoint {
|
||||
+ remote-endpoint = <&hdmi_connector_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ pcm5102a: pcm5102a@4c {
|
||||
+ compatible = "ti,pcm5102a";
|
||||
+ reg = <0x4c>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ir {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&remote_input_ao_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ linux,rc-map-name = "rc-odroid";
|
||||
+};
|
||||
+
|
||||
+&gpio_ao {
|
||||
+ gpio-line-names = "UART TX", "UART RX", "VCCK En", "TF 3V3/1V8 En",
|
||||
+ "USB HUB nRESET", "USB OTG Power En",
|
||||
+ "SPDIF_OUTPUT", "IR In", "I2S_MCLK",
|
||||
+ "I2S_SCLK", "I2S_LRCLK", "I2S_DATA_OUTPUT",
|
||||
+ "HDMI CEC", "SYS LED",
|
||||
+ /* GPIO_TEST_N */
|
||||
+ "";
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ gpio-line-names = /* Bank GPIOZ */
|
||||
+ "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
|
||||
+ "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
|
||||
+ "Eth RX D3", "Eth RGMII TX Clk", "Eth TX En",
|
||||
+ "Eth TX D0", "Eth TX D1", "Eth TX D2", "Eth TX D3",
|
||||
+ "Eth PHY nRESET", "Eth PHY Intc",
|
||||
+ /* Bank GPIOH */
|
||||
+ "HDMI HPD", "HDMI DDC SDA", "HDMI DDC SCL", "",
|
||||
+ /* Bank BOOT */
|
||||
+ "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", "eMMC D4",
|
||||
+ "eMMC D5", "eMMC D6", "eMMC D7", "eMMC Clk",
|
||||
+ "eMMC Reset", "eMMC CMD",
|
||||
+ "", "", "", "", "", "", "",
|
||||
+ /* Bank CARD */
|
||||
+ "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD",
|
||||
+ "SDCard D3", "SDCard D2", "SDCard Det",
|
||||
+ /* Bank GPIODV */
|
||||
+ "", "", "", "", "", "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "", "", "", "",
|
||||
+ "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK",
|
||||
+ "PWM D", "PWM B",
|
||||
+ /* Bank GPIOY */
|
||||
+ "Revision Bit0", "Revision Bit1", "",
|
||||
+ "J2 Header Pin35", "", "", "", "J2 Header Pin36",
|
||||
+ "J2 Header Pin31", "", "", "", "TF VDD En",
|
||||
+ "J2 Header Pin32", "J2 Header Pin26", "", "",
|
||||
+ /* Bank GPIOX */
|
||||
+ "J2 Header Pin29", "J2 Header Pin24",
|
||||
+ "J2 Header Pin23", "J2 Header Pin22",
|
||||
+ "J2 Header Pin21", "J2 Header Pin18",
|
||||
+ "J2 Header Pin33", "J2 Header Pin19",
|
||||
+ "J2 Header Pin16", "J2 Header Pin15",
|
||||
+ "J2 Header Pin12", "J2 Header Pin13",
|
||||
+ "J2 Header Pin8", "J2 Header Pin10",
|
||||
+ "", "", "", "", "",
|
||||
+ "J2 Header Pin11", "", "J2 Header Pin7", "",
|
||||
+ /* Bank GPIOCLK */
|
||||
+ "", "", "", "";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vcc1v8>;
|
||||
+};
|
||||
+
|
||||
+&scpi_clocks {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+/* SD */
|
||||
+&sd_emmc_b {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&sdcard_pins>;
|
||||
+ pinctrl-1 = <&sdcard_clk_gate_pins>;
|
||||
+ pinctrl-names = "default", "clk-gate";
|
||||
+
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-ddr50;
|
||||
+ max-frequency = <100000000>;
|
||||
+ disable-wp;
|
||||
+
|
||||
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ vmmc-supply = <&tflash_vdd>;
|
||||
+ vqmmc-supply = <&tf_io>;
|
||||
+};
|
||||
+
|
||||
+/* eMMC */
|
||||
+&sd_emmc_c {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
||||
+ pinctrl-1 = <&emmc_clk_gate_pins>;
|
||||
+ pinctrl-names = "default", "clk-gate";
|
||||
+
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ disable-wp;
|
||||
+ cap-mmc-highspeed;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs200-1_8v;
|
||||
+
|
||||
+ mmc-pwrseq = <&emmc_pwrseq>;
|
||||
+ vmmc-supply = <&vcc3v3>;
|
||||
+ vqmmc-supply = <&vcc1v8>;
|
||||
+};
|
||||
+
|
||||
+&uart_AO {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_ao_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&usb0_phy {
|
||||
+ status = "disabled";
|
||||
+ phy-supply = <&usb_otg_pwr>;
|
||||
+};
|
||||
+
|
||||
+&usb1_phy {
|
||||
+ status = "okay";
|
||||
+ phy-supply = <&usb_otg_pwr>;
|
||||
+};
|
||||
+
|
||||
+&usb0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usb1 {
|
||||
+ dr_mode = "host";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ hub@1 {
|
||||
+ /* Genesys Logic GL852G USB 2.0 hub */
|
||||
+ compatible = "usb5e3,610";
|
||||
+ reg = <1>;
|
||||
+ vdd-supply = <&p5v0>;
|
||||
+ reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield2.dts
|
||||
new file mode 100644
|
||||
index 000000000000..91697f5b5cd7
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2-hifishield2.dts
|
||||
@@ -0,0 +1,447 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2016 Andreas Färber
|
||||
+ * Copyright (c) 2016 BayLibre, Inc.
|
||||
+ * Author: Kevin Hilman <khilman@kernel.org>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "meson-gxbb.dtsi"
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/sound/meson-aiu.h>
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
|
||||
+ model = "Hardkernel ODROID-C2";
|
||||
+
|
||||
+ aliases {
|
||||
+ serial0 = &uart_AO;
|
||||
+ ethernet0 = ðmac;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ stdout-path = "serial0:115200n8";
|
||||
+ };
|
||||
+
|
||||
+ memory@0 {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x0 0x0 0x0 0x80000000>;
|
||||
+ };
|
||||
+
|
||||
+ spdif_dit: audio-codec-0 {
|
||||
+ #sound-dai-cells = <0>;
|
||||
+ compatible = "linux,spdif-dit";
|
||||
+ status = "okay";
|
||||
+ sound-name-prefix = "DIT";
|
||||
+ };
|
||||
+
|
||||
+ usb_otg_pwr: regulator-usb-pwrs {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "USB_OTG_PWR";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+
|
||||
+ /*
|
||||
+ * signal name from schematics: PWREN
|
||||
+ */
|
||||
+ gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ /*
|
||||
+ * signal name from schematics: USB_POWER
|
||||
+ */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ led-blue {
|
||||
+ label = "c2:blue:alive";
|
||||
+ gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ default-state = "off";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ p5v0: regulator-p5v0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "P5V0";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ hdmi_p5v0: regulator-hdmi-p5v0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "HDMI_P5V0";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ /* AP2331SA-7 */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ tflash_vdd: regulator-tflash-vdd {
|
||||
+ compatible = "regulator-fixed";
|
||||
+
|
||||
+ regulator-name = "TFLASH_VDD";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ /*
|
||||
+ * signal name from schematics: TFLASH_VDD_EN
|
||||
+ */
|
||||
+ gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ /* U16 RT9179GB */
|
||||
+ vin-supply = <&vddio_ao3v3>;
|
||||
+ };
|
||||
+
|
||||
+ tf_io: gpio-regulator-tf-io {
|
||||
+ compatible = "regulator-gpio";
|
||||
+
|
||||
+ regulator-name = "TF_IO";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ /*
|
||||
+ * signal name from schematics: TF_3V3N_1V8_EN
|
||||
+ */
|
||||
+ gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
|
||||
+ gpios-states = <0>;
|
||||
+
|
||||
+ states = <3300000 0>,
|
||||
+ <1800000 1>;
|
||||
+ /* U12/U13 RT9179GB */
|
||||
+ vin-supply = <&vddio_ao3v3>;
|
||||
+ };
|
||||
+
|
||||
+ vcc1v8: regulator-vcc1v8 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VCC1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U18 RT9179GB */
|
||||
+ vin-supply = <&vddio_ao3v3>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3: regulator-vcc3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VCC3V3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ vddio_ao1v8: regulator-vddio-ao1v8 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VDDIO_AO1V8";
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <1800000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U17 RT9179GB */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ vddio_ao3v3: regulator-vddio-ao3v3 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "VDDIO_AO3V3";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U11 MP2161GJ-C499 */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ ddr3_1v5: regulator-ddr3-1v5 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "DDR3_1V5";
|
||||
+ regulator-min-microvolt = <1500000>;
|
||||
+ regulator-max-microvolt = <1500000>;
|
||||
+ regulator-always-on;
|
||||
+ /* U15 MP2161GJ-C499 */
|
||||
+ vin-supply = <&p5v0>;
|
||||
+ };
|
||||
+
|
||||
+ emmc_pwrseq: emmc-pwrseq {
|
||||
+ compatible = "mmc-pwrseq-emmc";
|
||||
+ reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi-connector {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi_connector_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi_tx_tmds_out>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ compatible = "amlogic,gx-sound-card";
|
||||
+ model = "ODROID-C2";
|
||||
+ assigned-clocks = <&clkc CLKID_MPLL0>,
|
||||
+ <&clkc CLKID_MPLL1>,
|
||||
+ <&clkc CLKID_MPLL2>;
|
||||
+ assigned-clock-parents = <0>, <0>, <0>;
|
||||
+ assigned-clock-rates = <294912000>,
|
||||
+ <270950400>,
|
||||
+ <393216000>;
|
||||
+
|
||||
+ dai-link-0 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-1 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
|
||||
+ };
|
||||
+
|
||||
+ dai-link-2 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
|
||||
+ dai-format = "i2s";
|
||||
+ mclk-fs = <256>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dai-link-3 {
|
||||
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&spdif_dit>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ dai-link-4 {
|
||||
+ sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
|
||||
+
|
||||
+ codec-0 {
|
||||
+ sound-dai = <&hdmi_tx>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&aiu {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&spdif_out_ao_6_pins &i2s_am_clk_pins &i2s_out_ao_clk_pins &i2s_out_lr_clk_pins &i2s_out_ch01_ao_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&cec_AO {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&ao_cec_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ hdmi-phandle = <&hdmi_tx>;
|
||||
+};
|
||||
+
|
||||
+ðmac {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <ð_rgmii_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ phy-handle = <ð_phy0>;
|
||||
+ phy-mode = "rgmii";
|
||||
+
|
||||
+ amlogic,tx-delay-ns = <2>;
|
||||
+
|
||||
+ mdio {
|
||||
+ compatible = "snps,dwmac-mdio";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ eth_phy0: ethernet-phy@0 {
|
||||
+ /* Realtek RTL8211F (0x001cc916) */
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ reset-assert-us = <10000>;
|
||||
+ reset-deassert-us = <80000>;
|
||||
+ reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ interrupt-parent = <&gpio_intc>;
|
||||
+ /* MAC_INTR on GPIOZ_15 */
|
||||
+ interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_tx {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ hdmi-supply = <&hdmi_p5v0>;
|
||||
+};
|
||||
+
|
||||
+&hdmi_tx_tmds_port {
|
||||
+ hdmi_tx_tmds_out: endpoint {
|
||||
+ remote-endpoint = <&hdmi_connector_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c_A {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&i2c_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ pcm5242: pcm5242@4c {
|
||||
+ compatible = "ti,pcm5242";
|
||||
+ reg = <0x4c>;
|
||||
+ #sound-dai-cells = <0>;
|
||||
+
|
||||
+ AVDD-supply = <&vddio_ao3v3>;
|
||||
+ DVDD-supply = <&vddio_ao3v3>;
|
||||
+ CPVDD-supply = <&vddio_ao3v3>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ir {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&remote_input_ao_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+ linux,rc-map-name = "rc-odroid";
|
||||
+};
|
||||
+
|
||||
+&gpio_ao {
|
||||
+ gpio-line-names = "UART TX", "UART RX", "VCCK En", "TF 3V3/1V8 En",
|
||||
+ "USB HUB nRESET", "USB OTG Power En",
|
||||
+ "SPDIF_OUTPUT", "IR In", "I2S_MCLK",
|
||||
+ "I2S_SCLK", "I2S_LRCLK", "I2S_DATA_OUTPUT",
|
||||
+ "HDMI CEC", "SYS LED",
|
||||
+ /* GPIO_TEST_N */
|
||||
+ "";
|
||||
+};
|
||||
+
|
||||
+&gpio {
|
||||
+ gpio-line-names = /* Bank GPIOZ */
|
||||
+ "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
|
||||
+ "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
|
||||
+ "Eth RX D3", "Eth RGMII TX Clk", "Eth TX En",
|
||||
+ "Eth TX D0", "Eth TX D1", "Eth TX D2", "Eth TX D3",
|
||||
+ "Eth PHY nRESET", "Eth PHY Intc",
|
||||
+ /* Bank GPIOH */
|
||||
+ "HDMI HPD", "HDMI DDC SDA", "HDMI DDC SCL", "",
|
||||
+ /* Bank BOOT */
|
||||
+ "eMMC D0", "eMMC D1", "eMMC D2", "eMMC D3", "eMMC D4",
|
||||
+ "eMMC D5", "eMMC D6", "eMMC D7", "eMMC Clk",
|
||||
+ "eMMC Reset", "eMMC CMD",
|
||||
+ "", "", "", "", "", "", "",
|
||||
+ /* Bank CARD */
|
||||
+ "SDCard D1", "SDCard D0", "SDCard CLK", "SDCard CMD",
|
||||
+ "SDCard D3", "SDCard D2", "SDCard Det",
|
||||
+ /* Bank GPIODV */
|
||||
+ "", "", "", "", "", "", "", "", "", "", "", "", "",
|
||||
+ "", "", "", "", "", "", "", "", "", "", "",
|
||||
+ "I2C A SDA", "I2C A SCK", "I2C B SDA", "I2C B SCK",
|
||||
+ "PWM D", "PWM B",
|
||||
+ /* Bank GPIOY */
|
||||
+ "Revision Bit0", "Revision Bit1", "",
|
||||
+ "J2 Header Pin35", "", "", "", "J2 Header Pin36",
|
||||
+ "J2 Header Pin31", "", "", "", "TF VDD En",
|
||||
+ "J2 Header Pin32", "J2 Header Pin26", "", "",
|
||||
+ /* Bank GPIOX */
|
||||
+ "J2 Header Pin29", "J2 Header Pin24",
|
||||
+ "J2 Header Pin23", "J2 Header Pin22",
|
||||
+ "J2 Header Pin21", "J2 Header Pin18",
|
||||
+ "J2 Header Pin33", "J2 Header Pin19",
|
||||
+ "J2 Header Pin16", "J2 Header Pin15",
|
||||
+ "J2 Header Pin12", "J2 Header Pin13",
|
||||
+ "J2 Header Pin8", "J2 Header Pin10",
|
||||
+ "", "", "", "", "",
|
||||
+ "J2 Header Pin11", "", "J2 Header Pin7", "",
|
||||
+ /* Bank GPIOCLK */
|
||||
+ "", "", "", "";
|
||||
+};
|
||||
+
|
||||
+&saradc {
|
||||
+ status = "okay";
|
||||
+ vref-supply = <&vcc1v8>;
|
||||
+};
|
||||
+
|
||||
+&scpi_clocks {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+/* SD */
|
||||
+&sd_emmc_b {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&sdcard_pins>;
|
||||
+ pinctrl-1 = <&sdcard_clk_gate_pins>;
|
||||
+ pinctrl-names = "default", "clk-gate";
|
||||
+
|
||||
+ bus-width = <4>;
|
||||
+ cap-sd-highspeed;
|
||||
+ sd-uhs-sdr12;
|
||||
+ sd-uhs-sdr25;
|
||||
+ sd-uhs-sdr50;
|
||||
+ sd-uhs-ddr50;
|
||||
+ max-frequency = <100000000>;
|
||||
+ disable-wp;
|
||||
+
|
||||
+ cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ vmmc-supply = <&tflash_vdd>;
|
||||
+ vqmmc-supply = <&tf_io>;
|
||||
+};
|
||||
+
|
||||
+/* eMMC */
|
||||
+&sd_emmc_c {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
|
||||
+ pinctrl-1 = <&emmc_clk_gate_pins>;
|
||||
+ pinctrl-names = "default", "clk-gate";
|
||||
+
|
||||
+ bus-width = <8>;
|
||||
+ max-frequency = <200000000>;
|
||||
+ non-removable;
|
||||
+ disable-wp;
|
||||
+ cap-mmc-highspeed;
|
||||
+ mmc-ddr-1_8v;
|
||||
+ mmc-hs200-1_8v;
|
||||
+
|
||||
+ mmc-pwrseq = <&emmc_pwrseq>;
|
||||
+ vmmc-supply = <&vcc3v3>;
|
||||
+ vqmmc-supply = <&vcc1v8>;
|
||||
+};
|
||||
+
|
||||
+&uart_AO {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&uart_ao_a_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+};
|
||||
+
|
||||
+&usb0_phy {
|
||||
+ status = "disabled";
|
||||
+ phy-supply = <&usb_otg_pwr>;
|
||||
+};
|
||||
+
|
||||
+&usb1_phy {
|
||||
+ status = "okay";
|
||||
+ phy-supply = <&usb_otg_pwr>;
|
||||
+};
|
||||
+
|
||||
+&usb0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usb1 {
|
||||
+ dr_mode = "host";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ hub@1 {
|
||||
+ /* Genesys Logic GL852G USB 2.0 hub */
|
||||
+ compatible = "usb5e3,610";
|
||||
+ reg = <1>;
|
||||
+ vdd-supply = <&p5v0>;
|
||||
+ reset-gpio = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,15 +1,15 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 6.8.0 Kernel Configuration
|
||||
# Linux/arm64 6.9.3 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="aarch64-libreelec-linux-gnu-gcc-13.2.0 (GCC) 13.2.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
CONFIG_GCC_VERSION=130200
|
||||
CONFIG_CLANG_VERSION=0
|
||||
CONFIG_AS_IS_GNU=y
|
||||
CONFIG_AS_VERSION=24100
|
||||
CONFIG_AS_VERSION=24200
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=24100
|
||||
CONFIG_LD_VERSION=24200
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_CAN_LINK_STATIC=y
|
||||
@ -263,7 +263,6 @@ CONFIG_PROFILING=y
|
||||
#
|
||||
# CONFIG_KEXEC is not set
|
||||
# CONFIG_KEXEC_FILE is not set
|
||||
# CONFIG_CRASH_DUMP is not set
|
||||
# end of Kexec and crash features
|
||||
# end of General setup
|
||||
|
||||
@ -271,7 +270,6 @@ CONFIG_ARM64=y
|
||||
CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_MMU=y
|
||||
CONFIG_ARM64_PAGE_SHIFT=12
|
||||
CONFIG_ARM64_CONT_PTE_SHIFT=4
|
||||
CONFIG_ARM64_CONT_PMD_SHIFT=4
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MIN=18
|
||||
@ -399,6 +397,7 @@ CONFIG_ARM64_4K_PAGES=y
|
||||
# CONFIG_ARM64_64K_PAGES is not set
|
||||
# CONFIG_ARM64_VA_BITS_39 is not set
|
||||
CONFIG_ARM64_VA_BITS_48=y
|
||||
# CONFIG_ARM64_VA_BITS_52 is not set
|
||||
CONFIG_ARM64_VA_BITS=48
|
||||
CONFIG_ARM64_PA_BITS_48=y
|
||||
CONFIG_ARM64_PA_BITS=48
|
||||
@ -507,6 +506,7 @@ CONFIG_RANDOMIZE_BASE=y
|
||||
CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
|
||||
CONFIG_STACKPROTECTOR_PER_TASK=y
|
||||
CONFIG_ARM64_CONTPTE=y
|
||||
# end of Kernel Features
|
||||
|
||||
#
|
||||
@ -589,8 +589,8 @@ CONFIG_ARM_SCPI_CPUFREQ=y
|
||||
# end of CPU Frequency scaling
|
||||
# end of CPU Power Management
|
||||
|
||||
CONFIG_HAVE_KVM=y
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
CONFIG_CPU_MITIGATIONS=y
|
||||
|
||||
#
|
||||
# General architecture-dependent options
|
||||
@ -623,6 +623,7 @@ CONFIG_ARCH_WANTS_NO_INSTR=y
|
||||
CONFIG_HAVE_ASM_MODVERSIONS=y
|
||||
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
|
||||
CONFIG_HAVE_RSEQ=y
|
||||
CONFIG_HAVE_RUST=y
|
||||
CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y
|
||||
CONFIG_HAVE_HW_BREAKPOINT=y
|
||||
CONFIG_HAVE_PERF_EVENTS_NMI=y
|
||||
@ -673,8 +674,11 @@ CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS=18
|
||||
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11
|
||||
CONFIG_HAVE_PAGE_SIZE_4KB=y
|
||||
CONFIG_PAGE_SIZE_4KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SHIFT=12
|
||||
CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
@ -877,7 +881,6 @@ CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
|
||||
CONFIG_THP_SWAP=y
|
||||
# CONFIG_READ_ONLY_THP_FOR_FS is not set
|
||||
CONFIG_CMA=y
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
CONFIG_CMA_DEBUGFS=y
|
||||
# CONFIG_CMA_SYSFS is not set
|
||||
CONFIG_CMA_AREAS=7
|
||||
@ -929,7 +932,6 @@ CONFIG_SKB_EXTENSIONS=y
|
||||
CONFIG_PACKET=y
|
||||
# CONFIG_PACKET_DIAG is not set
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_UNIX_SCM=y
|
||||
CONFIG_AF_UNIX_OOB=y
|
||||
# CONFIG_UNIX_DIAG is not set
|
||||
CONFIG_TLS=y
|
||||
@ -1151,6 +1153,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
|
||||
# IP: Netfilter Configuration
|
||||
#
|
||||
CONFIG_NF_DEFRAG_IPV4=m
|
||||
CONFIG_IP_NF_IPTABLES_LEGACY=m
|
||||
# CONFIG_NF_SOCKET_IPV4 is not set
|
||||
# CONFIG_NF_TPROXY_IPV4 is not set
|
||||
# CONFIG_NF_DUP_IPV4 is not set
|
||||
@ -1173,12 +1176,13 @@ CONFIG_IP_NF_MANGLE=m
|
||||
# CONFIG_IP_NF_TARGET_ECN is not set
|
||||
# CONFIG_IP_NF_TARGET_TTL is not set
|
||||
# CONFIG_IP_NF_RAW is not set
|
||||
# CONFIG_IP_NF_ARPTABLES is not set
|
||||
# CONFIG_IP_NF_ARPFILTER is not set
|
||||
# end of IP: Netfilter Configuration
|
||||
|
||||
#
|
||||
# IPv6: Netfilter Configuration
|
||||
#
|
||||
CONFIG_IP6_NF_IPTABLES_LEGACY=m
|
||||
# CONFIG_NF_SOCKET_IPV6 is not set
|
||||
# CONFIG_NF_TPROXY_IPV6 is not set
|
||||
# CONFIG_NF_DUP_IPV6 is not set
|
||||
@ -1323,7 +1327,6 @@ CONFIG_BT_RFCOMM=m
|
||||
CONFIG_BT_RFCOMM_TTY=y
|
||||
# CONFIG_BT_BNEP is not set
|
||||
CONFIG_BT_HIDP=m
|
||||
CONFIG_BT_HS=y
|
||||
CONFIG_BT_LE=y
|
||||
CONFIG_BT_LE_L2CAP_ECRED=y
|
||||
# CONFIG_BT_LEDS is not set
|
||||
@ -1430,6 +1433,7 @@ CONFIG_ETHTOOL_NETLINK=y
|
||||
#
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_HAVE_PCI=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
@ -1655,7 +1659,6 @@ CONFIG_MTD_CFI_I2=y
|
||||
# Mapping drivers for chip access
|
||||
#
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
# CONFIG_MTD_INTEL_VR_NOR is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
# end of Mapping drivers for chip access
|
||||
|
||||
@ -2171,6 +2174,9 @@ CONFIG_MICROSEMI_PHY=y
|
||||
# CONFIG_NXP_TJA11XX_PHY is not set
|
||||
# CONFIG_NCN26000_PHY is not set
|
||||
# CONFIG_AT803X_PHY is not set
|
||||
# CONFIG_QCA83XX_PHY is not set
|
||||
# CONFIG_QCA808X_PHY is not set
|
||||
# CONFIG_QCA807X_PHY is not set
|
||||
# CONFIG_QSEMI_PHY is not set
|
||||
CONFIG_REALTEK_PHY=y
|
||||
# CONFIG_RENESAS_PHY is not set
|
||||
@ -2437,11 +2443,13 @@ CONFIG_RTL8188EE=m
|
||||
CONFIG_RTL8192EE=m
|
||||
CONFIG_RTL8821AE=m
|
||||
CONFIG_RTL8192CU=m
|
||||
CONFIG_RTL8192DU=m
|
||||
CONFIG_RTLWIFI=m
|
||||
CONFIG_RTLWIFI_PCI=m
|
||||
CONFIG_RTLWIFI_USB=m
|
||||
CONFIG_RTLWIFI_DEBUG=y
|
||||
CONFIG_RTL8192C_COMMON=m
|
||||
CONFIG_RTL8192D_COMMON=m
|
||||
CONFIG_RTL8723_COMMON=m
|
||||
CONFIG_RTLBTCOEXIST=m
|
||||
CONFIG_RTL8XXXU=m
|
||||
@ -2668,7 +2676,6 @@ CONFIG_VT=y
|
||||
CONFIG_CONSOLE_TRANSLATIONS=y
|
||||
CONFIG_VT_CONSOLE=y
|
||||
CONFIG_VT_CONSOLE_SLEEP=y
|
||||
CONFIG_HW_CONSOLE=y
|
||||
CONFIG_VT_HW_CONSOLE_BINDING=y
|
||||
CONFIG_UNIX98_PTYS=y
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
@ -2940,6 +2947,7 @@ CONFIG_PINMUX=y
|
||||
CONFIG_PINCONF=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
# CONFIG_DEBUG_PINCTRL is not set
|
||||
# CONFIG_PINCTRL_AW9523 is not set
|
||||
# CONFIG_PINCTRL_CY8C95X0 is not set
|
||||
# CONFIG_PINCTRL_MCP23S08 is not set
|
||||
# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set
|
||||
@ -3137,9 +3145,11 @@ CONFIG_HWMON=y
|
||||
# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set
|
||||
# CONFIG_SENSORS_AS370 is not set
|
||||
# CONFIG_SENSORS_ASC7621 is not set
|
||||
# CONFIG_SENSORS_ASUS_ROG_RYUJIN is not set
|
||||
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set
|
||||
CONFIG_SENSORS_ARM_SCPI=y
|
||||
# CONFIG_SENSORS_ATXP1 is not set
|
||||
# CONFIG_SENSORS_CHIPCAP2 is not set
|
||||
# CONFIG_SENSORS_CORSAIR_CPRO is not set
|
||||
# CONFIG_SENSORS_CORSAIR_PSU is not set
|
||||
# CONFIG_SENSORS_DRIVETEMP is not set
|
||||
@ -3176,6 +3186,7 @@ CONFIG_SENSORS_GPIO_FAN=m
|
||||
# CONFIG_SENSORS_LTC4245 is not set
|
||||
# CONFIG_SENSORS_LTC4260 is not set
|
||||
# CONFIG_SENSORS_LTC4261 is not set
|
||||
# CONFIG_SENSORS_LTC4282 is not set
|
||||
# CONFIG_SENSORS_MAX1111 is not set
|
||||
# CONFIG_SENSORS_MAX127 is not set
|
||||
# CONFIG_SENSORS_MAX16065 is not set
|
||||
@ -3225,10 +3236,12 @@ CONFIG_SENSORS_GPIO_FAN=m
|
||||
# CONFIG_SENSORS_NCT7904 is not set
|
||||
# CONFIG_SENSORS_NPCM7XX is not set
|
||||
# CONFIG_SENSORS_NZXT_KRAKEN2 is not set
|
||||
# CONFIG_SENSORS_NZXT_KRAKEN3 is not set
|
||||
# CONFIG_SENSORS_NZXT_SMART2 is not set
|
||||
# CONFIG_SENSORS_OCC_P8_I2C is not set
|
||||
# CONFIG_SENSORS_PCF8591 is not set
|
||||
# CONFIG_PMBUS is not set
|
||||
# CONFIG_SENSORS_PT5161L is not set
|
||||
CONFIG_SENSORS_PWM_FAN=m
|
||||
# CONFIG_SENSORS_SBTSI is not set
|
||||
# CONFIG_SENSORS_SBRMI is not set
|
||||
@ -3286,7 +3299,6 @@ CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_HWMON=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
# CONFIG_THERMAL_WRITABLE_TRIPS is not set
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
|
||||
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
|
||||
@ -4299,17 +4311,18 @@ CONFIG_DVB_DUMMY_FE=m
|
||||
# Graphics support
|
||||
#
|
||||
CONFIG_APERTURE_HELPERS=y
|
||||
CONFIG_VIDEO_CMDLINE=y
|
||||
CONFIG_VIDEO_NOMODESET=y
|
||||
CONFIG_VIDEO=y
|
||||
CONFIG_AUXDISPLAY=y
|
||||
# CONFIG_HD44780 is not set
|
||||
# CONFIG_IMG_ASCII_LCD is not set
|
||||
# CONFIG_HT16K33 is not set
|
||||
# CONFIG_LCD2S is not set
|
||||
CONFIG_TM1628=m
|
||||
# CONFIG_CHARLCD_BL_OFF is not set
|
||||
# CONFIG_CHARLCD_BL_ON is not set
|
||||
CONFIG_CHARLCD_BL_FLASH=y
|
||||
# CONFIG_IMG_ASCII_LCD is not set
|
||||
# CONFIG_HT16K33 is not set
|
||||
# CONFIG_MAX6959 is not set
|
||||
# CONFIG_SEG_LED_GPIO is not set
|
||||
CONFIG_TM1628=m
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_MIPI_DSI=y
|
||||
# CONFIG_DRM_DEBUG_MM is not set
|
||||
@ -4367,15 +4380,15 @@ CONFIG_DRM_PANEL=y
|
||||
# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
|
||||
# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set
|
||||
# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set
|
||||
# CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A is not set
|
||||
# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set
|
||||
# CONFIG_DRM_PANEL_DSI_CM is not set
|
||||
# CONFIG_DRM_PANEL_LVDS is not set
|
||||
# CONFIG_DRM_PANEL_SIMPLE is not set
|
||||
# CONFIG_DRM_PANEL_EDP is not set
|
||||
# CONFIG_DRM_PANEL_EBBG_FT8719 is not set
|
||||
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
|
||||
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
|
||||
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
|
||||
# CONFIG_DRM_PANEL_DSI_CM is not set
|
||||
# CONFIG_DRM_PANEL_LVDS is not set
|
||||
# CONFIG_DRM_PANEL_HIMAX_HX83112A is not set
|
||||
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
|
||||
# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
|
||||
# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set
|
||||
@ -4385,17 +4398,17 @@ CONFIG_DRM_PANEL=y
|
||||
# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set
|
||||
# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set
|
||||
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
|
||||
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
|
||||
# CONFIG_DRM_PANEL_JDI_LPM102A188A is not set
|
||||
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
|
||||
# CONFIG_DRM_PANEL_JDI_R63452 is not set
|
||||
# CONFIG_DRM_PANEL_KHADAS_TS050 is not set
|
||||
# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set
|
||||
# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set
|
||||
# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set
|
||||
# CONFIG_DRM_PANEL_LG_LB035Q02 is not set
|
||||
# CONFIG_DRM_PANEL_LG_LG4573 is not set
|
||||
# CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966 is not set
|
||||
# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set
|
||||
# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set
|
||||
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
|
||||
# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set
|
||||
@ -4404,8 +4417,8 @@ CONFIG_DRM_PANEL=y
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT36672E is not set
|
||||
# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set
|
||||
# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set
|
||||
# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set
|
||||
# CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set
|
||||
# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set
|
||||
@ -4416,15 +4429,16 @@ CONFIG_DRM_PANEL=y
|
||||
# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set
|
||||
# CONFIG_DRM_PANEL_RAYDIUM_RM692E5 is not set
|
||||
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set
|
||||
# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set
|
||||
@ -4435,19 +4449,21 @@ CONFIG_DRM_PANEL=y
|
||||
# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set
|
||||
# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set
|
||||
# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set
|
||||
# CONFIG_DRM_PANEL_SYNAPTICS_R63353 is not set
|
||||
# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set
|
||||
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
|
||||
# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set
|
||||
# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
|
||||
# CONFIG_DRM_PANEL_EDP is not set
|
||||
# CONFIG_DRM_PANEL_SIMPLE is not set
|
||||
# CONFIG_DRM_PANEL_SYNAPTICS_R63353 is not set
|
||||
# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set
|
||||
# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set
|
||||
# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set
|
||||
# CONFIG_DRM_PANEL_TPO_TPG110 is not set
|
||||
# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
|
||||
# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
|
||||
# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set
|
||||
# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
|
||||
# end of Display Panels
|
||||
@ -4602,6 +4618,7 @@ CONFIG_FB_MODE_HELPERS=y
|
||||
# CONFIG_LCD_CLASS_DEVICE is not set
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
# CONFIG_BACKLIGHT_KTD253 is not set
|
||||
# CONFIG_BACKLIGHT_KTD2801 is not set
|
||||
# CONFIG_BACKLIGHT_KTZ8866 is not set
|
||||
# CONFIG_BACKLIGHT_PWM is not set
|
||||
# CONFIG_BACKLIGHT_QCOM_WLED is not set
|
||||
@ -4853,7 +4870,7 @@ CONFIG_SND_SOC_MAX98357A=y
|
||||
# CONFIG_SND_SOC_PCM3168A_I2C is not set
|
||||
# CONFIG_SND_SOC_PCM3168A_SPI is not set
|
||||
CONFIG_SND_SOC_PCM5102A=m
|
||||
# CONFIG_SND_SOC_PCM512x_I2C is not set
|
||||
CONFIG_SND_SOC_PCM512x_I2C=m
|
||||
# CONFIG_SND_SOC_PCM512x_SPI is not set
|
||||
# CONFIG_SND_SOC_PEB2466 is not set
|
||||
# CONFIG_SND_SOC_RK3328 is not set
|
||||
@ -5122,6 +5139,7 @@ CONFIG_USB_OTG=y
|
||||
# CONFIG_USB_OTG_FSM is not set
|
||||
# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set
|
||||
CONFIG_USB_AUTOSUSPEND_DELAY=2
|
||||
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
|
||||
CONFIG_USB_MON=m
|
||||
|
||||
#
|
||||
@ -5382,6 +5400,7 @@ CONFIG_TYPEC_UCSI=m
|
||||
# CONFIG_TYPEC_MUX_FSA4480 is not set
|
||||
# CONFIG_TYPEC_MUX_GPIO_SBU is not set
|
||||
# CONFIG_TYPEC_MUX_PI3USB30532 is not set
|
||||
# CONFIG_TYPEC_MUX_IT5205 is not set
|
||||
# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
|
||||
# CONFIG_TYPEC_MUX_PTN36502 is not set
|
||||
# CONFIG_TYPEC_MUX_WCD939X_USBSS is not set
|
||||
@ -5492,6 +5511,7 @@ CONFIG_LEDS_SYSCON=y
|
||||
#
|
||||
# CONFIG_LEDS_GROUP_MULTICOLOR is not set
|
||||
# CONFIG_LEDS_KTD202X is not set
|
||||
# CONFIG_LEDS_NCP5623 is not set
|
||||
# CONFIG_LEDS_PWM_MULTICOLOR is not set
|
||||
# CONFIG_LEDS_QCOM_LPG is not set
|
||||
|
||||
@ -5734,7 +5754,6 @@ CONFIG_VIDEO_MESON_VDEC=m
|
||||
# StarFive media platform drivers
|
||||
#
|
||||
# CONFIG_STAGING_MEDIA_DEPRECATED is not set
|
||||
# CONFIG_STAGING_BOARD is not set
|
||||
# CONFIG_LTE_GDM724X is not set
|
||||
# CONFIG_FB_TFT is not set
|
||||
# CONFIG_KS7010 is not set
|
||||
@ -5911,6 +5930,7 @@ CONFIG_MESON_GX_SOCINFO=y
|
||||
#
|
||||
# Qualcomm SoC drivers
|
||||
#
|
||||
# CONFIG_QCOM_PBS is not set
|
||||
# end of Qualcomm SoC drivers
|
||||
|
||||
# CONFIG_SOC_TI is not set
|
||||
@ -6069,6 +6089,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
|
||||
# CONFIG_AD7923 is not set
|
||||
# CONFIG_AD7949 is not set
|
||||
# CONFIG_AD799X is not set
|
||||
# CONFIG_AD9467 is not set
|
||||
# CONFIG_ADI_AXI_ADC is not set
|
||||
# CONFIG_CC10001_ADC is not set
|
||||
# CONFIG_ENVELOPE_DETECTOR is not set
|
||||
@ -6095,6 +6116,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
|
||||
# CONFIG_MCP3911 is not set
|
||||
CONFIG_MESON_SARADC=y
|
||||
# CONFIG_NAU7802 is not set
|
||||
# CONFIG_PAC1934 is not set
|
||||
# CONFIG_QCOM_SPMI_IADC is not set
|
||||
# CONFIG_QCOM_SPMI_VADC is not set
|
||||
# CONFIG_QCOM_SPMI_ADC5 is not set
|
||||
@ -6110,6 +6132,7 @@ CONFIG_MESON_SARADC=y
|
||||
# CONFIG_TI_ADS1015 is not set
|
||||
# CONFIG_TI_ADS7924 is not set
|
||||
# CONFIG_TI_ADS1100 is not set
|
||||
# CONFIG_TI_ADS1298 is not set
|
||||
# CONFIG_TI_ADS7950 is not set
|
||||
# CONFIG_TI_ADS8344 is not set
|
||||
# CONFIG_TI_ADS8688 is not set
|
||||
@ -6259,6 +6282,7 @@ CONFIG_MESON_SARADC=y
|
||||
# CONFIG_ADF4350 is not set
|
||||
# CONFIG_ADF4371 is not set
|
||||
# CONFIG_ADF4377 is not set
|
||||
# CONFIG_ADMFM2000 is not set
|
||||
# CONFIG_ADMV1013 is not set
|
||||
# CONFIG_ADMV1014 is not set
|
||||
# CONFIG_ADMV4420 is not set
|
||||
@ -6395,6 +6419,7 @@ CONFIG_MESON_SARADC=y
|
||||
#
|
||||
# Magnetometer sensors
|
||||
#
|
||||
# CONFIG_AF8133J is not set
|
||||
# CONFIG_AK8974 is not set
|
||||
# CONFIG_AK8975 is not set
|
||||
# CONFIG_AK09911 is not set
|
||||
@ -6562,6 +6587,7 @@ CONFIG_MESON_IRQ_GPIO=y
|
||||
|
||||
# CONFIG_IPACK_BUS is not set
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
# CONFIG_RESET_GPIO is not set
|
||||
CONFIG_RESET_MESON=y
|
||||
CONFIG_RESET_MESON_AUDIO_ARB=y
|
||||
# CONFIG_RESET_SIMPLE is not set
|
||||
@ -6753,6 +6779,7 @@ CONFIG_AUTOFS_FS=y
|
||||
CONFIG_FUSE_FS=m
|
||||
# CONFIG_CUSE is not set
|
||||
# CONFIG_VIRTIO_FS is not set
|
||||
CONFIG_FUSE_PASSTHROUGH=y
|
||||
CONFIG_OVERLAY_FS=m
|
||||
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
|
||||
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
|
||||
@ -6792,11 +6819,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
||||
# CONFIG_FAT_DEFAULT_UTF8 is not set
|
||||
CONFIG_EXFAT_FS=m
|
||||
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
|
||||
# CONFIG_NTFS_FS is not set
|
||||
CONFIG_NTFS3_FS=m
|
||||
# CONFIG_NTFS3_64BIT_CLUSTER is not set
|
||||
# CONFIG_NTFS3_LZX_XPRESS is not set
|
||||
# CONFIG_NTFS3_FS_POSIX_ACL is not set
|
||||
# CONFIG_NTFS_FS is not set
|
||||
# end of DOS/FAT/EXFAT/NT Filesystems
|
||||
|
||||
#
|
||||
@ -7282,7 +7309,6 @@ CONFIG_GENERIC_NET_UTILS=y
|
||||
CONFIG_CORDIC=m
|
||||
# CONFIG_PRIME_NUMBERS is not set
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
|
||||
CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
|
||||
CONFIG_ARCH_USE_SYM_ANNOTATIONS=y
|
||||
@ -7471,7 +7497,7 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y
|
||||
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
# CONFIG_KGDB is not set
|
||||
CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y
|
||||
CONFIG_ARCH_HAS_UBSAN=y
|
||||
# CONFIG_UBSAN is not set
|
||||
CONFIG_HAVE_ARCH_KCSAN=y
|
||||
CONFIG_HAVE_KCSAN_COMPILER=y
|
||||
|
@ -64,7 +64,7 @@
|
||||
# for a list of additional drivers see packages/linux-drivers
|
||||
# Space separated list is supported,
|
||||
# e.g. ADDITIONAL_DRIVERS+=" DRIVER1 DRIVER2"
|
||||
ADDITIONAL_DRIVERS+=""
|
||||
ADDITIONAL_DRIVERS="${ADDITIONAL_DRIVERS//RTL8192DU/}"
|
||||
|
||||
# build and install driver addons (yes / no)
|
||||
DRIVER_ADDONS_SUPPORT="no"
|
||||
|
Loading…
x
Reference in New Issue
Block a user