Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp635459ybl; Fri, 10 Jan 2020 04:21:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyiOP6tmT2xu0DXeqzTdHkTWytjfAsMqKvffRMKWKScVpKsE863BOmv9Y0U4YohOxNF5Oaf X-Received: by 2002:a05:6830:1353:: with SMTP id r19mr2415418otq.288.1578658917750; Fri, 10 Jan 2020 04:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578658917; cv=none; d=google.com; s=arc-20160816; b=YpXpJT0IWCZG7JK5tS3JUFAJ24IbZNAsGg9iCB0oXR6PWOyHDBZ7sr3gYs9XUzSTFV qAPePqP23Q29Q/1GJbGRkqNoWbb3XRTCZe9sI5FUxA7pspgEkhrR2J0rzj1JHS5mgVa4 4fXOkfST9nd1Wlh0i4F9njDHQRTqiFKaE7vBIw5bn8b+KEGNoc/syXXslix/oeVL5zTD KvwNl2jAGw429pobQ4kzqtploQP6DSBtwzClFfBMSZa1kiSFYuLt7+TNIBhbY4aQkMUk TUZoeoKlrmXwP0PReMmkUdlgDhuKHk8v0Xk1t3kOkd7KT0irFZuTWZ22O1XsMrbV+G22 c77Q== 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=m47CASzMHaVhbPY6pSIKhztRERVaeEtpnb80y01kxKk=; b=ZOLgC5sOfeSFUzPv7zCiotmGsttHVs7gBWnWNtTjm7lOc3u/CP46z1Bg7DuX2Oo/gF M858hMNtRs+uYqCup4HljerzbBIOWy/WRGmVydrKvSo04iKrS8CkAuEjHYQzXUv5karV oAwExFb0/cINBfSXwWVuzaYP9tQM86PDuUscf2C/UbzISm8OIFw5uu4qV5QXpyUSLIDs U0UlbO9NAWiq54ygkRds3Wrtaw2bqejW39Ebgvun9oIl1K812KnUyzwn53M7WJ88BGtC x5/KzR4F+B3QgOJnDt0685K6qLZXwsd7/UyMjUwaBh91XWeVUbX9DC/9hvxordABv+op ITCQ== 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 j17si1124011otl.278.2020.01.10.04.21.46; Fri, 10 Jan 2020 04:21:57 -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 S1728194AbgAJMTV (ORCPT + 99 others); Fri, 10 Jan 2020 07:19:21 -0500 Received: from alexa-out-blr-02.qualcomm.com ([103.229.18.198]:23806 "EHLO alexa-out-blr-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbgAJMTN (ORCPT ); Fri, 10 Jan 2020 07:19:13 -0500 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-02.qualcomm.com with ESMTP/TLS/AES256-SHA; 10 Jan 2020 17:49:07 +0530 Received: from c-sanm-linux.qualcomm.com ([10.206.25.31]) by ironmsg02-blr.qualcomm.com with ESMTP; 10 Jan 2020 17:48:52 +0530 Received: by c-sanm-linux.qualcomm.com (Postfix, from userid 2343233) id 1845822B4; Fri, 10 Jan 2020 17:48:51 +0530 (IST) From: Sandeep Maheswaram To: Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Rob Herring , Mark Rutland , Stephen Boyd , Doug Anderson Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Manu Gautam , Sandeep Maheswaram Subject: [PATCH v3 1/5] phy: qcom-qusb2: Add QUSB2 PHY support for SC7180 Date: Fri, 10 Jan 2020 17:48:15 +0530 Message-Id: <1578658699-30458-2-git-send-email-sanm@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578658699-30458-1-git-send-email-sanm@codeaurora.org> References: <1578658699-30458-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 Using generic cfg table for QUSB2 V2 PHY. Add QUSB2 PHY config data and compatible for SC7180. Signed-off-by: Sandeep Maheswaram --- drivers/phy/qualcomm/phy-qcom-qusb2.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c index bf94a52..db4ae26 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,14 @@ static const struct of_device_id qusb2_phy_of_match_table[] = { .compatible = "qcom,msm8998-qusb2-phy", .data = &msm8998_phy_cfg, }, { + .compatible = "qcom,sc7180-qusb2-phy", + .data = &qusb2_v2_phy_cfg, + }, { .compatible = "qcom,sdm845-qusb2-phy", - .data = &sdm845_phy_cfg, + .data = &qusb2_v2_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