From patchwork Wed Aug 15 09:26:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10566411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D36F139A for ; Wed, 15 Aug 2018 09:27:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C23329ECB for ; Wed, 15 Aug 2018 09:27:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 809A029ECD; Wed, 15 Aug 2018 09:27:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF67A29ECB for ; Wed, 15 Aug 2018 09:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=DuRfa7xl/Fv8G/OKOzbHOS+eDkzNFNFYjtDj8t0rfDs=; b=lXW 8l3mlFO+mNM+t7k6h+rrhfsrVr5+yE6rF6uFD+Tunw4RVmI4zopctiwIs9ITIOjMXJYPqkpHQGwIx rLBkHITdSa2TCk8/XHd2tDrbSrpSmb3CRlOmiPUppwiIXrXY6W4VsNPxfw4T+4nDnVJaRdCtSISy6 zD97O7LsJfe9xQqxgF/BjFRnFK7c7ZYgXRpBEe79CMio9cRqR9rjy6qodU0iLUrk/xTdmC9Wa1XPc hd+n1YTY02+Y+dJai4v7f9a4bO6fUz6FVX+Z+ur79f+OcILLDboFg7ZALFhoag1l++4t0ADCH/hmA 1UPXj5PeRSKCADpYTz3GU6z+cNcs6TQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fps4z-0000YV-3L; Wed, 15 Aug 2018 09:27:01 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fps4u-0000Tn-JI for ath10k@lists.infradead.org; Wed, 15 Aug 2018 09:26:58 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C7593624C1; Wed, 15 Aug 2018 09:26:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1534325206; bh=3B3f4mjMbXf3Q41qutHqiq2adDuelFt0QZPQHg0V1NY=; h=From:To:Cc:Subject:Date:From; b=LoR4QLkRMpALo95aOQiF7mFlldNKhMd2+Jatbe05JIKrVGze14y8s/U9vy3qn8CNT Qw65nUVONMClx/GvGIZwXPeRd1CEX8uHXj3nQtEL+sIZWRZ2TIRC8fN6tjBFpwcZ22 CctFiw7Y/u6MB3DnC7tyh/z4GqHK1fznOvBMcnkQ= Received: from govinds-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: govinds@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 26E5C624C1; Wed, 15 Aug 2018 09:26:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1534325205; bh=3B3f4mjMbXf3Q41qutHqiq2adDuelFt0QZPQHg0V1NY=; h=From:To:Cc:Subject:Date:From; b=BwRNVK8rCY7s4ia9FHwMNkiqvjabyJnb5D0OVQqTD7Qnz7/6O5RcYtWBxFOCevgcg OcWSTx9mln9n0aqyp5mOzH9YmADIeTkdpxhNonrkCYLa2vwdcHeVoCM3m4RIbwwVss v4HMlmBc6tZOV4QAfOcKWmBmUg5xCuhFNSnu4uXQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 26E5C624C1 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=govinds@codeaurora.org From: Govind Singh To: ath10k@lists.infradead.org, briannorris@chromium.org, niklas.cassel@linaro.org, bjorn.andersson@linaro.org, andy.gross@linaro.org, devicetree@vger.kernel.org Subject: [PATCH v5 0/6] *** Add support for wifi QMI client handshakes *** Date: Wed, 15 Aug 2018 14:56:31 +0530 Message-Id: <20180815092637.11455-1-govinds@codeaurora.org> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180815_022656_670711_DBF7CB86 X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Govind Singh , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add QMI client handshakes for Q6 integrated WLAN connectivity subsystem. This module is responsible for communicating WLAN control messages to FW over QMI interface. This patch series enables the qmi handshakes required for WCN3990 chipset. QUALCOMM MSM Interface(QMI) provides the control interface between components running b/w remote processors with underlying transport layer based on integrated chipset(shared memory) or discrete chipset(PCI/USB/SDIO/UART). QMI client driver implementation is based on qmi framework https://lwn.net/Articles/729924/. Below is the sequence of qmi handshake. QMI CLIENT(APPS) QMI SERVER(FW in Q6) <------wlan service discoverd---- -----connect to wlam qmi service-----> ------------wlan info request-----> <------------wlan info resp------------ ------------msa info req--------> <------------msa info resp------------ ------------msa ready req--------> <------------msa ready resp------------ <------------msa ready indication------- ------------capability req-------> <------------capability resp------------ ------------qmi bdf req---------> <------------qmi bdf resp------------ ------------qmi cal trigger-------> <------------ QMI FW ready indication------- WLAN fw is running in modem Q6 dsp as user PD(protection domain). Sequence of user PD loading is as following. 1) Remote proc PIL driver loads the modem fw/ROOT PD. 2) As part of ROOT pd boot-up it queries to a daemon(pd_mapper) running in apps processor to determine how many usre pd's to be loaded by the remote processor(Q6). 3) Once user pd info is known to remote processor it loads the user pd via tftp protocol. https://github.com/andersson/pd-mapper https://github.com/andersson/tqftpserv Changes since V4: Minor change in unload sequence, qmi handle is released prior work destroy. Changes since V3: Removed msa memory child node and used only memory-region property. Fixed sparse warning reported in v3 change. Changed qmi board id data type to u32 to align with fw defined value. Changes since V2: Addressed review comments from v2 version. Removed msa-size from dt binding and added reference to reserved-memory/reserved-memory.txt. Changes since V1: Removed qmi client driver and integrated qmi client handshakes in snoc platform driver. Addressed comments on v1 version. Switched to ath10k bdf download infra(board-2.bin) Added MSA fixed region support to support unload use-case. Unified logging. Testing: Tested all qmi handshakes, driver load/unload and STA/SAP sanity testing. Tested HW: SDM845(WCN3990) Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1 Govind Singh (5): ath10k: Add qmi service helpers for wcn3990 qmi client dt: bindings: add bindings for msa memory region firmware: qcom: scm: Add WLAN VMID for Qualcomm SCM interface ath10k: Add debug mask for QMI layer ath10k: Add QMI message handshake for wcn3990 client Rakesh Pillai (1): ath10k: Add support to create boardname for non-bmi target .../bindings/net/wireless/qcom,ath10k.txt | 6 + drivers/net/wireless/ath/ath10k/Kconfig | 1 + drivers/net/wireless/ath/ath10k/Makefile | 4 +- drivers/net/wireless/ath/ath10k/core.c | 14 +- drivers/net/wireless/ath/ath10k/core.h | 4 + drivers/net/wireless/ath/ath10k/debug.h | 1 + drivers/net/wireless/ath/ath10k/qmi.c | 1019 ++++++++ drivers/net/wireless/ath/ath10k/qmi.h | 129 + .../net/wireless/ath/ath10k/qmi_wlfw_v01.c | 2072 +++++++++++++++++ .../net/wireless/ath/ath10k/qmi_wlfw_v01.h | 677 ++++++ drivers/net/wireless/ath/ath10k/snoc.c | 262 ++- drivers/net/wireless/ath/ath10k/snoc.h | 4 + include/linux/qcom_scm.h | 4 +- 13 files changed, 4186 insertions(+), 11 deletions(-) create mode 100644 drivers/net/wireless/ath/ath10k/qmi.c create mode 100644 drivers/net/wireless/ath/ath10k/qmi.h create mode 100644 drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.c create mode 100644 drivers/net/wireless/ath/ath10k/qmi_wlfw_v01.h Reviewed-by: Brian Norris