Skip to contentSkip to conversation

arm64: dts: mt7981/openwrt-one: UART labels and console

PATCH Superseded [email protected] 2 participants 4 messages Sep 20, 2025

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover arm64: dts: mt7981/openwrt-one: UART labels and console

This series makes two small updates for MT7981:

- Patch 1/2: Add stable labels (uart0, uart1, uart2) in the SoC dtsi so that board dts files can reference them directly.
- Patch 2/2: Update the OpenWrt One board dts to define serial0 alias, configure chosen stdout-path, and set correct UART current-speed.

Both patches were build-tested (dtbs) and boot-tested:
mainline Image+DTB built and loaded via U-Boot on MT7981 hardware, with serial console output verified.

Thanks,
Bryan

---

Bryan Hinton (2):
arm64: dts: mediatek: mt7981b: add labels for UART0/1/2 nodes
arm64: dts: mediatek: mt7981b: OpenWrt One: set console UART to 115200

 .../arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts | 13 +++++++++++++
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi           |  6 +++---
 2 files changed, 16 insertions(+), 3 deletions(-)

base-commit: 1522b530ac3e2dadd75ccb351b88d3c7c4cf584e

Signature · 1 line
2.51.0
#1 lore raw

PATCH 1/2 arm64: dts: mediatek: mt7981b: add labels for UART0/1/2 nodes

Add stable labels (uart0, uart1, uart2) to the MT7981B SoC UART nodes so board DTS files can reference them directly. This change is purely cosmetic and introduces no functional differences.

Verification: Built dtbs and boot-tested mainline Image+DTB via U-Boot on MT7981B hardware; decompiled DT shows the uart0 label present and the serial0 alias (or absolute path) resolves to serial@11002000.

---
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/mediatek/mt7981b.dtsi +3 -3
index 5cbea9cd411f..4ee7fb83000d 100644
@@ -94,7 +94,7 @@ pwm@10048000 {
 			#pwm-cells = <2>;
 		};
 
-		serial@11002000 {
+		uart0: serial@11002000 {
 			compatible = "mediatek,mt7981-uart", "mediatek,mt6577-uart";
 			reg = <0 0x11002000 0 0x100>;
 			interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
@@ -105,7 +105,7 @@ serial@11002000 {
 			status = "disabled";
 		};
 
-		serial@11003000 {
+		uart1: serial@11003000 {
 			compatible = "mediatek,mt7981-uart", "mediatek,mt6577-uart";
 			reg = <0 0x11003000 0 0x100>;
 			interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
@@ -116,7 +116,7 @@ serial@11003000 {
 			status = "disabled";
 		};
 
-		serial@11004000 {
+		uart2: serial@11004000 {
 			compatible = "mediatek,mt7981-uart", "mediatek,mt6577-uart";
 			reg = <0 0x11004000 0 0x100>;
 			interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.51.0
#2 lore raw

PATCH 2/2 arm64: dts: mediatek: mt7981b: OpenWrt One: set console UART to 115200

In reply to [email protected]

Use the new uart0 label for the console and make the speed explicit by adding current-speed = <115200>. This keeps the DTS OS-agnostic: no bootargs or distribution-specific properties are added.

Verification: Boot-tested with mainline Image+DTB via U-Boot on OpenWrt One (MT7981B). Serial console active at 115200 baud, and DTB decompile confirms serial0 alias and stdout-path set correctly.

---
 .../arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +13 -0
index 4f6cbb491287..1d2c3a21019c 100644
@@ -8,8 +8,21 @@ / {
 	compatible = "openwrt,one", "mediatek,mt7981b";
 	model = "OpenWrt One";
 
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
 	memory@40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
 		device_type = "memory";
 	};
 };
+
+&uart0 {
+	status = "okay";
+	current-speed = <115200>; /* 0x1c200 */
+};
Signature · 1 line
2.51.0
Reviewed-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] arm64: dts: mediatek: mt7981b: OpenWrt One: set console UART to 115200

Quoted 9 lines · On Fri, Sep 19, 2025 at 07:06:12PM -0500, [email protected] wrote:

Use the new uart0 label for the console and make the speed explicit by adding current-speed = <115200>. This keeps the DTS OS-agnostic: no bootargs or distribution-specific properties are added.

Verification: Boot-tested with mainline Image+DTB via U-Boot on OpenWrt One (MT7981B). Serial console active at 115200 baud, and DTB decompile confirms serial0 alias and stdout-path set correctly.

See comment below

Quoted 19 lines
---
 .../arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +7 -0
index 4f6cbb491287..1d2c3a21019c 100644
@@ -8,8 +8,21 @@ / {
 	compatible = "openwrt,one", "mediatek,mt7981b";
 	model = "OpenWrt One";
 
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};

arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts / { · line 27

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +5 -0
+
 	memory@40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
 		device_type = "memory";
 	};
 };
+
+&uart0 {
+	status = "okay";
+	current-speed = <115200>; /* 0x1c200 */

The comment with the hex value should be removed. There is no need for it.

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +1 -0
+};
Signature · 1 line
2.51.0