From patchwork Fri Nov 11 08:42:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 18551 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp621924wru; Fri, 11 Nov 2022 00:46:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Hr/lGJ0fxvhUXRX9TIomMaTwuUXuMbYbAD3bWO4rZWjS0mCJAWcfNlh9Rzma0ySYmCORh X-Received: by 2002:a17:90a:2c01:b0:1fe:b9b:7d31 with SMTP id m1-20020a17090a2c0100b001fe0b9b7d31mr869055pjd.152.1668156372666; Fri, 11 Nov 2022 00:46:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668156372; cv=none; d=google.com; s=arc-20160816; b=fA+wcxjBrKmP8GEB3h5oUQ+iAcnXCjqzyzKiqRTOJzaBL3gyuUbp44Kuf450bQ7Q4M YujIDfmfUw1KD3RdrFSNvvZxHCxFgIbA0a+7E+vADqTjChtf0L6XTR1C2EXH+AesLaVt NdgcGItn1l3Rgn6aI0hKA756o0E+tzvXMLs/AAMtILJfC9NQqZ8HjvU9B8WzfR6BVXu+ MQ0mGmZHNl78Hexjv4j5qBbHI4iAtWe9T1iPxTntlR5GzMCR00Q0SmTDboOLnNjBfbj+ LSYEIWYFY59pM/Qb+Flu02Tj2hZz/KogBt8qnBbPkVOWQSfV39ofFdzjUAGTmEntBrUG 2jKw== 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=6CHBgy6rbeJs9Ag5gEzQLckCJlu2Ybv16hhK64/HyKI=; b=omR4KWwJkRfK0AiwZQKON9cJ5I3Nmr5EdIH1YjrPZ/x2NFXJybpLNk2zOudUDtRSdR ldZeVdaBKa2i5woQbnqwPGSEgjITa/pC+xsUDzCbwGEETK/UYkviM1KDgIcWbKhhplit tACG9i4VJhvh9MueiVv5Dk36e/n/XR+pBjQeUHgCFxdwkR6z9A/73ckIlwXV9PeLwIOn lUoh0tyviH+6ZbmBzKy11uAAvTSRHZfp2QVP87S5R6NnjjilFFW8aWkyBslyxue6w5p6 EFL9xWYJyALRuanFQQEJn0gQdB6+gxqJhZLC2Ml4U1GNPtYxPI2vphkIDt7Sg+Ed4qQo qtuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Arcu4vGl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb17-20020a17090b281100b00212d63cd243si6735995pjb.109.2022.11.11.00.45.59; Fri, 11 Nov 2022 00:46:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Arcu4vGl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233306AbiKKIo7 (ORCPT + 99 others); Fri, 11 Nov 2022 03:44:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233270AbiKKIoz (ORCPT ); Fri, 11 Nov 2022 03:44:55 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0DC17C8E9; Fri, 11 Nov 2022 00:44:54 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8E37061ED4; Fri, 11 Nov 2022 08:44:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3430C433C1; Fri, 11 Nov 2022 08:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668156293; bh=BsM6e57E76PP1RYFVtT8hgjhqoIm78zr8LXoGcM453w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Arcu4vGl2iArUUjbEgyd0rM4627m/lwmFwbJYhsJVkhGMUgddru7vVbPFWdFc74tH 0mXNwNeaRvtJV/0x33fgIJAliMlZIYdaG2Pv6Bp0eIshD23LRRz7ImHnNrU1b8cHFo csJNjHciLKkWbMATl+pwLOH8JwxQXC2GVeUtMgvhQ9IslLIGB+mR9qCChFJRfPXzR2 xjw+YWnicinABDv6ET0G/9IwyR39k05OPgNRi5rX+YzTAz/63+aRpgV0r/gM8oI0m+ riZUPdi/71Ee8AsPF7bNqs6m1yYpGLWGuhX1sIBFzsmwoeb4UVUvlf+0Wf2OX0A9t7 F6iYC2dZMqGUg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otPeD-0002Mi-M3; Fri, 11 Nov 2022 09:44:25 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH 2/6] phy: qcom-qmp-combo: fix sdm845 reset Date: Fri, 11 Nov 2022 09:42:51 +0100 Message-Id: <20221111084255.8963-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111084255.8963-1-johan+linaro@kernel.org> References: <20221111084255.8963-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749188736831622295?= X-GMAIL-MSGID: =?utf-8?q?1749188736831622295?= The SDM845 has two resets but the DP configuration erroneously described only one. In case the DP part of the PHY is initialised before the USB part (e.g. depending on probe order), then only the first reset would be asserted. Add a dedicated configuration for SDM845 rather than reuse the incompatible SC7180 configuration. Fixes: d88497fb6bbd ("phy: qualcomm: phy-qcom-qmp: add support for combo USB3+DP phy on SDM845") Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 39 ++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index bb38b18258ca..cc53e2f99121 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -1084,9 +1084,46 @@ static const struct qmp_phy_cfg sdm845_usb3phy_cfg = { .has_pwrdn_delay = true, }; +static const struct qmp_phy_cfg sdm845_dpphy_cfg = { + .type = PHY_TYPE_DP, + .lanes = 2, + + .serdes_tbl = qmp_v3_dp_serdes_tbl, + .serdes_tbl_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl), + .tx_tbl = qmp_v3_dp_tx_tbl, + .tx_tbl_num = ARRAY_SIZE(qmp_v3_dp_tx_tbl), + + .serdes_tbl_rbr = qmp_v3_dp_serdes_tbl_rbr, + .serdes_tbl_rbr_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl_rbr), + .serdes_tbl_hbr = qmp_v3_dp_serdes_tbl_hbr, + .serdes_tbl_hbr_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl_hbr), + .serdes_tbl_hbr2 = qmp_v3_dp_serdes_tbl_hbr2, + .serdes_tbl_hbr2_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl_hbr2), + .serdes_tbl_hbr3 = qmp_v3_dp_serdes_tbl_hbr3, + .serdes_tbl_hbr3_num = ARRAY_SIZE(qmp_v3_dp_serdes_tbl_hbr3), + + .swing_hbr_rbr = &qmp_dp_v3_voltage_swing_hbr_rbr, + .pre_emphasis_hbr_rbr = &qmp_dp_v3_pre_emphasis_hbr_rbr, + .swing_hbr3_hbr2 = &qmp_dp_v3_voltage_swing_hbr3_hbr2, + .pre_emphasis_hbr3_hbr2 = &qmp_dp_v3_pre_emphasis_hbr3_hbr2, + + .clk_list = qmp_v3_phy_clk_l, + .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l), + .reset_list = msm8996_usb3phy_reset_l, + .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l), + .vreg_list = qmp_phy_vreg_l, + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), + .regs = qmp_v3_usb3phy_regs_layout, + + .dp_aux_init = qcom_qmp_v3_phy_dp_aux_init, + .configure_dp_tx = qcom_qmp_v3_phy_configure_dp_tx, + .configure_dp_phy = qcom_qmp_v3_phy_configure_dp_phy, + .calibrate_dp_phy = qcom_qmp_v3_dp_phy_calibrate, +}; + static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = { .usb_cfg = &sdm845_usb3phy_cfg, - .dp_cfg = &sc7180_dpphy_cfg, + .dp_cfg = &sdm845_dpphy_cfg, }; static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {