mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-16 04:03:56 +02:00
![John Audia](/assets/img/avatar_default.png)
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.23 Removed upstreamed: pending-6.6/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch[1] pending-6.6/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch[2] mediatek/patches-6.6/232-clk-mediatek-mt7981-topckgen-flag-SGM_REG_SEL-as-cri.patch[3] Manually rebased: mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch Added: generic/backports-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch[4] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=1f32abb474c1c9bdb21d9eda74c325a0b3a162e5 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=943c14ece95eb1cf98d477462aebcbfdfd714633 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.23&id=6ff01b314149d1cf59caebc29384f0beed21cba4 4. See comments in https://github.com/openwrt/openwrt/pull/14992 regarding broken flogic/xiaomi_redmi-router-ax6000-ubootmod Build system: x86/64 Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000 Run-tested: x86/64/AMD Cezannei, flogic/xiaomi_redmi-router-ax6000-ubootmod, flogic/glinet_gl-mt6000 Signed-off-by: John Audia <therealgraysky@proton.me>
44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
From 1d81e51d6d79d9098013b2e8cdd677bae998c5d8 Mon Sep 17 00:00:00 2001
|
|
From: David Bauer <mail@david-bauer.net>
|
|
Date: Fri, 28 Apr 2023 02:22:59 +0200
|
|
Subject: [PATCH 1/2] mt7530: register OF node for internal MDIO bus
|
|
|
|
The MT753x switches provide a switch-internal MDIO bus for the embedded
|
|
PHYs.
|
|
|
|
Register a OF sub-node on the switch OF-node for this internal MDIO bus.
|
|
This allows to configure the embedded PHYs using device-tree.
|
|
|
|
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
---
|
|
drivers/net/dsa/mt7530.c | 7 ++++++-
|
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/dsa/mt7530.c
|
|
+++ b/drivers/net/dsa/mt7530.c
|
|
@@ -2192,10 +2192,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
|
|
{
|
|
struct dsa_switch *ds = priv->ds;
|
|
struct device *dev = priv->dev;
|
|
+ struct device_node *np, *mnp;
|
|
struct mii_bus *bus;
|
|
static int idx;
|
|
int ret;
|
|
|
|
+ np = priv->dev->of_node;
|
|
+
|
|
bus = devm_mdiobus_alloc(dev);
|
|
if (!bus)
|
|
return -ENOMEM;
|
|
@@ -2214,7 +2217,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
|
|
if (priv->irq)
|
|
mt7530_setup_mdio_irq(priv);
|
|
|
|
- ret = devm_mdiobus_register(dev, bus);
|
|
+ mnp = of_get_child_by_name(np, "mdio");
|
|
+ ret = devm_of_mdiobus_register(dev, bus, mnp);
|
|
+ of_node_put(mnp);
|
|
if (ret) {
|
|
dev_err(dev, "failed to register MDIO bus: %d\n", ret);
|
|
if (priv->irq)
|