linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup
@ 2025-07-06 21:41 Rosen Penev
  2025-07-06 21:41 ` [PATCH 1/6] wifi: rt2x00: fix compilation Rosen Penev
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 21:41 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

It doesn't even compile. Added OF bindings, documentation, and other
stuff to hopefully this doesn't happen again.

Rosen Penev (6):
  wifi: rt2x00: fix compilation
  wifi: rt2x00: remove mod_name from platform_driver
  wifi: rt2800soc: allow loading from OF
  wifi: rt2x00: soc: move and modernize probe
  dt-bindings: net: wireless: rt2800: add
  MIPS: dts: ralink: mt7628a: add wifi binding

 .../bindings/net/wireless/ralink,rt2800.yaml  |  49 +++++++++
 arch/mips/boot/dts/ralink/mt7620a.dtsi        |  10 ++
 drivers/net/wireless/ralink/rt2x00/Kconfig    |   2 +-
 .../net/wireless/ralink/rt2x00/rt2800soc.c    |  75 ++++++++++++-
 .../net/wireless/ralink/rt2x00/rt2x00soc.c    | 104 ------------------
 .../net/wireless/ralink/rt2x00/rt2x00soc.h    |   2 +-
 6 files changed, 133 insertions(+), 109 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml

-- 
2.50.0



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/6] wifi: rt2x00: fix compilation
  2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
@ 2025-07-06 21:41 ` Rosen Penev
  2025-07-08 10:00   ` Sergio Paracuellos
  2025-07-06 21:41 ` [PATCH 2/6] wifi: rt2x00: remove mod_name from platform_driver Rosen Penev
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 21:41 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

The .remove prototype commits seem to have missed this driver. Probably
because COMPILE_TEST is missing.

This is a mess anyway. These non static functions will be moved to their
proper place.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/wireless/ralink/rt2x00/Kconfig     | 2 +-
 drivers/net/wireless/ralink/rt2x00/rt2x00soc.c | 4 +---
 drivers/net/wireless/ralink/rt2x00/rt2x00soc.h | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/Kconfig b/drivers/net/wireless/ralink/rt2x00/Kconfig
index d1fd66d44a7e..3a32ceead54f 100644
--- a/drivers/net/wireless/ralink/rt2x00/Kconfig
+++ b/drivers/net/wireless/ralink/rt2x00/Kconfig
@@ -202,7 +202,7 @@ endif
 
 config RT2800SOC
 	tristate "Ralink WiSoC support"
-	depends on SOC_RT288X || SOC_RT305X || SOC_MT7620
+	depends on SOC_RT288X || SOC_RT305X || SOC_MT7620 || COMPILE_TEST
 	select RT2X00_LIB_SOC
 	select RT2X00_LIB_MMIO
 	select RT2X00_LIB_CRYPTO
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
index eface610178d..f7f3a2340c39 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
@@ -108,7 +108,7 @@ int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops)
 }
 EXPORT_SYMBOL_GPL(rt2x00soc_probe);
 
-int rt2x00soc_remove(struct platform_device *pdev)
+void rt2x00soc_remove(struct platform_device *pdev)
 {
 	struct ieee80211_hw *hw = platform_get_drvdata(pdev);
 	struct rt2x00_dev *rt2x00dev = hw->priv;
@@ -119,8 +119,6 @@ int rt2x00soc_remove(struct platform_device *pdev)
 	rt2x00lib_remove_dev(rt2x00dev);
 	rt2x00soc_free_reg(rt2x00dev);
 	ieee80211_free_hw(hw);
-
-	return 0;
 }
 EXPORT_SYMBOL_GPL(rt2x00soc_remove);
 
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h
index 021fd06b3627..d6226b8a10e0 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.h
@@ -17,7 +17,7 @@
  * SoC driver handlers.
  */
 int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops);
-int rt2x00soc_remove(struct platform_device *pdev);
+void rt2x00soc_remove(struct platform_device *pdev);
 #ifdef CONFIG_PM
 int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state);
 int rt2x00soc_resume(struct platform_device *pdev);
-- 
2.50.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/6] wifi: rt2x00: remove mod_name from platform_driver
  2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
  2025-07-06 21:41 ` [PATCH 1/6] wifi: rt2x00: fix compilation Rosen Penev
@ 2025-07-06 21:41 ` Rosen Penev
  2025-07-08 10:01   ` Sergio Paracuellos
  2025-07-06 21:41 ` [PATCH 3/6] wifi: rt2800soc: allow loading from OF Rosen Penev
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 21:41 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

mod_name is a legacy debugging feature with no real modern use. An
analysis of the underlying MIPS setup code reveals it to also be unused.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
index 701ba54bf3e5..e73394cf6ea6 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
@@ -246,7 +246,6 @@ static int rt2800soc_probe(struct platform_device *pdev)
 static struct platform_driver rt2800soc_driver = {
 	.driver		= {
 		.name		= "rt2800_wmac",
-		.mod_name	= KBUILD_MODNAME,
 	},
 	.probe		= rt2800soc_probe,
 	.remove		= rt2x00soc_remove,
-- 
2.50.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/6] wifi: rt2800soc: allow loading from OF
  2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
  2025-07-06 21:41 ` [PATCH 1/6] wifi: rt2x00: fix compilation Rosen Penev
  2025-07-06 21:41 ` [PATCH 2/6] wifi: rt2x00: remove mod_name from platform_driver Rosen Penev
@ 2025-07-06 21:41 ` Rosen Penev
  2025-07-08 10:03   ` Sergio Paracuellos
  2025-07-06 21:41 ` [PATCH 4/6] wifi: rt2x00: soc: move and modernize probe Rosen Penev
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 21:41 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

Add a single bindng to help the already present dts files load the
driver. More are possible but there doesn't seem to be a significant
difference between them to justify this.

Use wifi name per dtschema requirements.

The data field will be used to remove the custom non static probe
function and use of_device_get_match_data.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
index e73394cf6ea6..db8d01f0cdc3 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
@@ -243,9 +243,16 @@ static int rt2800soc_probe(struct platform_device *pdev)
 	return rt2x00soc_probe(pdev, &rt2800soc_ops);
 }
 
+static const struct of_device_id rt2880_wmac_match[] = {
+	{ .compatible = "ralink,rt2880-wifi", .data = &rt2800soc_ops },
+	{},
+};
+MODULE_DEVICE_TABLE(of, rt2880_wmac_match);
+
 static struct platform_driver rt2800soc_driver = {
 	.driver		= {
 		.name		= "rt2800_wmac",
+		.of_match_table = rt2880_wmac_match,
 	},
 	.probe		= rt2800soc_probe,
 	.remove		= rt2x00soc_remove,
-- 
2.50.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 4/6] wifi: rt2x00: soc: move and modernize probe
  2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
                   ` (2 preceding siblings ...)
  2025-07-06 21:41 ` [PATCH 3/6] wifi: rt2800soc: allow loading from OF Rosen Penev
@ 2025-07-06 21:41 ` Rosen Penev
  2025-07-08 10:07   ` Sergio Paracuellos
  2025-07-06 21:41 ` [PATCH 5/6] dt-bindings: net: wireless: rt2800: add Rosen Penev
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 21:41 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

By moving functions from rt2x00soc to rt2800soc, the driver benefits
with potentially smaller compiled size. It also becomes much easier to
remove a bunch of manual memory management and use devm.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 .../net/wireless/ralink/rt2x00/rt2800soc.c    |  67 +++++++++++-
 .../net/wireless/ralink/rt2x00/rt2x00soc.c    | 102 ------------------
 2 files changed, 65 insertions(+), 104 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
index db8d01f0cdc3..e2c05ead9b25 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c
@@ -18,6 +18,7 @@
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 
 #include "rt2x00.h"
