From patchwork Thu Jan 26 13:14: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: 48622 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp264019wrn; Thu, 26 Jan 2023 05:16:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXutS8buUSaGKZzo8lzJpF2TW5uYJcB3BqNiosPRIRoTHMXU0ZgaKxFHsD7hRMDcPO/ect7n X-Received: by 2002:a17:906:c1c6:b0:819:2756:e090 with SMTP id bw6-20020a170906c1c600b008192756e090mr36396998ejb.50.1674738963586; Thu, 26 Jan 2023 05:16:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674738963; cv=none; d=google.com; s=arc-20160816; b=NcjMKMmcVuO80eWo2z1RZ/GRXQWXtIOk/fAoBROXljC5bfLuMIb4QwNlAYo5xjUd2P 3C9Wcfz2/R1TnTxSot/GknCJ8IpVqx9vPlku8K3FlZbJC9ptHgc8fqOqNT1ym2OBuceK mmQQ6qn4++cTGIUzUnAEBJkuVnc3U82KdFcN6UWzSzLRB1bxulKC/YCcQ1n6d23E9ybX so3ClbA6AG9w6GkiSMOR9vJlTCUVClq2cK8pHMdczc193CTXnoiy/IR2rLeKpKZ9Thih nWpmsxS/JFXcgjaI2jvJwFIlNShcLX9qMJwuoK7QyfAJbPaLPr9i1rG1z3DuE3nMr5ND 8GQQ== 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=kURYlYVInYs10ttpQnifCsWvtgqKTN58XyXAiFJVJmk=; b=E6oVtIQrQstVeIkm41eZhT8Yj6G2y4VMAyWBRFIZCLyAQJbsIHh0OV1eyc5kfIVFCt c+cnr9s4Lq5usYTS6AUOEHY6smhxu3l2NXVWupsp89BB84MZ5j7/jaanthti2WrwbvbH xytDEkYoVANT4kVvNMWn07H18N1vz40gYOcfCIA1/AAix5x4SiHLnX73fELtPST+Z3J+ hmIrk3H5ukMHiVPXXCu878PSjJnyDn/0Ac29yCDl5H6FwmVTpRO1TBU3ZXssE6GIQNOG FDyuQWGpX9JodzGY6Hjt4x0kVN+hnq3/LQBhFk8KLKm3BP1DI3+trrjplu4GKxxKmvLD O2Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vs1slFZN; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 3-20020a170906008300b00875abc669casi1265571ejc.572.2023.01.26.05.15.40; Thu, 26 Jan 2023 05:16:03 -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=@linaro.org header.s=google header.b=vs1slFZN; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236695AbjAZNO7 (ORCPT + 99 others); Thu, 26 Jan 2023 08:14:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236498AbjAZNOs (ORCPT ); Thu, 26 Jan 2023 08:14:48 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A8F86950D for ; Thu, 26 Jan 2023 05:14:26 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id q10-20020a1cf30a000000b003db0edfdb74so3934055wmq.1 for ; Thu, 26 Jan 2023 05:14:25 -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=kURYlYVInYs10ttpQnifCsWvtgqKTN58XyXAiFJVJmk=; b=vs1slFZNTRGkGwY5ZeFOhINvWnSjW1vc40xeezY992M/0jOmZt7nXHI2tE5L7o0Qrz oM+FtRVXkUgBpaGuhnQ2R0rHBXR8lNHUs6wP/vwZJC90mKkhDn0fdXYMZoufztAyavnX wmeb06hMn7M3k90MzldwrkM8Hjom1768vdwUI0FgujKowzncPZ29KVmm8hC/p55B6iY+ JHJRpHwMFrAC0Ma44EbWtzTNzDuRtm0uYjMGZt3FpB2pMTIX2PkY568oBdhfFq7lz9e8 zy2/9sJReS+EX1SukT3nPJw6ynSKZe4YeQOln/WQ2aisN0rw7qV2fSRZTpj8UZz+QCza RjFA== 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=kURYlYVInYs10ttpQnifCsWvtgqKTN58XyXAiFJVJmk=; b=Q1F43jWwFc0oDf2qymLI7/3zDZb+zHK/ZWlHsp8Vxe8nTJRoCPHJPW48+HanvPhe5o bCL5qzwVufKyz/mNecVsqneFXGAA+yVhaqoZpEmKQ8aiQaAeax521d/LhSUcPJNGJyFK pi1o2i2UwnyTe5muq0SSUbs+1js+lP5fRP/oRAb1MN9DWmyO6KlKkSjMrdRiNUXTOGyw toBhhCcTe0IjnBGyBG2q4l74CgMgGHTdvMYFgGXpJXmvbMpYRxaRrhueQoTGACI9+Ong a33Z/QLptnLxXAUMdH08Mil0m63y3AMlXoiQyUr+tM8C0tczlpnB3IoBkrkVjKsgS7ka ppzQ== X-Gm-Message-State: AFqh2kpHicm5C/MBAEk5PqRvGhqrcGav79YzRMMy6pgJ0C5uIlEwHfM0 EdJlirv/zBPlS3Dst10FoEnAYA== X-Received: by 2002:a05:600c:35c1:b0:3db:1424:e781 with SMTP id r1-20020a05600c35c100b003db1424e781mr29987079wmq.23.1674738864516; Thu, 26 Jan 2023 05:14:24 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id 18-20020a05600c26d200b003da28dfdedcsm1719804wmv.5.2023.01.26.05.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:14:24 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I , Philipp Zabel Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org Subject: [PATCH v3 4/8] phy: qcom-qmp: pcs-usb: Add v6 register offsets Date: Thu, 26 Jan 2023 15:14:11 +0200 Message-Id: <20230126131415.1453741-5-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126131415.1453741-1-abel.vesa@linaro.org> References: <20230126131415.1453741-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1756091083804685832?= X-GMAIL-MSGID: =?utf-8?q?1756091083804685832?= The new SM8550 SoC bumps up the HW version of QMP phy to v6 for USB. Add the new PCS USB specific offsets in a dedicated header file. Signed-off-by: Abel Vesa --- The v2 version of this patch was here: https://lore.kernel.org/all/20230126124651.1362533-5-abel.vesa@linaro.org/ Changes since v2: * none Changes since v1: * split all the offsets into separate patches, like Vinod suggested drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 1 + .../phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index 521ea3ce6b83..14d12d198d87 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -26,6 +26,7 @@ #include "phy-qcom-qmp-pcs-misc-v3.h" #include "phy-qcom-qmp-pcs-usb-v4.h" #include "phy-qcom-qmp-pcs-usb-v5.h" +#include "phy-qcom-qmp-pcs-usb-v6.h" /* QPHY_SW_RESET bit */ #define SW_RESET BIT(0) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h new file mode 100644 index 000000000000..9510e63ba9d8 --- /dev/null +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcs-usb-v6.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2022, The Linux Foundation. All rights reserved. + */ + +#ifndef QCOM_PHY_QMP_PCS_USB_V6_H_ +#define QCOM_PHY_QMP_PCS_USB_V6_H_ + +/* Only for QMP V6 PHY - USB3 have different offsets than V5 */ +#define QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG1 0xc4 +#define QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG2 0xc8 +#define QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG3 0xcc +#define QPHY_USB_V6_PCS_LOCK_DETECT_CONFIG6 0xd8 +#define QPHY_USB_V6_PCS_REFGEN_REQ_CONFIG1 0xdc +#define QPHY_USB_V6_PCS_USB3_POWER_STATE_CONFIG1 0x90 +#define QPHY_USB_V6_PCS_RX_SIGDET_LVL 0x188 +#define QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_L 0x190 +#define QPHY_USB_V6_PCS_RCVR_DTCT_DLY_P1U2_H 0x194 +#define QPHY_USB_V6_PCS_CDR_RESET_TIME 0x1b0 +#define QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG1 0x1c0 +#define QPHY_USB_V6_PCS_ALIGN_DETECT_CONFIG2 0x1c4 +#define QPHY_USB_V6_PCS_PCS_TX_RX_CONFIG 0x1d0 +#define QPHY_USB_V6_PCS_EQ_CONFIG1 0x1dc +#define QPHY_USB_V6_PCS_EQ_CONFIG5 0x1ec + +#define QPHY_USB_V6_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL 0x18 +#define QPHY_USB_V6_PCS_USB3_RXEQTRAINING_DFE_TIME_S2 0x3c +#define QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_L 0x40 +#define QPHY_USB_V6_PCS_USB3_RCVR_DTCT_DLY_U3_H 0x44 + +#endif