From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=185.203.200.13 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796138875; b=oyrqR+tEJqYPgYk/2BShmT1C3J+s1PDTdsYTQv5okXKA9/WzRwGwLlTzHKpZ3EAq1PY4 HqM4FfJBzLi/99kO4ClXFeyUGkaIVrJdMnb4Wm6bLQN/t/rsHSQfAi+UiJHt1TlhvPLL1 8YlHsXSEE5sJuDUwZYuck0MVYYn+rduvxq68K06fS4qpgylzAvE+WsY8i/VnIDd+WgIMH /EwF3VrPQ+Mlc+hYKKXfvK+jJcFuNsXpFjQaiyd209gKR/tXTo/+1F/lR4mdnOj1yRivO R5YrOYRYI5CHjvlc9G5qK+Yov+PZIUDsqfE3vrdttGwe3gLrIJyBsJtaCu3+KGArhMA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796138875; h=DMARC-Filter:Received:DKIM-Signature:Message-ID:Subject:From:To:Cc: Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding: User-Agent:MIME-Version; bh=lQZoiBNj3aZqpkys7gC++te5OrUBjf54ahYwXzPup1w=; b=Ex6tMgOl9TGlVEp20jRGa8p8XIttB6QmH54adgMHX31H9aBMrOzqBvODdegX94yoWXUn si2kNWDH83lHsqM20pkPTkXU8uPsiT10xGI7AfGurjFYJlGclTi24lNfwOQ+C+hvby09b L6eIoHk4EdCqODLfvA2On5MtK9EEUf9gNseiMaSCsdwgwPikphz79DCk/K3RzJlrRvMUu 0MYl09eNIZAMWVMQYayizMiiFkCR/DmPunF1q2ES6n2xBpCKC9cyG44tbYXf0/SbRzRwF MJMefpff+cjgoL3l2GoSrRrn88NP34YCNbK086SHLppMxB2nZaBbPEApdjKmM758rYg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; dkim=pass header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=dfHHYceI; arc=pass header.oldest-pass=0 smtp.remote-ip=185.203.200.13 Received: from mx1.white.stw.pengutronix.de (mx1.white.stw.pengutronix.de [185.203.200.13]) (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 57D02606A32D; Tue, 1 Dec 2026 15:27:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 57D02606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pengutronix.de header.i=@pengutronix.de header.a=rsa-sha256 header.s=20260414 header.b=dfHHYceI Received: from [IPv6:2a0a:edc0:0:900:1d::4e] (lupine.office.stw.pengutronix.de [IPv6:2a0a:edc0:0:900:1d::4e]) (Authenticated sender: pza@pengutronix.de) by mx1.white.stw.pengutronix.de (Postfix) with ESMTPSA id E1E7F201A9C; Tue, 01 Dec 2026 16:27:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1796138867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQZoiBNj3aZqpkys7gC++te5OrUBjf54ahYwXzPup1w=; b=dfHHYceIdwlbKf1redegdV5MwdFnnS1uGqMhQlSnPigwoC3t26dC2sezFilGudo0l0hT1g fJPVQF9ihgtyS2d+ziK5bcwe2tyO1wOuSh4ajgEz6OVpTOZ4zhQZR/HrmVW7SWeYfEV0W3 sRfvx51B/m+b1jd1/k63zrFY4s58s25UJvNO8z3VEuv8AzlammJCmvDtHcAO8yZDfU0LE9 Y8qxjYLOvjpigdYFB0tfI4OYbXGbaCG+8ymJp/Rv/G1qiOFIsLyprdol1yGbko9bXEewIM 8cXnhjvuGElBB0cpElvBRk2V54i+y7CiYceh4ehBY+/XQo1CTl1qH3Yxn69OYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=pengutronix.de; s=20260414; t=1796138867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lQZoiBNj3aZqpkys7gC++te5OrUBjf54ahYwXzPup1w=; b=dFGojdVI/oBase9hioYK/330X8NQPyLM+/sgkyHDn2RqmO9b2YdXvadmJzC4CUi88WntXC QEoMNtjvgAOQJe4GYOScAG58UN/uChdAJS+1oTbIeLwSwrPvhH5W1E3PU6Y9WaYF2V2RHL dNNQ4HFGot7ShYIph004dGQpjc9a49FD1lj4E5S/IH0+Otk2lt6vDitGr1VPqslXz9tSYZ 6CGSys4aunVdWATlqS7K9uxzW9hAuTALSbj2AHYvDamUvJofrMJ2JFv3UeWojnL7S3FSfQ QSYfVpnnbe9se/gO1x1lTj+Urm9TVeg1S5BwKfRxDn2W8Lba3LWwYzN8Gckhdg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pza@pengutronix.de smtp.mailfrom=p.zabel@pengutronix.de ARC-Seal: i=1; s=20260414; d=pengutronix.de; t=1796138867; a=rsa-sha256; cv=none; b=HHTnka7ei8iECkCVcqXGF3OybBRxAIaB5d4EHYZLmKMVTJcO5DvKs4tcmeWuEHN1sjK5yD ui9v9i03+aiAe3FmDLL9x5A4JtHSYyNVqPu51GHHrGRZ5tnfpXbX3q4d37o1m8X1ScUZ5A MsZvIHXOkOewjhvqd99RmbJq2Cts2C+W1UBDTLD1kYZDOTIzFwX5ExW7elHNgfdxt0Q0yp qrPMwtq0uw7FvTTpvZNLnlleqlXqiU3BCxvI8PpzISfGXo9aSeaWd0BkXeLCREsg0rBkVe Ja5MUH+f9K2SC6ZHykb1Ndl4k/rLX1+nGpOZIbJmAihvK34O5f0/Tcojm1cGYA== Message-ID: <9175cd8f50d4670af16b3937e157e742e51ee8e6.camel@pengutronix.de> Subject: Re: [PATCH v5 2/2] phy: add a driver for T-Head TH1520 USB PHY From: Philipp Zabel To: Icenowy Zheng , Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wei Fu , Drew Fustini Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Han Gao , Drew Fustini , Manivannan Sadhasivam Date: Tue, 01 Dec 2026 16:27:47 +0100 In-Reply-To: <9f418e1edd7fb5f94d03a94483e6f6f610d47a16.camel@iscas.ac.cn> References: <20261130-b4-th1520-usb-phy-v5-0-230a05b7e5bf@iscas.ac.cn> <20261130-b4-th1520-usb-phy-v5-2-230a05b7e5bf@iscas.ac.cn> <9ced310aaca0a27c526fe010a66a3e7e7ed87ab3.camel@pengutronix.de> <9f418e1edd7fb5f94d03a94483e6f6f610d47a16.camel@iscas.ac.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-0+deb13u1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Di, 2026-12-01 at 20:50 +0800, Icenowy Zheng wrote: > =E5=9C=A8 2026-12-01=E4=BA=8C=E7=9A=84 11:22 +0100=EF=BC=8CPhilipp Zabel= =E5=86=99=E9=81=93=EF=BC=9A > > On Mo, 2026-11-30 at 17:07 +0800, Icenowy Zheng wrote: > > > The USB PHY on T-Head TH1520 SoC is a Synopsys USB 3.0 FemtoPHY, with > > > some PHY parameters exported as another system controller along with = it. > > >=20 > > > A few PHY parameters have unusable defaults. Add a driver that progra= ms > > > them before releasing the PHY from reset in addition to > > > clock/reset/regulator management. > > >=20 > > > Reviewed-by: Drew Fustini > > > Reviewed-by: Manivannan Sadhasivam > > > Signed-off-by: Icenowy Zheng > > > --- > > > drivers/phy/Kconfig | 1 + > > > drivers/phy/Makefile | 1 + > > > drivers/phy/thead/Kconfig | 12 +++ > > > drivers/phy/thead/Makefile | 2 + > > > drivers/phy/thead/phy-th1520-usb.c | 176 +++++++++++++++++++++++++++= ++++++++++ > > > 5 files changed, 192 insertions(+) > > >=20 > > [...] > > > diff --git a/drivers/phy/thead/Kconfig b/drivers/phy/thead/Kconfig > > > new file mode 100644 > > > index 0000000000000..ba0ceac54c1b0 > > > --- /dev/null > > > +++ b/drivers/phy/thead/Kconfig > > > @@ -0,0 +1,12 @@ > > > +# SPDX-License-Identifier: GPL-2.0-only > > > +config PHY_TH1520_USB > > > + tristate "USB PHY driver for T-Head TH1520 SoC" > > > + depends on ARCH_THEAD || COMPILE_TEST > > > + depends on COMMON_CLK > > > + depends on HAS_IOMEM > > > + depends on OF > > > + depends on RESET_CONTROLLER > >=20 > > Drop this, only reset controller drivers need to depend on > > RESET_CONTROLLER. >=20 > I think this driver would not make sense if the real reset operations > aren't available (because this driver tunes some MMIO PHY parameters whil= e > putting the PHY into reset). The driver won't work if the reset controller driver - I assume RESET_TH1520 - is missing, either. I don't think Kbuild the right tool to enforce such runtime dependencies per driver. regards Philipp