@@ -240,7 +241,69 @@ static const struct rt2x00_ops rt2800soc_ops = {
 
 static int rt2800soc_probe(struct platform_device *pdev)
 {
-	return rt2x00soc_probe(pdev, &rt2800soc_ops);
+	const struct rt2x00_ops *ops = of_device_get_match_data(&pdev->dev);
+	struct rt2x00_dev *rt2x00dev;
+	struct ieee80211_hw *hw;
+	int retval;
+
+	hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
+	if (!hw) {
+		rt2x00_probe_err("Failed to allocate hardware\n");
+		return -ENOMEM;
+	}
+
+	platform_set_drvdata(pdev, hw);
+
+	rt2x00dev = hw->priv;
+	rt2x00dev->dev = &pdev->dev;
+	rt2x00dev->ops = ops;
+	rt2x00dev->hw = hw;
+	rt2x00dev->irq = platform_get_irq(pdev, 0);
+	rt2x00dev->name = pdev->dev.driver->name;
+	rt2x00dev->clk = devm_clk_get_optional(&pdev->dev, NULL);
+
+	rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC);
+
+	rt2x00dev->csr.base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(rt2x00dev->csr.base)) {
+		retval = PTR_ERR(rt2x00dev->csr.base);
+		goto exit_free_device;
+	}
+
+	rt2x00dev->eeprom = devm_kzalloc(&pdev->dev, rt2x00dev->ops->eeprom_size, GFP_KERNEL);
+	if (!rt2x00dev->eeprom) {
+		retval = -ENOMEM;
+		goto exit_free_device;
+	}
+
+	rt2x00dev->rf = devm_kzalloc(&pdev->dev, rt2x00dev->ops->rf_size, GFP_KERNEL);
+	if (!rt2x00dev->rf) {
+		retval = -ENOMEM;
+		goto exit_free_device;
+	}
+
+	retval = rt2x00lib_probe_dev(rt2x00dev);
+	if (retval)
+		goto exit_free_device;
+
+	return 0;
+
+exit_free_device:
+	ieee80211_free_hw(hw);
+
+	return retval;
+}
+
+static void rt2800soc_remove(struct platform_device *pdev)
+{
+	struct ieee80211_hw *hw = platform_get_drvdata(pdev);
+	struct rt2x00_dev *rt2x00dev = hw->priv;
+
+	/*
+	 * Free all allocated data.
+	 */
+	rt2x00lib_remove_dev(rt2x00dev);
+	ieee80211_free_hw(hw);
 }
 
 static const struct of_device_id rt2880_wmac_match[] = {
@@ -255,7 +318,7 @@ static struct platform_driver rt2800soc_driver = {
 		.of_match_table = rt2880_wmac_match,
 	},
 	.probe		= rt2800soc_probe,
-	.remove		= rt2x00soc_remove,
+	.remove		= rt2800soc_remove,
 	.suspend	= rt2x00soc_suspend,
 	.resume		= rt2x00soc_resume,
 };
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
index f7f3a2340c39..9fd763f2fcde 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c
@@ -20,108 +20,6 @@
 #include "rt2x00.h"
 #include "rt2x00soc.h"
 
-static void rt2x00soc_free_reg(struct rt2x00_dev *rt2x00dev)
-{
-	kfree(rt2x00dev->rf);
-	rt2x00dev->rf = NULL;
-
-	kfree(rt2x00dev->eeprom);
-	rt2x00dev->eeprom = NULL;
-
-	iounmap(rt2x00dev->csr.base);
-}
-
-static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev)
-{
-	struct platform_device *pdev = to_platform_device(rt2x00dev->dev);
-	struct resource *res;
-
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -ENODEV;
-
-	rt2x00dev->csr.base = ioremap(res->start, resource_size(res));
-	if (!rt2x00dev->csr.base)
-		return -ENOMEM;
-
-	rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL);
-	if (!rt2x00dev->eeprom)
-		goto exit;
-
-	rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL);
-	if (!rt2x00dev->rf)
-		goto exit;
-
-	return 0;
-
-exit:
-	rt2x00_probe_err("Failed to allocate registers\n");
-	rt2x00soc_free_reg(rt2x00dev);
-
-	return -ENOMEM;
-}
-
-int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops)
-{
-	struct ieee80211_hw *hw;
-	struct rt2x00_dev *rt2x00dev;
-	int retval;
-
-	hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
-	if (!hw) {
-		rt2x00_probe_err("Failed to allocate hardware\n");
-		return -ENOMEM;
-	}
-
-	platform_set_drvdata(pdev, hw);
-
-	rt2x00dev = hw->priv;
-	rt2x00dev->dev = &pdev->dev;
-	rt2x00dev->ops = ops;
-	rt2x00dev->hw = hw;
-	rt2x00dev->irq = platform_get_irq(pdev, 0);
-	rt2x00dev->name = pdev->dev.driver->name;
-
-	rt2x00dev->clk = clk_get(&pdev->dev, NULL);
-	if (IS_ERR(rt2x00dev->clk))
-		rt2x00dev->clk = NULL;
-
-	rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_SOC);
-
-	retval = rt2x00soc_alloc_reg(rt2x00dev);
-	if (retval)
-		goto exit_free_device;
-
-	retval = rt2x00lib_probe_dev(rt2x00dev);
-	if (retval)
-		goto exit_free_reg;
-
-	return 0;
-
-exit_free_reg:
-	rt2x00soc_free_reg(rt2x00dev);
-
-exit_free_device:
-	ieee80211_free_hw(hw);
-
-	return retval;
-}
-EXPORT_SYMBOL_GPL(rt2x00soc_probe);
-
-void rt2x00soc_remove(struct platform_device *pdev)
-{
-	struct ieee80211_hw *hw = platform_get_drvdata(pdev);
-	struct rt2x00_dev *rt2x00dev = hw->priv;
-
-	/*
-	 * Free all allocated data.
-	 */
-	rt2x00lib_remove_dev(rt2x00dev);
-	rt2x00soc_free_reg(rt2x00dev);
-	ieee80211_free_hw(hw);
-}
-EXPORT_SYMBOL_GPL(rt2x00soc_remove);
-
 #ifdef CONFIG_PM
 int rt2x00soc_suspend(struct platform_device *pdev, pm_message_t state)
 {
-- 
2.50.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 5/6] dt-bindings: net: wireless: rt2800: add
  2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
                   ` (3 preceding siblings ...)
  2025-07-06 21:41 ` [PATCH 4/6] wifi: rt2x00: soc: move and modernize probe Rosen Penev
