From patchwork Wed Feb 8 18:00:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13133499 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 77535C64ED9 for ; Wed, 8 Feb 2023 18:00:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231598AbjBHSAy (ORCPT ); Wed, 8 Feb 2023 13:00:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231573AbjBHSAw (ORCPT ); Wed, 8 Feb 2023 13:00:52 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BF25518EB for ; Wed, 8 Feb 2023 10:00:51 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id f47-20020a05600c492f00b003dc584a7b7eso2062519wmp.3 for ; Wed, 08 Feb 2023 10:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NuslcVzm4ovVkZpIesuPA6j9ljtQBkOK1Q3oSb91/SU=; b=fVGhN1GCVrZm1IcBbu5zfUziHCoDF5aJlvM4pA5UE6nK2j+kOYjAndUcaCLfzsyXNp EdEBPk6YixeQnkXDCf6fAiDauXY94bl5Q5rolcYF71cygHoLFTERE7+jzV4dCukV3yID S/H9ub9MMiM1pIuraqGiH2Gf20c++x5Y+jzc1yu6Kd3sw9hFVu03y24PnDUE3DFhNGK1 ln1fnea/yBkg7qgBBq0n9V0RufqmmqR0xD/KYzFCge+UgCefDqa1pT6pKnA4cPpz0yCU i1ucHcgTms6iDOXr2xpNy1yppQr5MwEDkiPaU5hiY2oN9SMlZGlM4UHQNiuuey+1d29L dt0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NuslcVzm4ovVkZpIesuPA6j9ljtQBkOK1Q3oSb91/SU=; b=dTRrmtb6Hrh/jrry2Qp7HJ0atc7lkQODvRs8ylUZCJ8sMrTXzWOcAlRoxiwnxGHj5F DYu9+MO6RRsACZ4PPGs5VT/89+PutXX5KPBoL4YZn5Bm2c4GRMbKwzZ5jFHY5kOpidkh BNQAb7NeoymGPr64H1VMOJiof3BxQ8VvWGpcSOvoVziYKvycppNg1CYRAz5HSmX/thDv byhBZ8jRVd0oL9GA/A8WnQ4+j6tCXoDXHTbgmbN9JSD904bWSKbdJ4vKllIYC7seE48v 1wKKECXW1WJuK9KcQtiUJN9FafN6KeH3lj68G0ToCQpOQDOQIs9RSTvDYfmNEnJuOFTE xPqg== X-Gm-Message-State: AO0yUKX+EcJgZT/MTzA7HwzPX2vIO/S+zfRh1m4Dgo3QJYukpLRf1rYH OwyVbxcBqv703/0eFW2DLkBQcQ== X-Google-Smtp-Source: AK7set92WA+nm2emR7icl29kIXPOxUUsKGuttEnEogPdmz9+uc4MFTDQsmOZpG3c2yGKpIIRheOQXw== X-Received: by 2002:a05:600c:a295:b0:3da:1e35:dfec with SMTP id hu21-20020a05600ca29500b003da1e35dfecmr7399010wmb.4.1675879250072; Wed, 08 Feb 2023 10:00:50 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id k20-20020a05600c169400b003dc54eef495sm2370286wmn.24.2023.02.08.10.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:00:49 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Krzysztof Kozlowski , Lorenzo Pieralisi , "vkoul@kernel.org" , Kishon Vijay Abraham I , Manivannan Sadhasivam , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , Dmitry Baryshkov Subject: [PATCH v9 02/11] phy: qcom-qmp: pcs: Add v6 register offsets Date: Wed, 8 Feb 2023 20:00:11 +0200 Message-Id: <20230208180020.2761766-3-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230208180020.2761766-1-abel.vesa@linaro.org> References: <20230208180020.2761766-1-abel.vesa@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB, UFS and PCIE g3x2. Add the new PCS offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov --- The v8 of this patch is: https://lore.kernel.org/all/20230206212619.3218741-3-abel.vesa@linaro.org/ Changes since v8: * none Changes since v7: * none Changes since v6: * none Changes since v5: * none Changes since v4: * none Changes since v3: * added Dmitry's R-b tag Changes since v2: * none Changes since v1: * split all the offsets into separate patches, like Vinod suggested drivers/phy/qualcomm/phy-qcom-qmp-pcs-v6.h | 16 ++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp.h | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 drivers/phy/qualcomm/phy-qcom-qmp-pcs-v6.h diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v6.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v6.h new file mode 100644 index 000000000000..18c4a3abe590 --- /dev/null +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-v6.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2023, Linaro Limited + */ + +#ifndef QCOM_PHY_QMP_PCS_V6_H_ +#define QCOM_PHY_QMP_PCS_V6_H_ + +/* Only for QMP V6 PHY - USB/PCIe PCS registers */ +#define QPHY_V6_PCS_REFGEN_REQ_CONFIG1 0xdc +#define QPHY_V6_PCS_RX_SIGDET_LVL 0x188 +#define QPHY_V6_PCS_RATE_SLEW_CNTRL1 0x198 +#define QPHY_V6_PCS_EQ_CONFIG2 0x1e0 +#define QPHY_V6_PCS_PCS_TX_RX_CONFIG 0x1d0 + +#endif diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.h b/drivers/phy/qualcomm/phy-qcom-qmp.h index a63a691b8372..80e3b5c860b6 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp.h +++ b/drivers/phy/qualcomm/phy-qcom-qmp.h @@ -38,6 +38,8 @@ #include "phy-qcom-qmp-pcs-v5_20.h" +#include "phy-qcom-qmp-pcs-v6.h" + /* Only for QMP V3 & V4 PHY - DP COM registers */ #define QPHY_V3_DP_COM_PHY_MODE_CTRL 0x00 #define QPHY_V3_DP_COM_SW_RESET 0x04