Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp486508ybh; Wed, 11 Mar 2020 05:06:34 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuMjmRrLSXKHDMybkCiFI7vBuG7GiLK0ckjpjWhKz36ln5IwZuEbeldCDAHt637e+1x+lW+ X-Received: by 2002:a9d:7c9a:: with SMTP id q26mr2166545otn.206.1583928394475; Wed, 11 Mar 2020 05:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583928394; cv=none; d=google.com; s=arc-20160816; b=zrhQPg/6TzMzR2SylNhupse2uUWdjPuUFVrmMocteyK+69E0R8joMF/5eWIQ/wZTvl SWvXvY7OrGms0v0bKcNx4gdnAuJo3hEs3oYN+SfWRt5ee6yZmlvkLTibuIEH8qHmvYjE ATpAktkmf181UpHrTjfKZsFNHL/RIYiU9VLCtPt/3jC2w2MefB7Ed9q/8ougoUJvL02c c3rhaTuNW8Q2HhcYk3ieyHuKwCC3buFWTK+onfTI69diD5sPeRBP1I2ygoRm/xFAcs/T mbf3TFfpoGq3g7+4uQwk5Cba7hoC2GLud/dItu4Rmn8QpowdKClWazKIlqOpk/1TU4DQ lxEQ== 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=WpZ39EY29e7EL++wF8numoSy4hlTirwd8lrvZmAybVE=; b=O8hlvVEehJcGU61w0S2/Jb+wGTKIGs7xOXzJSAnwgUxzeQbTd06niDiNvk9h25yVo1 +SEHkj8vSrkxXHqXrmn1y0o4z/s6dOc3oV0564pK3TnXfaiGQxDAaUZ8mymYbU1HXRFA gQJHM/n8EqEfzk0i6wPJWqY9DqaVKtOldhFYPpHHB0G7KnuGxhTW4yZQYCvm8thkM7Jw qFB52f3DMhXYMJYZmr995BP+ZbiRLliW1qMZbASWV5N95o+S+IBRn5cvax2cZhmzkUUA vwObQeAR5fSjFO8g0KC8r516oOokoL7ABL7U5DyVH8CzP5mUwatClSo3XHHw5Kobznu4 z2+w== 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 h10si970197oie.63.2020.03.11.05.06.22; Wed, 11 Mar 2020 05:06:34 -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 S1729309AbgCKME5 (ORCPT + 99 others); Wed, 11 Mar 2020 08:04:57 -0400 Received: from alexa-out-blr-02.qualcomm.com ([103.229.18.198]:62732 "EHLO alexa-out-blr-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729084AbgCKMEz (ORCPT ); Wed, 11 Mar 2020 08:04:55 -0400 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-02.qualcomm.com with ESMTP/TLS/AES256-SHA; 11 Mar 2020 17:34:47 +0530 Received: from c-sanm-linux.qualcomm.com ([10.206.25.31]) by ironmsg01-blr.qualcomm.com with ESMTP; 11 Mar 2020 17:34:27 +0530 Received: by c-sanm-linux.qualcomm.com (Postfix, from userid 2343233) id A712E26C2; Wed, 11 Mar 2020 17:34:26 +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 v4 3/4] phy: qcom-qmp: Add QMP V3 USB3 PHY support for SC7180 Date: Wed, 11 Mar 2020 17:34:11 +0530 Message-Id: <1583928252-21246-4-git-send-email-sanm@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583928252-21246-1-git-send-email-sanm@codeaurora.org> References: <1583928252-21246-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 9733d75..be61f03 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -1380,6 +1380,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", }; @@ -1568,6 +1572,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, @@ -2410,6 +2445,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