From nobody Thu Dec 18 01:18:41 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D82730FC1F for ; Mon, 15 Dec 2025 16:26:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816020; cv=none; b=kZ1nbizp6o8r0NNEk7qAPXRu5YWSsB7znDgYK/9cHqUVE0sMx6Nw2AW3sRe+hDbo8YsljiAskBjyNxJiT9NwKPUJapp6ceNazvGGIvFjP8jdsOTXV/B/ysTaMzUh+uXcov51F6OQnIxDJ8lIrqM6CUWKlgYgfHOvROUMeZNjvqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816020; c=relaxed/simple; bh=QXUiS85EIUUd867FAX8BQt+rIZ5D4JQIHmers4hf4as=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=A5SOIqcWQtMxWyfQiXT/OxZm+Wm0d9M4C0rlQM6W13BXaiX7kXpBNoo9BBxq51GA49ECGP0pn/MXLM4XCm7nqwzl6kJLqX4Pmzmp7GcEjgp+rJVRX84WtXG72LR/+9JRyEVRzyMex9g5bClRvUY8eApxif73K/pwtyDKdPHVnE4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=VzvYMrfE; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="VzvYMrfE" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 5EC67C19D20; Mon, 15 Dec 2025 16:26:32 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id BBAEB60664; Mon, 15 Dec 2025 16:26:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 27DAE119427BD; Mon, 15 Dec 2025 17:26:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765816011; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=PcFyLKn28tM/nd0u7JbcHwSmBDJOiHSl2uY1fJ6Cd+w=; b=VzvYMrfEnIrZa6MJkp48SrUDAeIhOVSaKZ7g6GnMOJjUZFQqL0ZtSq34R9PYkRJQgJ8LRr A54BPf0C0uo48KMMtTaUiMHbzIHMiNiFg7B/w8WjgTY9gaqI2eo9VE/RO9Lbe35Pindvcw WV87Rg12z+E0BIZj+otPuvH0qEtJc+j2BvHgEsPFlHZgAKowmmylO1UHguPZQz8mQY5h7v 7/gfJXqorEnDVkpKvg6Sy8CTXqizNG3BMDHo3sbw/qkHHNutTuL23UnW5UhWCQZ65IVt+U +NzNMPZm5hybu52taBuv1VaWXHZZiGTBRM8vYBzwiKCbaWB9HkFqNkunmx99aQ== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 15 Dec 2025 17:26:35 +0100 Subject: [PATCH v5 1/7] dt-bindings: soc: mobileye: OLB is an Ethernet PHY provider on EyeQ5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-macb-phy-v5-1-a9dfea39da34@bootlin.com> References: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> In-Reply-To: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> To: Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9gory_Clement?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Philipp Zabel , Thomas Bogendoerfer , Neil Armstrong Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= , Conor Dooley X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 OLB on EyeQ5 ("mobileye,eyeq5-olb" compatible) is now declared as a generic PHY provider. Under the hood, it provides Ethernet RGMII/SGMII PHY support for both MAC instances. Acked-by: Conor Dooley Signed-off-by: Th=C3=A9o Lebrun --- .../devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml | 7 +++= +++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-= olb.yaml b/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-ol= b.yaml index 6d11472ba5a7..56401d76a9b5 100644 --- a/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml +++ b/Documentation/devicetree/bindings/soc/mobileye/mobileye,eyeq5-olb.yaml @@ -51,6 +51,9 @@ properties: clock-names: const: ref =20 + '#phy-cells': + const: 1 + patternProperties: '-pins?$': type: object @@ -310,7 +313,7 @@ allOf: properties: '#reset-cells': false =20 - # Only EyeQ5 has pinctrl in OLB. + # Only EyeQ5 has pinctrl and PHY in OLB. - if: not: properties: @@ -320,6 +323,8 @@ allOf: then: patternProperties: '-pins?$': false + properties: + '#phy-cells': false =20 examples: - | --=20 2.52.0 From nobody Thu Dec 18 01:18:41 2025 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 303F630FF06; Mon, 15 Dec 2025 16:27:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816025; cv=none; b=tHVzukDXAP0bvNiNtxwrzHi0ffnotDK4TfeK937sSyGh9VjfxVfSrc+bZ/NeKnkTpb5Syy0L7hzy7d86YGdczEdEv9XXEVS69Wf5qkuc8Iv89mErWLWtkz+16VB4uRv65c5FVQ8W+6HYS+g2Gr/4gBNmtL/0HkRwS1qZCPV1c48= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816025; c=relaxed/simple; bh=OLHUDmK8vvFnADag7lyiyT2GB2M7Q2/ejF//k6Ptpos=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XbZDWcL+S/+uEnc2Gl7SeCoLs4DAoEO/29WYmor8MnyWXv9JVGi2V1nuUEmS4uggRsu7xD4ndjbGTfSCaCV9gjoz8W2xMFrZ1ctSANJEPZfPQnPFZYVg+yHoJ8ME6teRYwNucQjPRPw3a2/9evDEeeH0+5qIJXnuhODETlE6Aws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=C6pS63rE; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="C6pS63rE" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 64C7D4E41C1B; Mon, 15 Dec 2025 16:26:59 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 38CFF60664; Mon, 15 Dec 2025 16:26:59 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 22F2B119427B8; Mon, 15 Dec 2025 17:26:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765816017; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=6ReHjdAyVBcuPjF5r2gvsVluwjl4asHqr17I206WTJw=; b=C6pS63rEfH3Xrz/6YP9rQB99Grh3ow6DFtY4lY7/Z/Tgq3m4cSOnGYtf2T88/vpEXy6rNf 8S3OQEUX72T+sq2ZkQ2zC2Ia809ELjPfZtSHo1YZQOAArJD8t+KPuN8VIVHi6xh1hRGAqU 227HJwoMFZzzaI6gI67zQ0/k46su2kgXyRVk9o+IN1uadPwlCiUFqNEPFoviIvZO5TRr1o kXa9zDFHh6j7GHCNAKkRLV2V1zqDHwjSAdua3whK4opSLgNpFwtUvp3C4Z5eXwv7+TUlzo 7DI33PCQyWH1mEEuE7Lepc0wbe+bjLtd6PLEjC/SP5ocJsE0L1w/tWxxvdKkow== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 15 Dec 2025 17:26:36 +0100 Subject: [PATCH v5 2/7] phy: Add driver for EyeQ5 Ethernet PHY wrapper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-macb-phy-v5-2-a9dfea39da34@bootlin.com> References: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> In-Reply-To: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> To: Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9gory_Clement?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Philipp Zabel , Thomas Bogendoerfer , Neil Armstrong Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 EyeQ5 embeds a system-controller called OLB. It features many unrelated registers, and some of those are registers used to configure the integration of the RGMII/SGMII Cadence PHY used by MACB/GEM instances. Wrap in a neat generic PHY provider, exposing two PHYs with standard phy_init() / phy_set_mode() / phy_power_on() operations. Reviewed-by: Luca Ceresoli Signed-off-by: Th=C3=A9o Lebrun --- MAINTAINERS | 1 + drivers/phy/Kconfig | 13 +++ drivers/phy/Makefile | 1 + drivers/phy/phy-eyeq5-eth.c | 249 ++++++++++++++++++++++++++++++++++++++++= ++++ 4 files changed, 264 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5b11839cba9d..2f67ec9fad57 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17605,6 +17605,7 @@ F: arch/mips/boot/dts/mobileye/ F: arch/mips/configs/eyeq5_defconfig F: arch/mips/mobileye/board-epm5.its.S F: drivers/clk/clk-eyeq.c +F: drivers/phy/phy-eyeq5-eth.c F: drivers/pinctrl/pinctrl-eyeq5.c F: drivers/reset/reset-eyeq.c F: include/dt-bindings/clock/mobileye,eyeq5-clk.h diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 678dd0452f0a..1aa6eff12dbc 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -101,6 +101,19 @@ config PHY_NXP_PTN3222 schemes. It supports all three USB 2.0 data rates: Low Speed, Full Speed and High Speed. =20 +config PHY_EYEQ5_ETH + tristate "Ethernet PHY Driver on EyeQ5" + depends on OF + depends on MACH_EYEQ5 || COMPILE_TEST + select AUXILIARY_BUS + select GENERIC_PHY + default MACH_EYEQ5 + help + Enable this to support the Ethernet PHY integrated on EyeQ5. + It supports both RGMII and SGMII. Registers are located in a + shared register region called OLB. If M is selected, the + module will be called phy-eyeq5-eth. + source "drivers/phy/allwinner/Kconfig" source "drivers/phy/amlogic/Kconfig" source "drivers/phy/broadcom/Kconfig" diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile index bfb27fb5a494..8289497ece55 100644 --- a/drivers/phy/Makefile +++ b/drivers/phy/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_PHY_SNPS_EUSB2) +=3D phy-snps-eusb2.o obj-$(CONFIG_USB_LGM_PHY) +=3D phy-lgm-usb.o obj-$(CONFIG_PHY_AIROHA_PCIE) +=3D phy-airoha-pcie.o obj-$(CONFIG_PHY_NXP_PTN3222) +=3D phy-nxp-ptn3222.o +obj-$(CONFIG_PHY_EYEQ5_ETH) +=3D phy-eyeq5-eth.o obj-y +=3D allwinner/ \ amlogic/ \ broadcom/ \ diff --git a/drivers/phy/phy-eyeq5-eth.c b/drivers/phy/phy-eyeq5-eth.c new file mode 100644 index 000000000000..6e28f7e24835 --- /dev/null +++ b/drivers/phy/phy-eyeq5-eth.c @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define EQ5_PHY_COUNT 2 + +#define EQ5_PHY0_GP 0x128 +#define EQ5_PHY1_GP 0x12c +#define EQ5_PHY0_SGMII 0x134 +#define EQ5_PHY1_SGMII 0x138 + +#define EQ5_GP_TX_SWRST_DIS BIT(0) // Tx SW reset +#define EQ5_GP_TX_M_CLKE BIT(1) // Tx M clock enable +#define EQ5_GP_SYS_SWRST_DIS BIT(2) // Sys SW reset +#define EQ5_GP_SYS_M_CLKE BIT(3) // Sys clock enable +#define EQ5_GP_SGMII_MODE BIT(4) // SGMII mode +#define EQ5_GP_RGMII_DRV GENMASK(8, 5) // RGMII drive strength + +#define EQ5_SGMII_PWR_EN BIT(0) +#define EQ5_SGMII_RST_DIS BIT(1) +#define EQ5_SGMII_PLL_EN BIT(2) +#define EQ5_SGMII_SIG_DET_SW BIT(3) +#define EQ5_SGMII_PWR_STATE BIT(4) +#define EQ5_SGMII_PLL_ACK BIT(18) +#define EQ5_SGMII_PWR_STATE_ACK GENMASK(24, 20) + +struct eq5_phy_inst { + struct eq5_phy_private *priv; + struct phy *phy; + void __iomem *gp, *sgmii; + phy_interface_t phy_interface; +}; + +struct eq5_phy_private { + struct device *dev; + struct eq5_phy_inst phys[EQ5_PHY_COUNT]; +}; + +static int eq5_phy_init(struct phy *phy) +{ + struct eq5_phy_inst *inst =3D phy_get_drvdata(phy); + struct eq5_phy_private *priv =3D inst->priv; + struct device *dev =3D priv->dev; + u32 reg; + + dev_dbg(dev, "phy_init(inst=3D%td)\n", inst - priv->phys); + + writel(0, inst->gp); + writel(0, inst->sgmii); + + udelay(5); + + reg =3D readl(inst->gp) | EQ5_GP_TX_SWRST_DIS | EQ5_GP_TX_M_CLKE | + EQ5_GP_SYS_SWRST_DIS | EQ5_GP_SYS_M_CLKE | + FIELD_PREP(EQ5_GP_RGMII_DRV, 0x9); + writel(reg, inst->gp); + + return 0; +} + +static int eq5_phy_exit(struct phy *phy) +{ + struct eq5_phy_inst *inst =3D phy_get_drvdata(phy); + struct eq5_phy_private *priv =3D inst->priv; + struct device *dev =3D priv->dev; + + dev_dbg(dev, "phy_exit(inst=3D%td)\n", inst - priv->phys); + + writel(0, inst->gp); + writel(0, inst->sgmii); + udelay(5); + + return 0; +} + +static int eq5_phy_set_mode(struct phy *phy, enum phy_mode mode, int submo= de) +{ + struct eq5_phy_inst *inst =3D phy_get_drvdata(phy); + struct eq5_phy_private *priv =3D inst->priv; + struct device *dev =3D priv->dev; + + dev_dbg(dev, "phy_set_mode(inst=3D%td, mode=3D%d, submode=3D%d)\n", + inst - priv->phys, mode, submode); + + if (mode !=3D PHY_MODE_ETHERNET) + return -EOPNOTSUPP; + + if (!phy_interface_mode_is_rgmii(submode) && + submode !=3D PHY_INTERFACE_MODE_SGMII) + return -EOPNOTSUPP; + + inst->phy_interface =3D submode; + return 0; +} + +static int eq5_phy_power_on(struct phy *phy) +{ + struct eq5_phy_inst *inst =3D phy_get_drvdata(phy); + struct eq5_phy_private *priv =3D inst->priv; + struct device *dev =3D priv->dev; + u32 reg; + + dev_dbg(dev, "phy_power_on(inst=3D%td)\n", inst - priv->phys); + + if (inst->phy_interface =3D=3D PHY_INTERFACE_MODE_SGMII) { + writel(readl(inst->gp) | EQ5_GP_SGMII_MODE, inst->gp); + + reg =3D EQ5_SGMII_PWR_EN | EQ5_SGMII_RST_DIS | EQ5_SGMII_PLL_EN; + writel(reg, inst->sgmii); + + if (readl_poll_timeout(inst->sgmii, reg, + reg & EQ5_SGMII_PLL_ACK, 1, 100)) { + dev_err(dev, "PLL timeout\n"); + return -ETIMEDOUT; + } + + reg =3D readl(inst->sgmii); + reg |=3D EQ5_SGMII_PWR_STATE | EQ5_SGMII_SIG_DET_SW; + writel(reg, inst->sgmii); + } else { + writel(readl(inst->gp) & ~EQ5_GP_SGMII_MODE, inst->gp); + writel(0, inst->sgmii); + } + + return 0; +} + +static int eq5_phy_power_off(struct phy *phy) +{ + struct eq5_phy_inst *inst =3D phy_get_drvdata(phy); + struct eq5_phy_private *priv =3D inst->priv; + struct device *dev =3D priv->dev; + + dev_dbg(dev, "phy_power_off(inst=3D%td)\n", inst - priv->phys); + + writel(readl(inst->gp) & ~EQ5_GP_SGMII_MODE, inst->gp); + writel(0, inst->sgmii); + + return 0; +} + +static const struct phy_ops eq5_phy_ops =3D { + .init =3D eq5_phy_init, + .exit =3D eq5_phy_exit, + .set_mode =3D eq5_phy_set_mode, + .power_on =3D eq5_phy_power_on, + .power_off =3D eq5_phy_power_off, +}; + +static struct phy *eq5_phy_xlate(struct device *dev, + const struct of_phandle_args *args) +{ + struct eq5_phy_private *priv =3D dev_get_drvdata(dev); + + if (args->args_count !=3D 1 || args->args[0] >=3D EQ5_PHY_COUNT) + return ERR_PTR(-EINVAL); + + return priv->phys[args->args[0]].phy; +} + +static int eq5_phy_probe_phy(struct eq5_phy_private *priv, unsigned int in= dex, + void __iomem *base, unsigned int gp, + unsigned int sgmii) +{ + struct eq5_phy_inst *inst =3D &priv->phys[index]; + struct device *dev =3D priv->dev; + struct phy *phy; + + phy =3D devm_phy_create(dev, dev->of_node, &eq5_phy_ops); + if (IS_ERR(phy)) + return dev_err_probe(dev, PTR_ERR(phy), + "failed to create PHY %u\n", index); + + inst->priv =3D priv; + inst->phy =3D phy; + inst->gp =3D base + gp; + inst->sgmii =3D base + sgmii; + inst->phy_interface =3D PHY_INTERFACE_MODE_NA; + phy_set_drvdata(phy, inst); + + return 0; +} + +static int eq5_phy_probe(struct auxiliary_device *adev, + const struct auxiliary_device_id *id) +{ + struct device *dev =3D &adev->dev; + struct phy_provider *provider; + struct eq5_phy_private *priv; + void __iomem *base; + int ret; + + priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + priv->dev =3D dev; + dev_set_drvdata(dev, priv); + + base =3D (void __iomem *)dev_get_platdata(dev); + + ret =3D eq5_phy_probe_phy(priv, 0, base, EQ5_PHY0_GP, EQ5_PHY0_SGMII); + if (ret) + return ret; + + ret =3D eq5_phy_probe_phy(priv, 1, base, EQ5_PHY1_GP, EQ5_PHY1_SGMII); + if (ret) + return ret; + + provider =3D devm_of_phy_provider_register(dev, eq5_phy_xlate); + if (IS_ERR(provider)) + return dev_err_probe(dev, PTR_ERR(provider), + "registering provider failed\n"); + + return 0; +} + +static const struct auxiliary_device_id eq5_phy_id_table[] =3D { + { .name =3D "clk_eyeq.phy" }, + {} +}; +MODULE_DEVICE_TABLE(auxiliary, eq5_phy_id_table); + +static struct auxiliary_driver eq5_phy_driver =3D { + .probe =3D eq5_phy_probe, + .id_table =3D eq5_phy_id_table, +}; +module_auxiliary_driver(eq5_phy_driver); + +MODULE_DESCRIPTION("EyeQ5 Ethernet PHY driver"); +MODULE_AUTHOR("Th=C3=A9o Lebrun "); +MODULE_LICENSE("GPL"); --=20 2.52.0 From nobody Thu Dec 18 01:18:41 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BD55310782; Mon, 15 Dec 2025 16:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816025; cv=none; b=a9+Ok2aSHOBhH6a2Pv69RuQrNsLctTDirGoxh7RmM48Rk+blt26iiwvey06hxoMtr+BHxFBz/WI0tEke82Ekc1Qebj9StbEazS4tphhBXPORhYxFU/smvMaGWLnEEgPrUJ063SBmCo/ktREDaGV3HjOGgBfi5LpI9Qg0xalvTuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816025; c=relaxed/simple; bh=SswwY96XHueksfWg1PDkkV5f9iHfxAzdvS0KMpVarKY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Wd4QzfsHEN86IMMd3x0hckxIhN0JvRwUW1pOYb8VvVGWP/+hkt/kj3AVevfFRfgDy54Qcxwic8dcHamj32yyI9UaOck2u2Bv7fd5UZ+CvtFBj7VVS2InN9H/f7MtUjiHNepZpaWkmiXZsHgC/8Wd4jxeJ/ad5/dAiTDiJ2CKfyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=U4tZBM2/; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="U4tZBM2/" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 6712AC19D20; Mon, 15 Dec 2025 16:26:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id C277460664; Mon, 15 Dec 2025 16:27:01 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A3195119427C6; Mon, 15 Dec 2025 17:26:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765816020; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=0Ml6Zzl8BFTNao2FAIaUiqupgTqhQZZUaSVqC7tVQy8=; b=U4tZBM2/wEI/yKYO94ez0ZRXfhAIHhvAv8HthI+6jXKEP5nxsj4LVlVLtqjRvZfqsDrQpH uYjcTdnltaeneJI6KQYRy/YbixefuydARWQnc2Fa/qL10caIExdPf5FYDLpA/WIs0DCpQV C0RMlLYuCkPINsyFdTlkXlssXx4MynWlLWKHuzlk0W5prv9awxCLm4SWlcR9YrJARJtyEQ 3cwuCW/IJ3EtPeaoDlBexkySNa6gGyv2D0Uo3TyWEJ8vrAVsUHXaZk5fo6boGGrqM9zA2+ BlAS4mp+xIJrnkFwXTgpINkk2/SojTrLR1txYB/1m+otzei5oldB23bzJJ4ZvA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 15 Dec 2025 17:26:37 +0100 Subject: [PATCH v5 3/7] clk: eyeq: use the auxiliary device creation helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-macb-phy-v5-3-a9dfea39da34@bootlin.com> References: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> In-Reply-To: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> To: Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9gory_Clement?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Philipp Zabel , Thomas Bogendoerfer , Neil Armstrong Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= , Jerome Brunet X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 From: Jerome Brunet The auxiliary device creation of this driver is simple enough to use the available auxiliary device creation helper. Use it and remove some boilerplate code. Tested-by: Th=C3=A9o Lebrun # On Mobileye EyeQ5 Signed-off-by: Jerome Brunet Reviewed-by: Luca Ceresoli Signed-off-by: Th=C3=A9o Lebrun --- drivers/clk/clk-eyeq.c | 57 +++++++++++-----------------------------------= ---- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c index ea1c3d78e7cd..664ce7d7868d 100644 --- a/drivers/clk/clk-eyeq.c +++ b/drivers/clk/clk-eyeq.c @@ -322,38 +322,18 @@ static void eqc_probe_init_fixed_factors(struct devic= e *dev, } } =20 -static void eqc_auxdev_release(struct device *dev) -{ - struct auxiliary_device *adev =3D to_auxiliary_dev(dev); - - kfree(adev); -} - -static int eqc_auxdev_create(struct device *dev, void __iomem *base, - const char *name, u32 id) +static void eqc_auxdev_create_optional(struct device *dev, void __iomem *b= ase, + const char *name) { struct auxiliary_device *adev; - int ret; =20 - adev =3D kzalloc(sizeof(*adev), GFP_KERNEL); - if (!adev) - return -ENOMEM; - - adev->name =3D name; - adev->dev.parent =3D dev; - adev->dev.platform_data =3D (void __force *)base; - adev->dev.release =3D eqc_auxdev_release; - adev->id =3D id; - - ret =3D auxiliary_device_init(adev); - if (ret) - return ret; - - ret =3D auxiliary_device_add(adev); - if (ret) - auxiliary_device_uninit(adev); - - return ret; + if (name) { + adev =3D devm_auxiliary_device_create(dev, name, + (void __force *)base); + if (!adev) + dev_warn(dev, "failed creating auxiliary device %s.%s\n", + KBUILD_MODNAME, name); + } } =20 static int eqc_probe(struct platform_device *pdev) @@ -365,7 +345,6 @@ static int eqc_probe(struct platform_device *pdev) unsigned int i, clk_count; struct resource *res; void __iomem *base; - int ret; =20 data =3D device_get_match_data(dev); if (!data) @@ -379,21 +358,9 @@ static int eqc_probe(struct platform_device *pdev) if (!base) return -ENOMEM; =20 - /* Init optional reset auxiliary device. */ - if (data->reset_auxdev_name) { - ret =3D eqc_auxdev_create(dev, base, data->reset_auxdev_name, 0); - if (ret) - dev_warn(dev, "failed creating auxiliary device %s.%s: %d\n", - KBUILD_MODNAME, data->reset_auxdev_name, ret); - } - - /* Init optional pinctrl auxiliary device. */ - if (data->pinctrl_auxdev_name) { - ret =3D eqc_auxdev_create(dev, base, data->pinctrl_auxdev_name, 0); - if (ret) - dev_warn(dev, "failed creating auxiliary device %s.%s: %d\n", - KBUILD_MODNAME, data->pinctrl_auxdev_name, ret); - } + /* Init optional auxiliary devices. */ + eqc_auxdev_create_optional(dev, base, data->reset_auxdev_name); + eqc_auxdev_create_optional(dev, base, data->pinctrl_auxdev_name); =20 if (data->pll_count + data->div_count + data->fixed_factor_count =3D=3D 0) return 0; /* Zero clocks, we are done. */ --=20 2.52.0 From nobody Thu Dec 18 01:18:41 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1384430FC1F for ; Mon, 15 Dec 2025 16:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816026; cv=none; b=gKKd2Bscb62LQQ1+LnEQhm4caddzh9Y6ooZRds7+dzHuwbVD9x7Zzi6miATchBEDzJLwkFf82CXuiZAsTTrb/Nab8fy5IOvrJowERdJR420b5ucY9b4qtAG8kxXZTUCLDgBlPkpwBiW1NVooeuGHuTsnv+ouLm2ohyyOFoeMhVY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816026; c=relaxed/simple; bh=CsMp0CiGqrPmLMVUU4FM9eUsbzrHdW6HV7OsJ0PHpyk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lEedM9M4EZITNs+uxh5oPLvT0xUnELoRvNEaa2zCK+DPlbFGd44+YkMFYYMhc2KMeTDlP8s8iJq+MEuA2n4Eicb7xMwUH8dBnfmLNq+9C/HkZ6BdU6ecgOGWvpbzCdcRT/oHr8fnDd8vllJmJkfRUM20qGd1MBzain3HEx33JKU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=GR5PY+dd; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="GR5PY+dd" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 8E939C19D21; Mon, 15 Dec 2025 16:26:39 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id EB8E360664; Mon, 15 Dec 2025 16:27:03 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4598E119427C5; Mon, 15 Dec 2025 17:27:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765816022; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=k5FHfCu3lXplllIOLz1R5tej0eu2UNbtzmdh0flsAZE=; b=GR5PY+dddeOA3dJuR6tiwlLU8mciWm8CPIAZiaCqIOAgvzBl3R/m7Bbr8q+mpoUzC0gLe5 63NKsEG7lpBLID0FSeujeWByBUT+14asszfMbgoIBgg6C+w/kCNQrmudCh/iSfSqpG9mZp bbRkZzhPRnZXSXb2SA8yPCKJdnT3LgzfjQe1Nln5bzi5uFv2XQC1wJCMk2TVseAFxZhDjY HYYdDNFTm9ZG3rK5qVJwtKsrY/vyrTRpoTheBckuHiBLLbIhcW+xBhVYSDJxY/4P34tDqM TWpyWG2xT3gphCA9S5DZsQ+AqBGBHbteLVqr+lxgavCKwSHd75gPQuAzs/awfg== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 15 Dec 2025 17:26:38 +0100 Subject: [PATCH v5 4/7] clk: eyeq: add EyeQ5 children auxiliary device for generic PHYs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-macb-phy-v5-4-a9dfea39da34@bootlin.com> References: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> In-Reply-To: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> To: Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9gory_Clement?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Philipp Zabel , Thomas Bogendoerfer , Neil Armstrong Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Grow our clk-eyeq family; it knows how to spawn reset provider and pin controller children. Expand with a generic PHY driver on EyeQ5. Reviewed-by: Luca Ceresoli Signed-off-by: Th=C3=A9o Lebrun --- drivers/clk/clk-eyeq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c index 664ce7d7868d..a9de57315e48 100644 --- a/drivers/clk/clk-eyeq.c +++ b/drivers/clk/clk-eyeq.c @@ -109,6 +109,7 @@ struct eqc_match_data { =20 const char *reset_auxdev_name; const char *pinctrl_auxdev_name; + const char *eth_phy_auxdev_name; =20 unsigned int early_clk_count; }; @@ -361,6 +362,7 @@ static int eqc_probe(struct platform_device *pdev) /* Init optional auxiliary devices. */ eqc_auxdev_create_optional(dev, base, data->reset_auxdev_name); eqc_auxdev_create_optional(dev, base, data->pinctrl_auxdev_name); + eqc_auxdev_create_optional(dev, base, data->eth_phy_auxdev_name); =20 if (data->pll_count + data->div_count + data->fixed_factor_count =3D=3D 0) return 0; /* Zero clocks, we are done. */ @@ -521,6 +523,7 @@ static const struct eqc_match_data eqc_eyeq5_match_data= =3D { =20 .reset_auxdev_name =3D "reset", .pinctrl_auxdev_name =3D "pinctrl", + .eth_phy_auxdev_name =3D "phy", =20 .early_clk_count =3D ARRAY_SIZE(eqc_eyeq5_early_plls) + ARRAY_SIZE(eqc_eyeq5_early_fixed_factors), --=20 2.52.0 From nobody Thu Dec 18 01:18:41 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6922311971; Mon, 15 Dec 2025 16:27:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816029; cv=none; b=mqDm37CkL3poWHXo0+MEImR+mOtmjhUOEThnUcxUdFBtEhJZEjs3XHF7eFbL7/edwdPr18ynIOChWNa6hYVEFYxU1MSFbzZicpAdavL5Gzo+Pf/SxYe0SapIRICDruUGVF5byuf1si18HhenshyPdr4kanticRs7tijCYa8rsOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816029; c=relaxed/simple; bh=7rmGmfTngZt6tK5QNwyq9C6LC99vB6mF6aqAOIQbrr0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gzlz/JVCLhWZaIRj2R5GoPJ/e9ug8LdJHz7/wh27BaZLFBhSXNtK8I6BRpF2PZLbMvfM8Tj+SrA1jzWXBdEwix02/aBQrXLP6C0Cc83Q2u3WqRHUDJtqL6bQPpJlafoi79PJ7j0XAIUBRTty6NtzJuRGTG0l1hTB60+UYuQ9bXQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=YcsGJtYd; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="YcsGJtYd" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 14BBAC19D20; Mon, 15 Dec 2025 16:26:42 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7278C60664; Mon, 15 Dec 2025 16:27:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2F734119427C4; Mon, 15 Dec 2025 17:27:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765816025; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=+uRP6I+VHQdCF3SP4Wbv8N2ZU6aFa3eq082m9FRdvVo=; b=YcsGJtYd4yz4c2x1askrh12Q9lo57c/0xlcVBe75FUwyIzwGPyAA1j2856n+2CknQoFBDX 4r/b6k7RtnQ+bMHGFM2Ex0i0jJorIFeTMd6KHkOK5aHuDw/H2t53k55gt5L/yv64t4jRAp s26KP/VJl7ueh0vdkUvSO7IWdj0cb7yrYtJsO6eakIETzyGHXb65INweFV2ERA8fUFuuGW eZMwExxmtCdmn3iXoq5O4gRxQaqoioxJlprxxqXIkbTgVadtBAOxIjftE/ZAV8hcWoIn1x V9Kkn9kpP0bAeUY2P+dheH064XO4fVR89y5D7NOU9MJOWh1SywsdHmj7WepGwg== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 15 Dec 2025 17:26:39 +0100 Subject: [PATCH v5 5/7] reset: eyeq: drop device_set_of_node_from_dev() done by parent Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-macb-phy-v5-5-a9dfea39da34@bootlin.com> References: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> In-Reply-To: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> To: Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9gory_Clement?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Philipp Zabel , Thomas Bogendoerfer , Neil Armstrong Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= , Jerome Brunet X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Our parent driver (clk-eyeq) now does the device_set_of_node_from_dev(dev, dev->parent) call through the newly introduced devm_auxiliary_device_create() helper. Doing it again in the reset-eyeq probe would be redundant. Drop both the WARN_ON() and the device_set_of_node_from_dev() call. Also fix the following comment that talks about "our newfound OF node". Signed-off-by: Jerome Brunet Reviewed-by: Philipp Zabel Acked-by: Philipp Zabel Signed-off-by: Th=C3=A9o Lebrun --- drivers/reset/reset-eyeq.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/reset/reset-eyeq.c b/drivers/reset/reset-eyeq.c index 2d3998368a1c..8018fa895427 100644 --- a/drivers/reset/reset-eyeq.c +++ b/drivers/reset/reset-eyeq.c @@ -410,13 +410,6 @@ static int eqr_of_xlate_twocells(struct reset_controll= er_dev *rcdev, return eqr_of_xlate_internal(rcdev, reset_spec->args[0], reset_spec->args= [1]); } =20 -static void eqr_of_node_put(void *_dev) -{ - struct device *dev =3D _dev; - - of_node_put(dev->of_node); -} - static int eqr_probe(struct auxiliary_device *adev, const struct auxiliary_device_id *id) { @@ -427,21 +420,8 @@ static int eqr_probe(struct auxiliary_device *adev, int ret; =20 /* - * We are an auxiliary device of clk-eyeq. We do not have an OF node by - * default; let's reuse our parent's OF node. - */ - WARN_ON(dev->of_node); - device_set_of_node_from_dev(dev, dev->parent); - if (!dev->of_node) - return -ENODEV; - - ret =3D devm_add_action_or_reset(dev, eqr_of_node_put, dev); - if (ret) - return ret; - - /* - * Using our newfound OF node, we can get match data. We cannot use - * device_get_match_data() because it does not match reused OF nodes. + * Get match data. We cannot use device_get_match_data() because it does + * not accept reused OF nodes; see device_set_of_node_from_dev(). */ match =3D of_match_node(dev->driver->of_match_table, dev->of_node); if (!match || !match->data) --=20 2.52.0 From nobody Thu Dec 18 01:18:41 2025 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EB2432BF51; Mon, 15 Dec 2025 16:27:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816033; cv=none; b=IBZNBDsU1fD62Ae232mqOAR1oiRvBGcrXnbYFQinRTv2WGjkUo/9R2anHiE0isPANx6vPxLBOiS74DOss7kz+xzIEtNGivAgKbEaHhm5bQ0/XntERek+vEBHM3PKWYosx3X8+V212A48WcGJquj6O1cU9Tfrp3iBmMW59aAiyU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816033; c=relaxed/simple; bh=lv6WeHOLzN4/qsaLqmD30sEVGUM+jW6HmTJ9zT06aPY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kLHpUCUxhWLLi3l3QwHg+BqAKQ+HtZ0wgGWhhA6m3fo8R0MS0LVhy5LlJRSJvR8kOEjGZdKPG20/PB9cYLm4ugInT6VckV/NT6k334Er8EQLbjKnfplecbAuyeQOtD7fy9E1Ow572cGNdaS7q86wI96jDLO7N5WMTVH7fYFDTzo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=xvXizGIQ; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="xvXizGIQ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 1BC541A21E8; Mon, 15 Dec 2025 16:27:09 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E4B5A60664; Mon, 15 Dec 2025 16:27:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C1AED119427CC; Mon, 15 Dec 2025 17:27:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765816027; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=j3DTItJWdi9LPxqF5IOPQvF/znTVfYmJgIlAc45vP7g=; b=xvXizGIQOp/xY/60TITOZkpz1O7Q7Z2JF65bPYluAuPI/TvTrTCpFwFdo4I8srQsnD/okC Mr+4Ywe1KxNnsWcf8LVyCj+MPOW6IgnaMqZPS8vSu/9EHtE3t48gtNBvMDQKPR4B2q7nwK Xir4W2DR3jWtf3RchXBbt1pGo74a0GK6rlrOaDL76wLKgSKGGuGlbsaMBDE4vHcypS0JmK q6TmbVZceQ1d31PyNDyQMMQHVC0kpFTp/QaaYK26Jq34A9CgqKSI0VjHh7U2ikKLmRRDFY aXYc0FNCw4fAD4X4xocM9ImzOBI5YZ16xR1lZAZTEHMm+PQRW6YDRVb9X9cseQ== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 15 Dec 2025 17:26:40 +0100 Subject: [PATCH v5 6/7] MIPS: mobileye: eyeq5: add two Cadence GEM Ethernet controllers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-macb-phy-v5-6-a9dfea39da34@bootlin.com> References: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> In-Reply-To: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> To: Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9gory_Clement?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Philipp Zabel , Thomas Bogendoerfer , Neil Armstrong Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Add both MACB/GEM instances found in the Mobileye EyeQ5 SoC. Acked-by: Thomas Bogendoerfer Signed-off-by: Th=C3=A9o Lebrun --- arch/mips/boot/dts/mobileye/eyeq5.dtsi | 45 ++++++++++++++++++++++++++++++= ++++ 1 file changed, 45 insertions(+) diff --git a/arch/mips/boot/dts/mobileye/eyeq5.dtsi b/arch/mips/boot/dts/mo= bileye/eyeq5.dtsi index 36a73e8a63a1..cec5ad875228 100644 --- a/arch/mips/boot/dts/mobileye/eyeq5.dtsi +++ b/arch/mips/boot/dts/mobileye/eyeq5.dtsi @@ -77,6 +77,8 @@ aliases { serial0 =3D &uart0; serial1 =3D &uart1; serial2 =3D &uart2; + ethernet0 =3D &macb0; + ethernet1 =3D &macb1; }; =20 cpu_intc: interrupt-controller { @@ -231,6 +233,7 @@ olb: system-controller@e00000 { #clock-cells =3D <1>; clocks =3D <&xtal>; clock-names =3D "ref"; + #phy-cells =3D <1>; }; =20 gic: interrupt-controller@140000 { @@ -305,6 +308,48 @@ gpio1: gpio@1500000 { #interrupt-cells =3D <2>; resets =3D <&olb 0 26>; }; + + iocu-bus { + compatible =3D "simple-bus"; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + dma-coherent; + dma-ranges =3D <0x10 0x00000000 0x0 0x0 0x10 0>; + + macb0: ethernet@2a00000 { + compatible =3D "mobileye,eyeq5-gem"; + reg =3D <0x0 0x02a00000 0x0 0x4000>; + interrupt-parent =3D <&gic>; + /* One interrupt per queue */ + interrupts =3D , + , + , + ; + clock-names =3D "pclk", "hclk", "tsu_clk"; + clocks =3D <&pclk>, <&pclk>, <&tsu_clk>; + nvmem-cells =3D <ð0_mac>; + nvmem-cell-names =3D "mac-address"; + phys =3D <&olb 0>; + }; + + macb1: ethernet@2b00000 { + compatible =3D "mobileye,eyeq5-gem"; + reg =3D <0x0 0x02b00000 0x0 0x4000>; + interrupt-parent =3D <&gic>; + /* One interrupt per queue */ + interrupts =3D , + , + , + ; + clock-names =3D "pclk", "hclk", "tsu_clk"; + clocks =3D <&pclk>, <&pclk>, <&tsu_clk>; + nvmem-cells =3D <ð1_mac>; + nvmem-cell-names =3D "mac-address"; + phys =3D <&olb 1>; + }; + }; + }; }; =20 --=20 2.52.0 From nobody Thu Dec 18 01:18:41 2025 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E015315765 for ; Mon, 15 Dec 2025 16:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816035; cv=none; b=qX9dcBdezcmNpG3eljLH0pbMcnP9GdY3vWFygUI2pEDzTKy+Yr2vDcRu0H8klsb9rz7TaVObzcWSdvGop77pi05dPucYydUWWPyYJo27rHDpmSBGZ8AngnAAcinvhfzHpc8aqhYAitWWUnxmoXegrcy6nZQJz5qN8pO7CbfxFls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765816035; c=relaxed/simple; bh=z1kakQ9LaR6Mmp/D9XparO7zsqYpwomJgOpObaNr6CQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jTTRuLzRMuGdr9fQGs1SBCRNv7oaNNrOhX2Ji2oo71AB6+833TsuypZSoQhkifx7uxfLMvUYcYj02EotrfsuY+rcmhTDY2mdcfDmgZc/mHTYQxkTHn3n5MdAqC0unFcLtw1WZyJG+JWzMKZaJmzhgQA1IX9ALJDq4y0CToqQzzY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=h0VhN5qd; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="h0VhN5qd" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 1E5BA4E41C13; Mon, 15 Dec 2025 16:27:12 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E7BC060664; Mon, 15 Dec 2025 16:27:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3C705119427CD; Mon, 15 Dec 2025 17:27:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1765816030; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=BVCjO3PiJ96hjbVyejrX+9TN3cIt/NAX8/w5F1wcAmA=; b=h0VhN5qdNhRa6cG9oqMlSmJFGlKLMXZFM+slK/OMQ6nCQxKhrXNsnlo8/uDZQs0Kt6YZP3 nBZjsrH7zP/NP1yTq/c7ugbK3rUkXgowC2XZ27vDe3oTmnqz9n7KCQ+7g12iU2LiFpC7/J Z4TuxPJXkZe/usPO4luywI5fBE2XzX3izhvIv1AfzbS6DvF5G8Z7bVWItxcMYSikp3u+R1 UZSd2t8N+B+6op8pDG8afsJVS1T9H4Y6BTQqwne/zBhxCC4x2SL9x7cBGbigurHmKazOCg hRW+sW/Y91s/M3ZqF0m4IbPmdKwSrm7tzjyP7aNGS+/fYneGMIQf3Y1bitMdkw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Mon, 15 Dec 2025 17:26:41 +0100 Subject: [PATCH v5 7/7] MIPS: mobileye: eyeq5-epm: add two Cadence GEM Ethernet PHYs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251215-macb-phy-v5-7-a9dfea39da34@bootlin.com> References: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> In-Reply-To: <20251215-macb-phy-v5-0-a9dfea39da34@bootlin.com> To: Vladimir Kondratiev , =?utf-8?q?Gr=C3=A9gory_Clement?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Michael Turquette , Stephen Boyd , Philipp Zabel , Thomas Bogendoerfer , Neil Armstrong Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= , Andrew Lunn X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 The Mobileye EyeQ5 eval board (EPM) embeds two MDIO PHYs. Reviewed-by: Andrew Lunn Acked-by: Thomas Bogendoerfer Signed-off-by: Th=C3=A9o Lebrun --- arch/mips/boot/dts/mobileye/eyeq5-epm5.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/mips/boot/dts/mobileye/eyeq5-epm5.dts b/arch/mips/boot/dt= s/mobileye/eyeq5-epm5.dts index 9fc1a1b0a81b..babf52731ea6 100644 --- a/arch/mips/boot/dts/mobileye/eyeq5-epm5.dts +++ b/arch/mips/boot/dts/mobileye/eyeq5-epm5.dts @@ -29,3 +29,29 @@ temperature-sensor@48 { label =3D "U60"; }; }; + +&macb0 { + phy-mode =3D "sgmii"; + phy-handle =3D <&macb0_phy>; + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + macb0_phy: ethernet-phy@e { + reg =3D <0xe>; + }; + }; +}; + +&macb1 { + phy-mode =3D "rgmii-id"; + phy-handle =3D <&macb1_phy>; + + mdio { + #address-cells =3D <1>; + #size-cells =3D <0>; + macb1_phy: ethernet-phy@e { + reg =3D <0xe>; + }; + }; +}; --=20 2.52.0