Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp703221ybl; Wed, 8 Jan 2020 04:32:35 -0800 (PST) X-Google-Smtp-Source: APXvYqwnwbN8x1JZ0kA2piUGdL+IRxkzbJ2L4oVG+q/mOQ65GJf/KNfAAs7oZS3skTRB2OCRPr7+ X-Received: by 2002:aca:5303:: with SMTP id h3mr2635569oib.109.1578486755239; Wed, 08 Jan 2020 04:32:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578486755; cv=none; d=google.com; s=arc-20160816; b=ecqRUz+sfZ/C8xk1stjT5I3ztvpheRUp8Hy1WGqVskDXHIAmnOnjUt3RWV8VOBFeOs JN4l1lDz2xck3cU1/xjo/BeG51GkL7HxorWPJ4WfwH81BZglasTkZkezV3cs0BOffuyG ZvzR0nz7+jLHrZJPyrjhlXmsR5b+/+p3cs+TBxsABneqE3ljpQMUNnS53YY7O8SGjzWa j65Cm7oBwI7yZ4KeoiJphK6buGoX73zbljtBxi4DK+uv7ssceqkkdDv9WN0lvYPNqlQE 9zeVpQJ3dM48JT175iZWjbHeIvl9aRgu5Et3CrWwMvTX0fi5QkJAUoq5sftTAuKwWaTF 2qkA== 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=s96ESp9z4CGIFQz+GWN/0GCwe/e2Wl0Auc5P3hJQW3o=; b=iHw1kQat1kp7chdbWig+od5jpZDulH4Oc5mzJ+W8yOwnd9FI9rCf1BRMbvrBoy9MqJ BmHFbFZ3rEh3RjFw6PfDRyLoUinIZWcQynKcZEo0sXeo8NSyZV6h2pJm5CDlTsAiSoCT +ixiTU9WojYv+lwKTy7zZkGfEgeyRYE2ipEjGLPzVIlNlvSqzQK7gkHxqH5JG5EWvZ1j xzFkExQrUEyA9gmnQ/lEsu2mRZop99QYhWNibETJu/YmohV7frXDuCnRgNJQXbikj0EJ f3BrRDSGR+24iLxyltgIKHwjeJ4DIs0NJEsc+1onuBHjCHgoLaYJ8QmRPkWdeIok4N60 BxSA== 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 y8si1786271otg.309.2020.01.08.04.32.23; Wed, 08 Jan 2020 04:32:35 -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 S1727954AbgAHMbL (ORCPT + 99 others); Wed, 8 Jan 2020 07:31:11 -0500 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:61031 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbgAHMbG (ORCPT ); Wed, 8 Jan 2020 07:31:06 -0500 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 08 Jan 2020 18:00:19 +0530 Received: from c-sanm-linux.qualcomm.com ([10.206.25.31]) by ironmsg01-blr.qualcomm.com with ESMTP; 08 Jan 2020 18:00:00 +0530 Received: by c-sanm-linux.qualcomm.com (Postfix, from userid 2343233) id 846CD1AA2; Wed, 8 Jan 2020 17:59:59 +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 v2 1/3] phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180 Date: Wed, 8 Jan 2020 17:59:39 +0530 Message-Id: <1578486581-7540-2-git-send-email-sanm@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1578486581-7540-1-git-send-email-sanm@codeaurora.org> References: <1578486581-7540-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 Adding QMP v3 USB3 phy support for SC7180. Signed-off-by: Sandeep Maheswaram --- drivers/phy/qualcomm/phy-qcom-qmp.c | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 7db2a94..dc300a9 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -1139,6 +1139,10 @@ static const char * const msm8996_usb3phy_reset_l[] = { "phy", "common", }; +static const char * const sc7180_usb3phy_reset_l[] = { + "phy", +}; + /* list of regulators */ static const char * const qmp_phy_vreg_l[] = { "vdda-phy", "vdda-pll", @@ -1265,6 +1269,37 @@ static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = { .is_dual_lane_phy = true, }; +static const struct qmp_phy_cfg sc7180_usb3phy_cfg = { + .type = PHY_TYPE_USB3, + .nlanes = 1, + + .serdes_tbl = qmp_v3_usb3_serdes_tbl, + .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl), + .tx_tbl = qmp_v3_usb3_tx_tbl, + .tx_tbl_num = ARRAY_SIZE(qmp_v3_usb3_tx_tbl), + .rx_tbl = qmp_v3_usb3_rx_tbl, + .rx_tbl_num = ARRAY_SIZE(qmp_v3_usb3_rx_tbl), + .pcs_tbl = qmp_v3_usb3_pcs_tbl, + .pcs_tbl_num = ARRAY_SIZE(qmp_v3_usb3_pcs_tbl), + .clk_list = qmp_v3_phy_clk_l, + .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l), + .reset_list = sc7180_usb3phy_reset_l, + .num_resets = ARRAY_SIZE(sc7180_usb3phy_reset_l), + .vreg_list = qmp_phy_vreg_l, + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), + .regs = qmp_v3_usb3phy_regs_layout, + + .start_ctrl = SERDES_START | PCS_START, + .pwrdn_ctrl = SW_PWRDN, + + .has_pwrdn_delay = true, + .pwrdn_delay_min = POWER_DOWN_DELAY_US_MIN, + .pwrdn_delay_max = POWER_DOWN_DELAY_US_MAX, + + .has_phy_dp_com_ctrl = true, + .is_dual_lane_phy = true, +}; + static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = { .type = PHY_TYPE_USB3, .nlanes = 1, @@ -2103,6 +2138,9 @@ static const struct of_device_id qcom_qmp_phy_of_match_table[] = { .compatible = "qcom,ipq8074-qmp-pcie-phy", .data = &ipq8074_pciephy_cfg, }, { + .compatible = "qcom,sc7180-qmp-usb3-phy", + .data = &sc7180_usb3phy_cfg, + }, { .compatible = "qcom,sdm845-qmp-usb3-phy", .data = &qmp_v3_usb3phy_cfg, }, { -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation