Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Cody Kang" <codykang.hk@gmail.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-phy@lists.infradead.org, linux-clk@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
	neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v4 05/16] phy: spacemit: add Innosilicon DP TX PHY driver
Date: Sun, 29 Nov 2026 12:48:20 +0000	[thread overview]
Message-ID: <sashiko-outbox-239606@kernel.org> (raw)
In-Reply-To: <20261129-k3-display-v4-5-ce6cf7988202@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] phy: spacemit: restore DPTX_ANA_BG_EN_RCAL after
  k3_inno_dp_phy_exit()
--

commit db47538992daf82cf49bc60c2552401b3362a0b7
Author: Cody Kang <codykang@vsit.ai>

phy: spacemit: add Innosilicon DP TX PHY driver

This commit adds a PHY and pixel-clock provider driver for the Innosilicon
DisplayPort transmit PHY on the SpacemiT K3 SoC.

> diff --git a/drivers/phy/spacemit/phy-k3-inno-dp.c b/drivers/phy/spacemit/phy-k3-inno-dp.c
> new file mode 100644
> index 0000000000000..75ec9e16d2757
> --- /dev/null
> +++ b/drivers/phy/spacemit/phy-k3-inno-dp.c
[ ... ]
> +/* Bandgap and lane supplies back on after exit. */
> +static int k3_inno_dp_phy_init(struct phy *phy)
> +{
> +	struct k3_inno_dp_phy *p = phy_get_drvdata(phy);
> +	struct regmap *rm = p->regmap;
> +	int ret;
> +
> +	ret = regmap_set_bits(rm, DPTX_ANA_TX_CTRL6, DPTX_ANA_BG_EN);
> +	if (ret)
> +		return ret;
> +
> +	ret = regmap_set_bits(rm, DPTX_ANA_TX_ENABLE,
> +			      DPTX_ANA_TX_EN_LDO_D3 | DPTX_ANA_TX_EN_LDO_D2 |
> +			      DPTX_ANA_TX_EN_LDO_D1 | DPTX_ANA_TX_EN_LDO_D0 |
> +			      DPTX_ANA_TX_EN_DRV_D3 | DPTX_ANA_TX_EN_DRV_D2 |
> +			      DPTX_ANA_TX_EN_DRV_D1 | DPTX_ANA_TX_EN_DRV_D0);
> +	if (ret)
> +		return ret;
> +
> +	return regmap_set_bits(rm, DPTX_ANA_TX_CTRL3,
> +			       DPTX_ANA_TX_EN_P2S_D3 | DPTX_ANA_TX_EN_P2S_D2 |
> +			       DPTX_ANA_TX_EN_P2S_D1 | DPTX_ANA_TX_EN_P2S_D0);
> +}
> +
> +static int k3_inno_dp_phy_exit(struct phy *phy)
> +{
> +	struct k3_inno_dp_phy *p = phy_get_drvdata(phy);
> +	struct regmap *rm = p->regmap;
> +
[ ... ]
> +	regmap_write_bits(rm, DPTX_ANA_TX_CTRL6, DPTX_ANA_BG_EN,
> +			  FIELD_PREP(DPTX_ANA_BG_EN, 0));
> +	regmap_write_bits(rm, DPTX_ANA_TX_CTRL7, DPTX_ANA_BG_EN_RCAL,
> +			  FIELD_PREP(DPTX_ANA_BG_EN_RCAL, 0));

[Severity: Medium]
Should k3_inno_dp_phy_init() (or k3_inno_dp_phy_calibrate()) re-enable
DPTX_ANA_BG_EN_RCAL in DPTX_ANA_TX_CTRL7?  k3_inno_dp_phy_exit() clears
it, and neither k3_inno_dp_phy_init() nor k3_inno_dp_phy_calibrate() sets
it back, leaving the resistor-calibration reference disabled if the PHY is
re-initialized after phy_exit().

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261129-k3-display-v4-0-ce6cf7988202@gmail.com?part=5

  reply	other threads:[~2026-11-29 12:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 12:32 [PATCH v4 00/16] drm/spacemit: add SpacemiT K3 display support Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 01/16] dt-bindings: display: spacemit: add K3 Saturn DPU controller Cody Kang via B4 Relay
2026-11-29 12:36   ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 02/16] dt-bindings: phy: add SpacemiT K3 Innosilicon DP PHY Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 03/16] dt-bindings: display: spacemit: add K3 Innosilicon DP/eDP controller Cody Kang via B4 Relay
2026-11-29 12:38   ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 04/16] dt-bindings: soc: spacemit: allow eDP/DP PHY PLL pixel clocks on K3 APMU Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 05/16] phy: spacemit: add Innosilicon DP TX PHY driver Cody Kang via B4 Relay
2026-11-29 12:48   ` sashiko-bot [this message]
2026-11-29 12:32 ` [PATCH v4 06/16] drm/spacemit: add Saturn DPU register model Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 07/16] drm/spacemit: add Saturn DPU core types, cmdlist and display MMU Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 08/16] drm/spacemit: add Saturn DPU hardware backend Cody Kang via B4 Relay
2026-11-29 12:49   ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 09/16] drm/spacemit: add Saturn DPU KMS pipeline Cody Kang via B4 Relay
2026-11-29 12:54   ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 10/16] drm/spacemit: add Saturn DPU DRM device driver Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 11/16] drm/spacemit: add Innosilicon DP/eDP controller bridge driver Cody Kang via B4 Relay
2026-11-29 13:01   ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 12/16] MAINTAINERS: add SpacemiT K3 display driver entry Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 13/16] riscv: dts: spacemit: k3: add display nodes Cody Kang via B4 Relay
2026-11-29 12:48   ` sashiko-bot
2026-11-29 12:32 ` [PATCH v4 14/16] riscv: dts: spacemit: k3-pico-itx: enable the DisplayPort output Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 15/16] riscv: dts: spacemit: k3-com260-ifx: " Cody Kang via B4 Relay
2026-11-29 12:32 ` [PATCH v4 16/16] riscv: defconfig: spacemit: k3: enable display driver Cody Kang via B4 Relay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-239606@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=codykang.hk@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox