From patchwork Wed Feb 8 18:00:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 652993 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 3B50FC677F1 for ; Wed, 8 Feb 2023 18:01:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231659AbjBHSBB (ORCPT ); Wed, 8 Feb 2023 13:01:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231646AbjBHSA6 (ORCPT ); Wed, 8 Feb 2023 13:00:58 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22538530D6 for ; Wed, 8 Feb 2023 10:00:55 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id hn2-20020a05600ca38200b003dc5cb96d46so2057555wmb.4 for ; Wed, 08 Feb 2023 10:00:55 -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=/2ULfqaWtAXZsjMHKgQGvS+d3WjfdWm7pm2QzT86+1Q=; b=JAcWPyMrT1gIswMyagFQ8OSbzsFQR168lSLRwRMsHBc8jR9PaoOrLOD8dVvifSaoYl qvDJv7JhIjUg4URX6LiyhQLY/6JZt5hNFn4OUnCiBP8yA/r9abJCIhYK4+rBSlyDOyhO OYWxij1CvgaJiMH8E76Q5k3Bf7T36cL+o3KFdc8MycLfAPRjSkDWoWoavY/IUb6xB1SR d/Y41/zi2xLLrBona7QSfMpFmEJsKfclUJBGvF1gETvV4+kVu943dLWqfONQ/2amtBNR eeBFDvFBfIRLFET7OskmjV/BXTIbH6WtYG1um0p1ImUmQFcWSBe9YqDgjOiX9RO1pnns fOxw== 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=/2ULfqaWtAXZsjMHKgQGvS+d3WjfdWm7pm2QzT86+1Q=; b=h3ZosDzlNxX/ITSlicdOpNZ8dCyEsdmvFQQQbjqzWqB66MyzkZOnIM/L2FO4sCVbi1 GFA2xppJHH/BjpUenubPBsT4JCDCa0mi7QI0kyP9n48wYVS9OpDyfv/8ArzKl1m+E96T Lag0Wp5eYoUXO3T+ggsAsHvxzxbIVaLRILPYmB07tcIzD1elrYYIKaDeNiMEIWcTzHIP DqZmQ5zDBUTj26VoYEE5ilujA+aRg9TvOnTxQbSwmHyzWgDs8k7U9IzBahZHXBxnNqVs WnlfAHcF2X2IZf0h3LvLCXg6Raqln5ZkEIsDkEmfQkhO16QFGjfs8eQ8Rc4MXwB6AW6Y Q7rw== X-Gm-Message-State: AO0yUKVT/nebxS9VpdnTkarj8r2Amq76mXsXf4y3XvrlK3a0CBI6Kl/v 6YZHEOKtg5NziFp5kQImLFjYrA== X-Google-Smtp-Source: AK7set8W0N68Y8OoOwDpG/GwtUos2odmIiJjsigJPt1vMtKkbI1POjZam2roD3GAVdHdZ2fSH2xwKw== X-Received: by 2002:a05:600c:19d1:b0:3e0:15b:47b3 with SMTP id u17-20020a05600c19d100b003e0015b47b3mr7486577wmq.32.1675879253472; Wed, 08 Feb 2023 10:00:53 -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.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 10:00:52 -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 04/11] phy: qcom-qmp: pcs-pcie: Add v6 register offsets Date: Wed, 8 Feb 2023 20:00:13 +0200 Message-Id: <20230208180020.2761766-5-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-arm-msm@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 PCIE specific 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-5-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-pcie.c | 1 + drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v6.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v6.h diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 0e7aaff2ecfd..05b59f261999 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -29,6 +29,7 @@ #include "phy-qcom-qmp-pcs-pcie-v4_20.h" #include "phy-qcom-qmp-pcs-pcie-v5.h" #include "phy-qcom-qmp-pcs-pcie-v5_20.h" +#include "phy-qcom-qmp-pcs-pcie-v6.h" #include "phy-qcom-qmp-pcie-qhp.h" /* QPHY_SW_RESET bit */ diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v6.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v6.h new file mode 100644 index 000000000000..91e70002eb47 --- /dev/null +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-pcie-v6.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2023, Linaro Limited + */ + +#ifndef QCOM_PHY_QMP_PCS_PCIE_V6_H_ +#define QCOM_PHY_QMP_PCS_PCIE_V6_H_ + +/* Only for QMP V6 PHY - PCIE have different offsets than V5 */ +#define QPHY_PCIE_V6_PCS_PCIE_POWER_STATE_CONFIG2 0x0c +#define QPHY_PCIE_V6_PCS_PCIE_POWER_STATE_CONFIG4 0x14 +#define QPHY_PCIE_V6_PCS_PCIE_ENDPOINT_REFCLK_DRIVE 0x20 +#define QPHY_PCIE_V6_PCS_PCIE_OSC_DTCT_ACTIONS 0x94 + +#endif