Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1412034ybb; Wed, 1 Apr 2020 23:42:02 -0700 (PDT) X-Google-Smtp-Source: APiQypIbcYGT6WnZ3r82s/7V8VygG23qaf9zCLTOvKi0EWAOdEFCqKbPQpJGO7tQ5q7pfy68PjCY X-Received: by 2002:a05:6808:b3b:: with SMTP id t27mr1221059oij.5.1585809722294; Wed, 01 Apr 2020 23:42:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585809722; cv=none; d=google.com; s=arc-20160816; b=FKQ+foHsoXYRmKanFRt9ZCa+RX3Zr8P9kI6+KmoLoyeCqUkd8c/0h5iOB0MRlF39c2 EfQfl+tl9IJPT/HUTAHMjd4M5TPGMyvkfzOQ2I3pc3hgFChNRmeWcL1wTbivvSdNvGij xch7hYnfDOeykpsTzBB+buJxvdoxwQsfehrhUgPqQSuVNz7CAlU0TpngAkYPfKOd1Vsv x3y1a09iEkNGEgiEWsQk68Im+yxxLh1CurRkcD12nO8QSuKwLbzm8pT9U/42bIgLk7BG hhcqk06Z7coedGz+RnP03BH7rG2kRrLqLwFj/3Z+z4+iP4qNWVTEqOVTGHArJd9eZK0T 5AjQ== 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=IqM2b9RxYS3K1ChaBiF7DrY4P70eYZUE8aSlPBvYvQg=; b=p5uMw7milXOovAwJREazfU26rmLX5Icfq+VdLnAb0M2zKvlLccSPQLjtvTQils5jBI MQL2XSjmgRFRjEhqzGpCXZuMYJ9r1e67EJ0N1RCclOd61uzhuOZE70G5ATiIZxT9USAD 5QguCEbE9IzylDxVSORTMxj3WCAsYRkuoVb56yus3Ht9oH/eUQGzjgpOYTr0MfopHTLV UqrO8Nz29Rq7lRv9bCuGhk7hTozEQaXy+INKPO5JdT9k+/stZiG50cGD5o3LYBCjWd4z tek8QR0UKW7btbOsAUKoZ/SGba0mGMAJmgnuoHAoB0Tf8NYUq9d9c36zrEuBQDs0nmrI eLhg== 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 h27si1966701ots.293.2020.04.01.23.41.50; Wed, 01 Apr 2020 23:42:02 -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; 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 S1729164AbgDBGkD (ORCPT + 99 others); Thu, 2 Apr 2020 02:40:03 -0400 Received: from alexa-out-blr-02.qualcomm.com ([103.229.18.198]:36979 "EHLO alexa-out-blr-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728974AbgDBGkD (ORCPT ); Thu, 2 Apr 2020 02:40:03 -0400 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-02.qualcomm.com with ESMTP/TLS/AES256-SHA; 02 Apr 2020 12:09:57 +0530 Received: from c-sanm-linux.qualcomm.com ([10.206.25.31]) by ironmsg01-blr.qualcomm.com with ESMTP; 02 Apr 2020 12:09:42 +0530 Received: by c-sanm-linux.qualcomm.com (Postfix, from userid 2343233) id C260219F8; Thu, 2 Apr 2020 12:09:41 +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, Manu Gautam , Sandeep Maheswaram Subject: [PATCH v5 3/3] phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180 Date: Thu, 2 Apr 2020 12:08:54 +0530 Message-Id: <1585809534-11244-4-git-send-email-sanm@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1585809534-11244-1-git-send-email-sanm@codeaurora.org> References: <1585809534-11244-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. Adding only usb phy reset in the list to avoid reset of DP block. Signed-off-by: Sandeep Maheswaram Reviewed-by: Matthias Kaehlcke --- 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 c190406..d9d3e2f 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -1458,6 +1458,10 @@ static const char * const msm8996_usb3phy_reset_l[] = { "phy", "common", }; +static const char * const sc7180_usb3phy_reset_l[] = { + "phy", +}; + static const char * const sdm845_pciephy_reset_l[] = { "phy", }; @@ -1671,6 +1675,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, @@ -2516,6 +2551,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-qhp-pcie-phy", .data = &sdm845_qhp_pciephy_cfg, }, { -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation