Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1666192lqp; Mon, 15 Apr 2024 13:10:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXedcnAixn8xne7OwWzRxa4g7OS1GKRAtL9wv8QfOVeaI3JqgZMISsCw2KNdZvsdhGFEaApKCxQORiqJgSCgFqv5niFbm9e0Zb0p6v2kQ== X-Google-Smtp-Source: AGHT+IGcDJuBP5bGMP/d/+h1NvZRBPhBLxt8obzWTmShwzCoJh2mzcUOOt3bmx33My2NBG9ohQDA X-Received: by 2002:a05:6214:584f:b0:69b:6f13:7999 with SMTP id ml15-20020a056214584f00b0069b6f137999mr87715qvb.7.1713211853481; Mon, 15 Apr 2024 13:10:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713211853; cv=pass; d=google.com; s=arc-20160816; b=s5TTLAiHF5Rtq51befdmIkYjW6ZbfB6X5Y7vW2tyUea6m6lKgeF/uHKlYnghjI6zbN O6x7t5SnuA82N+k+05p/56r1vnevYiefci6Sk/ThVRz4Gxh+aTitehVEqbhKr6Q0UCmt kfp5x7EpQycOC7XXMX9AXXN4ESXhbPRnh2nB+10lAyG+EIEiHYn8PK1UBBbjGZ+Mwbs2 sfAY/0fV0+Ucr8fBWnnDEqDDMDWnBvvd/Jl9ckn32cnMSo+llmSMe5ETw2vC66xV6G+D hOL7JL9iYys9Ld+NxjoRXpSELGrLbM9emPHhoE+uZSmRsRor7lW1aX2fbOloDAGZxq5B tNhQ== 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=N+78Ths3N+m/trnfB/LCX44mWfPui51vN9doYTN2NYM=; fh=N8k53/fvoBbt3rkJZ50INr1gGA6rmIcztzq7mCFHsms=; b=m2XEGylhjmlfzKzeJ0PwbSQf0yhKZ/UJUOWUl45pQ3QEqZ59UqZXK/ruuvrh91zN2v nSZULlu2tm2wvHiCUd/ni1LNOH81FveR3c73H1NLIhUIfWj80C+O5XN1+tI4p7PjlZcl hOtzXM7IFcqa3t6fDLZvveXvL5czqw+LxiGzdkh3m/BtVnU/tE8qaE3RAJ3e9nmwV2Nn g3fWyMRxkmSvhWIqHOLvP93FlLH8WJzNSCLoZHcf1/k4Kw5n7yuPUaYsaeBggX4bAum5 DttM1Z3ciycuQdFV1H3yP95796LJAVjqU/fDJRCpEdyLbTOSdwC9oZDb2pJKgB8ye9ES FqCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oZFANBZw; 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-145863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145863-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h6-20020a0cd806000000b0069b7c307240si2926490qvj.375.2024.04.15.13.10.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 13:10:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oZFANBZw; 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-145863-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145863-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id ED0A51C20D74 for ; Mon, 15 Apr 2024 20:10:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E3C2156879; Mon, 15 Apr 2024 20:10:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oZFANBZw" Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.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 4D0B4155A59 for ; Mon, 15 Apr 2024 20:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713211843; cv=none; b=eycMzdk9XEQmI1VrAR8y//tFx8vnogk3OhqwTdsQ3fsOtbHxPe3PZc5+To5Mb9w+WBs2c4JqucXSmhEZzZx3IvMSb7gdBoMoHCN6E4ZRGfIoZSJJ1922UQoxCn0ctTQSJuAjT+AbjqvlMg8jhT0ZGjDeuZfNpahD+wYp7mfv4Wg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713211843; c=relaxed/simple; bh=HlV7PNxjhHZXhDEySUcwKrxlmqDtJcya54wZ5/zd6IE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=alNixvh/OIvMgkC7onPXTlfXw2AG4MRr6wcPgNfX7gDmQlvg5XUtCexwi0nAg7Z6cE+KRKMyWQblyqikb3G0ci9k8KkHRT8TqkWJISfgjkJuWSmbhLL9BiqLk7/lj2TOMiIVA/Ytt+HyJdYuqm3nsAZXMQtBrjTHNG/JA0MV734= 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=oZFANBZw; arc=none smtp.client-ip=209.85.219.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-yb1-f177.google.com with SMTP id 3f1490d57ef6-dcc6fc978ddso2673035276.0 for ; Mon, 15 Apr 2024 13:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713211840; x=1713816640; 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=N+78Ths3N+m/trnfB/LCX44mWfPui51vN9doYTN2NYM=; b=oZFANBZwkHu8WvJVRRD+CRFuevxDlhxI+A9lkRvRlSigCwdUAO6hZfxFwTWQ7u7eXB AlypVnLUDVa3aaGgnP7RpSVsZv+mcEQUHEG7mXmt7mDySMdaUwlq9JvfkfiaHArMI7Dr vKkTldcwX5Aa1iAuY5QBrEVsPuzyWkx+5nsbH2PpaeknYgiMoLk4cSTHiF0dv1vFGj6H 2MG9Lu2ILCx7ucX1q9UMJ6kaJouIo5EMz+LNzRYWmVV/bOHD8ej6K8gu9nXS7OcumUjd 6LaZKON0FXWLW0m3ohDAJmpX4AmRymqrQK/qrrsc+S1H+xn30xG0r7SX64FbmIwe+HQv aYSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713211840; x=1713816640; 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=N+78Ths3N+m/trnfB/LCX44mWfPui51vN9doYTN2NYM=; b=lgQ6KjNKECYXFbva+gCu3Vx0jJuouiyFfd9LR/fwFl10kfX3B0kVQ/y/Km/+RB2ODW iKlH07Pq65RxqUtPa8XbIxZs5J17fkV86OhC2Ut0mNLmqPSIgCzbxNUSAiruToK6RSue bv4RmMxbv5gK4rOXXCfNjYQ8EvKy9jW2c2bx/W7czCtagAhLRY2v00+HE5iaJa/j1itW +CUqgM/J2Ajrw62vDus8RWwbcaWslHgtux6RlS4UkLeLYZtJmjopm+/kv6lrpLj/JzRs 5AiZxNNK7X1XVxc6JYGwTOxeN0+xfDHZc1hTDE+PVQn2ZrHBXeOapdWG9aD9kVbRoldz zZng== X-Forwarded-Encrypted: i=1; AJvYcCXwZG7cr0LgcjLo2ovP4Pa9O+wY8HKUWTd52DtDzv446rMOAIlcUEKQPVK/3jMmTsEUxiq5chX/4yib61PLP69yfBh5jWCyb0Zmxdbn X-Gm-Message-State: AOJu0YxVxSM3zrJK2lBy3fTW62LAWloEn29s0kpD5Yli0VGbgssoeOW3 hPZUl+D24QR2+TdVBbKOyHBjWzlIuV52yBW5JPaS9+7qljavi5nrYKBkkwp5ytdW4zYRtJ2VTdM zjBfRDkY1wBNllQTCATyA+0yl7fKs2mLYMjFTtg== X-Received: by 2002:a5b:90e:0:b0:dc2:23b1:eaef with SMTP id a14-20020a5b090e000000b00dc223b1eaefmr36360ybq.18.1713211840182; Mon, 15 Apr 2024 13:10:40 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240415182052.374494-1-mr.nuke.me@gmail.com> <20240415182052.374494-7-mr.nuke.me@gmail.com> In-Reply-To: <20240415182052.374494-7-mr.nuke.me@gmail.com> From: Dmitry Baryshkov Date: Mon, 15 Apr 2024 23:10:29 +0300 Message-ID: Subject: Re: [PATCH v3 6/7] phy: qcom-qmp-pcie: add support for ipq9574 gen3x2 PHY To: Alexandru Gagniuc Cc: Bjorn Andersson , Konrad Dybcio , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Mon, 15 Apr 2024 at 21:23, Alexandru Gagniuc wrote: > > Add support for the gen3x2 PCIe PHY on IPQ9574, ported form downstream > 5.4 kernel. Only the serdes and pcs_misc tables are new, the others > being reused from IPQ8074 and IPQ6018 PHYs. > > Signed-off-by: Alexandru Gagniuc > --- > drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 136 +++++++++++++++++- > .../phy/qualcomm/phy-qcom-qmp-pcs-pcie-v5.h | 14 ++ > 2 files changed, 149 insertions(+), 1 deletion(-) > [skipped] > @@ -2448,7 +2542,7 @@ static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) > > /* list of clocks required by phy */ > static const char * const qmp_pciephy_clk_l[] = { > - "aux", "cfg_ahb", "ref", "refgen", "rchng", "phy_aux", > + "aux", "cfg_ahb", "ref", "refgen", "rchng", "phy_aux", "anoc", "snoc" Are the NoC clocks really necessary to drive the PHY? I think they are usually connected to the controllers, not the PHYs. > }; > > /* list of regulators */ > @@ -2499,6 +2593,16 @@ static const struct qmp_pcie_offsets qmp_pcie_offsets_v4x1 = { > .rx = 0x0400, > }; > > +static const struct qmp_pcie_offsets qmp_pcie_offsets_ipq9574 = { > + .serdes = 0, > + .pcs = 0x1000, > + .pcs_misc = 0x1400, > + .tx = 0x0200, > + .rx = 0x0400, > + .tx2 = 0x0600, > + .rx2 = 0x0800, > +}; > + > static const struct qmp_pcie_offsets qmp_pcie_offsets_v4x2 = { > .serdes = 0, > .pcs = 0x0a00, > @@ -2728,6 +2832,33 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = { > .phy_status = PHYSTATUS, > }; > > +static const struct qmp_phy_cfg ipq9574_pciephy_gen3x2_cfg = { > + .lanes = 2, > + > + .offsets = &qmp_pcie_offsets_ipq9574, > + > + .tbls = { > + .serdes = ipq9574_gen3x2_pcie_serdes_tbl, > + .serdes_num = ARRAY_SIZE(ipq9574_gen3x2_pcie_serdes_tbl), > + .tx = ipq8074_pcie_gen3_tx_tbl, > + .tx_num = ARRAY_SIZE(ipq8074_pcie_gen3_tx_tbl), > + .rx = ipq6018_pcie_rx_tbl, > + .rx_num = ARRAY_SIZE(ipq6018_pcie_rx_tbl), > + .pcs = ipq6018_pcie_pcs_tbl, > + .pcs_num = ARRAY_SIZE(ipq6018_pcie_pcs_tbl), > + .pcs_misc = ipq9574_gen3x2_pcie_pcs_misc_tbl, > + .pcs_misc_num = ARRAY_SIZE(ipq9574_gen3x2_pcie_pcs_misc_tbl), > + }, > + .reset_list = ipq8074_pciephy_reset_l, > + .num_resets = ARRAY_SIZE(ipq8074_pciephy_reset_l), > + .vreg_list = NULL, > + .num_vregs = 0, > + .regs = pciephy_v4_regs_layout, So, is it v4 or v5? > + > + .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, > + .phy_status = PHYSTATUS, > +}; > + > static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = { > .lanes = 2, > -- With best wishes Dmitry