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=1796156672; b=fsNP2LaX/ziv+fNcTgteAntjFdzYI8/qyxNRj9ZsiCFzhttAdgJJgof1iChSvl0lRNPp 1Fg0otmM9gDm4kJuiK4unEZQ6zfIpMuUJjjHEwCraBeUv3nB0WHABUtpXPVZ/eqk2heKN jP6sQ5FyYYdROm1f0gG/MzOoKoJSp5i74bfRvoWwRHhnI60pRnjppe6PqQoASEihkPMFb t+FbI0fY2RUXMzrE70amz/t7Lr6JhKpPo+Iae4mqiidTO106hsldFE/JqBvg321DeAz/L vAp3bNJABXacN5Z7kb7xdZDV/zRW1A5ZEmE3tCl7lFoOSHvWo9pvxNbSC5/MmhQ/qeQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796156672; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=skcInkt3Tka2U2axADsuS4+roxByrQABrElPX7B0a5Y=; b=tltMTvkBI3Z6JAWECKtJe2LNqaqjB3Ei2+fe7yUCO2z3VwQtsbpDdS4k9SRNkkME4MBb LuC04cAUeTK9A3d+8JFsGBvZCvysHdTI8CoLU823zzYVWA3QvSq7it9dgHSfhfw6i5awD n2hfWeyULPQR/RCdFUvGelADfTj09Pr8SUGW1QXXmsWf5RiG0d6ek4xfAxQGd4FMzQq1x toRHfyfVeP+ayKVgDPPZyiqNDJ+tZLy07JVpPnPBWk5PzNegYjNFjC4dvNtW/2oqyGQzj YnIJzYdyE+2CTbnvqr41dGYDBEcJ1cCQepaoqKRcV9zc6dwjMu5LHb8MMfPl0QWzZvg== 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="Dzfxh/Bd"; 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 07A91606A31A for ; Tue, 1 Dec 2026 20:24: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=Dzfxh/Bd Received: by smtp.kernel.org (Postfix) with ESMTPSA id 240D91F00899; Tue, 1 Dec 2026 20:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796156671; bh=skcInkt3Tka2U2axADsuS4+roxByrQABrElPX7B0a5Y=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Dzfxh/BdD7J9zFl3M41aOvHb0RD+o44z9ocq27udjdKr5Ax0qilScLxj3UIC0qrO0 sAYpgrnzDSqVqQEKNKVlqhydOnmwW1iMEAgMOiqt5LpyTni6Uvtn+44H4NLtu+ITUA zKpHVKQIbMH/CWTRtakA301rLlVHPWQcShJpStSgvI4H+ftalQtcpUIATkB4dPeyVG Yurp3hcGFqG62Xe54qKRJFNm+qmZdRmyfE+tR1ysM2dF2IYxCY1k6YQyV2XjLobdLB R+9vKoB2ojqBDrxGaj0pnwMmpxY/ijCP2w8WM5w20HdUOU/uaUfrwsYVwIcB1bUIMj EMVdtWjQkzWFw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v6 03/13] soc: amlogic: Add Meson GX HHI system controller driver Reply-To: sashiko-reviews@lists.linux.dev To: "Ronald Claveau" Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-phy@lists.infradead.org, dri-devel@lists.freedesktop.org, robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org, vkoul@kernel.org, olteanv@gmail.com In-Reply-To: <20261201-meson-drm-create-hdmitx-phy-v6-3-5ccdf57a6cf5@aliel.fr> References: <20261201-meson-drm-create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr> <20261201-meson-drm-create-hdmitx-phy-v6-3-5ccdf57a6cf5@aliel.fr> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 20:24: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: - [High] soc: amlogic: meson_gx_hhi_sysctrl_probe() registers PHY provider before PHY - [High] soc: amlogic: meson_gx_hhi_sysctrl_probe() hijacks child PHY node lookups -- commit 5d78a854bc7adf16d895a668b567c24c0ad39b45 Author: Ronald Claveau soc: amlogic: Add Meson GX HHI system controller driver This commit adds a driver for the Amlogic Meson GX HHI system controller that registers a PHY provider and creates an auxiliary device for the HDMI TX PHY driver. > diff --git a/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c b/drivers/soc/aml= ogic/meson-gx-hhi-sysctrl.c > new file mode 100644 > index 0000000000000..d4ef41e422a27 > --- /dev/null > +++ b/drivers/soc/amlogic/meson-gx-hhi-sysctrl.c [ ... ] > +static int meson_gx_hhi_sysctrl_probe(struct platform_device *pdev) > +{ > + struct phy_provider *phy_provider; > + struct auxiliary_device *auxdev; > + const char *phy_aux_name; > + struct device *dev =3D &pdev->dev; > + > + phy_aux_name =3D device_get_match_data(dev); > + if (!phy_aux_name) > + return dev_err_probe(dev, -ENODEV, "missing PHY match data\n"); > + > + phy_provider =3D devm_of_phy_provider_register(dev, of_phy_simple_xlate= ); > + if (IS_ERR(phy_provider)) > + return dev_err_probe(dev, PTR_ERR(phy_provider), > + "failed to register PHY provider\n"); [Severity: High] Does registering the HHI MFD node with devm_of_phy_provider_register() intercept lookups for child PHY nodes under the HHI node? devm_of_phy_provider_register() passes NULL for the children node, which causes __of_phy_provider_register() to set phy_provider->children to dev->of_node, and of_phy_provider_lookup() matches any direct child of phy_provider->children: drivers/phy/phy-core.c:of_phy_provider_lookup() { ... for_each_child_of_node_scoped(phy_provider->children, child) if (child =3D=3D node) return phy_provider; ... } On G12A, G12B and SM1 SoCs, the HHI node contains the mipi_analog_dphy child PHY node (compatible "amlogic,g12a-mipi-dphy-analog"). If phy_meson_axg_mipi_dphy_probe() calls devm_phy_get(dev, "analog") before phy_g12a_mipi_dphy_analog_probe() has created that PHY, of_phy_provider_lookup() returns the HHI phy_provider instead of deferring and of_phy_simple_xlate() returns -ENODEV, causing the MIPI D-PHY probe to fail permanently. Even after the child PHY driver probes, of_phy_provider_lookup() matches the HHI provider first and pins the wrong module owner. > + > + auxdev =3D devm_auxiliary_device_create(dev, phy_aux_name, NULL); [Severity: High] Does registering phy_provider before the auxiliary HDMI TX PHY driver binds break probe deferral for HDMI TX PHY consumers? _of_phy_get_with_args() only returns -EPROBE_DEFER while of_phy_provider_lookup() finds no provider for the node. Once devm_of_phy_provider_register() succeeds here, any consumer requesting the PHY before the auxiliary driver has bound and called devm_phy_create() reaches of_phy_simple_xlate(), which fails class_find_device_by_of_node() and returns -ENODEV instead of -EPROBE_DEFER. This happens whenever CONFIG_MESON_GX_HHI_SYSCTRL=3Dy and the HDMI TX PHY driver is built as a module or probes later, causing devm_phy_get() callers to fail permanently and devm_phy_optional_get() callers to treat the PHY as absent. In addition, phy_provider->owner is set to this module rather than the PHY driver module, and devres teardown on unbind destroys auxdev and its struct phy before unregistering phy_provider. Since auxiliary_device_create() already copies dev->of_node to auxdev->dev.of_node, could the auxiliary PHY driver register the PHY provider itself after calling devm_phy_create()? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-meson-drm-= create-hdmitx-phy-v6-0-5ccdf57a6cf5@aliel.fr?part=3D3