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=1796386651; b=rEbUFEAwiYToG67Pub5uEMg5Ia7oVv0Rzi15bxTf+rPF7lCZjJvyRV1dmphAPTlJKVUW /I68CeXG6zDZhSX/mKDiiMdCruAdKy8YJ99GJvHWbhqhCcHP3Ng161oSMyix7uZyWh0xE ZTSGs+WJysNzdFfVfEOBTlVPEyvlZdyhKKlcn/+FJRRGPznzvBLNZpuN4cyXnhJPPKk6o uY2/ruU1/PxQVpXwDIwiC45MUInqaq+MJmID3hdue7xvIble+gd7yjK0H0e94zCxkdO54 GuV8YhTmjD6UIphJyiG4aZ6rPNfLg/UY/AHntMjD1f7hu3iC/pSZuAEnbYv5EfSPeig== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796386651; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=xMvusAP2/eVSwFMOe/iHA1pX7ZVGbcGJ/kMrikjRoBk=; b=oCOfCekYzZ5iVAP4+x5Ttfk+vJrpUhw73zF+LgvTNkhe2Ma/H8OumbgH9pPqHpqqBD27 JtjvA/ireMKUIVD9W+YHz9jeNboOTT15naaIJ7/xhsGWyyOAe/3BxS58DP9FOTfkDrxql B1osyjdHCoJH1qlsCyjeTXiyz1Va7KdJF1eHIKlzibLuyBgtR+i2igEzZoKeLzJsUJJl+ /8O9UPxg/aGRNwfjLpE8LgZNDhj3ldXcNMJ4wIMDeaCzSK8FZTyzOdsKaE7heAdzB8yPt jVvy0qbe509Sh2aoRAqH8DIvYn7tRZfuzdu93ndJlSxYxHeJUJk0FE/qf9d9PE0YUpg== 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=Un9RBIE0; 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 7B44A606A32F for ; Fri, 4 Dec 2026 12:17:31 +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=Un9RBIE0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7CFD1F00931; Fri, 4 Dec 2026 12:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796386651; bh=xMvusAP2/eVSwFMOe/iHA1pX7ZVGbcGJ/kMrikjRoBk=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Un9RBIE0Hqxlgvq6fX/sz4qltWQHFX8C+AgEOatJVr1bU3uN9tH2mOTaREi9Ysb1F U/tfylXxrq0NAat0rSWiOlMygLdilbB9SqE8ZDSSj8FEeLeYZbEMiJigc/HQxESbR6 /tuVCNe68lUgImrUY3bKAoadZbFTaRT1XYUK0R0MeSO61z+vwi4m9FzjpllAbgKi7K 7tU2rYLSpL5CWSaiCbYYbLx1g3JkSDzj7eC1Pe2J3aSBo5SfPbouw24z7ZGNvQud4L ofxW5jf7xwXrtWR576ljdzlRUQO5jHePukUgLSSH+WD2w5qn1039y1JoqV660gTich Wq1749OHNVlJg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v9 2/2] phy: cix: add Sky1 USB/DP combo PHY driver Reply-To: sashiko-reviews@lists.linux.dev To: "Gary Yang" Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com In-Reply-To: <20261204113906.563606-3-gary.yang@cixtech.com> References: <20261204113906.563606-1-gary.yang@cixtech.com> <20261204113906.563606-3-gary.yang@cixtech.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 12:17:30 +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: cix: sky1_udphy_init() and sky1_udphy_reinit() omit CMN_READY wait - [Low] phy: cix: duplicate common and PLL register entries across mode tables -- commit 95a3c95211c8745a0327c54cc4ef9066a334100d Author: Gary Yang phy: cix: add Sky1 USB/DP combo PHY driver This commit adds the USB3/DisplayPort combo PHY driver for the CIX Sky1 SoC, exposing independent USB3 and DP PHY instances along with Type-C orientation switch and mux support. > diff --git a/drivers/phy/cix/phy-cix-usbdp.c b/drivers/phy/cix/phy-cix-us= bdp.c > new file mode 100644 > index 0000000000000..e8b0d50624490 > --- /dev/null > +++ b/drivers/phy/cix/phy-cix-usbdp.c > @@ -0,0 +1,1839 @@ [ ... ] > +static const struct reg_sequence sky1_udphy_usbdp_conf_normal[] =3D { > + {CMN_SSM_BIAS_TMR, 0x0018}, > + {CMN_PLLSM0_PLLPRE_TMR, 0x0030}, > + {CMN_PLLSM0_PLLLOCK_TMR, 0x00f0}, [ ... ] > +static const struct reg_sequence sky1_udphy_dp_conf[] =3D { > + {CMN_SSM_BIAS_TMR, 0x0018}, > + {CMN_PLLSM0_PLLPRE_TMR, 0x0030}, > + {CMN_PLLSM0_PLLLOCK_TMR, 0x00f0}, [ ... ] > +static const struct reg_sequence sky1_udphy_usbdp_conf_flip[] =3D { > + /* common_part */ > + {CMN_SSM_BIAS_TMR, 0x0018}, > + {CMN_PLLSM0_PLLPRE_TMR, 0x0030}, > + {CMN_PLLSM0_PLLLOCK_TMR, 0x00f0}, [Severity: Low] This isn't a bug, but sky1_udphy_usbdp_conf_normal[], sky1_udphy_dp_conf[], and sky1_udphy_usbdp_conf_flip[] duplicate roughly 80 identical common time= r, PLL0/PLL1, PIPE USB3 Gen2, CDIAG, ISO PLL, and CMN_DIAG_GPANA_0 entries, and expand identical per-lane writes four times despite PHY_LANE_STRIDE. Factoring out a shared common table with smaller mode/orientation delta tab= les (similar to the per_lane handling in drivers/phy/cix/phy-cix-dp.c) would av= oid this repetition and reduce the risk of the tables drifting out of sync. [ ... ] > +/* Reprogram the PHY after the mode or the plug orientation has changed.= */ > +static int sky1_udphy_reinit(struct cix_udphy *udphy) > +{ > + udphy->active_flip =3D udphy->flip; > + > + sky1_udphy_set_orientation(udphy); > + > + /* > + * The APB clock is still enabled, so the block can be reset without > + * running the full power-on sequence again. > + */ > + reset_control_assert(udphy->reset); > + reset_control_assert(udphy->preset); > + reset_control_deassert(udphy->preset); > + > + sky1_udphy_write_mode_table(udphy); > + > + reset_control_deassert(udphy->reset); > + > + return 0; > +} > + > +static int sky1_udphy_init(struct cix_udphy *udphy) > +{ > + int ret; > + > + udphy->active_flip =3D udphy->flip; > + > + sky1_udphy_set_orientation(udphy); > + > + /* usb rcsu reset is default deassert */ > + reset_control_assert(udphy->reset); > + reset_control_assert(udphy->preset); > + > + ret =3D sky1_udphy_clk_enable(udphy->apb_clk); > + if (ret) { > + dev_err(udphy->dev, "failed to enable APB clock\n"); > + return ret; > + } > + > + reset_control_deassert(udphy->preset); > + > + sky1_udphy_write_mode_table(udphy); > + > + reset_control_deassert(udphy->reset); > + > + return 0; > +} [Severity: Medium] Should sky1_udphy_init() and sky1_udphy_reinit() wait for PHY_PMA_CMN_CTRL1_CMN_READY_BIT after deasserting udphy->reset? sky1_reset_deassert() only sleeps 50 to 100 us, which does not guarantee the PMA calibration timers have finished. Only udphy_dp_phy_set_rate() calls sky1_udphy_wait_common_ready(), so USB3 callers like cdns3-plat.c can enter cdns_drd_init() and fail with -ENODEV before the PMA common block is ready. A PMA startup timeout in sky1_udphy_init() also goes undetected, leaving apb_clk enabled. Polling sky1_udphy_wait_common_ready() in both functions (matching phy-cix-dp.c and phy-rockchip-typec.c) and unwinding with sky1_udphy_exit() on failure in sky1_udphy_init() avoids both issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204113906.5636= 06-1-gary.yang@cixtech.com?part=3D2