wifi: ath12k: Add logic to write QRTR node id to scratch
authorP Praneesh <quic_ppranees@quicinc.com>
Mon, 29 Jan 2024 06:57:16 +0000 (12:27 +0530)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 2 Feb 2024 12:32:50 +0000 (14:32 +0200)
commit94e8235c679db3e3b130a91d4c1d8f5023a5bb01
treea5fafe829d71e0bb160476342f567710e6bfe795
parent902700d55d4a4522bb3eb4ef94f752a19c42230a
wifi: ath12k: Add logic to write QRTR node id to scratch

Currently only one MHI device is registered successfully on platform
having two or more identical MHI devices. This is beacuse QMI service
runs with identical QRTR node ID. And, qrtr-lookup cannot register
more than one QMI service with identical node ID.

Hence, generate a unique QRTR instance ID from PCIe domain number and
bus number. QMI allows node id to be written on scratch register.
Add logic to write QRTR node id to the register. It is available for
firmware to uniquely identify an instance.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00188-QCAHKSWPL_SILICONZ-1
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
Signed-off-by: Raj Kumar Bhagat <quic_rajkbhag@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240129065724.2310207-6-quic_rajkbhag@quicinc.com
drivers/net/wireless/ath/ath12k/fw.h
drivers/net/wireless/ath/ath12k/pci.c
drivers/net/wireless/ath/ath12k/pci.h
drivers/net/wireless/ath/ath12k/qmi.h