Received: by 10.213.65.68 with SMTP id h4csp38387imn; Tue, 27 Mar 2018 15:54:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Quwfg/olstnCRvCJTil3JFhgNT3FyeGUmo/jg9TWFJdUWmHW9jZhY4bcXt07WkFF0GOFk X-Received: by 10.98.253.17 with SMTP id p17mr896195pfh.105.1522191249756; Tue, 27 Mar 2018 15:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522191249; cv=none; d=google.com; s=arc-20160816; b=n0S0RhLTOYixQSQfW1SBbOamv7BDD4wc4ykd4yCZ288t5CRlCQ521kLAdd9VX4RSMW 8A1sSXkozL9kT1dkyLhVYiaruj8dWvSh593AMbFD4VoWlEZvs+PheZ5yTMcYdnTJVSfq wRnLF53aIpkDv4oZrLV2zT1X7p0+F6Q6W5NqXrxbPraLRqLtrg8mZGz72qYxh5B0pw3j 0c+z/xQd+I2dPMY4NoXpwEf7fSymUfI6ZGHWViSv5V1aVd7aeSi/0mUII9ZnRQNMcqfv PFKdeXl0lDg/biscFYvZO3rJlWZi1LaYSXyBcA1oJhQXE9WH68W4gIyHvjrrVLVia5Ox gMjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=6z1C9M/g6+jVh5OhpsaXinmsCsA0c526c4rmFNIphcQ=; b=A4BPyGyk+XVYRcNvlqbWPVr6tvx0DL3OJ6ZjxfR5QEQney8DcSKLoAIQqgXlmsfZYJ qMX19S5jS5nevKZBGOO94nRJ/Xd5iUlNtEZK4ABwUVTNwV9t3Ln5XN6ujqYZ3gEfQ1Fm AGjYqkXweaDpg+vBU+1ikzGowW5Gj7OfDZiEW9JTPabAGkEHC0XZSQsTAwDDG4R6TOj+ BoIfrjK2gk/tl7l6tUe9AcvvAhRsZP3idl2ptbx4VpqoK5ITenBax8tQ91C7/reNA/b8 /a8+4JZOrvpxIcOxk93NUXyNPE18M1DugKHK9zL2/aLDTKcx59OAVMWydA9PlXYh5Yn6 zMbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=hjQTA92J; dkim=fail header.i=@chromium.org header.s=google header.b=a39GbQLW; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s87si1696409pfk.141.2018.03.27.15.53.53; Tue, 27 Mar 2018 15:54:09 -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=fail header.i=@google.com header.s=20161025 header.b=hjQTA92J; dkim=fail header.i=@chromium.org header.s=google header.b=a39GbQLW; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbeC0Wwu (ORCPT + 99 others); Tue, 27 Mar 2018 18:52:50 -0400 Received: from mail-ua0-f169.google.com ([209.85.217.169]:40494 "EHLO mail-ua0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752128AbeC0Wwr (ORCPT ); Tue, 27 Mar 2018 18:52:47 -0400 Received: by mail-ua0-f169.google.com with SMTP id n20so353568ual.7 for ; Tue, 27 Mar 2018 15:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6z1C9M/g6+jVh5OhpsaXinmsCsA0c526c4rmFNIphcQ=; b=hjQTA92JbyRnzH1D4eX4amdugpMsVxURd+lr4sPgNhUrcpcaHDIdsxF34WnmsRN73i qG0cqH6PlpdnlnGv7oyk65iY8ltsPwUn00Qri3zSjt+zKKkO0pDqHfQZPQqRQBi9AjZD u77ehPC3EQTmnuXpAb65aDrT8cF3V0u2uhOnKw2C0qZwFqw6nd5Aw1g6pCa9zYGm07p5 UM8EE5vC3TvkAMt6S6I8nkMbAyjd3pFHxthqMzunh8VLZColWjwz+NdYEPf1pLtqCxHB ovox0amCb2NPgkG57wbv7uNnB8kP47Fdq/XmFxzfv3qfSGIoG+kCFabD3x19ldyV4uzm JVmw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6z1C9M/g6+jVh5OhpsaXinmsCsA0c526c4rmFNIphcQ=; b=a39GbQLWuwAA5tlV9hyQfCN1BvnT6k+5iozjn2N5wXiU2qdztjcHh03uS7Py4OnsrI tK8pahOx/qhm9l3HViTVcaHzXz5yutTaHjighs6UdpC8TOEX74Y+ohbijP1iLxpa0+WM cqyeRyRlBGDMHJNd8U7Seh6DvF7dtdfa+5Rdg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=6z1C9M/g6+jVh5OhpsaXinmsCsA0c526c4rmFNIphcQ=; b=noWc+pAAAm7Cz1TdCwotUFNsQqcS4IyDt61SSW4Bv6xmT9DC3duevgPKAyEBnm1Auv nkP9QymKuCzocESdntXjEPGsHX9S6n46+FlPtwLJ0AIOdTvyYxDAx2I9kaT6Hdqlkg/0 ZBC0wavj5ssCRFSLADarRAhTRk6YPs6aMFj7T0HYEI4/aVy3MMDGIm+G7gz8XWkjG8oq EmwxngO9rWWXoMMdBrUH68bQXZXjFZFHLcRJonIoGfz8ntDCN1GVXvMMAHIF7FEEvWtr D/8tP5aOyN2YWaNf9//iFP1z3lTuinR4FpNz7wNkFVyK4R2jZ6mEoQm/+By4cUaNffLR KSrw== X-Gm-Message-State: AElRT7HHrQL1SbAzTiMAvnhuFW08rq2vlNRCw8BMrhmki2Yb290P1i0A ryJpckUBcLKc6dVaTy1UG5nilp6xtq+h4jNL0lvd+A== X-Received: by 10.176.92.33 with SMTP id q33mr976106uaf.108.1522191165847; Tue, 27 Mar 2018 15:52:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.4.8 with HTTP; Tue, 27 Mar 2018 15:52:44 -0700 (PDT) In-Reply-To: <1521785487-29866-7-git-send-email-mgautam@codeaurora.org> References: <1521785487-29866-1-git-send-email-mgautam@codeaurora.org> <1521785487-29866-7-git-send-email-mgautam@codeaurora.org> From: Doug Anderson Date: Tue, 27 Mar 2018 15:52:44 -0700 X-Google-Sender-Auth: OXDnL3bqRLJb-Z0BnswufliTALo Message-ID: Subject: Re: [PATCH v3 6/6] phy: qcom-qusb2: Add QUSB2 PHYs support for sdm845 To: Manu Gautam Cc: Kishon Vijay Abraham I , LKML , devicetree@vger.kernel.org, Rob Herring , linux-arm-msm@vger.kernel.org, Vivek Gautam , Stephen Boyd , Krzysztof Kozlowski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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... 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. 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. -Doug