From patchwork Mon Apr 1 09:19:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10879473 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 C79CA1908 for ; Mon, 1 Apr 2019 09:19:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB4902846F for ; Mon, 1 Apr 2019 09:19:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D2DB284A5; Mon, 1 Apr 2019 09:19:42 +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 9B9DD28488 for ; Mon, 1 Apr 2019 09:19:41 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=j/KZCXjccT62Xg1VHnFDSyuIOLLqt/m8JRRHDO5Ngm0=; b=n+zcuOjwAdUY7N T9qtBPJImJs4jc/yYFBMb14ujQGTFro9iFwDHr94ydNbhh4vBMAWG1a2pWpQ/VyCWly6OATtYP3DK zo2XUY+dOw42VokV2e8wZFSVSA7CV5PpC39V953XoNH7IGEB3yQlfXxe/HJ6gJ2I4Rd2dgH1nRn2N tY1rivODLYl8gNFP/qaQckHAdHmvy3TOA9V461Vlfvp3+C+kU7LV0bn4OxFZhU6nyU7Ie5W1XfmxX zlD98VihEGVJCZyjjG31Zza/K75QUvQfrUm1RHqJNINm7DgZQFAL9hsBVWIcar5c48hkgNmcV3292 fIGtrnzmfbarwM6NwTXA==; 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 1hAt6S-0002IL-DW; Mon, 01 Apr 2019 09:19:40 +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 1hAt6P-0002Hv-So for ath10k@lists.infradead.org; Mon, 01 Apr 2019 09:19:39 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B458B61DFC; Mon, 1 Apr 2019 09:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554110376; bh=thza7iCw+vvPm9lX1K2Lsc3W5awbW1OYBjHgX+WVaF0=; h=From:To:Cc:Subject:Date:From; b=iVcNc3UEq6I906w+CA/SdU79omSMkw8NDUfKVVAi9pXQf9nqq+tsCntcAkWAVgOb0 dfuAN0ORSTUA8w6eh+ahrJpgod46zciq1FCKkwFmWDWM1XBxFXTRhggIrjjjRlXZP7 mUgv14H4VxX9aYMvVQqD+kYvhM8hccpG2etXc9mo= 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 EC97F61D81; Mon, 1 Apr 2019 09:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554110376; bh=thza7iCw+vvPm9lX1K2Lsc3W5awbW1OYBjHgX+WVaF0=; h=From:To:Cc:Subject:Date:From; b=iVcNc3UEq6I906w+CA/SdU79omSMkw8NDUfKVVAi9pXQf9nqq+tsCntcAkWAVgOb0 dfuAN0ORSTUA8w6eh+ahrJpgod46zciq1FCKkwFmWDWM1XBxFXTRhggIrjjjRlXZP7 mUgv14H4VxX9aYMvVQqD+kYvhM8hccpG2etXc9mo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EC97F61D81 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, robh@kernel.org Subject: [PATCH v3 0/2] Add xo calibration support for wifi rf clock Date: Mon, 1 Apr 2019 14:49:24 +0530 Message-Id: <20190401091926.19119-1-govinds@codeaurora.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190401_021937_943262_8F8082DB X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. 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, Govind Singh , linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP PMIC XO is the clock source for wifi rf clock in integrated wifi chipset ex: WCN3990. Due to board layout errors XO frequency drifts can cause wifi rf clock inaccuracy. XO calibration test tree in Factory Test Mode is used to find the best frequency offset(for example +/-2KHz )by programming XO trim register. This ensure system clock stays within required 20 ppm WLAN rf clock. Retrieve the xo trim offset via system firmware (e.g., device tree), especially in the case where the device doesn't have a useful EEPROM on which to store the calibrated XO offset (e.g., for integrated Wifi). Calibrated XO offset is sent to fw, which compensate the clock drift by programing the XO trim register. Testing: Tested on QCS404 platform(WCN3990 HW) Tested FW: WLAN.HL.3.1-00959-QCAHLSWMTPLZ-1 change since v2: Added "qcom," prefix in xo cal prop. change since v1: Added return check for case where xo cal dt is not populated. Govind Singh (2): dt: bindings: add dt entry for XO calibration support ath10k: Add xo calibration support for wifi rf clock .../devicetree/bindings/net/wireless/qcom,ath10k.txt | 1 + drivers/net/wireless/ath/ath10k/qmi.c | 12 ++++++++++++ drivers/net/wireless/ath/ath10k/snoc.c | 11 +++++++++++ drivers/net/wireless/ath/ath10k/snoc.h | 2 ++ 4 files changed, 26 insertions(+)