From patchwork Mon Dec 10 18:31:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhagavathi Perumal S X-Patchwork-Id: 10722301 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 8823C159A for ; Mon, 10 Dec 2018 19:31:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 724842AA98 for ; Mon, 10 Dec 2018 19:31:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 632252AA80; Mon, 10 Dec 2018 19:31:29 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 0B8802AA80 for ; Mon, 10 Dec 2018 19:31:28 +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:References: In-Reply-To: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:List-Owner; bh=mBKaOybYyBcjBM+KgXkKWCsrnKhXYC9UxBZk3ciawvw=; b=rCJfS333CDMML0NU1ekBSQ7LrK KVkErjwCXwya7g/1hgdV1CJk/THx+/T7K5kI0LNVulOqZEsY3G7hc7YN6U7tcSUyO1kaVoduxvlrt Ldf5tRMITJUh4uPYo79Gu2SdaRTUO12B8uQw9SGz98urJj1co0TtdMCB7s6AtzN86lmepB1i2b06t niYuIscMuz0yhBd9rXTptxCMO8V3MlQ+Gky2tPonPDgyaCXFB73aDlu1/o9JYsj1iZcYbyaL7Aptf AeIBV789PpIPnHtwn+r8EYRzglfaklbl6nGDQpc+wxes/ay2aSrsY+TiPR4AFczRy7qmu6InR2cbI KhXrrhow==; 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 1gWRH4-0008WL-6e; Mon, 10 Dec 2018 19:31:26 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWRH2-0008WA-ER for ath10k@bombadil.infradead.org; Mon, 10 Dec 2018 19:31:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KpyUWviOXMSxoF98XVWcnrRGCGh/P7PEKKrs1RLSnfE=; b=dFtSH1BAjOEcRx2VTS+dWCWVS lz3oNyoOsv/hIXbTZ88QxZYF9SBt50601R2IuEeTS1UzidfaoCR9RV8I26tWrn3rfWJySC7+6uFu2 uzW79YCYMBDLvwTpaoS+easl+Eb03qkEcl4ktpjM6hAIP2GxCl9sKr2G8lIRQLhSRlPNCTu5QZLbN s95Mpx4D66dNU2jdYssivPrdlZtViB//dLDXrEldi2/gEYPpw8ihqoYjCwBBHCtj+l96XgaZty3fA iZO2z8L2mmhwQSg4yBSyiVBHFgMRGg+7b5DbCVl8XZD3NrnVIfN/o9/D8K67y3eCRXfQrWV7swT32 +Xf4wd8eg==; Received: from smtp.codeaurora.org ([198.145.29.96]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWQNI-0006XZ-9d for ath10k@lists.infradead.org; Mon, 10 Dec 2018 18:33:49 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6B904612EE; Mon, 10 Dec 2018 18:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544466815; bh=RPI8wq/o5rD0pLJ8Alj24SJE6v8fFnpIpei79G9hYmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n9o7Xg5QBHTKBNQbHBI6Oh+KHPcxK0NtLwpIVIch4i0addbfQgoFJXNxmWYXvzWll wqsw5mOvA1KkT2GMRroBvQxu2CfTM8g0CUar81vlI/JI2u8Zlxcf7KTse7POW4sMvx OkCG9n2J/CZsXBxDgstljiTNFXXa+Ad3bgmGrSno= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: bperumal@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BDDF560C48; Mon, 10 Dec 2018 18:33:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544466814; bh=RPI8wq/o5rD0pLJ8Alj24SJE6v8fFnpIpei79G9hYmE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b5L/vuDvH2TwPjaBkhnM3sJbDAjk0hBPourwlJhLI7dSFm/f9/262VmG3TBmVxGu6 P3DVlRbFDlT3MXW07L97/LzkieGppexCx/QRjy/vBi1kaBg4cXP4A4y3+nI5ksycpS GAx7ewh9q4K7hW3RcZ6nY1eApvaV9VQs0A45uy1E= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BDDF560C48 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=bperumal@codeaurora.org From: Bhagavathi Perumal S To: ath10k@lists.infradead.org Subject: [PATCH v3 1/3] dt-bindings: net: ath10k: fix node name and device type in qcom ath10k example Date: Tue, 11 Dec 2018 00:01:29 +0530 Message-Id: <1544466691-11821-2-git-send-email-bperumal@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1544466691-11821-1-git-send-email-bperumal@codeaurora.org> References: <1544466691-11821-1-git-send-email-bperumal@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181210_133348_406794_D9E293FA X-CRM114-Status: GOOD ( 11.84 ) 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: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org, Bhagavathi Perumal S MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In qcom,ath10k documentation, ath10k is used as node name in the example of pci based device. Normally, node name shoud be class of device and not the model name, so fix it to node name "wifi". And remove the property device_type pci since only pci bridges should have this property. Signed-off-by: Bhagavathi Perumal S --- Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt index 2196d1a..ef60f25 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt @@ -74,9 +74,8 @@ pci { #address-cells = <3>; device_type = "pci"; - ath10k@0,0 { + wifi@0,0 { reg = <0 0 0 0 0>; - device_type = "pci"; qcom,ath10k-calibration-data = [ 01 02 03 ... ]; }; }; From patchwork Mon Dec 10 18:31:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhagavathi Perumal S X-Patchwork-Id: 10722181 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 D3101159A for ; Mon, 10 Dec 2018 18:34:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C44C62AB8E for ; Mon, 10 Dec 2018 18:34:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8E1D2AC3F; Mon, 10 Dec 2018 18:34:19 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham 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 685D32AB8E for ; Mon, 10 Dec 2018 18:34:19 +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:References: In-Reply-To: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:List-Owner; bh=R9K9g0Mr+10hOahqLgvDS3PBZbrEVixjpIiv6bM6PTY=; b=bjGs38J8NdOhwBq4KpUU/xF2Um 64/yw8Qtxw77HcyKOTVJ8ktvBX6X6tof3vnANm15jemVSdE/1LjoURl9P/ADxV6SzAJKlXcSFbwh3 prbVv/ayoEPmuxRNt6TFMwDUK0YhShKtYdZhWXSPJ3qoGiy3y/tWvosw9v6aZ5jbMrskWD/vZcMWY /k38L5hnkqgxup4wd9QnefZDpiYlh0Y8cgDybh0/a8Zggv9YPaTGXnnmE4Dl4r9B5uibZrEGX7elq H2IHXlWjbMahPQMGucCSsEOOY6cUHAJQSSue7snQKKR/ednlsx2utpBJehoBLY5RC1Tl98Uxmb4Ct ymDYQ8Zw==; 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 1gWQNl-00084b-J4; Mon, 10 Dec 2018 18:34:17 +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 1gWQNX-0007sP-Jm for ath10k@lists.infradead.org; Mon, 10 Dec 2018 18:34:13 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3A68261344; Mon, 10 Dec 2018 18:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544466833; bh=ga9RyYbpcoVkNI6F/pCJo1PU2BYZuQzbYpMXaa65yyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WRvkVHv1soND8gA6YEY4Ojm5n74hFQmgze8hPJJuNOKYO1Kd51QX5aHjWrmj+QgMb G1HqOpbgrU1Doc3gGkOCmv630+fYTFlX0YmjTFX55WIlX2rkR5K/0ufoxwC8TFf/gO 4VvFK1c6LPTzmnTjt/YU+2nRY1Y9vXRJ/n32BYfQ= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: bperumal@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C8DA561550; Mon, 10 Dec 2018 18:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544466826; bh=ga9RyYbpcoVkNI6F/pCJo1PU2BYZuQzbYpMXaa65yyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LQHvu73UeJe8d09VHOeOzWcKiKJcBFK3Am9VXVDr2uOaXebUu0vF5PbdH7zVbNtEP GL6WfwuWS48+Au9HQ1ial8KbLiCINfXXUIe8txfPNCHnDb7zjaIDTYNxMaVryOnO9S 9pQcthAvOr6gR1oYd1UnYk/EfO5Mgzu2kMeTtqOo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C8DA561550 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=bperumal@codeaurora.org From: Bhagavathi Perumal S To: ath10k@lists.infradead.org Subject: [PATCH v3 2/3] dt-bindings: net: ath10k: add new dt entry to identify external FEM Date: Tue, 11 Dec 2018 00:01:30 +0530 Message-Id: <1544466691-11821-3-git-send-email-bperumal@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1544466691-11821-1-git-send-email-bperumal@codeaurora.org> References: <1544466691-11821-1-git-send-email-bperumal@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181210_103404_131357_EA8D9663 X-CRM114-Status: GOOD ( 10.36 ) 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: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org, Bhagavathi Perumal S MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds new dt entry ext-fem-name, it is used by ath10k driver to select correct timing parameters and configure it in target wifi hardware. The Front End Module(FEM) normally includes tx power amplifier(PA) and rx low noise amplifier(LNA). The default timing parameters like tx end to PA off timing values were fine tuned for internal FEM used in reference design. And these timing values can not be same if ODM modifies hardware design with different external FEM. This DT entry helps to choose correct timing values in driver if different external FEM hardware used. Signed-off-by: Bhagavathi Perumal S Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt index ef60f25..71530fd 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt @@ -61,8 +61,14 @@ Optional properties: Value type: Definition: reference to the reserved-memory for the msa region used by the wifi firmware running in Q6. +- ext-fem-name: + Usage: Optional + Value type: string + Definition: Name of external front end module used. Some valid FEM names + for example: "microsemi-lx5586", "sky85703-11" + and "sky85803" etc. -Example (to supply the calibration data alone): +Example (to supply PCI based wifi block details): In this example, the node is defined as child node of the PCI controller. @@ -77,6 +83,7 @@ pci { wifi@0,0 { reg = <0 0 0 0 0>; qcom,ath10k-calibration-data = [ 01 02 03 ... ]; + ext-fem-name = "microsemi-lx5586"; }; }; }; From patchwork Mon Dec 10 18:31:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhagavathi Perumal S X-Patchwork-Id: 10722179 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 74ACA112E for ; Mon, 10 Dec 2018 18:34:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6439A2AB8E for ; Mon, 10 Dec 2018 18:34:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5855C2AE25; Mon, 10 Dec 2018 18:34:17 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 2BFD12AB8E for ; Mon, 10 Dec 2018 18:34:16 +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:References: In-Reply-To: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:List-Owner; bh=zo/tGnNoVczHQGSNl3b0tQ7BBFEpIzEQhIGn/SnZQmA=; b=he8/hZzGVZ3yPA2dwCOH5rZ93B 46O/MXFv+2W+O7sElzBq02SWHF8AU3Kvv85+5ejFkSNFu1hpv1xS0FlFffw7BsN2b/EvRXrCuavbg ghLBEDsuky3RNMIejgN3CYun+olHAZrJYz0UiWX8L0US1EDC0tj7yyDWnt9TIIvZ48u1jqxPMYnmC iW7iW5T80t5xM9eP9jjhzWcTfd84fkIMD4eViaVTKr7YsRZNSGI5rmlesvcFP9/xhEk27t7v6mVto 7ESDUUNzgeaviXc/gvLTNhNuDfS0YbPXRUtMQcJmE8WYCssoANyjsFYXsBrpTAVsViD0JcbfbYM59 t3R5nadg==; 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 1gWQNh-00082H-MC; Mon, 10 Dec 2018 18:34:13 +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 1gWQNX-0007wL-Jp for ath10k@lists.infradead.org; Mon, 10 Dec 2018 18:34:12 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D052561552; Mon, 10 Dec 2018 18:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544466840; bh=hGerwc4V1jOqWkLQ0Pu91q/8OFMGBcPozdN2GfkqJzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=noe2O5wrfhn/EtXuzUcFcbd2pvD1iQScuZzvvFoCoQcns0DlnoD+Cqy0NTFGIA415 CddaCnwiQP3KCyJa66tUhjedAOUx3qSKnuvDmPbj6/5wbFpreVwdx9MbLJIDdrVmPK 3uT74J6n0JRcHLnid1Wfj3rOArOK+eSzagoWBSG4= Received: from localhost (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: bperumal@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4797D6151F; Mon, 10 Dec 2018 18:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544466839; bh=hGerwc4V1jOqWkLQ0Pu91q/8OFMGBcPozdN2GfkqJzw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G3uoXvNSKN1U2n6Axv6QjKKOMbJEQhiyUr7ku+N/PFF47ds9xLDDGH4ZmugUybxKs h/A8ix2ANZMrVJnc1Fqcf62u3JPFSmeSWoWRlgQPpKA70vaYKDHLA3lKCLnPB0L+Qs 70+UnsV2NX85CwgcOnBU8ZGYehynL+qQanY7idcs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4797D6151F 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=bperumal@codeaurora.org From: Bhagavathi Perumal S To: ath10k@lists.infradead.org Subject: [PATCH v3 3/3] ath10k: Add support to configure BB timing over wmi Date: Tue, 11 Dec 2018 00:01:31 +0530 Message-Id: <1544466691-11821-4-git-send-email-bperumal@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1544466691-11821-1-git-send-email-bperumal@codeaurora.org> References: <1544466691-11821-1-git-send-email-bperumal@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181210_103403_931262_D0B3F139 X-CRM114-Status: GOOD ( 15.87 ) 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: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org, Bhagavathi Perumal S 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 wmi configuration cmd to configure base band(BB) power amplifier(PA) off timing values in hardware. The default PA off timings were fine tuned to make proper DFS radar detection in QCA reference design. If ODM uses different PA in their design, then the same default PA off timing values cannot be used, it requires different settling time to detect radar pulses very sooner and avoid radar detection problems. In that case it provides provision to select proper PA off timing values based on the PA hardware used. The PA component is part of FEM hardware and new device tree entry "ext-fem-name" is used to indentify the FEM hardware. And this wmi configuration cmd is enabled via wmi service flag "WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT". Other way is to apply these values through calibration data, but recalibration of all boards out there might not be feasible. This change tested on firmware ver 10.2.4-1.0-00042 in QCA988X chipset. Signed-off-by: Bhagavathi Perumal S --- drivers/net/wireless/ath/ath10k/mac.c | 47 +++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath10k/wmi-ops.h | 20 +++++++++++++ drivers/net/wireless/ath/ath10k/wmi.c | 23 +++++++++++++++ drivers/net/wireless/ath/ath10k/wmi.h | 26 +++++++++++++++++ 4 files changed, 116 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 1db2a30..5a1c9b6 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -22,6 +22,7 @@ #include #include #include +#include #include "hif.h" #include "core.h" @@ -4637,11 +4638,44 @@ static int ath10k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) return ret; } +static int __ath10k_fetch_bb_timing_dt(struct ath10k *ar, + struct wmi_bb_timing_cfg_arg *bb_timing) +{ + struct device_node *node; + const char *fem_name; + int ret; + + node = ar->dev->of_node; + if (!node) + return -ENOENT; + + ret = of_property_read_string_index(node, "ext-fem-name", 0, &fem_name); + if (ret) + return -ENOENT; + + /* + * If external Front End module used in hardware, then default base band timing + * parameter cannot be used since they were fine tuned for reference hardware, + * so choosing different value suitable for that external FEM. + */ + if (!strcmp("microsemi-lx5586", fem_name)) { + bb_timing->bb_tx_timing = 0x00; + bb_timing->bb_xpa_timing = 0x0101; + } else { + return -ENOENT; + } + + ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot bb_tx_timing 0x%x bb_xpa_timing 0x%x\n", + bb_timing->bb_tx_timing, bb_timing->bb_xpa_timing); + return 0; +} + static int ath10k_start(struct ieee80211_hw *hw) { struct ath10k *ar = hw->priv; u32 param; int ret = 0; + struct wmi_bb_timing_cfg_arg bb_timing = {0}; /* * This makes sense only when restarting hw. It is harmless to call @@ -4796,6 +4830,19 @@ static int ath10k_start(struct ieee80211_hw *hw) clear_bit(ATH10K_FLAG_BTCOEX, &ar->dev_flags); } + if (test_bit(WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT, ar->wmi.svc_map)) { + ret = __ath10k_fetch_bb_timing_dt(ar, &bb_timing); + if (!ret) { + ret = ath10k_wmi_pdev_bb_timing(ar, &bb_timing); + if (ret) { + ath10k_warn(ar, + "failed to set bb timings: %d\n", + ret); + goto err_core_stop; + } + } + } + ar->num_started_vdevs = 0; ath10k_regd_update(ar); diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h index 7978a77..0466307 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h @@ -219,6 +219,9 @@ struct wmi_ops { struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value); struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar, u32 param); + struct sk_buff *(*gen_bb_timing) + (struct ath10k *ar, + const struct wmi_bb_timing_cfg_arg *arg); }; @@ -1576,4 +1579,21 @@ struct wmi_ops { ar->wmi.cmd->radar_found_cmdid); } +static inline int +ath10k_wmi_pdev_bb_timing(struct ath10k *ar, + const struct wmi_bb_timing_cfg_arg *arg) +{ + struct sk_buff *skb; + + if (!ar->wmi.ops->gen_bb_timing) + return -EOPNOTSUPP; + + skb = ar->wmi.ops->gen_bb_timing(ar, arg); + + if (IS_ERR(skb)) + return PTR_ERR(skb); + + return ath10k_wmi_cmd_send(ar, skb, + ar->wmi.cmd->set_bb_timing_cmdid); +} #endif diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 659513b..a1e8695 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -539,6 +539,7 @@ WMI_10_2_PDEV_BSS_CHAN_INFO_REQUEST_CMDID, .pdev_get_tpc_table_cmdid = WMI_CMD_UNSUPPORTED, .radar_found_cmdid = WMI_CMD_UNSUPPORTED, + .set_bb_timing_cmdid = WMI_10_2_PDEV_SET_BB_TIMING_CONFIG_CMDID, }; /* 10.4 WMI cmd track */ @@ -8839,6 +8840,27 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) return 0; } +static struct sk_buff * +ath10k_wmi_10_2_4_op_gen_bb_timing(struct ath10k *ar, + const struct wmi_bb_timing_cfg_arg *arg) +{ + struct wmi_pdev_bb_timing_cfg_cmd *cmd; + struct sk_buff *skb; + + skb = ath10k_wmi_alloc_skb(ar, sizeof(*cmd)); + if (!skb) + return ERR_PTR(-ENOMEM); + + cmd = (struct wmi_pdev_bb_timing_cfg_cmd *)skb->data; + cmd->bb_tx_timing = __cpu_to_le32(arg->bb_tx_timing); + cmd->bb_xpa_timing = __cpu_to_le32(arg->bb_xpa_timing); + + ath10k_dbg(ar, ATH10K_DBG_WMI, + "wmi pdev bb_tx_timing 0x%x bb_xpa_timing 0x%x\n", + arg->bb_tx_timing, arg->bb_xpa_timing); + return skb; +} + static const struct wmi_ops wmi_ops = { .rx = ath10k_wmi_op_rx, .map_svc = wmi_main_svc_map, @@ -9112,6 +9134,7 @@ static u32 ath10k_wmi_prepare_peer_qos(u8 uapsd_queues, u8 sp) .gen_pdev_enable_adaptive_cca = ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, + .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 58e33ab..5e18dc0 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -205,6 +205,7 @@ enum wmi_service { WMI_SERVICE_SPOOF_MAC_SUPPORT, WMI_SERVICE_TX_DATA_ACK_RSSI, WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT, + WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT, /* keep last */ WMI_SERVICE_MAX, @@ -244,6 +245,9 @@ enum wmi_10x_service { WMI_10X_SERVICE_PEER_STATS, WMI_10X_SERVICE_RESET_CHIP, WMI_10X_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, + WMI_10X_SERVICE_VDEV_BCN_RATE_CONTROL, + WMI_10X_SERVICE_PER_PACKET_SW_ENCRYPT, + WMI_10X_SERVICE_BB_TIMING_CONFIG_SUPPORT, }; enum wmi_main_service { @@ -568,6 +572,8 @@ static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out, WMI_SERVICE_RESET_CHIP, len); SVCMAP(WMI_10X_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, len); + SVCMAP(WMI_10X_SERVICE_BB_TIMING_CONFIG_SUPPORT, + WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT, len); } static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out, @@ -986,6 +992,7 @@ struct wmi_cmd_map { u32 pdev_wds_entry_list_cmdid; u32 tdls_set_offchan_mode_cmdid; u32 radar_found_cmdid; + u32 set_bb_timing_cmdid; }; /* @@ -1601,6 +1608,8 @@ enum wmi_10_2_cmd_id { WMI_10_2_SET_LTEU_CONFIG_CMDID, WMI_10_2_SET_CCA_PARAMS, WMI_10_2_PDEV_BSS_CHAN_INFO_REQUEST_CMDID, + WMI_10_2_FWTEST_CMDID, + WMI_10_2_PDEV_SET_BB_TIMING_CONFIG_CMDID, WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1, }; @@ -7153,6 +7162,23 @@ struct wmi_pdev_chan_info_req_cmd { __le32 reserved; } __packed; +/* bb timing register configurations */ +struct wmi_bb_timing_cfg_arg { + /* Tx_end to pa off timing */ + u32 bb_tx_timing; + + /* Tx_end to external pa off timing */ + u32 bb_xpa_timing; +}; + +struct wmi_pdev_bb_timing_cfg_cmd { + /* Tx_end to pa off timing */ + __le32 bb_tx_timing; + + /* Tx_end to external pa off timing */ + __le32 bb_xpa_timing; +} __packed; + struct ath10k; struct ath10k_vif; struct ath10k_fw_stats_pdev;