From d6a6b81ebdfb7ce99f18323cbdff481bf2c7ac4f Mon Sep 17 00:00:00 2001 From: Qubot <1445788683@qq.com> Date: Tue, 26 May 2026 17:35:50 +0800 Subject: [PATCH] sun60iw2: enable early uart0 console for bananapi m8 --- arch/arm/dts/sun60i-a733-bananapi-m8.dts | 7 +++++++ configs/bananapi_m8_defconfig | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/dts/sun60i-a733-bananapi-m8.dts b/arch/arm/dts/sun60i-a733-bananapi-m8.dts index 665fdbc8..eccc52db 100644 --- a/arch/arm/dts/sun60i-a733-bananapi-m8.dts +++ b/arch/arm/dts/sun60i-a733-bananapi-m8.dts @@ -17,6 +17,13 @@ compatible = "allwinner,a733", "arm,sun60iw2p1"; #address-cells = <2>; #size-cells = <2>; + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; leds { compatible = "gpio-leds"; diff --git a/configs/bananapi_m8_defconfig b/configs/bananapi_m8_defconfig index b6745240..c6745cd8 100644 --- a/configs/bananapi_m8_defconfig +++ b/configs/bananapi_m8_defconfig @@ -10,6 +10,11 @@ CONFIG_R_I2C0_ENABLE=y CONFIG_USB0_VBUS_PIN="PL2" CONFIG_USB1_VBUS_PIN="PH12" CONFIG_DEFAULT_DEVICE_TREE="sun60i-a733-bananapi-m8" +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_NS16550=y +CONFIG_DEBUG_UART_BASE=0x02500000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART_SHIFT=2 # CONFIG_SYS_MALLOC_F is not set # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_PHYS_64BIT=y