[PATCH v2 3/5] phy: apple: atc: Add initial M3 series support

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sun Nov 22 04:35:04 PST 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] phy: apple: atc: duplicate
  atcphy_configure_post_tunable_t8122() breaks build
--

commit 58a76d7bc11875605ca0ba4c4a3ffac99ce93776
Author: Sasha Finkelstein <k at chaosmail.tech>

phy: apple: atc: Add initial M3 series support

This commit adds initial USB and Thunderbolt PHY support for the Apple M3
(t8122) Type-C PHY.

> diff --git a/drivers/phy/apple/atc.c b/drivers/phy/apple/atc.c
> index 45f1280a6faa3..398b2be5dd116 100644
> --- a/drivers/phy/apple/atc.c
> +++ b/drivers/phy/apple/atc.c

[ ... ]

> @@ -1792,18 +1929,100 @@ static int atcphy_configure(struct apple_atcphy *atcphy, enum atcphy_mode mode)
>  	mask32(atcphy->regs.core + ACIOPHY_CFG0, ACIOPHY_CFG0_RX_CLAMP_OV,
>  	       FIELD_PREP(ACIOPHY_CFG0_RX_CLAMP_OV, 3));
>  	udelay(10);
> +}
> +
> +static void atcphy_configure_post_tunable_t8122(struct apple_atcphy *atcphy, enum atcphy_mode mode)
> +{
> +	if (atcphy_modes[mode].pipehandler_state != ATCPHY_PIPEHANDLER_STATE_USB3)
> +		return;
> +	core_set32(atcphy, ACIOPHY_CFG0, ACIOPHY_CFG0_COMMON_SMALL);
> +	udelay(10);
> +	core_set32(atcphy, ACIOPHY_CFG0, ACIOPHY_CFG0_COMMON_SMALL_OV);
> +	udelay(10);
> +	core_set32(atcphy, ACIOPHY_CFG0, ACIOPHY_CFG0_COMMON_BIG);
> +	udelay(10);
> +	core_set32(atcphy, ACIOPHY_CFG0, ACIOPHY_CFG0_COMMON_BIG_OV);
> +	udelay(10);
> +	core_clear32(atcphy, ACIOPHY_CFG0, ACIOPHY_CFG0_COMMON_CLAMP);
> +	udelay(10);
> +	core_set32(atcphy, ACIOPHY_CFG0, ACIOPHY_CFG0_COMMON_CLAMP_OV);
> +	udelay(10);
> +	core_set32(atcphy, AUS_COMMON_SHIM_BLK_BIAS_REG, AUS_COMMON_SHIM_BLK_BIAS_REG_BGBIAS_OV);
> +	udelay(10);
> +}
> +
> +static void atcphy_configure_post_tunable_t8122(struct apple_atcphy *atcphy, enum atcphy_mode mode)
> +{
> +	if (atcphy_modes[mode].pipehandler_state == ATCPHY_PIPEHANDLER_STATE_USB3 ||
> +	    (atcphy->hw->dp && atcphy_modes[mode].enable_dp_aux))
> +		atcphy_power_on_common_t8122(atcphy);
> +}

[Severity: High]
Does this second definition of atcphy_configure_post_tunable_t8122()
belong in the later commit "phy: apple: atc: Add T8122 DisplayPort
support"?

Defining atcphy_configure_post_tunable_t8122() twice, while referencing
atcphy->hw->dp and atcphy_power_on_common_t8122() before they exist,
breaks the build at this commit.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-t8122-phy-v2-0-8d5c8fdf31ba@chaosmail.tech?part=3



More information about the linux-phy mailing list