From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2F55C433FE for ; Thu, 29 Sep 2022 09:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235710AbiI2JaZ (ORCPT ); Thu, 29 Sep 2022 05:30:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234932AbiI2J33 (ORCPT ); Thu, 29 Sep 2022 05:29:29 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10B2D145964; Thu, 29 Sep 2022 02:29:28 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id A304ACE20F5; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03CCEC433C1; Thu, 29 Sep 2022 09:29:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=kro7aDlZROhupYv5MZjecCfiwnFNkfBZUEuYby/yjeE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YI97mZfb169VX05+lNOg3+H7WS2L3bre/5RRB0YAfMnH4uwwgSq9U3htQfFPJth9G ODrICMFBZ+5pvfTWKNnBydOn9UExyX3sxv8nSk2ZHIqRZl8Bx0dFgRJoBrYtofSgrt ZbyFwfRBkqgJ6yvzSFlklklmcPQuD6TGP+SfwHh582HPt7STiY+/zWYpWep57gP6/T 3XsAMIasmSDU7iRSL3S/gwaZZrRB4d29/nvLfKmyW7h2tAJa3Ib6ZlclBUXW+5gEBq KR1iRQX1LFb43piHbgY5Pv8GY1s+tf+9/8cm4Kob58kTsMkhVDtlZLdepKaNwDJxwt gt8xu6/xuKiAg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprF-00061F-Ga; Thu, 29 Sep 2022 11:29:29 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 01/11] phy: qcom-qmp: fix obsolete lane comments Date: Thu, 29 Sep 2022 11:29:06 +0200 Message-Id: <20220929092916.23068-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" All QMP drivers but the MSM8996 and combo ones handle exactly one PHY and the corresponding memory resources are not per-lane, but per PHY. Update the obsolete comments. Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 2 +- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualco= mm/phy-qcom-qmp-combo.c index ad3b0aa22048..0cf1eb8a62f6 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -2669,7 +2669,7 @@ static int qmp_combo_create(struct device *dev, struc= t device_node *np, int id, qphy->cfg =3D cfg; qphy->serdes =3D serdes; /* - * Get memory resources for each phy lane: + * Get memory resources for each PHY: * Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2. * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy= /qualcomm/phy-qcom-qmp-pcie-msm8996.c index 0f8e739936ab..d9646bf5dc91 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -777,7 +777,7 @@ static int qmp_pcie_msm8996_create(struct device *dev, = struct device_node *np, i qphy->cfg =3D cfg; qphy->serdes =3D serdes; /* - * Get memory resources for each phy lane: + * Get memory resources for each PHY: * Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2. */ qphy->tx =3D devm_of_iomap(dev, np, 0, NULL); diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcom= m/phy-qcom-qmp-pcie.c index 83fbbb446c9d..f4634af75890 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -2201,7 +2201,7 @@ static int qmp_pcie_create(struct device *dev, struct= device_node *np, int id, qphy->cfg =3D cfg; qphy->serdes =3D serdes; /* - * Get memory resources for each phy lane: + * Get memory resources for the PHY: * Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2. * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm= /phy-qcom-qmp-ufs.c index d21b977850b3..d7b35b715b95 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -1094,7 +1094,7 @@ static int qmp_ufs_create(struct device *dev, struct = device_node *np, int id, qphy->cfg =3D cfg; qphy->serdes =3D serdes; /* - * Get memory resources for each phy lane: + * Get memory resources for the PHY: * Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2. * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm= /phy-qcom-qmp-usb.c index f01b3022a10d..f8685eddbf80 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -2581,7 +2581,7 @@ int qmp_usb_create(struct device *dev, struct device_= node *np, int id, qphy->cfg =3D cfg; qphy->serdes =3D serdes; /* - * Get memory resources for each phy lane: + * Get memory resources for the PHY: * Resources are indexed as: tx -> 0; rx -> 1; pcs -> 2. * For dual lane PHYs: tx2 -> 3, rx2 -> 4, pcs_misc (optional) -> 5 * For single lane PHYs: pcs_misc (optional) -> 3. --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0635C43217 for ; Thu, 29 Sep 2022 09:29:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235155AbiI2J32 (ORCPT ); Thu, 29 Sep 2022 05:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234574AbiI2J3Z (ORCPT ); Thu, 29 Sep 2022 05:29:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DDC413A056; Thu, 29 Sep 2022 02:29:24 -0700 (PDT) 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 C4BEA60B79; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 150D1C433B5; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=vWpzBrV6j+ZnvnNGyI76CUcoYB8DWggjkaozF0vshM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uwjt1TuiQezkCfDppwRPRejaDnfAQDkXrTArR9R4eJd6fnLXt9nW0fAktE3oQLmPo e1HYY4bi946gzFuaBakPn3EgQTdWinkwrJ+tO0RgxlYHdgb9fg0TXDuD4hcqXH3nlx SfMsxLUmQuCZt+WPXT0I1Xm/RGocTmd3yqyfx8E69c43WExxUd3pF1PKcsfvPivB0k qIhi58CMD1yotag8FtPNfe1CUh/EfcUqOPD3XfZnvgECoLyDEjD6nApye82A/spsqO vT3woGJKAq5b1uCoHtS2AHpSEwZCGVbFCCCflx3Ait0OYAcLVxiK+nPm2CVpqevGfs pbiAzlSaY/YoA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprF-00061H-J6; Thu, 29 Sep 2022 11:29:29 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 02/11] phy: qcom-qmp-combo: drop unused UFS reset Date: Thu, 29 Sep 2022 11:29:07 +0200 Message-Id: <20220929092916.23068-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Drop the unused UFS reset code which isn't used since the QMP driver split. Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualco= mm/phy-qcom-qmp-combo.c index 0cf1eb8a62f6..e618e675e8ec 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -944,7 +944,6 @@ struct qmp_phy_dp_clks { * @phys: array of per-lane phy descriptors * @phy_mutex: mutex lock for PHY common block initialization * @init_count: phy common block initialization count - * @ufs_reset: optional UFS PHY reset handle */ struct qcom_qmp { struct device *dev; @@ -958,8 +957,6 @@ struct qcom_qmp { =20 struct mutex phy_mutex; int init_count; - - struct reset_control *ufs_reset; }; =20 static void qcom_qmp_v3_phy_dp_aux_init(struct qmp_phy *qphy); @@ -2027,8 +2024,6 @@ static int qmp_combo_com_exit(struct qmp_phy *qphy) return 0; } =20 - reset_control_assert(qmp->ufs_reset); - reset_control_bulk_assert(cfg->num_resets, qmp->resets); =20 clk_bulk_disable_unprepare(cfg->num_clks, qmp->clks); @@ -2103,10 +2098,6 @@ static int qmp_combo_power_on(struct phy *phy) else qmp_combo_configure(pcs, cfg->regs, cfg->pcs_tbl, cfg->pcs_tbl_num); =20 - ret =3D reset_control_deassert(qmp->ufs_reset); - if (ret) - goto err_disable_pipe_clk; - if (cfg->has_pwrdn_delay) usleep_range(cfg->pwrdn_delay_min, cfg->pwrdn_delay_max); =20 --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62A39C433FE for ; Thu, 29 Sep 2022 09:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235695AbiI2JaQ (ORCPT ); Thu, 29 Sep 2022 05:30:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234987AbiI2J31 (ORCPT ); Thu, 29 Sep 2022 05:29:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D78C313A056; Thu, 29 Sep 2022 02:29:25 -0700 (PDT) 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 59CACB823C1; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12FEFC433D6; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=6kymEPxpVkS6o8CrMIpTnIiW+FVWGdN60sh6Ed9IVgk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cX6a6d5cdMYO+O3C96EIj8K/s/hYgQdR1T9kSqNWdEu9huzga/8AEdkIgLDvGZ18l 3cC//3EihEFXjpAdtPd8l23lySiX8Cj9REIjA0FK29g2y2SlYRJqlmdvqyWXC+HOc8 EKpS2Xj0EtRT2kAV8JuP4E2jIA1OEJAqB4S0AfET+Xz9u9uX3znqf+VPmv3P+h5OHa B+mV/yQrkfj0bG21jfApjHcBD22vcAkLv2iB7asnCtCeHH5PFjmr2R5NavSFt/Qn8O ln9xhJvLdZ7oRo9iV8uEWyIMO7zuBRX3dFxBBryiMAD2nBC5Wn+03/OutZnwD3kUVY YLRIh9cpMfsiQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprF-00061K-MK; Thu, 29 Sep 2022 11:29:29 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 03/11] phy: qcom-qmp-pcie: drop unused common-block registers Date: Thu, 29 Sep 2022 11:29:08 +0200 Message-Id: <20220929092916.23068-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Drop the common-block register defines that are unused since the QMP driver split. Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Signed-off-by: Johan Hovold --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcom= m/phy-qcom-qmp-pcie.c index f4634af75890..c9330b0f0fcf 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -77,11 +77,6 @@ struct qmp_phy_init_tbl { =20 /* set of registers with offsets different per-PHY */ enum qphy_reg_layout { - /* Common block control registers */ - QPHY_COM_SW_RESET, - QPHY_COM_POWER_DOWN_CONTROL, - QPHY_COM_START_CONTROL, - QPHY_COM_PCS_READY_STATUS, /* PCS registers */ QPHY_SW_RESET, QPHY_START_CTRL, @@ -99,10 +94,6 @@ static const unsigned int ipq_pciephy_gen3_regs_layout[Q= PHY_LAYOUT_SIZE] =3D { }; =20 static const unsigned int pciephy_regs_layout[QPHY_LAYOUT_SIZE] =3D { - [QPHY_COM_SW_RESET] =3D 0x400, - [QPHY_COM_POWER_DOWN_CONTROL] =3D 0x404, - [QPHY_COM_START_CONTROL] =3D 0x408, - [QPHY_COM_PCS_READY_STATUS] =3D 0x448, [QPHY_SW_RESET] =3D 0x00, [QPHY_START_CTRL] =3D 0x08, [QPHY_PCS_STATUS] =3D 0x174, --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08551C433FE for ; Thu, 29 Sep 2022 09:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235494AbiI2J3v (ORCPT ); Thu, 29 Sep 2022 05:29:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234919AbiI2J30 (ORCPT ); Thu, 29 Sep 2022 05:29:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0153E145C97; Thu, 29 Sep 2022 02:29:25 -0700 (PDT) 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 5FF2F60EC4; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56F53C43153; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=LaAaPBlm6yRSR9iwlubpTa3EtE2ekh7akXEXvlkB+UE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AS+L1l26/t587fC0ejCa59UXyeNiar3TCgzSWscgRcn335Ajqc3aQtjcEKlhXplfy CmUEWr6vcd04BTWbDF/rBrmwrLQOJFjlIQSPInhYrIAH1yfJ8Ne9x8VRmak/Lb0D4n I6hCVkajdWinxhSdPBeGiLB1REBhEPXIHr0C6C3CJYgsk+bl8tYORgVMTIPEQsECqb +VfepB6YdLgep08HiIQf7XU4yDrFReNF5hL4+5sUgcZmtSxGFb00dZglXKnysnuNfy KlN9NdScoyndc/7qEh+qBwwRtncYTLOKvga58RRnOQqOR6sBILGGHirshxq9Z9RET7 7VWi595KhdoRg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprF-00061M-PD; Thu, 29 Sep 2022 11:29:29 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 04/11] phy: qcom-qmp-pcie: clean up power-down handling Date: Thu, 29 Sep 2022 11:29:09 +0200 Message-Id: <20220929092916.23068-5-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 offset during power on and power off. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcom= m/phy-qcom-qmp-pcie.c index c9330b0f0fcf..efffb77e8f45 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -97,18 +97,21 @@ static const unsigned int pciephy_regs_layout[QPHY_LAYO= UT_SIZE] =3D { [QPHY_SW_RESET] =3D 0x00, [QPHY_START_CTRL] =3D 0x08, [QPHY_PCS_STATUS] =3D 0x174, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int sdm845_qmp_pciephy_regs_layout[QPHY_LAYOUT_SIZE]= =3D { [QPHY_SW_RESET] =3D 0x00, [QPHY_START_CTRL] =3D 0x08, [QPHY_PCS_STATUS] =3D 0x174, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int sdm845_qhp_pciephy_regs_layout[QPHY_LAYOUT_SIZE]= =3D { [QPHY_SW_RESET] =3D 0x00, [QPHY_START_CTRL] =3D 0x08, [QPHY_PCS_STATUS] =3D 0x2ac, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int sm8250_pcie_regs_layout[QPHY_LAYOUT_SIZE] =3D { @@ -1885,13 +1888,8 @@ static int qmp_pcie_init(struct phy *phy) if (ret) goto err_assert_reset; =20 - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) - qphy_setbits(pcs, - cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - else - qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); + qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); =20 return 0; =20 @@ -2014,13 +2012,8 @@ static int qmp_pcie_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); =20 /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); =20 return 0; } --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18E0EC433F5 for ; Thu, 29 Sep 2022 09:30:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235500AbiI2JaM (ORCPT ); Thu, 29 Sep 2022 05:30:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235024AbiI2J31 (ORCPT ); Thu, 29 Sep 2022 05:29:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36554145C82; Thu, 29 Sep 2022 02:29:26 -0700 (PDT) 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 97995B823E5; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AA44C43144; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=ErVujQpTlieu8ZHWHfKSzGAnMt90i1Sh8tRPUlLjA0Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X6txW5mB+JExe5QLYWarD33RByP2qwjXQZ5gSDCAfkbOulEjRaTuKTKGeIMlmrfVj +Atbsq+Gm+dYNUIoW0DMiYwwdVgZ9bXaWprnYynTjlbKY0NtShC0Rpe7j7AVTVgzk2 luVyHKIwdhhHMnsR3xsTrZ9SW/LbuHX70IqpoZBTgsRColzy1Im6T2D9VHR96hz9h/ rlgKp1eiK4cHgdWGypCC+HnBZhmq9nkdITVe6yBICP38hQVIQhYRX+yYUuDSWddMsp gulaLtBdQLfMBRYNHEAACnVxDJncZ/imfcee+/87Un5N0wxQp3SyCaZp6SmcsZXRxd fhVekANIVvvUg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprF-00061P-Rj; Thu, 29 Sep 2022 11:29:29 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 05/11] phy: qcom-qmp-pcie: move power-down update Date: Thu, 29 Sep 2022 11:29:10 +0200 Message-Id: <20220929092916.23068-6-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Move the power-down-control register update that powers on the PHY to the power-on handler so that it matches the power-off handler. Note that the power-on handler is currently always called directly after init. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcom= m/phy-qcom-qmp-pcie.c index efffb77e8f45..db78d2d76c03 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -1862,7 +1862,6 @@ static int qmp_pcie_init(struct phy *phy) struct qmp_phy *qphy =3D phy_get_drvdata(phy); struct qcom_qmp *qmp =3D qphy->qmp; const struct qmp_phy_cfg *cfg =3D qphy->cfg; - void __iomem *pcs =3D qphy->pcs; int ret; =20 /* turn on regulator supplies */ @@ -1888,9 +1887,6 @@ static int qmp_pcie_init(struct phy *phy) if (ret) goto err_assert_reset; =20 - qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - return 0; =20 err_assert_reset: @@ -1929,6 +1925,9 @@ static int qmp_pcie_power_on(struct phy *phy) unsigned int mask, val, ready; int ret; =20 + qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); + qmp_pcie_serdes_init(qphy); =20 ret =3D clk_prepare_enable(qphy->pipe_clk); --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B64CC433F5 for ; Thu, 29 Sep 2022 09:30:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235700AbiI2JaV (ORCPT ); Thu, 29 Sep 2022 05:30:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234907AbiI2J31 (ORCPT ); Thu, 29 Sep 2022 05:29:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8214914597A; Thu, 29 Sep 2022 02:29:26 -0700 (PDT) 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 1D732B823E4; Thu, 29 Sep 2022 09:29:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51153C43151; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=RCDMsqIFvGXQJyg4OyLTudRn8PZLhfXKmmKAniUA9x0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e0itfTuGMYmuiVFXNUGerLKOSIVpupFDHlT988AY5P0O+aLVwDbnar88/o9vDD1wK c/dejAnfVMQ99m2H4INqKmq3yz2X8+iAo4XpqHpHP5EdeSMNwApCKUAos5uH1fUUEQ PJYWpxUuNLMue7eghJyLJ/zG6j55w3S0i+hXp0MEYYkMlHXBQn2uZRM7uLJL4duT1k x5SgTVeI9ZCBGiqlWgWIkBT0kqaxfnUpVwa2iBTHoaIhr5W25atvJo47Qr0/QfueRs DXd+QYImGu8ASCPujwLsL4/8q+2uWAUJwFkFwRKbVUN3qZwme2WSbdYfuCZRtHoMfv OFSS2AY7CzTMg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprF-00061T-Uc; Thu, 29 Sep 2022 11:29:29 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 06/11] phy: qcom-qmp-pcie-msm8996: clean up power-down handling Date: Thu, 29 Sep 2022 11:29:11 +0200 Message-Id: <20220929092916.23068-7-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" This driver uses v2 registers only so drop the unnecessary POWER_DOWN_CONTROL override. Note that this register is already hard-coded when powering on the PHY. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy= /qualcomm/phy-qcom-qmp-pcie-msm8996.c index d9646bf5dc91..1960bd0513e9 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -91,7 +91,6 @@ enum qphy_reg_layout { QPHY_SW_RESET, QPHY_START_CTRL, QPHY_PCS_STATUS, - QPHY_PCS_POWER_DOWN_CONTROL, /* Keep last to ensure regs_layout arrays are properly initialized */ QPHY_LAYOUT_SIZE }; @@ -591,13 +590,8 @@ static int qmp_pcie_msm8996_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); =20 /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, + cfg->pwrdn_ctrl); =20 return 0; } --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7284C43217 for ; Thu, 29 Sep 2022 09:29:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235446AbiI2J3g (ORCPT ); Thu, 29 Sep 2022 05:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234798AbiI2J3Z (ORCPT ); Thu, 29 Sep 2022 05:29:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C35E614597A; Thu, 29 Sep 2022 02:29:24 -0700 (PDT) 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 5AA07609E9; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41188C43148; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=09qcvulq5aMIFeYdnXKNSqkjHdo7ac6qqMsCzIMhtcI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C8OzsyDJLfwGj8a3zFA5xRSzQAYOL47bU4smmI9/whcpGCfMxgIOYrbD8DsGOFIeI FIhBoqRh6ppB2gkuu/E3l1+rB3QgJt0MdMLTeOvpRtr3a8P6+ux4BM+hp1CPezeGCA ce6YeiIO7zp4ZJ4uMKatxASt5ZsI1lyZHzzVs8y4RVVx8hN53B9tzt6YpvuFbCle6/ Zt+Wbx+3Viz5P6RShr5l2YgXl7yepxI0Hm31y60b1nLEcbifIZ5F/ef0ojviP1tLMt EERa+bg2yAmP0uA9mEwbemCdiBgsadwPs13qOCtYiCfyNLRuooTmmDQzPXs+1TIqSN yuUtSJHnJPeCQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprG-00061V-1G; Thu, 29 Sep 2022 11:29:30 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 07/11] phy: qcom-qmp-combo: clean up power-down handling Date: Thu, 29 Sep 2022 11:29:12 +0200 Message-Id: <20220929092916.23068-8-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v3) offset during power on and power off. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualco= mm/phy-qcom-qmp-combo.c index e618e675e8ec..5665eb3c1556 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -121,6 +121,7 @@ static const unsigned int qmp_v3_usb3phy_regs_layout[QP= HY_LAYOUT_SIZE] =3D { [QPHY_SW_RESET] =3D 0x00, [QPHY_START_CTRL] =3D 0x08, [QPHY_PCS_STATUS] =3D 0x174, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, [QPHY_PCS_AUTONOMOUS_MODE_CTRL] =3D 0x0d8, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] =3D 0x0dc, [QPHY_PCS_LFPS_RXTERM_IRQ_STATUS] =3D 0x170, @@ -1991,13 +1992,8 @@ static int qmp_combo_com_init(struct qmp_phy *qphy) qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03); qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET); =20 - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) - qphy_setbits(pcs, - cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - else - qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); + qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); =20 mutex_unlock(&qmp->phy_mutex); =20 @@ -2144,13 +2140,8 @@ static int qmp_combo_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); =20 /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); } =20 return 0; --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCDADC433FE for ; Thu, 29 Sep 2022 09:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235488AbiI2J3n (ORCPT ); Thu, 29 Sep 2022 05:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234889AbiI2J30 (ORCPT ); Thu, 29 Sep 2022 05:29:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDF5B145C96; Thu, 29 Sep 2022 02:29:24 -0700 (PDT) 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 5F37A60EB4; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53090C43152; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=WuJsAZUgyp0wCyNm2QoREGEP0a7ostaCyBNlvLxye4c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dwE/11Y+UsoTaKu9bQ7no+ElvTTu6p29iGDMxExdQQaXiBoIxBROjG6Y2/KkVCgGR k2Q76DJi+r8Ao6YP5fUFypfVfgJhyO+v3RD8MhkC13aDTtCSePikahZCpmrymjKlx4 S1alkpRTfCf/3oIXePxhe2VAYtY9reMjGmeIev1TqAOoquUJ20jfrC36oiG0/8Dw/Y yBDV82MUpANuH7WovYzBKx3JJh4ONywqmqkuRGo78usu4idNBe+KCE0xHTDa5Gb/p4 CwP5Lslllf+rrrPVW/v4p/n1leBtxFc2XzSvHLvRQ37VyKJdtP4OA4cR1PV2nGv81B INSpEaSdzsIRw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprG-00061Y-48; Thu, 29 Sep 2022 11:29:30 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 08/11] phy: qcom-qmp-ufs: clean up power-down handling Date: Thu, 29 Sep 2022 11:29:13 +0200 Message-Id: <20220929092916.23068-9-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v4) offset during power on and power off. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm= /phy-qcom-qmp-ufs.c index d7b35b715b95..c8d86aecfe74 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -89,22 +89,26 @@ enum qphy_reg_layout { static const unsigned int msm8996_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] =3D= { [QPHY_START_CTRL] =3D 0x00, [QPHY_PCS_READY_STATUS] =3D 0x168, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int sdm845_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] =3D { [QPHY_START_CTRL] =3D 0x00, [QPHY_PCS_READY_STATUS] =3D 0x160, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int sm6115_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] =3D { [QPHY_START_CTRL] =3D 0x00, [QPHY_PCS_READY_STATUS] =3D 0x168, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int sm8150_ufsphy_regs_layout[QPHY_LAYOUT_SIZE] =3D { [QPHY_START_CTRL] =3D QPHY_V4_PCS_UFS_PHY_START, [QPHY_PCS_READY_STATUS] =3D QPHY_V4_PCS_UFS_READY_STATUS, [QPHY_SW_RESET] =3D QPHY_V4_PCS_UFS_SW_RESET, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D QPHY_V4_PCS_UFS_POWER_DOWN_CONTROL, }; =20 static const struct qmp_phy_init_tbl msm8996_ufs_serdes_tbl[] =3D { @@ -856,13 +860,8 @@ static int qmp_ufs_com_init(struct qmp_phy *qphy) if (ret) goto err_disable_regulators; =20 - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) - qphy_setbits(pcs, - cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - else - qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); + qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); =20 return 0; =20 @@ -996,13 +995,8 @@ static int qmp_ufs_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); =20 /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); =20 return 0; } --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC452C433F5 for ; Thu, 29 Sep 2022 09:30:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235377AbiI2JaC (ORCPT ); Thu, 29 Sep 2022 05:30:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235000AbiI2J31 (ORCPT ); Thu, 29 Sep 2022 05:29:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41637145964; Thu, 29 Sep 2022 02:29:26 -0700 (PDT) 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 8DE0660EC6; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69E1BC43161; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=Vlk4gD9dG2K7feWuy/Wd6MSx9GjtDSoq6AEyp2Fhlbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E6VR4biJZvhh/2hR3pmm1x7awvpGvOLWcJ4hHDC5zcJQQukfitQ+m8OySboOee8Q0 qb+FueL9F4lSS57FzeHCnh9rTyQG7en1B+EiwSAcasBYesYT+HmlBG732DGlG5ENk4 WECqilXUALr463MMY6ZUMbdjeCKMKBMCRQ57KOghotxc3Tp8befHYRu3mr4HdlxykO 1Eo79465nyH/U/CACNEtZvB6sYjJA99b9bp3lGev/606GNBcjEV0NCvpmh2m7yEgNl 1bGTGI9PZeoBe+MVTJ4dU4hBMdzfj5SAbpXFu92iiBMVePdH/DAWcKYHwAsdC9TJc0 8bxewRoqV9ypg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprG-00061b-71; Thu, 29 Sep 2022 11:29:30 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 09/11] phy: qcom-qmp-usb: clean up power-down handling Date: Thu, 29 Sep 2022 11:29:14 +0200 Message-Id: <20220929092916.23068-10-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Always define the POWER_DOWN_CONTROL register instead of falling back to the v2 (and v3) offset during power on and power off. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm= /phy-qcom-qmp-usb.c index f8685eddbf80..8acb5a3aeb95 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -126,6 +126,7 @@ static const unsigned int usb3phy_regs_layout[QPHY_LAYO= UT_SIZE] =3D { [QPHY_PCS_AUTONOMOUS_MODE_CTRL] =3D 0x0d4, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] =3D 0x0d8, [QPHY_PCS_LFPS_RXTERM_IRQ_STATUS] =3D 0x178, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int qmp_v3_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] =3D= { @@ -135,6 +136,7 @@ static const unsigned int qmp_v3_usb3phy_regs_layout[QP= HY_LAYOUT_SIZE] =3D { [QPHY_PCS_AUTONOMOUS_MODE_CTRL] =3D 0x0d8, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] =3D 0x0dc, [QPHY_PCS_LFPS_RXTERM_IRQ_STATUS] =3D 0x170, + [QPHY_PCS_POWER_DOWN_CONTROL] =3D 0x04, }; =20 static const unsigned int qmp_v4_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] =3D= { @@ -2164,13 +2166,8 @@ static int qmp_usb_init(struct phy *phy) qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET); } =20 - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) - qphy_setbits(pcs, - cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - else - qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); + qphy_setbits(pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); =20 return 0; =20 @@ -2277,13 +2274,8 @@ static int qmp_usb_power_off(struct phy *phy) qphy_clrbits(qphy->pcs, cfg->regs[QPHY_START_CTRL], cfg->start_ctrl); =20 /* Put PHY into POWER DOWN state: active low */ - if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL]) { - qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], - cfg->pwrdn_ctrl); - } else { - qphy_clrbits(qphy->pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, - cfg->pwrdn_ctrl); - } + qphy_clrbits(qphy->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], + cfg->pwrdn_ctrl); =20 return 0; } --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C19EC433F5 for ; Thu, 29 Sep 2022 09:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235565AbiI2J36 (ORCPT ); Thu, 29 Sep 2022 05:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234980AbiI2J30 (ORCPT ); Thu, 29 Sep 2022 05:29:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9388145C95; Thu, 29 Sep 2022 02:29:25 -0700 (PDT) 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 89A2560E07; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6709DC4315C; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=OUakEnd5Dcvi32KbRY6l1r/Wck1E2RnGHkknGv+N/hU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F3a/Qydm80Ht/m+FOV8zay7AZnROtht3glDoaicI/4l2GfH8Y/U8yWYvtsWc4z4K0 Ggwg73HMp3MmRHDWl/m4VuYr4Yj7pkmKOh1wucpHX2KibH0V0uinqLF4uBCsGzApF7 6nTx/CK0xaVBmXL5WxFuDT9umT8t9mCHL4dVgXMirrwnj3Y5gDA5//IIYwtws4dLZS OPUqFplv1QY1uxKdiAVqzmQWjMXzjoPr8F5UoQ5ysUM1N5QFEvPzFEo2GvqZ95pWqh lZymmrVSyeLwrjAY0nO0X61f2eteV8O5oLBe0btkfJopoqKY+Ye4Zh1LnTiqydkalV 6/c4RhFy2MNBA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprG-00061d-9u; Thu, 29 Sep 2022 11:29:30 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 10/11] phy: qcom-qmp-pcie: clean up clock lists Date: Thu, 29 Sep 2022 11:29:15 +0200 Message-Id: <20220929092916.23068-11-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Keep the clock lists together and sorted by symbol name. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcom= m/phy-qcom-qmp-pcie.c index db78d2d76c03..a0f62e9633d9 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -1423,6 +1423,10 @@ static inline void qphy_clrbits(void __iomem *base, = u32 offset, u32 val) } =20 /* list of clocks required by phy */ +static const char * const ipq8074_pciephy_clk_l[] =3D { + "aux", "cfg_ahb", +}; + static const char * const msm8996_phy_clk_l[] =3D { "aux", "cfg_ahb", "ref", }; @@ -1437,10 +1441,6 @@ static const char * const qmp_phy_vreg_l[] =3D { "vdda-phy", "vdda-pll", }; =20 -static const char * const ipq8074_pciephy_clk_l[] =3D { - "aux", "cfg_ahb", -}; - /* list of resets */ static const char * const ipq8074_pciephy_reset_l[] =3D { "phy", "common", --=20 2.35.1 From nobody Mon May 6 08:12:24 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 522ECC433FE for ; Thu, 29 Sep 2022 09:30:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234962AbiI2JaG (ORCPT ); Thu, 29 Sep 2022 05:30:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234983AbiI2J30 (ORCPT ); Thu, 29 Sep 2022 05:29:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2E54145CA4; Thu, 29 Sep 2022 02:29:25 -0700 (PDT) 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 8CF3760ECB; Thu, 29 Sep 2022 09:29:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AC96C43166; Thu, 29 Sep 2022 09:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664443763; bh=R4xR8htFlvg+i9bj6nnADR37svsXJfJy0YwnIkjUsvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k3yOrlFgBHBQ4TqvEFfZuVV+ZFRJA1DF9Q/rX7pyAPLwFJUnILVhpDwVWM4oga6kL ORcywXNxwhIMt+sQVWWkysp/I0Bsi8vANsES/6OrTYjNv8m8lrvmFtxLd7ZVuPWoFR vxW029xYpSj31UAH+3W5PJ2AIARYfx02kl6eunMdo+c06jvKA2CfcNxJfHyj2UQySd 20dPYVf8Zl9Qz67+rft+56NnkWRTB6oD1HUs0BeqalQz8zlOS7uFLsB2o60WAKVb2Q 3AlltEcjYT9l97xe1jDatrHGomoRgvLZ6J8rMKK/0vgrVS0uo59dLY99Rqv2H8Dlwx SnOVREgN/RzoA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1odprG-00061g-CP; Thu, 29 Sep 2022 11:29:30 +0200 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Neil Armstrong , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 11/11] phy: qcom-qmp-pcie: drop bogus register update Date: Thu, 29 Sep 2022 11:29:16 +0200 Message-Id: <20220929092916.23068-12-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220929092916.23068-1-johan+linaro@kernel.org> References: <20220929092916.23068-1-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Since commit 0d58280cf1e6 ("phy: Update PHY power control sequence") the PHY is powered on before configuring the registers and only the MSM8996 PCIe PHY, which includes the POWER_DOWN_CONTROL register in its PCS initialisation table, may possibly require a second update afterwards. To make things worse, the POWER_DOWN_CONTROL register lies at a different offset on more recent SoCs so that the second update, which still used a hard-coded offset, would write to an unrelated register (e.g. a revision-id register on SC8280XP). As the MSM8996 PCIe PHY is now handled by a separate driver, simply drop the bogus register update. Fixes: e4d8b05ad5f9 ("phy: qcom-qmp: Use proper PWRDOWN offset for sm8150 U= SB") added support Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov #RB3 --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcom= m/phy-qcom-qmp-pcie.c index a0f62e9633d9..90bdbeee8372 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -1963,12 +1963,6 @@ static int qmp_pcie_power_on(struct phy *phy) qmp_pcie_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl, cfg->pcs_misc_= tbl_num); qmp_pcie_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl_sec, cfg->pcs_m= isc_tbl_num_sec); =20 - /* - * Pull out PHY from POWER DOWN state. - * This is active low enable signal to power-down PHY. - */ - qphy_setbits(pcs, QPHY_V2_PCS_POWER_DOWN_CONTROL, cfg->pwrdn_ctrl); - if (cfg->has_pwrdn_delay) usleep_range(cfg->pwrdn_delay_min, cfg->pwrdn_delay_max); =20 --=20 2.35.1