@ 2025-07-06 21:41 ` Rosen Penev
  2025-07-06 22:29   ` Rob Herring (Arm)
  2025-07-06 21:41 ` [PATCH 6/6] MIPS: dts: ralink: mt7628a: add wifi binding Rosen Penev
  2025-07-07  9:01 ` [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Johannes Berg
  6 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 21:41 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

Add device-tree bindings for the RT2800 SOC wifi device found in older
Ralink/Mediatek devices.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 .../bindings/net/wireless/ralink,rt2800.yaml  | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml

diff --git a/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml b/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml
new file mode 100644
index 000000000000..fef14ca20983
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/wireless/ralink,rt2800.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ralink RT2800 wireless devices
+
+maintainers:
+  - Stanislaw Gruszka <stf_xl@wp.pl>
+
+description: |
+  This node provides properties for configuring RT2800 SOC wifi device.
+  The node is expected to be specified as a root node of the device.
+
+allOf:
+  - $ref: ieee80211.yaml#
+
+properties:
+  compatible:
+    enum:
+      - ralink,rt2800-wifi
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  interrupt-parent:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+    wifi@110180000 {
+      compatible = "ralink,rt2880-wifi";
+      reg = <0x10180000 0x40000>;
+      clocks = <&sysc 16>;
+      interrupt-parent = <&cpuintc>;
+      interrupts = <6>;
+    };
-- 
2.50.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 6/6] MIPS: dts: ralink: mt7628a: add wifi binding
  2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
                   ` (4 preceding siblings ...)
  2025-07-06 21:41 ` [PATCH 5/6] dt-bindings: net: wireless: rt2800: add Rosen Penev
@ 2025-07-06 21:41 ` Rosen Penev
  2025-07-08  1:19   ` Daniel Golle
  2025-07-07  9:01 ` [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Johannes Berg
  6 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 21:41 UTC (permalink / raw)
  To: linux-wireless
  Cc: Johannes Berg, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

MT7620A devices all contain a wifi device as part of the SOC. Add it
here to get it working.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 arch/mips/boot/dts/ralink/mt7620a.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/mips/boot/dts/ralink/mt7620a.dtsi b/arch/mips/boot/dts/ralink/mt7620a.dtsi
index d66045948a83..460164bdd430 100644
--- a/arch/mips/boot/dts/ralink/mt7620a.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7620a.dtsi
@@ -62,4 +62,14 @@ uartlite@c00 {
 			reg-shift = <2>;
 		};
 	};
+
+	wmac: wifi@10180000 {
+		compatible = "ralink,rt2880-wifi";
+		reg = <0x10180000 0x40000>;
+
+		clocks = <&sysc 16>;
+
+		interrupt-parent = <&cpuintc>;
+		interrupts = <6>;
+	};
 };
-- 
2.50.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 5/6] dt-bindings: net: wireless: rt2800: add
  2025-07-06 21:41 ` [PATCH 5/6] dt-bindings: net: wireless: rt2800: add Rosen Penev
@ 2025-07-06 22:29   ` Rob Herring (Arm)
  2025-07-06 23:51     ` Rosen Penev
  0 siblings, 1 reply; 20+ messages in thread
From: Rob Herring (Arm) @ 2025-07-06 22:29 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-mips, AngeloGioacchino Del Regno, devicetree, linux-kernel,
	linux-arm-kernel, ansuelsmth, Conor Dooley, Stanislaw Gruszka,
	linux-mediatek, Johannes Berg, linux-wireless,
	Thomas Bogendoerfer, Matthias Brugger, Krzysztof Kozlowski,
	yangshiji66


