From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796295784; b=1to0rjZzaYekxQZCqin9sJzHFjnKOTXDynBmy06gZqn/gHh04uGM8Np3aZ/geJOs4dhC 9Shd9fuzWMKaZ3bvu+rlTJGDPTrAHuWGtQxcrSJVcAj4ZcIDBBloz6KETk96Lp+zLpDN4 1CZY1DpIk94Bx9pSsYc9hvPzAPyWLL+LPSEqyuci0pkKFH0DsHnkfIVdwVGR5NrmrV8x6 ISgGkjj4/xvZtSWy04tNwuzph8k4NnEaHpXwabey8sWmYexwe3jmYJtitGaJWHSZ7qwph xqdLS3e3I+XtxWj9KvTHqu02gWViMYzqeSIIkpxkYF/U3Su+RxMUjCMqKj86pxnDJeg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796295784; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=9Ym8IQK8SFQtkLitxKeEpp5lF/6Wr/kS9rn4Nz4PBGI=; b=K+21EvWcdm+Xdq3tilhnElT9s7LOleaEsa3XRTJgLJ/VFElOTqds+Mzi20Tbj8bDTFoY O2uleMon9bJ38eRA+8k5TI1lDc1kmcN5pIr9oejaADyrMVhe6CuAnJr2H/BKNj441S9st sCaPRNbhM+aPqcWZ5TNRPJc9BnHRFoL+ncjPnMkmI4xfwi6uG3I+p4O5GbjEnTWlWjB9u AF1dcpAOpkDgot2FVg9r5xRPIvlKOBmSe0JS1tAMXavhU92tB0fSVUgiujG+DBQ2dmGnl ndBFp/U7tssEXIk1IbtnMTwKuTMuWHj7xZKgpTfOnHWMmqXf0g6DKxPVgaXQVXc+iuQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RoTLdL3J; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DFEF606A322 for ; Thu, 3 Dec 2026 11:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=RoTLdL3J Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B60E1F00896; Thu, 3 Dec 2026 11:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796295784; bh=9Ym8IQK8SFQtkLitxKeEpp5lF/6Wr/kS9rn4Nz4PBGI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=RoTLdL3JAdK7H3mYiklwGqLa3rJ8bmF9ZRqGFbeqtHrXLRlAy5kpI0asGXw1FFAjX RokMLlBzw8V9j31b/U/hGWcNoF/ckED6GS8gE2ofQrmz+Nx4vGchNsGV37c0dCUoza IWKQ9W+6myHXWaAwh98/++9ROU9CX7fTr71O6VkJcPSfxGYX8H2NBUiJCltekuOBcB k1NwhJq7EfCBnCaH0bjXINu0YNwjiUB5feOkfWYEfDL4Sa70CVZuVTdyNGLUSphOyo L5E4NIwauqdCXOpgn6prOd8g0vKfh1XFtSs0Fh6rhw9NQAuw2LXgVcXhJmZR/wVacj IqMNiiqO07I5Q== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 09/10] phy: qcom: edp: Generalize power-on path for per-SoC overrides Reply-To: sashiko-reviews@lists.linux.dev To: "Nabige Aala" Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com In-Reply-To: <20261203-nord-drv-dt-v4-9-a899d23af07a@oss.qualcomm.com> References: <20261203-nord-drv-dt-v4-0-a899d23af07a@oss.qualcomm.com> <20261203-nord-drv-dt-v4-9-a899d23af07a@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 11:03:02 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] phy: qcom: edp: TXn_TX_BAND reordered past com_resetsm_cntrl() on power-on - [Medium] phy: qcom: edp: qcom_edp_phy_power_on() bypasses per-SoC TX_DRV_LVL override -- commit 493d2990280e67ac4cc64c08d1e81b79f34eee25 Author: Ritesh Kumar phy: qcom: edp: Generalize power-on path for per-SoC overrides This commit adds tx_res_config(), set_voltages(), and dcc_calibrate() hooks to phy_ver_ops and moves several PHY register offsets and the two-lane bias setting into qcom_edp_phy_cfg so newer SoCs can override parts of the DP/eDP PHY power-on and voltage setup paths. > diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/p= hy-qcom-edp.c > index 5e773843d6e62..46bc9a7797675 100644 > --- a/drivers/phy/qualcomm/phy-qcom-edp.c > +++ b/drivers/phy/qualcomm/phy-qcom-edp.c [ ... ] > @@ -1121,21 +1161,19 @@ static int qcom_edp_phy_power_on(struct phy *phy) > =20 > /* TX Lane configuration */ > writel(0x05, edp->edp + DP_PHY_TX0_TX1_LANE_CTL); > - writel(0x05, edp->edp + DP_PHY_TX2_TX3_LANE_CTL); > + writel(0x05, edp->edp + edp->cfg->tx2_tx3_lane_ctl); > =20 > /* TX-0 register configuration */ > writel(0x03, edp->tx0 + TXn_TRANSCEIVER_BIAS_EN); > writel(0x0f, edp->tx0 + TXn_CLKBUF_ENABLE); > writel(0x03, edp->tx0 + TXn_RESET_TSYNC_EN); > writel(0x01, edp->tx0 + TXn_TRAN_DRVR_EMP_EN); > - writel(0x04, edp->tx0 + TXn_TX_BAND); > =20 > /* TX-1 register configuration */ > writel(0x03, edp->tx1 + TXn_TRANSCEIVER_BIAS_EN); > writel(0x0f, edp->tx1 + TXn_CLKBUF_ENABLE); > writel(0x03, edp->tx1 + TXn_RESET_TSYNC_EN); > writel(0x01, edp->tx1 + TXn_TRAN_DRVR_EMP_EN); > - writel(0x04, edp->tx1 + TXn_TX_BAND); > =20 > ret =3D qcom_edp_set_vco_div(edp, &pixel_freq); > if (ret) [Severity: Medium] Is it safe to defer the TXn_TX_BAND writes past the PHY reset and com_resetsm_cntrl()? Moving TXn_TX_BAND into qcom_edp_tx_res_config_default() reorders it after qcom_edp_set_vco_div(), the DP_PHY_CFG reset sequence, and com_resetsm_cntrl() for all existing SoCs. Sibling QMP DP drivers (qmp_combo_dp_power_on() and qmp_usbc_dp_power_on()) also program TX_BAND before DP_PHY_CFG and COM_RESETSM_CNTRL, so deferring it may regress PHY bring-up or link training on existing platforms. Keeping TXn_TX_BAND in the pre-reset TX phase via a separate hook or config field would preserve the existing sequence. > @@ -1159,13 +1197,9 @@ static int qcom_edp_phy_power_on(struct phy *phy) > writel(0x00, edp->tx1 + TXn_TX_POL_INV); > writel(0x10, edp->tx0 + TXn_TX_DRV_LVL_OFFSET); > writel(0x10, edp->tx1 + TXn_TX_DRV_LVL_OFFSET); > - writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX0); > - writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX1); > - writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX0); > - writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX1); > - > - writel(0x10, edp->tx0 + TXn_TX_EMP_POST1_LVL); > - writel(0x10, edp->tx1 + TXn_TX_EMP_POST1_LVL); > + ret =3D edp->cfg->ver_ops->tx_res_config(edp); > + if (ret) > + return ret; > writel(0x1f, edp->tx0 + TXn_TX_DRV_LVL); > writel(0x1f, edp->tx1 + TXn_TX_DRV_LVL); [Severity: Medium] Should the TXn_TX_DRV_LVL writes also move into qcom_edp_tx_res_config_default()? Leaving these hardcoded writes in qcom_edp_phy_power_on() bypasses the per-SoC hooks on platforms with relocated TX drive-level registers. In commit "phy: qcom: edp: Add Nord DP PHY support", Nord initializes DP_PHY_TX_LN0_DRV_LVL_NORD and DP_PHY_TX_LN1_DRV_LVL_NORD to 0x12 in qcom_edp_tx_res_config_nord() and overrides set_voltages(), yet qcom_edp_phy_power_on() still writes 0x1f to TXn_TX_DRV_LVL on tx0/tx1. On Nord, those writes either hit a repurposed register in the tx0/tx1 blocks or leave a legacy drive-level register stuck at 0x1f instead of 0x12. Moving these writes into qcom_edp_tx_res_config_default() alongside TXn_TX_EMP_POST1_LVL would keep the power-on path consistent. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-nord-drv-d= t-v4-0-a899d23af07a@oss.qualcomm.com?part=3D9