From patchwork Wed Jul 21 22:56:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 483394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFEF3C6377B for ; Wed, 21 Jul 2021 22:58:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDBB261283 for ; Wed, 21 Jul 2021 22:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbhGUWRh (ORCPT ); Wed, 21 Jul 2021 18:17:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230100AbhGUWRh (ORCPT ); Wed, 21 Jul 2021 18:17:37 -0400 Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0424C0613C1 for ; Wed, 21 Jul 2021 15:58:13 -0700 (PDT) Received: by mail-ot1-x334.google.com with SMTP id b18-20020a0568303112b02904cf73f54f4bso619156ots.2 for ; Wed, 21 Jul 2021 15:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OVx4Y6jK7u4gxHBBBHFBP67+nRk3zXomiOraC96Tyvs=; b=Qt/l/1rkp7SS9H0h/4QZzmgSue+hfJumtgSAUDA8V/QViLEumTazojk2NQZ3e2MzwI ccKlnnATH1Yk6gnwUSsyx3XBpUnszE6/4bNGq+XtCQRsj6/HZl4Uzj+eu34s91oqrmlc LqWxBt6ceJN4IYRcwC6dMJ2UYJt2wnTQC4zTNHIOMLxTnd0kpWLQjdOJwZykkuGaxWZd wbOwzNa6Mr2MdKQ6Z79hQYnEpoY0IwhxH/ixEFRQ5VtHK8BmhmwMHmTpNbjg5fsXpWIA J5pb/q3iBl4jeb/rG8KvLskMVvuUKfllOB0voC7oTEUxMJvCbJ88Lw+JmGt9cw9KmgYC xpOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OVx4Y6jK7u4gxHBBBHFBP67+nRk3zXomiOraC96Tyvs=; b=a2qPIvsKcMbNQXJPHHQU0mTldVsvqyws7ZZbfIEYX8yBAEvZiCW7dZ2xljKVcm+Mn/ KkkbULtzhGiyNArWiyO6LCbnvu5dcrJOeFMR623ABEyP1JeHkWfsahEz4DHhRoeW8bSf LBmzrAWTLRYH52cTmtj+5t3QelSjjcJyjyfwwXYt/xQC6mqbHF+j/jyFaeARem1V5oYv ep6o1lOPeLl6BptYwB/Y1M834SeuTPsSjuHd++4mV0EjLzzogRuxBfN4O7Skakx2c3y5 CYsQJXz2aBcdRlrZIcZ1AeX56xlDKLzONTc7+5si33ssbx3WoaS9nqGNY3PG7iqTVVQe Eeow== X-Gm-Message-State: AOAM531AK0iM5S/5itzgqSqxF4Rjk4AH17RmIaJmIrSuk3N1dG8LAIIF 6Qz+uYX7Nysh8w3LP0ParP+BLg== X-Google-Smtp-Source: ABdhPJztGtSXle/txkOInBta7s9iPfgmNMwmeGcMh31LEFu/WZhvG+ecNlUxR7cpqKndhlt0YxF1kg== X-Received: by 2002:a9d:4ea:: with SMTP id 97mr28057608otm.324.1626908292956; Wed, 21 Jul 2021 15:58:12 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id h24sm5035388otl.41.2021.07.21.15.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 15:58:12 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Manu Gautam Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: phy: qcom, qmp-usb3-dp: Add support for sc8180x Date: Wed, 21 Jul 2021 15:56:29 -0700 Message-Id: <20210721225630.3035861-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The SC8180x has two instances of the QMP USB/DP combo PHYs, add a compatible for these. Signed-off-by: Bjorn Andersson Acked-by: Rob Herring --- Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml index 217aa6c91893..1d49cc3d4eae 100644 --- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml @@ -14,6 +14,7 @@ properties: compatible: enum: - qcom,sc7180-qmp-usb3-dp-phy + - qcom,sc8180x-qmp-usb3-dp-phy - qcom,sdm845-qmp-usb3-dp-phy - qcom,sm8250-qmp-usb3-dp-phy reg: From patchwork Wed Jul 21 22:56:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 483351 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp6626019jao; Wed, 21 Jul 2021 15:58:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgwMQ2uZ4vW+PqSY135k5P+qEBKMt+pwT4jjVlq1KgGxNAH+4E5n+31JO5aiLa4sZCBUmu X-Received: by 2002:aa7:d3cd:: with SMTP id o13mr44738255edr.149.1626908300022; Wed, 21 Jul 2021 15:58:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626908300; cv=none; d=google.com; s=arc-20160816; b=iDje2ENfSPQNiMdjVeVpF1qpyF14oidmlJPrB1erZJjYSfolqj7R6RHPb+wkUK3PnV tLlzzhF6EqngAv28tUn6wsCNxYD9xZyk/PQQ/W8J3EY5N4IFOY4171posUp7+1jNwCmq PUKZqxcfzELZDIWyBeOfAEM2mmgTnOdPoZihvupYdRkcs5lOT2dZrwSTbBIO7yxPORw5 2vLcdUGaZV7a1ZmPWlr+YndTJPXe6j2plmP6WoGUtygz3LF3axJ3hkSoGCwix+oHsJT3 RTmRLiFD1fsxvJmuP2H4zIwNPj8/CjS5CIPi5pFV/dCcKF2zUbs9OXbgbvemnJ53+kNb wGtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7g+i+w4u53CyM8L4HKCjxO+eyCNUNLkuoMzloAm4KQI=; b=S0nwPDuWK6JR7VmcZmLWUwzH5u+WLvMNEPPr0NKgG3cZozON35oJ2SVxTDygg1HbT/ oLb3mb9PQSPeCuc2WjGt8hLs21JjacFIpwAkDKZCJ/iWHYryxTIknphkm51GpLtaylfa HDkMphUnULFZjdb38yl4K/dF5i2+pYIWYFpzl03I5geqFaaRcne1Jr3GSRwbba8JdvQC eGf5og6rjC8+otSdJ+iRCptQPOSlWXbHtPpSHQ5scWvM+by9yw1mWZ6iAEFhBNWO+lLu JyeYzcgB6V5EL93DD4eBp00Rgy5hi/UFVhGYJNYvk8hrJ5WImQHT5iYld5x/DdEn9sS9 ZP2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZwYiGPaZ; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u22si29237746edo.200.2021.07.21.15.58.19; Wed, 21 Jul 2021 15:58:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZwYiGPaZ; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbhGUWRj (ORCPT + 17 others); Wed, 21 Jul 2021 18:17:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230353AbhGUWRi (ORCPT ); Wed, 21 Jul 2021 18:17:38 -0400 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B8AAC061757 for ; Wed, 21 Jul 2021 15:58:14 -0700 (PDT) Received: by mail-ot1-x331.google.com with SMTP id a17-20020a9d3e110000b02904ce97efee36so1631791otd.7 for ; Wed, 21 Jul 2021 15:58:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7g+i+w4u53CyM8L4HKCjxO+eyCNUNLkuoMzloAm4KQI=; b=ZwYiGPaZ6LwP/2mmJmuoYa4dCUWha+220rfFKh5KWHSz1Ybdx1BQUhFS00Ojfwxhgo 91OS1Umn2EDgDnrhiQtlBzAjK5BN5BX2G1eAoJNM+1T/cvPazG3GtO4UQarZPm4qSwAD WFgYCw2Q3FE47Q2C/4CFBV0QyxrPwsFemEbf1erDw/SjclvAxbE+4+1LhNTnYYBslots Ez/KTpCcq6kbOO3fIbVHyQNFZi+RTLjTF2sowQATJ2hCWoU6HxuVRJddeWtr2hbHk7iW +MVadYSa6EUHZXUixBzUlonRb6iewtaDO1VntbWVjrdS0xtcG895oZMPiUopw+H79Sr8 KC7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7g+i+w4u53CyM8L4HKCjxO+eyCNUNLkuoMzloAm4KQI=; b=TtzjSpNnX2G6W1Aaiw3+1y+xJWTIX0oo6vG0aVHL7hT8Ht5YZOPogZYRjvftDRE4RU drhD+doWSa4gp4JVDgzyOz82EaXNEmwkvFUIUSotaJDBA0bO07lREYJE00CItOxTYqTt VFOJcagd5xTj41E18MjWvdWKF9wyu4SJCYfwbNPjQoEbSVs6s+gDtGSVmq4GXXJLL8IE m919NoeyOoAmC7ZB795X7hLN1HEdvyyZlmNMKKesSCZGIpOtSa0ABWecBZHtb4CiPqTI bJ84NCtXcHU2YCnDZvVi2CHZwPFVTMV3edt7deE2tjIOX67WcIEF7xic8jeFzR9n2rqf Qj7g== X-Gm-Message-State: AOAM532oHYzhkl8Btw0Yc/TXUi9LPKUiNHWHaX0d3UJxHhYqu5EyJR8I SRU9TsZrRPftuYPKn7Uj6Y6LfQ== X-Received: by 2002:a9d:3a34:: with SMTP id j49mr27870764otc.102.1626908293828; Wed, 21 Jul 2021 15:58:13 -0700 (PDT) Received: from localhost.localdomain (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id h24sm5035388otl.41.2021.07.21.15.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 15:58:13 -0700 (PDT) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Vinod Koul , Manu Gautam Cc: Rob Herring , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] phy: qcom: qmp: Add SC8180x USB/DP combo Date: Wed, 21 Jul 2021 15:56:30 -0700 Message-Id: <20210721225630.3035861-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210721225630.3035861-1-bjorn.andersson@linaro.org> References: <20210721225630.3035861-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The two USB QMPs are USB/DP compbo PHYs, add the compatible for this combination to allow DP output. Signed-off-by: Bjorn Andersson --- drivers/phy/qualcomm/phy-qcom-qmp.c | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) -- 2.29.2 diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c index 2195f8ac393b..5e302830d061 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp.c @@ -3536,6 +3536,46 @@ static const struct qmp_phy_cfg sc8180x_pciephy_cfg = { .pwrdn_delay_max = 1005, /* us */ }; +static const struct qmp_phy_cfg sc8180x_dpphy_cfg = { + .type = PHY_TYPE_DP, + .nlanes = 1, + + .serdes_tbl = qmp_v4_dp_serdes_tbl, + .serdes_tbl_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl), + .tx_tbl = qmp_v4_dp_tx_tbl, + .tx_tbl_num = ARRAY_SIZE(qmp_v4_dp_tx_tbl), + + .serdes_tbl_rbr = qmp_v4_dp_serdes_tbl_rbr, + .serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_rbr), + .serdes_tbl_hbr = qmp_v4_dp_serdes_tbl_hbr, + .serdes_tbl_hbr_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_hbr), + .serdes_tbl_hbr2 = qmp_v4_dp_serdes_tbl_hbr2, + .serdes_tbl_hbr2_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_hbr2), + .serdes_tbl_hbr3 = qmp_v4_dp_serdes_tbl_hbr3, + .serdes_tbl_hbr3_num = ARRAY_SIZE(qmp_v4_dp_serdes_tbl_hbr3), + + .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, + + .has_phy_dp_com_ctrl = true, + .is_dual_lane_phy = true, + + .dp_aux_init = qcom_qmp_v4_phy_dp_aux_init, + .configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx, + .configure_dp_phy = qcom_qmp_v4_phy_configure_dp_phy, + .calibrate_dp_phy = qcom_qmp_v4_dp_phy_calibrate, +}; + +static const struct qmp_phy_combo_cfg sc8180x_usb3dpphy_cfg = { + .usb_cfg = &sm8150_usb3phy_cfg, + .dp_cfg = &sc8180x_dpphy_cfg, +}; + static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = { .type = PHY_TYPE_USB3, .nlanes = 1, @@ -5377,6 +5417,9 @@ static const struct of_device_id qcom_qmp_phy_of_match_table[] = { }, { .compatible = "qcom,sc8180x-qmp-usb3-phy", .data = &sm8150_usb3phy_cfg, + }, { + .compatible = "qcom,sc8180x-qmp-usb3-dp-phy", + /* It's a combo phy */ }, { .compatible = "qcom,sdm845-qhp-pcie-phy", .data = &sdm845_qhp_pciephy_cfg, @@ -5454,6 +5497,10 @@ static const struct of_device_id qcom_qmp_combo_phy_of_match_table[] = { .compatible = "qcom,sm8250-qmp-usb3-dp-phy", .data = &sm8250_usb3dpphy_cfg, }, + { + .compatible = "qcom,sc8180x-qmp-usb3-dp-phy", + .data = &sc8180x_usb3dpphy_cfg, + }, { } };