Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp361252lql; Mon, 11 Mar 2024 05:14:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWnVLz4CCLvigV8TVoPjHuy1XsUOAJr7aF02uM31cNbnzwylfXZaNY1y/krNo+iZ+89fqfvL+uNaZvzE/Kwas6qXrNfDlvY1gbSxWkBEA== X-Google-Smtp-Source: AGHT+IEEgcBsBMkSit5bT7JhfM7sMYgndM9Ljn+F6AsCxNDF3GKIInd8yKkgXKfM8bP+QMmjPioo X-Received: by 2002:a05:6a00:2ea8:b0:6e6:758e:4ad6 with SMTP id fd40-20020a056a002ea800b006e6758e4ad6mr9673542pfb.17.1710159244295; Mon, 11 Mar 2024 05:14:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710159244; cv=pass; d=google.com; s=arc-20160816; b=d04qVPJyN8udZcOhrXuez5c8h5aiFxORwBT71HFGTyt/wm3RO1Mfm4H9W6BmLTIGPF mClBvUKljvJ/R9YYXmuvOC1GWRIsAfsfUnivlkARsVPBjMiiqTHu1hhO28dvBRxBItUN B8MrfqzPBMv6KBFcE7d1q3NNUjzgsl02aT94kP8CAoeOfxPhbQI6sS5Qd7O5Q0WBda3T 57wQpiJpZTnqM26GspV53aYiHKvpnFLi2n+jN8H901UU1x76GmtqRelXQ3JVJ4P2xmAy lSguGfScb7YTQuJTRxf9dvb29Ywh+UNXTS3UZWGVPowQRwcltl7f3NPu8le8VTzhdhRb pzdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=8Df2BGMbvWb2FVi+eRBRBYDqje0ymDCBi93nT5jupjk=; fh=eikso9K7+e8TBJ+i1bH+aQba+vp8G9bzohkkCF0oB50=; b=cJYInOLwfpO4d2pymZ9GxFqmhPG8ru7CMkls02SM6jMVlW9EXuSgCJ6Wg9mNmIPgsf xxajfMm4Qb+7tl0/FVVJR+2tiReOWm2p7sAjqv/cYMBr9wh41RhwJJAPryVVB8paDS8f M8h+LHUR8uFJaYxkGKZP3FKc+Ac5jWPJR5kxsCujNSO2rgwXmYENLzBLEWa1Uq0TepSx /vsnofQQSQ07hGrR0cVRBnou+qtNWC99Pvth04919uT6NPvY0VZn7iUxUb0sxnkEJiD/ 9/JKNYQPUP1RQD1ko4FZWwpBfVKcq6eyI++XmQX09MBrnwRiN/uQECgJsvIUDx0avWfy Kz+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="To/mIZ2a"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-98806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y6-20020a633206000000b005d8c55d9669si4772803pgy.366.2024.03.11.05.14.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 05:14:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="To/mIZ2a"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-98806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 03E3DB224BA for ; Mon, 11 Mar 2024 12:11:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5A4F3C489; Mon, 11 Mar 2024 12:11:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="To/mIZ2a" Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D01E3BBF0 for ; Mon, 11 Mar 2024 12:11:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710159094; cv=none; b=If73LoIAr/p7CBF9yW8ks6DIBlqNwltaBJP8V9UaCSiEwk8d0OunRwBfqBkvYLdf0NLupC5GFLkcFaRkkXZxK4X4YufRmTeb9Cxvhv8NeYPVD2+4KFhaXecg0kX1Wp1H+cNPkcBXufimDEmbyYkzjP2wTHVrbSCNSSbDkXDiWJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710159094; c=relaxed/simple; bh=hPCVMa6Dg6Dev/02Qlr2EszqiAAyEsxvBg5lx8hr1bY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FKeBsYdRspJSS7VGfbyjHqd21rearOzf91cnyNj5IOJC1gHj02otNjAFM+01htaqz/SSIGp5c38B7u811n77F9UaR5uvwdW4ZcLJiFkuokRx3jo5nwZOntjPlmLQFWkyBOdsodSFm/Pmttg+4CBhcSHomYlV01St77Y0NVWs+GE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=To/mIZ2a; arc=none smtp.client-ip=209.85.128.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-609eb87a847so31777407b3.0 for ; Mon, 11 Mar 2024 05:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710159091; x=1710763891; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8Df2BGMbvWb2FVi+eRBRBYDqje0ymDCBi93nT5jupjk=; b=To/mIZ2a/NT8WwzOsnA38kwGMfoew/534sla9xvfbdwCGDypvthEq3zJDT2ewT7ELO yCQK+TUMZF8CpmIa9dKABV/K78FZYcrOiS4MQQk7PDytRa0pIX69WgSWyJYExkyUBhiR sQWsc4jYjyOpzuJLuXBUAFRs6jZowOjG7ZsOiFl9s/4CPOF/7oHsGIh3efYUOuHcVWf1 TVEcUGIJSXkOhvkxCPB1QWT4l6lEb4pwAtCQIIEqi9cgdw2NAroDoftWHhrTL23PG4/t UKjhlfnnV4m7c/SC3frH/DCVC0RYNl4bEO4l/SA3KTDbBRRyzvnPitnbo84/eEV0g7P/ QUHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710159091; x=1710763891; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8Df2BGMbvWb2FVi+eRBRBYDqje0ymDCBi93nT5jupjk=; b=I1Z2lgOz85wLb/+QtvaeXRC3MqWRiFbavF/qyaBUEvaiJu7ASkYV3Kpa9pCcuK8Hw1 JOKFRaYag79mGy8H/eH6sT8RCm2gfXOZNBdNFRdxvYJG38pbmUgIKBf+DGCjeUhEoPwf OurxTO9sSzzp8S/3qbW0wGfx6wggk3uPkBTzuu8KrQKDKFWZJbhI7Xd92PHNiW6ebUe7 ujBTGjcNTmmUrEdXy9up2nBGAMrWcwipmMsvwJxfqfGF55Z9s3ReREbq9XNWQYvPJ2Z1 C51RNzORiZiXLIPVON3Hi0bJUahfAJtBZGcEcYx97SaQGZMgIWbXO3TUxqIbkTZx9/G/ Ozfg== X-Forwarded-Encrypted: i=1; AJvYcCXB2nPJYcEauMhlSGywnWAShi0KIAtjRno/NS6+TApCZ9Dc08Earsi0oZjjGVGt6pqGQXpBZz1Pqp2CLIohW7jjt2s4XK35ynvwL2+9 X-Gm-Message-State: AOJu0Yyz83n1JiFhZBfHwsToqnenpE3QhbEWxsvnmPw0OYSYJf0JIyYE VhTLgOnu7a+pO+ZHz2a9rB82T2YVmxdRUJYRd2cRepqsXDSHaXzi0nIK3kEkoJJdXNz2aZuA6Kl wqNE3WVnOzdc/DBO6/S+m71NQnoCs7NJPETU/qA== X-Received: by 2002:a0d:eec1:0:b0:60a:36c2:fdf8 with SMTP id x184-20020a0deec1000000b0060a36c2fdf8mr1469676ywe.18.1710159091155; Mon, 11 Mar 2024 05:11:31 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240311120215.16845-1-quic_kbajaj@quicinc.com> <20240311120215.16845-5-quic_kbajaj@quicinc.com> In-Reply-To: <20240311120215.16845-5-quic_kbajaj@quicinc.com> From: Dmitry Baryshkov Date: Mon, 11 Mar 2024 14:11:19 +0200 Message-ID: Subject: Re: [PATCH 4/4] phy: qcpm-qmp-usb: Add support for QDU1000/QRU1000 To: Komal Bajaj Cc: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Wesley Cheng , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Amrit Anand Content-Type: text/plain; charset="UTF-8" On Mon, 11 Mar 2024 at 14:05, Komal Bajaj wrote: > > Add QDU1000/QRU1000 specific register layout and table configs. > > Co-developed-by: Amrit Anand > Signed-off-by: Amrit Anand > Signed-off-by: Komal Bajaj > --- > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 52 +++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) > > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c > index 5c003988c35d..e067574bea7a 100644 > --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c > @@ -1441,6 +1441,32 @@ static const struct qmp_phy_init_tbl x1e80100_usb3_uniphy_pcs_usb_tbl[] = { > QMP_PHY_INIT_CFG(QPHY_V7_PCS_USB3_RCVR_DTCT_DLY_U3_H, 0x00), > }; > > + > +static const struct qmp_phy_init_tbl qdu1000_usb3_uniphy_pcs_tbl[] = { > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG1, 0xc4), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG2, 0x89), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG3, 0x20), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG6, 0x13), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_RX_SIGDET_LVL, 0xaa), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_PCS_TX_RX_CONFIG, 0x0c), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_CDR_RESET_TIME, 0x0a), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_ALIGN_DETECT_CONFIG1, 0x88), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_ALIGN_DETECT_CONFIG2, 0x13), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_EQ_CONFIG1, 0x4b), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_EQ_CONFIG5, 0x10), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_REFGEN_REQ_CONFIG1, 0x21), > +}; > + > +static const struct qmp_phy_init_tbl qdu1000_usb3_uniphy_pcs_usb_tbl[] = { > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_USB3_RXEQTRAINING_DFE_TIME_S2, 0x07), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8), > + QMP_PHY_INIT_CFG(QPHY_V4_PCS_USB3_POWER_STATE_CONFIG1, 0x6f), > +}; > + > + > + Please drop extra empty lines. Also the tables are more or less sorted out. Please move this to a correct place. > struct qmp_usb_offsets { > u16 serdes; > u16 pcs; > @@ -1693,6 +1719,29 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { > .regs = qmp_v2_usb3phy_regs_layout, > }; > > +static const struct qmp_phy_cfg qdu1000_usb3_uniphy_cfg = { > + .lanes = 1, > + > + .offsets = &qmp_usb_offsets_v5, > + > + .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl, > + .serdes_tbl_num = ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl), > + .tx_tbl = sm8350_usb3_uniphy_tx_tbl, > + .tx_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_tx_tbl), > + .rx_tbl = sm8350_usb3_uniphy_rx_tbl, > + .rx_tbl_num = ARRAY_SIZE(sm8350_usb3_uniphy_rx_tbl), > + .pcs_tbl = qdu1000_usb3_uniphy_pcs_tbl, > + .pcs_tbl_num = ARRAY_SIZE(qdu1000_usb3_uniphy_pcs_tbl), > + .pcs_usb_tbl = qdu1000_usb3_uniphy_pcs_usb_tbl, > + .pcs_usb_tbl_num = ARRAY_SIZE(qdu1000_usb3_uniphy_pcs_usb_tbl), > + .vreg_list = qmp_phy_vreg_l, > + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), > + .regs = qmp_v4_usb3phy_regs_layout, > + .pcs_usb_offset = 0x1000, > + > + .has_pwrdn_delay = true, > +}; > + > static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { > .lanes = 1, > > @@ -2620,6 +2669,9 @@ static const struct of_device_id qmp_usb_of_match_table[] = { > }, { > .compatible = "qcom,sdx65-qmp-usb3-uni-phy", > .data = &sdx65_usb3_uniphy_cfg, > + }, { > + .compatible = "qcom,qdu1000-qmp-usb3-uni-phy", > + .data = &qdu1000_usb3_uniphy_cfg, Please keep the table sorted. > }, { > .compatible = "qcom,sdx75-qmp-usb3-uni-phy", > .data = &sdx75_usb3_uniphy_cfg, > -- > 2.42.0 > > -- With best wishes Dmitry