Re: [PATCH v1 3/4] serial: qcom-geni: Enable PM runtime for serial driver

From: Dmitry Baryshkov

Date: Wed Dec 31 2025 - 00:51:23 EST


On 31/12/2025 07:49, Praveen Talari wrote:
Hi Dmitry,

On 12/31/2025 8:30 AM, Dmitry Baryshkov wrote:
On 31/12/2025 05:00, Praveen Talari wrote:
Hi Dmitry,

On 12/30/2025 11:53 PM, Dmitry Baryshkov wrote:
On Mon, Nov 10, 2025 at 03:40:42PM +0530, Praveen Talari wrote:
The GENI serial driver currently handles power resource management
through calls to the statically defined geni_serial_resources_on() and
geni_serial_resources_off() functions. This approach reduces modularity
and limits support for platforms with diverse power management
mechanisms, including resource managed by firmware.

Improve modularity and enable better integration with platform- specific
power management, introduce support for runtime PM. Use
pm_runtime_resume_and_get() and pm_runtime_put_sync() within the
qcom_geni_serial_pm() callback to control resource power state
transitions based on UART power state changes.

Signed-off-by: Praveen Talari <praveen.talari@xxxxxxxxxxxxxxxx>
---
  drivers/tty/serial/qcom_geni_serial.c | 24 ++++++++++++++++++++++--
  1 file changed, 22 insertions(+), 2 deletions(-)


This breaks BT support on the Qualcomm RB2 platform. With this patch
applied, I'm getting the following:

root@qcom-armv8a:~# dmesg | grep tty\\\|hci0
[    0.000000] Kernel command line:  ignore_loglevel console=ttyMSM0,115200n8 earlycon root=PARTLABEL=rootfs rootwait systemd.mask=pd-mapper.service -- androidboot.bootdevice=4744000.sdhci androidboot.serialno=2b89b520 androidboot.baseband=apq msm_drm.dsi_display0=qcom,mdss_dsi_ext_bridge_1080p:
[    4.074354] 4a8c000.serial: ttyHS1 at MMIO 0x4a8c000 (irq = 140, base_baud = 0) is a MSM
[    4.099410] serial serial0: tty port ttyHS1 registered
[    4.131200] Bluetooth: hci0: setting up wcn399x
[    4.149847] 4a90000.serial: ttyMSM0 at MMIO 0x4a90000 (irq = 142, base_baud = 0) is a MSM
[    4.229099] printk: legacy console [ttyMSM0] enabled
[    6.499519] Bluetooth: hci0: command 0xfc00 tx timeout
[    6.514347] Bluetooth: hci0: Reading QCA version information failed (-110)
[    6.559933] Bluetooth: hci0: Retry BT power ON:0
[    8.016330] systemd[1]: Created slice Slice /system/getty.
[    8.066194] systemd[1]: Created slice Slice /system/serial-getty.
[    8.148389] systemd[1]: Expecting device /dev/ttyMSM0...
[    8.956804] Bluetooth: hci0: command 0xfc00 tx timeout
[    8.962447] Bluetooth: hci0: Reading QCA version information failed (-110)
[    8.976917] Bluetooth: hci0: Retry BT power ON:1
[   11.296715] Bluetooth: hci0: command 0xfc00 tx timeout
[   11.302340] Bluetooth: hci0: Reading QCA version information failed (-110)
[   11.309534] Bluetooth: hci0: Retry BT power ON:2
[   13.660078] Bluetooth: hci0: command 0xfc00 tx timeout
[   13.665814] Bluetooth: hci0: Reading QCA version information failed (-110)

Sure, will check and update.

If possible, can you share what is DT filename for RB2.

qrb4210-rb2.dts

Can you please try below change on target since i didn't get target yet?

Yes, I have this patch too. It didn't help.


diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/ dts/qcom/qrb4210-rb2.dts
index 0cd36c54632f..5f8613150bdd 100644
--- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
+++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
@@ -694,7 +694,7 @@ sdc2_card_det_n: sd-card-det-n-state {

 &uart3 {
        interrupts-extended = <&intc GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
-                             <&tlmm 11 IRQ_TYPE_LEVEL_HIGH>;
+                             <&tlmm 11 IRQ_TYPE_EDGE_FALLING>;
        pinctrl-0 = <&uart3_default>;
        pinctrl-1 = <&uart3_sleep>;
        pinctrl-names = "default", "sleep";

Thanks,
Praveen Talari



Earlier I had validated on RB1 and Kodiak.

Thanks,
Praveen


After reverting the next and this patches, BT is back to normal:

[    4.067201] 4a8c000.serial: ttyHS1 at MMIO 0x4a8c000 (irq = 140, base_baud = 0) is a MSM
[    4.082426] serial serial0: tty port ttyHS1 registered
[    4.106122] 4a90000.serial: ttyMSM0 at MMIO 0x4a90000 (irq = 142, base_baud = 0) is a MSM
[    4.108647] Bluetooth: hci0: setting up wcn399x
[    4.125371] printk: legacy console [ttyMSM0] enabled
[    4.445205] Bluetooth: hci0: QCA Product ID   :0x0000000a
[    4.450927] Bluetooth: hci0: QCA SOC Version  :0x40020150
[    4.456470] Bluetooth: hci0: QCA ROM Version  :0x00000201
[    4.462006] Bluetooth: hci0: QCA Patch Version:0x00000001
[    4.509408] Bluetooth: hci0: QCA controller version 0x01500201
[    4.515656] Bluetooth: hci0: QCA Downloading qca/apbtfw11.tlv
[    5.488739] Bluetooth: hci0: QCA Downloading qca/apnv11.bin
[    5.671740] Bluetooth: hci0: QCA setup on UART is completed
[    7.993368] systemd[1]: Created slice Slice /system/getty.
[    8.045612] systemd[1]: Created slice Slice /system/serial-getty.
[    8.125418] systemd[1]: Expecting device /dev/ttyMSM0...







--
With best wishes
Dmitry