On Sun, 06 Jul 2025 14:41:10 -0700, Rosen Penev wrote:
> Add device-tree bindings for the RT2800 SOC wifi device found in older
> Ralink/Mediatek devices.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  .../bindings/net/wireless/ralink,rt2800.yaml  | 49 +++++++++++++++++++
>  1 file changed, 49 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml:43:5: [warning] wrong indentation: expected 2 but found 4 (indentation)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: ignoring, error in schema: examples
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: examples: 'wifi@110180000 { compatible = "ralink,rt2880-wifi"; reg = <0x10180000 0x40000>; clocks = <&sysc 16>; interrupt-parent = <&cpuintc>; interrupts = <6>; };' is not of type 'array'
	from schema $id: http://json-schema.org/draft-07/schema#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: examples: 'wifi@110180000 { compatible = "ralink,rt2880-wifi"; reg = <0x10180000 0x40000>; clocks = <&sysc 16>; interrupt-parent = <&cpuintc>; interrupts = <6>; };' is not of type 'array'
	from schema $id: http://devicetree.org/meta-schemas/base.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: properties:interrupt-parent: False schema does not allow {'maxItems': 1}
	from schema $id: http://devicetree.org/meta-schemas/interrupts.yaml#
Error: Documentation/devicetree/bindings/net/wireless/ralink,rt2800.example.dts:19.5-6 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/net/wireless/ralink,rt2800.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1525: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250706214111.45687-6-rosenp@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 5/6] dt-bindings: net: wireless: rt2800: add
  2025-07-06 22:29   ` Rob Herring (Arm)
@ 2025-07-06 23:51     ` Rosen Penev
  0 siblings, 0 replies; 20+ messages in thread
From: Rosen Penev @ 2025-07-06 23:51 UTC (permalink / raw)
  To: Rob Herring (Arm)
  Cc: linux-mips, AngeloGioacchino Del Regno, devicetree, linux-kernel,
	linux-arm-kernel, ansuelsmth, Conor Dooley, Stanislaw Gruszka,
	linux-mediatek, Johannes Berg, linux-wireless,
	Thomas Bogendoerfer, Matthias Brugger, Krzysztof Kozlowski,
	yangshiji66

On Sun, Jul 6, 2025 at 3:29 PM Rob Herring (Arm) <robh@kernel.org> wrote:
>
>
> On Sun, 06 Jul 2025 14:41:10 -0700, Rosen Penev wrote:
> > Add device-tree bindings for the RT2800 SOC wifi device found in older
> > Ralink/Mediatek devices.
> >
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > ---
> >  .../bindings/net/wireless/ralink,rt2800.yaml  | 49 +++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
> ./Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml:43:5: [warning] wrong indentation: expected 2 but found 4 (indentation)
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: ignoring, error in schema: examples
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: examples: 'wifi@110180000 { compatible = "ralink,rt2880-wifi"; reg = <0x10180000 0x40000>; clocks = <&sysc 16>; interrupt-parent = <&cpuintc>; interrupts = <6>; };' is not of type 'array'
>         from schema $id: http://json-schema.org/draft-07/schema#
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: examples: 'wifi@110180000 { compatible = "ralink,rt2880-wifi"; reg = <0x10180000 0x40000>; clocks = <&sysc 16>; interrupt-parent = <&cpuintc>; interrupts = <6>; };' is not of type 'array'
>         from schema $id: http://devicetree.org/meta-schemas/base.yaml#
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/wireless/ralink,rt2800.yaml: properties:interrupt-parent: False schema does not allow {'maxItems': 1}
>         from schema $id: http://devicetree.org/meta-schemas/interrupts.yaml#
> Error: Documentation/devicetree/bindings/net/wireless/ralink,rt2800.example.dts:19.5-6 syntax error
> FATAL ERROR: Unable to parse input tree
> make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/net/wireless/ralink,rt2800.example.dtb] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1525: dt_binding_check] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
forgot to run dt_binding_check. Will fix in v2.
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250706214111.45687-6-rosenp@gmail.com
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
>


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup
  2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
                   ` (5 preceding siblings ...)
  2025-07-06 21:41 ` [PATCH 6/6] MIPS: dts: ralink: mt7628a: add wifi binding Rosen Penev
@ 2025-07-07  9:01 ` Johannes Berg
  2025-07-07 17:41   ` Rosen Penev
  6 siblings, 1 reply; 20+ messages in thread
From: Johannes Berg @ 2025-07-07  9:01 UTC (permalink / raw)
  To: Rosen Penev, linux-wireless
  Cc: yangshiji66, ansuelsmth, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Thomas Bogendoerfer, Matthias Brugger,
	AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Sun, 2025-07-06 at 14:41 -0700, Rosen Penev wrote:
> It doesn't even compile. Added OF bindings, documentation, and other
> stuff to hopefully this doesn't happen again.
> 
> Rosen Penev (6):
>   wifi: rt2x00: fix compilation
> 

That was half covered by Felix already, and really shouldn't do two
things at the same time anyway.

Also please add [PATCH wireless] or [PATCH wireless-next] prefix when
you submit patches, to make it clear where the series is targeted. In
this case, you probably should've split it up, but Felix already covered
the immediate bug.

