[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df2a463c-102c-4eb1-905d-96dbd926db7e@kernel.org>
Date: Thu, 16 Jan 2025 13:45:35 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Sky Huang <SkyLake.Huang@...iatek.com>, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>, Russell King
<linux@...linux.org.uk>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Daniel Golle <daniel@...rotopia.org>,
Qingfang Deng <dqfext@...il.com>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Simon Horman <horms@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Cc: Steven Liu <Steven.Liu@...iatek.com>
Subject: Re: [PATCH net-next 3/3] net: phy: mediatek: add driver for built-in
2.5G ethernet PHY on MT7988
On 16/01/2025 02:21, Sky Huang wrote:
> +
> +static int mt798x_2p5ge_phy_load_fw(struct phy_device *phydev)
> +{
> + struct mtk_i2p5ge_phy_priv *priv = phydev->priv;
> + void __iomem *mcu_csr_base, *pmb_addr;
> + struct device *dev = &phydev->mdio.dev;
> + const struct firmware *fw;
> + struct device_node *np;
> + int ret, i;
> + u32 reg;
> +
> + if (priv->fw_loaded)
> + return 0;
> +
> + np = of_find_compatible_node(NULL, NULL, "mediatek,2p5gphy-fw");
There is no such compatible. You cannot just add undocumented bindings.
Also, devices should not just look for some random compatibles. Express
proper relationships with phandles or node hierarchy.
> + if (!np)
> + return -ENOENT;
> +
> + pmb_addr = of_iomap(np, 1);
> + if (!pmb_addr)
> + return -ENOMEM;
> + mcu_csr_base = of_iomap(np, 2);
> + if (!mcu_csr_base) {
> + ret = -ENOMEM;
> + goto free_pmb;
> + }
> +
Best regards,
Krzysztof
Powered by blists - more mailing lists