From patchwork Mon Nov 14 08:13:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 19589 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2029174wru; Mon, 14 Nov 2022 00:19:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf5jvTmboMpJFOG8OtwV7u+v82DL/LggY7KT/KNZY4rVReVgPs5cd32JAHnZ/rqPaT3zkrCi X-Received: by 2002:aa7:d286:0:b0:461:505f:4a79 with SMTP id w6-20020aa7d286000000b00461505f4a79mr9766496edq.329.1668413956133; Mon, 14 Nov 2022 00:19:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668413956; cv=none; d=google.com; s=arc-20160816; b=ymwlwAU8QxRd6AXsc/AtZxIfrYL0IFO+Hspo7JQaXt0xl9DeYpxDSHP0TOYVQSDWGq H4I9PHY/11GkL5+FdYgMK8T20dn9wEhznvivd01JRPl9tb7Q7WQC/wK32GvHSljqAgFl QY9cbKWTxqybU+E++Y8w/c4hCZgGNuixbclfl+fG1VMDa/l5OT/yiJ+QC1HpBtCy8t4j /BgsBpHlnc8haxydlYx6KANdfz+6H3RWZTIVYuIq7/KhY4MwNRu5Ah9UH+GiCezbdRkz HO4CgmeqCFpUEke3NCOfjTP7nMXNLqbQWjflpWPagw6o9SQvbaANq8g95iEY4YmpvbZq LLKg== 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=seEEPlwHthqNmd3jTT+WiijfwXDKxcbul3wiMsqp4ok=; b=GEmCvRHRkCAWVMMYVe2fDlKb9TkrvVEFor8/kgyKVn5agvI6VvdfiZDZZzjw0hQtAd tjESgtNA1e0MGVirbIP3Ei77yx0sbueL1qaFuGjRQKlJN2lR2Gs0y9sO/w39v66t5ewF R2utU0goIAYPetzGGSWRlsV+Olr5Mgpm66axP8wgBRrgwx5fhBVYnICS6zfP0iUSym2Q d5XS6aTBgNo/g2JhHPcSC1XkYafAqOEI6BpG+eyw0CKWDmOyiyPyFxeodhJuDsYUCIJ5 K1vzSw6UZsf9o8MjMySz0PCCHvev7ZyQ6IrH3HfBrHr2aalBoPQEnHjBdvmeGti0uFxM osLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZW9zqD/l"; 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 he42-20020a1709073daa00b00781132a4ca6si8925248ejc.850.2022.11.14.00.18.52; Mon, 14 Nov 2022 00:19:16 -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="ZW9zqD/l"; 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 S236295AbiKNIOp (ORCPT + 99 others); Mon, 14 Nov 2022 03:14:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236262AbiKNIOd (ORCPT ); Mon, 14 Nov 2022 03:14:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 584AC193D9; Mon, 14 Nov 2022 00:14:32 -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 ams.source.kernel.org (Postfix) with ESMTPS id 1685BB80D1C; Mon, 14 Nov 2022 08:14:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1536CC43145; Mon, 14 Nov 2022 08:14:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668413669; bh=NzS+/VskG+KkDUr6qPiVoEuNjsO5Y/0j9nTuX6m8hXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZW9zqD/l38xk1Ff/d2yzy/ApfbNb3a3nqetZh/5Hv0Hf0tJmY3YhLO8Ve9zjItkyX iFH8E93XMpK1GJhv3OBUGe+s0gBeDEaFEZB2JCYPT0Z358kh6eT1FKiv+lCaGqaVbx utYfXeD6xwOuuMTCSknGZOYzckNvgN9yBCLZuzc+4W64JThaFuFJv8GV/MuveU166q 1ICXlgPgqWumy5KSXB8eTMzfYTEmQ8mZlT11HKdoZX0MRW49pxoH4SzedaACWTn/CU B3zbbH+l+eqzWxBXPmvGpnA+kTseD+C6wLOUc0geX4PubPYH1xhkH9UAfUJWRX5wPL pjzMhet1EtdFQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1ouUbM-0001L0-O4; Mon, 14 Nov 2022 09:13:56 +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 v2 2/6] phy: qcom-qmp-combo: fix sdm845 reset Date: Mon, 14 Nov 2022 09:13:42 +0100 Message-Id: <20221114081346.5116-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221114081346.5116-1-johan+linaro@kernel.org> References: <20221114081346.5116-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?1749458832780096731?= X-GMAIL-MSGID: =?utf-8?q?1749458832780096731?= 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 Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- 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 = {