johannes


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup
  2025-07-07  9:01 ` [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Johannes Berg
@ 2025-07-07 17:41   ` Rosen Penev
  2025-07-07 18:36     ` Johannes Berg
  0 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-07 17:41 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Mon, Jul 7, 2025 at 2:01 AM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Sun, 2025-07-06 at 14:41 -0700, Rosen Penev wrote:
> > It doesn't even compile. Added OF bindings, documentation, and other
> > stuff to hopefully this doesn't happen again.
> >
> > Rosen Penev (6):
> >   wifi: rt2x00: fix compilation
> >
>
> That was half covered by Felix already, and really shouldn't do two
> things at the same time anyway.
Just saw what you're talking about. That's gonna be annoying though.
The COMPILE_TEST commit will cause compilation to fail and the bot to
complain before Felix' patch gets merged.
>
> Also please add [PATCH wireless] or [PATCH wireless-next] prefix when
> you submit patches, to make it clear where the series is targeted. In
> this case, you probably should've split it up, but Felix already covered
> the immediate bug.
Will do.
>
> johannes


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup
  2025-07-07 17:41   ` Rosen Penev
@ 2025-07-07 18:36     ` Johannes Berg
  2025-07-07 22:55       ` Rosen Penev
  0 siblings, 1 reply; 20+ messages in thread
From: Johannes Berg @ 2025-07-07 18:36 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Mon, 2025-07-07 at 10:41 -0700, Rosen Penev wrote:
> On Mon, Jul 7, 2025 at 2:01 AM Johannes Berg <johannes@sipsolutions.net> wrote:
> > 
> > On Sun, 2025-07-06 at 14:41 -0700, Rosen Penev wrote:
> > > It doesn't even compile. Added OF bindings, documentation, and other
> > > stuff to hopefully this doesn't happen again.
> > > 
> > > Rosen Penev (6):
> > >   wifi: rt2x00: fix compilation
> > > 
> > 
> > That was half covered by Felix already, and really shouldn't do two
> > things at the same time anyway.
> Just saw what you're talking about. That's gonna be annoying though.
> The COMPILE_TEST commit will cause compilation to fail and the bot to
> complain before Felix' patch gets merged.
> 

Yeah well. That doesn't really mean it should be merged together though,
and we can pretty easily make that work by just putting the further work
in after net/wireless is merged back.

johannes


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup
  2025-07-07 18:36     ` Johannes Berg
@ 2025-07-07 22:55       ` Rosen Penev
  2025-07-08  6:51         ` Johannes Berg
  0 siblings, 1 reply; 20+ messages in thread
From: Rosen Penev @ 2025-07-07 22:55 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Mon, Jul 7, 2025 at 11:36 AM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Mon, 2025-07-07 at 10:41 -0700, Rosen Penev wrote:
> > On Mon, Jul 7, 2025 at 2:01 AM Johannes Berg <johannes@sipsolutions.net> wrote:
> > >
> > > On Sun, 2025-07-06 at 14:41 -0700, Rosen Penev wrote:
> > > > It doesn't even compile. Added OF bindings, documentation, and other
> > > > stuff to hopefully this doesn't happen again.
> > > >
> > > > Rosen Penev (6):
> > > >   wifi: rt2x00: fix compilation
> > > >
> > >
> > > That was half covered by Felix already, and really shouldn't do two
> > > things at the same time anyway.
> > Just saw what you're talking about. That's gonna be annoying though.
> > The COMPILE_TEST commit will cause compilation to fail and the bot to
> > complain before Felix' patch gets merged.
> >
>
> Yeah well. That doesn't really mean it should be merged together though,
> and we can pretty easily make that work by just putting the further work
> in after net/wireless is merged back.
Looking at it again, I'm effectively removing rt2x00soc.c . Meaning
Felix' patch is mostly useless here.

It might make more sense to submit this series at a later time.
>
> johannes


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/6] MIPS: dts: ralink: mt7628a: add wifi binding
  2025-07-06 21:41 ` [PATCH 6/6] MIPS: dts: ralink: mt7628a: add wifi binding Rosen Penev
@ 2025-07-08  1:19   ` Daniel Golle
  2025-07-08  1:36     ` Rosen Penev
  0 siblings, 1 reply; 20+ messages in thread
From: Daniel Golle @ 2025-07-08  1:19 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, Johannes Berg, yangshiji66, ansuelsmth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Thomas Bogendoerfer, Matthias Brugger, AngeloGioacchino Del Regno,
	Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Sun, Jul 06, 2025 at 02:41:11PM -0700, Rosen Penev wrote:
> MT7620A devices all contain a wifi device as part of the SOC. Add it
> here to get it working.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  arch/mips/boot/dts/ralink/mt7620a.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)

