]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.4
authorSasha Levin <sashal@kernel.org>
Fri, 24 Nov 2023 04:28:43 +0000 (23:28 -0500)
committerSasha Levin <sashal@kernel.org>
Fri, 24 Nov 2023 04:28:43 +0000 (23:28 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
13 files changed:
queue-5.4/bluetooth-add-device-0bda-887b-to-device-tables.patch [new file with mode: 0644]
queue-5.4/bluetooth-add-device-13d3-3571-to-device-tables.patch [new file with mode: 0644]
queue-5.4/bluetooth-btusb-add-0bda-b85b-for-fn-link-rtl8852be.patch [new file with mode: 0644]
queue-5.4/bluetooth-btusb-add-flag-to-define-wideband-speech-c.patch [new file with mode: 0644]
queue-5.4/bluetooth-btusb-add-realtek-8822ce-to-usb_device_id-.patch [new file with mode: 0644]
queue-5.4/bluetooth-btusb-add-realtek-rtl8852be-support-id-0x0.patch [new file with mode: 0644]
queue-5.4/bluetooth-btusb-add-rtw8852be-device-13d3-3570-to-de.patch [new file with mode: 0644]
queue-5.4/serial-meson-remove-redundant-initialization-of-vari.patch [new file with mode: 0644]
queue-5.4/serial-meson-use-platform_get_irq-to-get-the-interru.patch [new file with mode: 0644]
queue-5.4/series
queue-5.4/tty-serial-meson-fix-hard-lockup-on-crtscts-mode.patch [new file with mode: 0644]
queue-5.4/tty-serial-meson-retrieve-port-fifo-size-from-dt.patch [new file with mode: 0644]
queue-5.4/tty-serial-migrate-meson_uart-to-use-has_sysrq.patch [new file with mode: 0644]

diff --git a/queue-5.4/bluetooth-add-device-0bda-887b-to-device-tables.patch b/queue-5.4/bluetooth-add-device-0bda-887b-to-device-tables.patch
new file mode 100644 (file)
index 0000000..4f8a069
--- /dev/null
@@ -0,0 +1,67 @@
+From df3f7ce1f594ec89ed0770045041a0f4bf04477b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Mar 2023 19:52:02 -0500
+Subject: bluetooth: Add device 0bda:887b to device tables
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+[ Upstream commit 730a1d1a93a3e30c3723f87af97a8517334b2203 ]
+
+This device is part of a Realtek RTW8852BE chip.
+
+The device table entry is as follows:
+
+T:  Bus=03 Lev=01 Prnt=01 Port=12 Cnt=02 Dev#=  3 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=0bda ProdID=887b Rev= 0.00
+S:  Manufacturer=Realtek
+S:  Product=Bluetooth Radio
+S:  SerialNumber=00e04c000001
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Stable-dep-of: da06ff1f585e ("Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index ae7f984bd62c7..cef6cee5a1540 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -360,6 +360,8 @@ static const struct usb_device_id blacklist_table[] = {
+       /* Realtek 8852BE Bluetooth devices */
+       { USB_DEVICE(0x0cb8, 0xc559), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x0bda, 0x887b), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
+-- 
+2.42.0
+
diff --git a/queue-5.4/bluetooth-add-device-13d3-3571-to-device-tables.patch b/queue-5.4/bluetooth-add-device-13d3-3571-to-device-tables.patch
new file mode 100644 (file)
index 0000000..6a7d4c1
--- /dev/null
@@ -0,0 +1,65 @@
+From 61408f6885d5423ecb1de072849fd8616feead8d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 22 Mar 2023 19:52:03 -0500
+Subject: bluetooth: Add device 13d3:3571 to device tables
+
+From: Larry Finger <Larry.Finger@lwfinger.net>
+
+[ Upstream commit 069f534247bb6db4f8c2c2ea8e9155abf495c37e ]
+
+This device is part of a Realtek RTW8852BE chip. The device table is as follows:
+
+T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=13d3 ProdID=3571 Rev= 0.00
+S:  Manufacturer=Realtek
+S:  Product=Bluetooth Radio
+S:  SerialNumber=00e04c000001
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Stable-dep-of: da06ff1f585e ("Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index cef6cee5a1540..04912b1080dc6 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -362,6 +362,8 @@ static const struct usb_device_id blacklist_table[] = {
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x0bda, 0x887b), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x13d3, 0x3571), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
+-- 
+2.42.0
+
diff --git a/queue-5.4/bluetooth-btusb-add-0bda-b85b-for-fn-link-rtl8852be.patch b/queue-5.4/bluetooth-btusb-add-0bda-b85b-for-fn-link-rtl8852be.patch
new file mode 100644 (file)
index 0000000..d696664
--- /dev/null
@@ -0,0 +1,75 @@
+From a3fb3049b004c1c5f001ef89afea76aa18f12dfc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 12 Oct 2023 19:21:17 +0800
+Subject: Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE
+
+From: Guan Wentao <guanwentao@uniontech.com>
+
+[ Upstream commit da06ff1f585ea784c79f80e7fab0e0c4ebb49c1c ]
+
+Add PID/VID 0bda:b85b for Realtek RTL8852BE USB bluetooth part.
+The PID/VID was reported by the patch last year. [1]
+Some SBCs like rockpi 5B A8 module contains the device.
+And it`s founded in website. [2] [3]
+
+Here is the device tables in /sys/kernel/debug/usb/devices .
+
+T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=0bda ProdID=b85b Rev= 0.00
+S:  Manufacturer=Realtek
+S:  Product=Bluetooth Radio
+S:  SerialNumber=00e04c000001
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+
+Link: https://lore.kernel.org/all/20220420052402.19049-1-tangmeng@uniontech.com/ [1]
+Link: https://forum.radxa.com/t/bluetooth-on-ubuntu/13051/4 [2]
+Link: https://ubuntuforums.org/showthread.php?t=2489527 [3]
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Meng Tang <tangmeng@uniontech.com>
+Signed-off-by: Guan Wentao <guanwentao@uniontech.com>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index 3ea4870b08b32..dbba6a09e51e4 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -362,6 +362,8 @@ static const struct usb_device_id blacklist_table[] = {
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x0bda, 0x887b), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x0bda, 0xb85b), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x13d3, 0x3570), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x13d3, 0x3571), .driver_info = BTUSB_REALTEK |
+-- 
+2.42.0
+
diff --git a/queue-5.4/bluetooth-btusb-add-flag-to-define-wideband-speech-c.patch b/queue-5.4/bluetooth-btusb-add-flag-to-define-wideband-speech-c.patch
new file mode 100644 (file)
index 0000000..164747f
--- /dev/null
@@ -0,0 +1,65 @@
+From 867659b6188de5f38101777e512882286cc39da5 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 27 Feb 2020 18:29:37 +0000
+Subject: Bluetooth: btusb: Add flag to define wideband speech capability
+
+From: Alain Michaud <alainm@chromium.org>
+
+[ Upstream commit 3e4e3f73b9f4944ebd8100dbe107f2325aa79c6d ]
+
+This change adds a new flag to define a controller's wideband speech
+capability.  This is required since no reliable over HCI mechanism
+exists to query the controller and driver's compatibility with
+wideband speech.
+
+Signed-off-by: Alain Michaud <alainm@chromium.org>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Stable-dep-of: da06ff1f585e ("Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 19 +++++++++++++------
+ 1 file changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index 79f77315854f4..c42324ae8eeff 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -57,6 +57,7 @@ static struct usb_driver btusb_driver;
+ #define BTUSB_IFNUM_2         0x80000
+ #define BTUSB_CW6622          0x100000
+ #define BTUSB_MEDIATEK                0x200000
++#define BTUSB_WIDEBAND_SPEECH 0x400000
+ static const struct usb_device_id btusb_table[] = {
+       /* Generic Bluetooth USB device */
+@@ -332,15 +333,21 @@ static const struct usb_device_id blacklist_table[] = {
+       { USB_DEVICE(0x1286, 0x204e), .driver_info = BTUSB_MARVELL },
+       /* Intel Bluetooth devices */
+-      { USB_DEVICE(0x8087, 0x0025), .driver_info = BTUSB_INTEL_NEW },
+-      { USB_DEVICE(0x8087, 0x0026), .driver_info = BTUSB_INTEL_NEW },
+-      { USB_DEVICE(0x8087, 0x0029), .driver_info = BTUSB_INTEL_NEW },
++      { USB_DEVICE(0x8087, 0x0025), .driver_info = BTUSB_INTEL_NEW |
++                                                   BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x8087, 0x0026), .driver_info = BTUSB_INTEL_NEW |
++                                                   BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x8087, 0x0029), .driver_info = BTUSB_INTEL_NEW |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR },
+       { USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL },
+       { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL },
+-      { USB_DEVICE(0x8087, 0x0a2b), .driver_info = BTUSB_INTEL_NEW },
+-      { USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL },
+-      { USB_DEVICE(0x8087, 0x0aaa), .driver_info = BTUSB_INTEL_NEW },
++      { USB_DEVICE(0x8087, 0x0a2b), .driver_info = BTUSB_INTEL_NEW |
++                                                   BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL |
++                                                   BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x8087, 0x0aaa), .driver_info = BTUSB_INTEL_NEW |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       /* Other Intel Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x8087, 0xe0, 0x01, 0x01),
+-- 
+2.42.0
+
diff --git a/queue-5.4/bluetooth-btusb-add-realtek-8822ce-to-usb_device_id-.patch b/queue-5.4/bluetooth-btusb-add-realtek-8822ce-to-usb_device_id-.patch
new file mode 100644 (file)
index 0000000..06973dd
--- /dev/null
@@ -0,0 +1,39 @@
+From e2d5aa343d3b1ce567d2d09b6ce6017d103638ee Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 13 Jul 2020 15:45:29 +0800
+Subject: Bluetooth: btusb: add Realtek 8822CE to usb_device_id table
+
+From: Joseph Hwang <josephsih@chromium.org>
+
+[ Upstream commit 33bfd94a05abb5a63e323dd1454bc580d4bf992c ]
+
+This patch adds the Realtek 8822CE controller to the usb_device_id
+table to support the wideband speech capability.
+
+Signed-off-by: Joseph Hwang <josephsih@chromium.org>
+Reviewed-by: Alain Michaud <alainm@chromium.org>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Stable-dep-of: da06ff1f585e ("Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index c42324ae8eeff..854bf20353d3b 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -353,6 +353,10 @@ static const struct usb_device_id blacklist_table[] = {
+       { USB_VENDOR_AND_INTERFACE_INFO(0x8087, 0xe0, 0x01, 0x01),
+         .driver_info = BTUSB_IGNORE },
++      /* Realtek 8822CE Bluetooth devices */
++      { USB_DEVICE(0x0bda, 0xb00c), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
++
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
+         .driver_info = BTUSB_REALTEK },
+-- 
+2.42.0
+
diff --git a/queue-5.4/bluetooth-btusb-add-realtek-rtl8852be-support-id-0x0.patch b/queue-5.4/bluetooth-btusb-add-realtek-rtl8852be-support-id-0x0.patch
new file mode 100644 (file)
index 0000000..18384d0
--- /dev/null
@@ -0,0 +1,70 @@
+From 4180ab01bd80828b7da255c26ee67bd40e9d3084 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 23 Nov 2022 11:10:05 +0300
+Subject: Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0cb8:0xc559
+
+From: Artem Lukyanov <dukzcry@ya.ru>
+
+[ Upstream commit 393b4916b7b5b94faf5c6a7c68df1c62d17e4f38 ]
+
+Add the support ID(0x0cb8, 0xc559) to usb_device_id table for
+Realtek RTL8852BE.
+
+The device info from /sys/kernel/debug/usb/devices as below.
+
+T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=0cb8 ProdID=c559 Rev= 0.00
+S:  Manufacturer=Realtek
+S:  Product=Bluetooth Radio
+S:  SerialNumber=00e04c000001
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+
+Signed-off-by: Artem Lukyanov <dukzcry@ya.ru>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Stable-dep-of: da06ff1f585e ("Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index 854bf20353d3b..ae7f984bd62c7 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -357,6 +357,10 @@ static const struct usb_device_id blacklist_table[] = {
+       { USB_DEVICE(0x0bda, 0xb00c), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      /* Realtek 8852BE Bluetooth devices */
++      { USB_DEVICE(0x0cb8, 0xc559), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
++
+       /* Realtek Bluetooth devices */
+       { USB_VENDOR_AND_INTERFACE_INFO(0x0bda, 0xe0, 0x01, 0x01),
+         .driver_info = BTUSB_REALTEK },
+-- 
+2.42.0
+
diff --git a/queue-5.4/bluetooth-btusb-add-rtw8852be-device-13d3-3570-to-de.patch b/queue-5.4/bluetooth-btusb-add-rtw8852be-device-13d3-3570-to-de.patch
new file mode 100644 (file)
index 0000000..4d643a3
--- /dev/null
@@ -0,0 +1,68 @@
+From 999e75a34f8e4c3ddabba4eee38297472173a77e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 24 Sep 2023 16:46:55 +0530
+Subject: Bluetooth: btusb: Add RTW8852BE device 13d3:3570 to device tables
+
+From: Masum Reza <masumrezarock100@gmail.com>
+
+[ Upstream commit 02be109d3a405dbc4d53fb4b4473d7a113548088 ]
+
+This device is used in TP-Link TX20E WiFi+Bluetooth adapter.
+
+Relevant information in /sys/kernel/debug/usb/devices
+about the Bluetooth device is listed as the below.
+
+T:  Bus=01 Lev=01 Prnt=01 Port=08 Cnt=01 Dev#=  2 Spd=12   MxCh= 0
+D:  Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=13d3 ProdID=3570 Rev= 0.00
+S:  Manufacturer=Realtek
+S:  Product=Bluetooth Radio
+S:  SerialNumber=00e04c000001
+C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
+I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
+I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
+I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
+I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
+I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
+E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
+
+Signed-off-by: Masum Reza <masumrezarock100@gmail.com>
+Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Stable-dep-of: da06ff1f585e ("Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btusb.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
+index 04912b1080dc6..3ea4870b08b32 100644
+--- a/drivers/bluetooth/btusb.c
++++ b/drivers/bluetooth/btusb.c
+@@ -362,6 +362,8 @@ static const struct usb_device_id blacklist_table[] = {
+                                                    BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x0bda, 0x887b), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
++      { USB_DEVICE(0x13d3, 0x3570), .driver_info = BTUSB_REALTEK |
++                                                   BTUSB_WIDEBAND_SPEECH },
+       { USB_DEVICE(0x13d3, 0x3571), .driver_info = BTUSB_REALTEK |
+                                                    BTUSB_WIDEBAND_SPEECH },
+-- 
+2.42.0
+
diff --git a/queue-5.4/serial-meson-remove-redundant-initialization-of-vari.patch b/queue-5.4/serial-meson-remove-redundant-initialization-of-vari.patch
new file mode 100644 (file)
index 0000000..4a53b7e
--- /dev/null
@@ -0,0 +1,48 @@
+From c76b1a9925cd183ae65d8ac5ac28d7603229df67 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 26 Apr 2021 11:11:06 +0100
+Subject: serial: meson: remove redundant initialization of variable id
+
+From: Colin Ian King <colin.king@canonical.com>
+
+[ Upstream commit 021212f5335229ed12e3d31f9b7d30bd3bb66f7d ]
+
+The variable id being initialized with a value that is never read
+and it is being updated later with a new value. The initialization is
+redundant and can be removed. Since id is just being used in a for-loop
+inside a local scope, move the declaration of id to that scope.
+
+Reviewed-by: Kevin Hilman <khilman@baylibre.com>
+Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Addresses-Coverity: ("Unused value")
+Link: https://lore.kernel.org/r/20210426101106.9122-1-colin.king@canonical.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Stable-dep-of: 2a1d728f20ed ("tty: serial: meson: fix hard LOCKUP on crtscts mode")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/meson_uart.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
+index 4c3616cc00833..6a74a31231ebf 100644
+--- a/drivers/tty/serial/meson_uart.c
++++ b/drivers/tty/serial/meson_uart.c
+@@ -664,12 +664,13 @@ static int meson_uart_probe(struct platform_device *pdev)
+       struct resource *res_mem, *res_irq;
+       struct uart_port *port;
+       int ret = 0;
+-      int id = -1;
+       if (pdev->dev.of_node)
+               pdev->id = of_alias_get_id(pdev->dev.of_node, "serial");
+       if (pdev->id < 0) {
++              int id;
++
+               for (id = AML_UART_PORT_OFFSET; id < AML_UART_PORT_NUM; id++) {
+                       if (!meson_ports[id]) {
+                               pdev->id = id;
+-- 
+2.42.0
+
diff --git a/queue-5.4/serial-meson-use-platform_get_irq-to-get-the-interru.patch b/queue-5.4/serial-meson-use-platform_get_irq-to-get-the-interru.patch
new file mode 100644 (file)
index 0000000..128fa17
--- /dev/null
@@ -0,0 +1,69 @@
+From f96ce2d79b115236d763f273f5984b328712a311 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 24 Dec 2021 14:29:10 +0000
+Subject: serial: meson: Use platform_get_irq() to get the interrupt
+
+From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+
+[ Upstream commit 5b68061983471470d4109bac776145245f06bc09 ]
+
+platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
+allocation of IRQ resources in DT core code, this causes an issue
+when using hierarchical interrupt domains using "interrupts" property
+in the node as this bypasses the hierarchical setup and messes up the
+irq chaining.
+
+In preparation for removal of static setup of IRQ resource from DT core
+code use platform_get_irq().
+
+Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
+Link: https://lore.kernel.org/r/20211224142917.6966-5-prabhakar.mahadev-lad.rj@bp.renesas.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Stable-dep-of: 2a1d728f20ed ("tty: serial: meson: fix hard LOCKUP on crtscts mode")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/meson_uart.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
+index 7563fd215d816..a193cbc78ebc0 100644
+--- a/drivers/tty/serial/meson_uart.c
++++ b/drivers/tty/serial/meson_uart.c
+@@ -661,10 +661,11 @@ static int meson_uart_probe_clocks(struct platform_device *pdev,
+ static int meson_uart_probe(struct platform_device *pdev)
+ {
+-      struct resource *res_mem, *res_irq;
++      struct resource *res_mem;
+       struct uart_port *port;
+       u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
+       int ret = 0;
++      int irq;
+       if (pdev->dev.of_node)
+               pdev->id = of_alias_get_id(pdev->dev.of_node, "serial");
+@@ -687,9 +688,9 @@ static int meson_uart_probe(struct platform_device *pdev)
+       if (!res_mem)
+               return -ENODEV;
+-      res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+-      if (!res_irq)
+-              return -ENODEV;
++      irq = platform_get_irq(pdev, 0);
++      if (irq < 0)
++              return irq;
+       of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
+@@ -714,7 +715,7 @@ static int meson_uart_probe(struct platform_device *pdev)
+       port->iotype = UPIO_MEM;
+       port->mapbase = res_mem->start;
+       port->mapsize = resource_size(res_mem);
+-      port->irq = res_irq->start;
++      port->irq = irq;
+       port->flags = UPF_BOOT_AUTOCONF | UPF_LOW_LATENCY;
+       port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_MESON_CONSOLE);
+       port->dev = &pdev->dev;
+-- 
+2.42.0
+
index fa6ef75bc80f9de10962eb064e5d0b8e3c5f9fdf..9cfc9f67db9a6d412b220c29e6ed51d2b79bb7f2 100644 (file)
@@ -97,3 +97,15 @@ s390-cmma-fix-initial-kernel-address-space-page-table-walk.patch
 s390-cmma-fix-handling-of-swapper_pg_dir-and-invalid_pg_dir.patch
 mm-cma-use-nth_page-in-place-of-direct-struct-page-manipulation.patch
 i3c-master-cdns-fix-reading-status-register.patch
+tty-serial-migrate-meson_uart-to-use-has_sysrq.patch
+serial-meson-remove-redundant-initialization-of-vari.patch
+tty-serial-meson-retrieve-port-fifo-size-from-dt.patch
+serial-meson-use-platform_get_irq-to-get-the-interru.patch
+tty-serial-meson-fix-hard-lockup-on-crtscts-mode.patch
+bluetooth-btusb-add-flag-to-define-wideband-speech-c.patch
+bluetooth-btusb-add-realtek-8822ce-to-usb_device_id-.patch
+bluetooth-btusb-add-realtek-rtl8852be-support-id-0x0.patch
+bluetooth-add-device-0bda-887b-to-device-tables.patch
+bluetooth-add-device-13d3-3571-to-device-tables.patch
+bluetooth-btusb-add-rtw8852be-device-13d3-3570-to-de.patch
+bluetooth-btusb-add-0bda-b85b-for-fn-link-rtl8852be.patch
diff --git a/queue-5.4/tty-serial-meson-fix-hard-lockup-on-crtscts-mode.patch b/queue-5.4/tty-serial-meson-fix-hard-lockup-on-crtscts-mode.patch
new file mode 100644 (file)
index 0000000..450b34b
--- /dev/null
@@ -0,0 +1,101 @@
+From ccedecb70167283042f8473f035f8201f6000885 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 14 Oct 2023 11:39:26 +0000
+Subject: tty: serial: meson: fix hard LOCKUP on crtscts mode
+
+From: Pavel Krasavin <pkrasavin@imaqliq.com>
+
+[ Upstream commit 2a1d728f20edeee7f26dc307ed9df4e0d23947ab ]
+
+There might be hard lockup if we set crtscts mode on port without RTS/CTS configured:
+
+# stty -F /dev/ttyAML6 crtscts; echo 1 > /dev/ttyAML6; echo 2 > /dev/ttyAML6
+[   95.890386] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
+[   95.890857] rcu:     3-...0: (201 ticks this GP) idle=e33c/1/0x4000000000000000 softirq=5844/5846 fqs=4984
+[   95.900212] rcu:     (detected by 2, t=21016 jiffies, g=7753, q=296 ncpus=4)
+[   95.906972] Task dump for CPU 3:
+[   95.910178] task:bash            state:R  running task     stack:0     pid:205   ppid:1      flags:0x00000202
+[   95.920059] Call trace:
+[   95.922485]  __switch_to+0xe4/0x168
+[   95.925951]  0xffffff8003477508
+[   95.974379] watchdog: Watchdog detected hard LOCKUP on cpu 3
+[   95.974424] Modules linked in: 88x2cs(O) rtc_meson_vrtc
+
+Possible solution would be to not allow to setup crtscts on such port.
+
+Tested on S905X3 based board.
+
+Fixes: ff7693d079e5 ("ARM: meson: serial: add MesonX SoC on-chip uart driver")
+Cc: stable@vger.kernel.org
+Signed-off-by: Pavel Krasavin <pkrasavin@imaqliq.com>
+Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
+Reviewed-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
+
+v6: stable tag added
+v5: https://lore.kernel.org/lkml/OF43DA36FF.2BD3BB21-ON00258A47.005A8125-00258A47.005A9513@gdc.ru/
+added missed Reviewed-by tags, Fixes tag added according to Dmitry and Neil notes
+v4: https://lore.kernel.org/lkml/OF55521400.7512350F-ON00258A47.003F7254-00258A47.0040E15C@gdc.ru/
+More correct patch subject according to Jiri's note
+v3: https://lore.kernel.org/lkml/OF6CF5FFA0.CCFD0E8E-ON00258A46.00549EDF-00258A46.0054BB62@gdc.ru/
+"From:" line added to the mail
+v2: https://lore.kernel.org/lkml/OF950BEF72.7F425944-ON00258A46.00488A76-00258A46.00497D44@gdc.ru/
+braces for single statement removed according to Dmitry's note
+v1: https://lore.kernel.org/lkml/OF28B2B8C9.5BC0CD28-ON00258A46.0037688F-00258A46.0039155B@gdc.ru/
+Link: https://lore.kernel.org/r/OF66360032.51C36182-ON00258A48.003F656B-00258A48.0040092C@gdc.ru
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/meson_uart.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
+index a193cbc78ebc0..60c0a4079e093 100644
+--- a/drivers/tty/serial/meson_uart.c
++++ b/drivers/tty/serial/meson_uart.c
+@@ -367,10 +367,14 @@ static void meson_uart_set_termios(struct uart_port *port,
+       else
+               val |= AML_UART_STOP_BIT_1SB;
+-      if (cflags & CRTSCTS)
+-              val &= ~AML_UART_TWO_WIRE_EN;
+-      else
++      if (cflags & CRTSCTS) {
++              if (port->flags & UPF_HARD_FLOW)
++                      val &= ~AML_UART_TWO_WIRE_EN;
++              else
++                      termios->c_cflag &= ~CRTSCTS;
++      } else {
+               val |= AML_UART_TWO_WIRE_EN;
++      }
+       writel(val, port->membase + AML_UART_CONTROL);
+@@ -666,6 +670,7 @@ static int meson_uart_probe(struct platform_device *pdev)
+       u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
+       int ret = 0;
+       int irq;
++      bool has_rtscts;
+       if (pdev->dev.of_node)
+               pdev->id = of_alias_get_id(pdev->dev.of_node, "serial");
+@@ -693,6 +698,7 @@ static int meson_uart_probe(struct platform_device *pdev)
+               return irq;
+       of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
++      has_rtscts = of_property_read_bool(pdev->dev.of_node, "uart-has-rtscts");
+       if (meson_ports[pdev->id]) {
+               dev_err(&pdev->dev, "port %d already allocated\n", pdev->id);
+@@ -717,6 +723,8 @@ static int meson_uart_probe(struct platform_device *pdev)
+       port->mapsize = resource_size(res_mem);
+       port->irq = irq;
+       port->flags = UPF_BOOT_AUTOCONF | UPF_LOW_LATENCY;
++      if (has_rtscts)
++              port->flags |= UPF_HARD_FLOW;
+       port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_MESON_CONSOLE);
+       port->dev = &pdev->dev;
+       port->line = pdev->id;
+-- 
+2.42.0
+
diff --git a/queue-5.4/tty-serial-meson-retrieve-port-fifo-size-from-dt.patch b/queue-5.4/tty-serial-meson-retrieve-port-fifo-size-from-dt.patch
new file mode 100644 (file)
index 0000000..bd1576a
--- /dev/null
@@ -0,0 +1,55 @@
+From 52791294671e8dbedbff761679c93be8b2440533 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 18 May 2021 09:58:32 +0200
+Subject: tty: serial: meson: retrieve port FIFO size from DT
+
+From: Neil Armstrong <narmstrong@baylibre.com>
+
+[ Upstream commit 27d44e05d7b85d9d4cfe0a3c0663ea49752ece93 ]
+
+Now the DT bindings has a property to get the FIFO size for a particular port,
+retrieve it and use to setup the FIFO interrupts threshold.
+
+Reviewed-by: Kevin Hilman <khilman@baylibre.com>
+Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
+Link: https://lore.kernel.org/r/20210518075833.3736038-3-narmstrong@baylibre.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Stable-dep-of: 2a1d728f20ed ("tty: serial: meson: fix hard LOCKUP on crtscts mode")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/meson_uart.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
+index 6a74a31231ebf..7563fd215d816 100644
+--- a/drivers/tty/serial/meson_uart.c
++++ b/drivers/tty/serial/meson_uart.c
+@@ -663,6 +663,7 @@ static int meson_uart_probe(struct platform_device *pdev)
+ {
+       struct resource *res_mem, *res_irq;
+       struct uart_port *port;
++      u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
+       int ret = 0;
+       if (pdev->dev.of_node)
+@@ -690,6 +691,8 @@ static int meson_uart_probe(struct platform_device *pdev)
+       if (!res_irq)
+               return -ENODEV;
++      of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
++
+       if (meson_ports[pdev->id]) {
+               dev_err(&pdev->dev, "port %d already allocated\n", pdev->id);
+               return -EBUSY;
+@@ -719,7 +722,7 @@ static int meson_uart_probe(struct platform_device *pdev)
+       port->type = PORT_MESON;
+       port->x_char = 0;
+       port->ops = &meson_uart_ops;
+-      port->fifosize = 64;
++      port->fifosize = fifosize;
+       meson_ports[pdev->id] = port;
+       platform_set_drvdata(pdev, port);
+-- 
+2.42.0
+
diff --git a/queue-5.4/tty-serial-migrate-meson_uart-to-use-has_sysrq.patch b/queue-5.4/tty-serial-migrate-meson_uart-to-use-has_sysrq.patch
new file mode 100644 (file)
index 0000000..d379e7b
--- /dev/null
@@ -0,0 +1,56 @@
+From f88dfceaf7310b7a5879a56a3d6a894504076038 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 13 Dec 2019 00:06:20 +0000
+Subject: tty/serial: Migrate meson_uart to use has_sysrq
+
+From: Dmitry Safonov <dima@arista.com>
+
+[ Upstream commit dca3ac8d3bc9436eb5fd35b80cdcad762fbfa518 ]
+
+The SUPPORT_SYSRQ ifdeffery is not nice as:
+- May create misunderstanding about sizeof(struct uart_port) between
+  different objects
+- Prevents moving functions from serial_core.h
+- Reduces readability (well, it's ifdeffery - it's hard to follow)
+
+In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added.
+Initialise it in driver's probe and remove ifdeffery.
+
+Cc: Kevin Hilman <khilman@baylibre.com>
+Cc: linux-arm-kernel@lists.infradead.org
+Cc: linux-amlogic@lists.infradead.org
+Signed-off-by: Dmitry Safonov <dima@arista.com>
+Link: https://lore.kernel.org/r/20191213000657.931618-22-dima@arista.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Stable-dep-of: 2a1d728f20ed ("tty: serial: meson: fix hard LOCKUP on crtscts mode")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/meson_uart.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
+index 849ce8c1ef392..4c3616cc00833 100644
+--- a/drivers/tty/serial/meson_uart.c
++++ b/drivers/tty/serial/meson_uart.c
+@@ -5,10 +5,6 @@
+  * Copyright (C) 2014 Carlo Caione <carlo@caione.org>
+  */
+-#if defined(CONFIG_SERIAL_MESON_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
+-#define SUPPORT_SYSRQ
+-#endif
+-
+ #include <linux/clk.h>
+ #include <linux/console.h>
+ #include <linux/delay.h>
+@@ -716,6 +712,7 @@ static int meson_uart_probe(struct platform_device *pdev)
+       port->mapsize = resource_size(res_mem);
+       port->irq = res_irq->start;
+       port->flags = UPF_BOOT_AUTOCONF | UPF_LOW_LATENCY;
++      port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_MESON_CONSOLE);
+       port->dev = &pdev->dev;
+       port->line = pdev->id;
+       port->type = PORT_MESON;
+-- 
+2.42.0
+