Received: by 10.213.65.68 with SMTP id h4csp158089imn; Wed, 28 Mar 2018 00:36:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx49bx/NLmz/ZDYHfhnu0Oezhz89W+yskIK7zQYGeHRq5iHP4Y5oT99CxCWhW1zzskZxMqNE9 X-Received: by 10.98.62.71 with SMTP id l68mr2056771pfa.98.1522222572026; Wed, 28 Mar 2018 00:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522222571; cv=none; d=google.com; s=arc-20160816; b=V9O6Bu2dWlI7mQq448CR1v5Kjv7cxxqlZljrI6g5/+wPdhXfRd7UOXKkp0YSmfwK+g 9N1UDX8J4h6NltFp7tMAgxEBI3ec+ILtpdDEowuYvbaILV7lPoB3NAljGnsT29PI+F5t jBhWLD2fX5H4EcbRAGEhqIC94EHHHQjhxCqiYonKXRNUMJCSy0OMnqcmgm1z4SntV28W RV59SzoKlgHVMmjBzc8t9XnvXnEiRKnx0s/ZumsJ3OHrZG6gVIRXTvV1X4AVbYgpnEET cbZIbvnZFa63eiEh7w707daDiWUqM0L8n/cbntsX87zWAqJLhK//FDS7fjQ1fLT10qZV PUng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=wZya6ASlwYfs06N1dtkB3sG9Bo+mOU7Ui6fEFl/NAmw=; b=kxkxh7A+p/RJGmmKGaMN8NNkkHGluDLvBp4c8wBpxcPzQ1Cyg0lavb2YZO5s6eNfpy olAcVE6sZjhsGrwbEwsbVsZXe0X1lwKIv6TMZHxxSfGjpigqD9YRoWLB+pSwE0tHgu8L YEgxAqj7KiuOXZdoCWMFCtzlbTeWITsZhWVrfWBRh1YTrDEpsy6q7zLqgVfVJPnGuxpy DXfYxp02ncfWCdqcAXYKczkFtQ58HFabtOot7kK4AUlPBytRUfecv6y7VFIq7sUG9aqM M4Dbjk5CNUOBhkb7N52Rl3AXEAgj4P/w7gz49DJdXYv0a0zEF1mKmYpvBEW4cYQFaZtR S75w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OgjA875I; dkim=pass header.i=@codeaurora.org header.s=default header.b=V6+9szPz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si2386139pfs.116.2018.03.28.00.35.57; Wed, 28 Mar 2018 00:36:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OgjA875I; dkim=pass header.i=@codeaurora.org header.s=default header.b=V6+9szPz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753381AbeC1He1 (ORCPT + 99 others); Wed, 28 Mar 2018 03:34:27 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:45488 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752547AbeC1HeY (ORCPT ); Wed, 28 Mar 2018 03:34:24 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 973C660BFA; Wed, 28 Mar 2018 07:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522222463; bh=S67dGyzDZMD1yqaBuQjDN9VrcF/MNMp3u9oJCGD2z/0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=OgjA875IErpUQytnteF1pTsugk/dxTy3at0m2zCd/TGrguqHfcvMRUCvIgGzeK5lY 6HbVpFjNoUDa/Xm2ZcqCyAvQnHy78wBpvYdNAcPoYGfWWgAeNTwiTi7pp9SnLJtVKC ssXLt7e+SWvqE+Z/GgHMpVez2MpmpZTS38wiGyd8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.206.25.65] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgautam@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A5AF0603AF; Wed, 28 Mar 2018 07:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522222462; bh=S67dGyzDZMD1yqaBuQjDN9VrcF/MNMp3u9oJCGD2z/0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=V6+9szPzbK8OLYtWAnzdpU6CxzEDgwTUy0Wlvlt6joHK8ukBTAZv4Bfjsr77cH2+r Nm8tqI0Bvf+vsM+JbBF9LqMOHEIo+5IQ048ZopVkNzIevUI0jFqLwPcPpVoQYnxOZE 6buCjzyx5mDEtSVwK2uRUV2IfL5+oDmtBglIcwr4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A5AF0603AF 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=mgautam@codeaurora.org Subject: Re: [PATCH v3 6/6] phy: qcom-qusb2: Add QUSB2 PHYs support for sdm845 To: Doug Anderson Cc: Kishon Vijay Abraham I , LKML , devicetree@vger.kernel.org, Rob Herring , linux-arm-msm@vger.kernel.org, Vivek Gautam , Stephen Boyd , Krzysztof Kozlowski References: <1521785487-29866-1-git-send-email-mgautam@codeaurora.org> <1521785487-29866-7-git-send-email-mgautam@codeaurora.org> From: Manu Gautam Message-ID: Date: Wed, 28 Mar 2018 13:04:17 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 3/28/2018 4:22 AM, Doug Anderson wrote: > Hi, > > On Thu, Mar 22, 2018 at 11:11 PM, Manu Gautam wrote: >> There are two QUSB2 PHYs present on sdm845. Update PHY >> registers programming for both the PHYs related to >> electrical parameters to improve eye diagram. > This tuning difference is truly associated with the SoC itself? Are > you sure? Are the two different PHYs in the SoC somehow using > different silicon processes? ...or is one close to another IP block > that is noisy? ...or something else to account for this difference? > > It seems more likely that this tuning difference is associated with > the board. If you're _certain_ this is really due to internal SoC > differences you'll have to come up with some darn good evidence to > convince me... This difference must be due to board only. > > If the tuning is truly associated with the board then: > > 1. You should have a single device tree compatible string. IMHO it > should contain the name of the SoC in it, so "qcom,sdm845-qusb2-phy". > It's generally OK to name something in Linux using the name of the > first thing that happened to support it in Linux (even if later > processors use the exact same component). Leaving it as just > "qcom,qusb2-v2-phy" is OK with me too if that's what everyone wants. I will remove "qcom,qusb2-v2-phy" as I don't expect any users of that. > > > 2. You should figure out how to describe the needed board-to-board > tuning in device tree. > > The only two differences you have right now are: > > QUSB2PHY_IMP_CTRL1: 0 => 0x8 > QUSB2PHY_PORT_TUNE1: 0x30 => 0x48 > > I'm not sure I found all the correct documentation for the PHY (the > docs I have say that "TUNE1" bit 3 is "reserved") so I can't come up > with all of these for you. But I think I found the difference > accounting for the upper nybble of TUNE1 changing from 0x3 to 0x4. > For this, I think you'd want a device tree property like: > > qcom,hstx_trim_mv > > ...and the values of that property would be the values from 800 to 950 > in 8 steps, or [800, 821, 842, 864, 885, 907, 928, 950]. > > You'd want to do similar things for the other differences. > > You don't need to encode every possible difference right now. When > you come up with something that needs to be different you add a new > optional device tree property (defaulting to whatever the driver used > to do) to describe your new property. Sure. I will come up with separate device tree properties to specify board-to-board differences in PHY tuning. > > -Doug -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project