The commit title

MIPS: dts: ralink: mt7628a: add wifi binding 

seems wrong as the commit (correctly) touches mt7620a.dtsi and not
mt7628a.dtsi (which would be wrong as the WiFi part of MT7628A is
already supported by the mt76 driver and part of the device tree).
Also the word 'binding' seems wrong in this context, you are adding
a node to the device tree, not to the device tree bindings.

I'd hence suggest to change the commit title to

MIPS: dts: ralink: mt7620a: add wifi


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 6/6] MIPS: dts: ralink: mt7628a: add wifi binding
  2025-07-08  1:19   ` Daniel Golle
@ 2025-07-08  1:36     ` Rosen Penev
  0 siblings, 0 replies; 20+ messages in thread
From: Rosen Penev @ 2025-07-08  1:36 UTC (permalink / raw)
  To: Daniel Golle
  Cc: linux-wireless, Johannes Berg, yangshiji66, ansuelsmth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Thomas Bogendoerfer, Matthias Brugger, AngeloGioacchino Del Regno,
	Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Mon, Jul 7, 2025 at 6:19 PM Daniel Golle <daniel@makrotopia.org> wrote:
>
> On Sun, Jul 06, 2025 at 02:41:11PM -0700, Rosen Penev wrote:
> > MT7620A devices all contain a wifi device as part of the SOC. Add it
> > here to get it working.
> >
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > ---
> >  arch/mips/boot/dts/ralink/mt7620a.dtsi | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
>
> The commit title
>
> MIPS: dts: ralink: mt7628a: add wifi binding
That is embarrassing. I'm blaming my new Linux setup.
>
> seems wrong as the commit (correctly) touches mt7620a.dtsi and not
> mt7628a.dtsi (which would be wrong as the WiFi part of MT7628A is
> already supported by the mt76 driver and part of the device tree).
> Also the word 'binding' seems wrong in this context, you are adding
> a node to the device tree, not to the device tree bindings.
>
> I'd hence suggest to change the commit title to
>
> MIPS: dts: ralink: mt7620a: add wifi
Will do


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup
  2025-07-07 22:55       ` Rosen Penev
@ 2025-07-08  6:51         ` Johannes Berg
  0 siblings, 0 replies; 20+ messages in thread
From: Johannes Berg @ 2025-07-08  6:51 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, yangshiji66, ansuelsmth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Thomas Bogendoerfer,
	Matthias Brugger, AngeloGioacchino Del Regno, Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Mon, 2025-07-07 at 15:55 -0700, Rosen Penev wrote:
> > 
> > Yeah well. That doesn't really mean it should be merged together though,
> > and we can pretty easily make that work by just putting the further work
> > in after net/wireless is merged back.
> Looking at it again, I'm effectively removing rt2x00soc.c . Meaning
> Felix' patch is mostly useless here.

But we're not going to put your changes into 6.16. They're not even
entirely ready yet, from what I see in the thread.

> It might make more sense to submit this series at a later time.
> 

By end of the week Felix's patch should be in wireless-next too, if I
get all the things done right...

johannes


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/6] wifi: rt2x00: fix compilation
  2025-07-06 21:41 ` [PATCH 1/6] wifi: rt2x00: fix compilation Rosen Penev
@ 2025-07-08 10:00   ` Sergio Paracuellos
  0 siblings, 0 replies; 20+ messages in thread
From: Sergio Paracuellos @ 2025-07-08 10:00 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, Johannes Berg, yangshiji66, ansuelsmth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Thomas Bogendoerfer, Matthias Brugger, AngeloGioacchino Del Regno,
	Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Sun, Jul 6, 2025 at 11:41 PM Rosen Penev <rosenp@gmail.com> wrote:
>
> The .remove prototype commits seem to have missed this driver. Probably
> because COMPILE_TEST is missing.
>
> This is a mess anyway. These non static functions will be moved to their
> proper place.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/net/wireless/ralink/rt2x00/Kconfig     | 2 +-
>  drivers/net/wireless/ralink/rt2x00/rt2x00soc.c | 4 +---
>  drivers/net/wireless/ralink/rt2x00/rt2x00soc.h | 2 +-
>  3 files changed, 3 insertions(+), 5 deletions(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Best regards,
    Sergio Paracuellos


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/6] wifi: rt2x00: remove mod_name from platform_driver
  2025-07-06 21:41 ` [PATCH 2/6] wifi: rt2x00: remove mod_name from platform_driver Rosen Penev
@ 2025-07-08 10:01   ` Sergio Paracuellos
  0 siblings, 0 replies; 20+ messages in thread
From: Sergio Paracuellos @ 2025-07-08 10:01 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, Johannes Berg, yangshiji66, ansuelsmth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Thomas Bogendoerfer, Matthias Brugger, AngeloGioacchino Del Regno,
	Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Sun, Jul 6, 2025 at 11:41 PM Rosen Penev <rosenp@gmail.com> wrote:
>
> mod_name is a legacy debugging feature with no real modern use. An
> analysis of the underlying MIPS setup code reveals it to also be unused.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Best regards,
    Sergio Paracuellos


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/6] wifi: rt2800soc: allow loading from OF
  2025-07-06 21:41 ` [PATCH 3/6] wifi: rt2800soc: allow loading from OF Rosen Penev
@ 2025-07-08 10:03   ` Sergio Paracuellos
  0 siblings, 0 replies; 20+ messages in thread
From: Sergio Paracuellos @ 2025-07-08 10:03 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, Johannes Berg, yangshiji66, ansuelsmth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Thomas Bogendoerfer, Matthias Brugger, AngeloGioacchino Del Regno,
	Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Sun, Jul 6, 2025 at 11:41 PM Rosen Penev <rosenp@gmail.com> wrote:
>
> Add a single bindng to help the already present dts files load the
> driver. More are possible but there doesn't seem to be a significant
> difference between them to justify this.

typo: s/bindng/binding

>
> Use wifi name per dtschema requirements.
>
> The data field will be used to remove the custom non static probe
> function and use of_device_get_match_data.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2800soc.c | 7 +++++++
>  1 file changed, 7 insertions(+)

With the typo fixed:

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Best regards,
    Sergio Paracuellos


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 4/6] wifi: rt2x00: soc: move and modernize probe
  2025-07-06 21:41 ` [PATCH 4/6] wifi: rt2x00: soc: move and modernize probe Rosen Penev
@ 2025-07-08 10:07   ` Sergio Paracuellos
  0 siblings, 0 replies; 20+ messages in thread
From: Sergio Paracuellos @ 2025-07-08 10:07 UTC (permalink / raw)
  To: Rosen Penev
  Cc: linux-wireless, Johannes Berg, yangshiji66, ansuelsmth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Thomas Bogendoerfer, Matthias Brugger, AngeloGioacchino Del Regno,
	Stanislaw Gruszka,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, open list:MIPS,
	moderated list:ARM/Mediatek SoC support,
	moderated list:ARM/Mediatek SoC support

On Sun, Jul 6, 2025 at 11:42 PM Rosen Penev <rosenp@gmail.com> wrote:
>
> By moving functions from rt2x00soc to rt2800soc, the driver benefits
> with potentially smaller compiled size. It also becomes much easier to
> remove a bunch of manual memory management and use devm.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  .../net/wireless/ralink/rt2x00/rt2800soc.c    |  67 +++++++++++-
>  .../net/wireless/ralink/rt2x00/rt2x00soc.c    | 102 ------------------
>  2 files changed, 65 insertions(+), 104 deletions(-)

Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Best regards,
    Sergio Paracuellos


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2025-07-08 10:30 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-06 21:41 [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Rosen Penev
2025-07-06 21:41 ` [PATCH 1/6] wifi: rt2x00: fix compilation Rosen Penev
2025-07-08 10:00   ` Sergio Paracuellos
2025-07-06 21:41 ` [PATCH 2/6] wifi: rt2x00: remove mod_name from platform_driver Rosen Penev
2025-07-08 10:01   ` Sergio Paracuellos
2025-07-06 21:41 ` [PATCH 3/6] wifi: rt2800soc: allow loading from OF Rosen Penev
2025-07-08 10:03   ` Sergio Paracuellos
2025-07-06 21:41 ` [PATCH 4/6] wifi: rt2x00: soc: move and modernize probe Rosen Penev
2025-07-08 10:07   ` Sergio Paracuellos
2025-07-06 21:41 ` [PATCH 5/6] dt-bindings: net: wireless: rt2800: add Rosen Penev
2025-07-06 22:29   ` Rob Herring (Arm)
2025-07-06 23:51     ` Rosen Penev
2025-07-06 21:41 ` [PATCH 6/6] MIPS: dts: ralink: mt7628a: add wifi binding Rosen Penev
2025-07-08  1:19   ` Daniel Golle
2025-07-08  1:36     ` Rosen Penev
2025-07-07  9:01 ` [PATCH 0/6] wifi: rt2x00: add OF bindings + cleanup Johannes Berg
2025-07-07 17:41   ` Rosen Penev
2025-07-07 18:36     ` Johannes Berg
2025-07-07 22:55       ` Rosen Penev
2025-07-08  6:51         ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).