ramips: mt7621: update mt7621 indio um-305ax patch file

Changelog:
- Fix MAC address assignment for Ethernet ports
- Fix Ethernet port configuration (was not working in the current DTS
  because GPIOs 23 and 24, used for LEDs, are RGMII2 pins)
- Add package kmod-7915-firmware to enable Wi-Fi

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
This commit is contained in:
Shubham Vishwakarma
2025-09-29 10:39:58 +05:30
committed by John Crispin
parent d98e18a143
commit d1e18425b0

View File

@@ -1,16 +1,22 @@
From ec135e7aefac08806fbabb0634a2bd88a169dfc6 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Sat, 15 Jul 2023 15:25:59 +0200
Subject: [PATCH 58/68] ramips: add mt7621_indio_um-305ax
From 937c4ba769b4d3a0b5cb804e54fd8bece8efac47 Mon Sep 17 00:00:00 2001
From: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
Date: Mon, 29 Sep 2025 10:35:54 +0530
Subject: [PATCH 58/68] ramips: mt7621: add mt7621 indio um-305ax
Signed-off-by: John Crispin <john@phrozen.org>
Changelog:
- Fix MAC address assignment for Ethernet ports
- Fix Ethernet port configuration (was not working in the current DTS
because GPIOs 23 and 24, used for LEDs, are RGMII2 pins)
- Add package kmod-7915-firmware to enable Wi-Fi
Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
---
target/linux/ath79/image/generic.mk | 22 +--
.../ramips/dts/mt7621_indio_um-305ax.dts | 146 ++++++++++++++++++
.../ramips/dts/mt7621_indio_um-305ax.dts | 168 ++++++++++++++++++
target/linux/ramips/image/mt7621.mk | 11 ++
.../mt7621/base-files/etc/board.d/02_network | 6 +
.../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 6 +
5 files changed, 180 insertions(+), 11 deletions(-)
5 files changed, 202 insertions(+), 11 deletions(-)
create mode 100644 target/linux/ramips/dts/mt7621_indio_um-305ax.dts
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
@@ -55,27 +61,30 @@ index 5882feafcb..a98a5e816f 100644
DEVICE_VENDOR := YunCore
diff --git a/target/linux/ramips/dts/mt7621_indio_um-305ax.dts b/target/linux/ramips/dts/mt7621_indio_um-305ax.dts
new file mode 100644
index 0000000000..79cffbdec2
index 0000000000..42837dd9fe
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_indio_um-305ax.dts
@@ -0,0 +1,146 @@
@@ -0,0 +1,168 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2025, Shubham Vishwakarma <shubhamvis98@fossfrog.in>
+ */
+
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+ compatible = "indio,um-305ax", "mediatek,mt7621-soc";
+ model = "INDIO UM-305AX";
+ model = "Indio UM-305AX";
+
+ aliases {
+ led-boot = &led_green;
+ led-failsafe = &led_red;
+ led-running = &led_blue;
+ led-upgrade = &led_red;
+ label-mac-device = &wan_port;
+ led-failsafe = &led_green;
+ led-running = &led_green;
+ led-upgrade = &led_green;
+ };
+
+ chosen {
@@ -84,6 +93,11 @@ index 0000000000..79cffbdec2
+ };
+
+ leds {
+ /*
+ * GPIO 23 and 24 LEDs wont work because these pins are part of the RGMII2 pin group.
+ * To make the LEDs work, we need to change the &state_default nodes group variable
+ * to "rgmii2", which restores LED functionality but disables the Ethernet ports.
+ */
+ compatible = "gpio-leds";
+
+ led_blue: blue {
@@ -119,7 +133,7 @@ index 0000000000..79cffbdec2
+
+&state_default {
+ gpio {
+ groups = "rgmii2";
+ groups = "jtag", "wdt";
+ function = "gpio";
+ };
+};
@@ -136,15 +150,19 @@ index 0000000000..79cffbdec2
+};
+
+&gmac0 {
+ mtd-mac-address = <&factory 0x4>;
+ status = "okay";
+ nvmem-cells = <&macaddr_offset>;
+ nvmem-cell-names = "mac-address";
+};
+
+&switch0 {
+ ports {
+ wan_port: port@0 {
+ port@0 {
+ status = "okay";
+ label = "wan";
+ mtd-mac-address = <&factory 0x28>;
+ nvmem-cells = <&macaddr_offset>;
+ nvmem-cell-names = "mac-address";
+ mac-address-increment = <1>;
+ };
+
+ port@1 {
@@ -205,6 +223,16 @@ index 0000000000..79cffbdec2
+ };
+};
+
+&factory {
+ compatible = "nvmem-cells";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ macaddr_offset: macaddr@4 {
+ reg = <0x4 0x6>;
+ };
+};
+
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 962d7ef440..8790a2fa50 100644
--- a/target/linux/ramips/image/mt7621.mk
@@ -269,5 +297,5 @@ index 3467e783f0..d5bd50fdf7 100644
[ "$PHYNBR" = "1" ] && \
macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress
--
2.34.1
2.47.3