From patchwork Wed Mar 20 04:45:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10860749 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 A724C13B5 for ; Wed, 20 Mar 2019 04:45:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E01329A05 for ; Wed, 20 Mar 2019 04:45:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8222E29A03; Wed, 20 Mar 2019 04:45:33 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D00B28B7C for ; Wed, 20 Mar 2019 04:45:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726006AbfCTEpS (ORCPT ); Wed, 20 Mar 2019 00:45:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53934 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbfCTEpS (ORCPT ); Wed, 20 Mar 2019 00:45:18 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2691D60E57; Wed, 20 Mar 2019 04:45:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1553057118; bh=4vSItePpkN/PzC6k1gCpKDYgoD9uLTJnbp2OQFNBqY0=; h=From:To:Cc:Subject:Date:From; b=eCccvDjajwnLlcKaLphG9m97L+q2ebUSjmSAp8f9rqnJJ2KtueozjI/vlr3F5AOLd oCFJDUUfTkVEfKY0an6UqRQmhH6cNgBKnhpF+qJD2Ns9tivEo5GXymGdkHg3ySAvOp duCp3oPK3zb2FV0iB2lrMmopakwUffQLHTUwhn5A= 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 2ACFB6087A; Wed, 20 Mar 2019 04:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1553057117; bh=4vSItePpkN/PzC6k1gCpKDYgoD9uLTJnbp2OQFNBqY0=; h=From:To:Cc:Subject:Date:From; b=iPFLKn5h21V0Y//QFiqXGtJ91cuo5Yxcv4LKMjR3g0fCSzGfuaEfbRWYf4Gf/nczE /5To5v7x0i68z2AaR2u/A6GsaWVw8x+PExJYZUt2b9xCvPIA4yUq1XZglU5kCz1dWq 9BMOLNJrEV5MRseckG3SIlH7GGH0U8Xv3sfZsilU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2ACFB6087A 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 Cc: linux-wireless@vger.kernel.org, Govind Singh Subject: [PATCH v2 0/2] Add xo calibration support for wifi rf clock Date: Wed, 20 Mar 2019 10:15:09 +0530 Message-Id: <20190320044511.12172-1-govinds@codeaurora.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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 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(+)