Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp571224ybl; Wed, 29 Jan 2020 05:54:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyvCnUYmbQVg9L99MHN5/g9A80XEqPxz/UZCAOQoLLwqcOg7lvlIpIQxGEUxI72hLRuv8JE X-Received: by 2002:aca:3182:: with SMTP id x124mr6570994oix.170.1580306058413; Wed, 29 Jan 2020 05:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580306058; cv=none; d=google.com; s=arc-20160816; b=SAjag/YPcwbI5exGxnTrJKfdB+3Ewxg4BkgK/kaFkMhtHjGCc8cgxcs9o2fpcfrEmP hxO9hiMuITyyAeDAqhfvdrcMBsi7X9AeIHLKGZ7lKaRXjxHrD+ewnLU2UVW9aQzD2n5q 4bPzBTKZhPzZauRQRtDVYRGljKLpYozDeVY35e66boiAoerIym6uMLuTq4XxBgxQUw3x 6D6jbi8yOUR0ad6iIDAhzsm40UlCO8fqs46dTuPKGTBAH/GYxCG96bJu66ha0ilA9jnI GMRHWjLu9uNlccI9UOaqdbTV46Jpd/4fpjPpCaUzuFQn1HTWmT+HRy+K0hbsQaHpzFgn KtMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=KN00LDxhJRKhJKRo9LFuRxOTMRfyiiDJLgwAnvZiyxc=; b=cM83QXcmsuCRPhXRshdjojd1tJgHwRpdmNv5lxmRe4qgJxsJe6FiGGCe54QMoJE2Rk RuqbgSs34u3YXyxZsEpOSvDv+iy1z39uUlaSIO3UbXshpGSCmgO0byHoGqEdkDnP7N5V VTO9LaZJ/BK6zIk283a4TcjjKjBX5CiXHKCM4coSCAGTxYVH6COpNJZ96z4fj/aD4j8b Bkjzae/+FXXbibFYZAVbPtoG9h4l3ZE5x3X/ZWA4yEdUBN8pzdntjfVbs/U5L/MAvgcL 5AUbgXgRvBoGE8/Mh3Bl2ZkPpkp8brvptOo37S+VZoU5uoTuXkRsy6i9s/XZIya/hgYZ L7UQ== ARC-Authentication-Results: i=1; mx.google.com; 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 y20si1193534otq.190.2020.01.29.05.54.06; Wed, 29 Jan 2020 05:54:18 -0800 (PST) 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; 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 S1726856AbgA2Nwg (ORCPT + 99 others); Wed, 29 Jan 2020 08:52:36 -0500 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:11994 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726824AbgA2Nwe (ORCPT ); Wed, 29 Jan 2020 08:52:34 -0500 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 29 Jan 2020 19:22:26 +0530 Received: from c-sanm-linux.qualcomm.com ([10.206.25.31]) by ironmsg01-blr.qualcomm.com with ESMTP; 29 Jan 2020 19:22:07 +0530 Received: by c-sanm-linux.qualcomm.com (Postfix, from userid 2343233) id E80092583; Wed, 29 Jan 2020 19:22:05 +0530 (IST) From: Sandeep Maheswaram To: Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Rob Herring , Mark Rutland , Stephen Boyd , Doug Anderson , Matthias Kaehlcke Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Sandeep Maheswaram Subject: [PATCH v4 3/8] phy: qcom-qusb2: Add generic QUSB2 V2 PHY support Date: Wed, 29 Jan 2020 19:21:54 +0530 Message-Id: <1580305919-30946-4-git-send-email-sanm@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1580305919-30946-1-git-send-email-sanm@codeaurora.org> References: <1580305919-30946-1-git-send-email-sanm@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add generic QUSB2 V2 PHY table so the respective phys can use the same table. Signed-off-by: Sandeep Maheswaram --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c index bf94a52..70c9da6 100644 --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved. */ #include @@ -177,7 +177,7 @@ static const struct qusb2_phy_init_tbl msm8998_init_tbl[] = { QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_DIGITAL_TIMERS_TWO, 0x19), }; -static const unsigned int sdm845_regs_layout[] = { +static const unsigned int qusb2_v2_regs_layout[] = { [QUSB2PHY_PLL_CORE_INPUT_OVERRIDE] = 0xa8, [QUSB2PHY_PLL_STATUS] = 0x1a0, [QUSB2PHY_PORT_TUNE1] = 0x240, @@ -191,7 +191,7 @@ static const unsigned int sdm845_regs_layout[] = { [QUSB2PHY_INTR_CTRL] = 0x230, }; -static const struct qusb2_phy_init_tbl sdm845_init_tbl[] = { +static const struct qusb2_phy_init_tbl qusb2_v2_init_tbl[] = { QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_ANALOG_CONTROLS_TWO, 0x03), QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_CLOCK_INVERTERS, 0x7c), QUSB2_PHY_INIT_CFG(QUSB2PHY_PLL_CMODE, 0x80), @@ -258,10 +258,10 @@ static const struct qusb2_phy_cfg msm8998_phy_cfg = { .update_tune1_with_efuse = true, }; -static const struct qusb2_phy_cfg sdm845_phy_cfg = { - .tbl = sdm845_init_tbl, - .tbl_num = ARRAY_SIZE(sdm845_init_tbl), - .regs = sdm845_regs_layout, +static const struct qusb2_phy_cfg qusb2_v2_phy_cfg = { + .tbl = qusb2_v2_init_tbl, + .tbl_num = ARRAY_SIZE(qusb2_v2_init_tbl), + .regs = qusb2_v2_regs_layout, .disable_ctrl = (PWR_CTRL1_VREF_SUPPLY_TRIM | PWR_CTRL1_CLAMP_N_EN | POWER_DOWN), @@ -774,8 +774,8 @@ static const struct of_device_id qusb2_phy_of_match_table[] = { .compatible = "qcom,msm8998-qusb2-phy", .data = &msm8998_phy_cfg, }, { - .compatible = "qcom,sdm845-qusb2-phy", - .data = &sdm845_phy_cfg, + .compatible = "qcom,qusb2-v2-phy", + .data = &qusb2_v2_phy_cfg, }, { }, }; -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation