From 5024ac8888ee93901be03ee777bb20b14e9d6cab Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 5 Mar 2024 14:56:21 +0100 Subject: [PATCH] tizen: rpi: add support for RPi5 console RPi5 board uses different drivers for the serial console than RPi4, so the kernel's console parameter has to be adjusted depending on the detected board and its configuration. On RPi5 there are 2 serial ports available for debug messages: 1. Dedicated debug UART port. Used by firmware and u-boot unconditionally. It is instantiated as /dev/ttyAMA10. By default it is also used for kernel's earlycon and serial console. 2. Standard UART available on GPIO14 & GPIO15 lines (pins 8 & 10 on the 40-pin header, like on the RPi4). This can be enabled by adding "dtoverlay=uart0-pi5" line to "config.txt" on "boot" partition. It is instantiated as /dev/ttyAMA0. It can be used only for the standard Linux kernel console and serial login. Change-Id: I34aa978148fb593f5f88d3ed6471c8c3c7a74a38 Signed-off-by: Marek Szyprowski --- tizen/bootscript/tizen-boot-rpi4.scr | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tizen/bootscript/tizen-boot-rpi4.scr b/tizen/bootscript/tizen-boot-rpi4.scr index eb9d000..d2bb38b 100644 --- a/tizen/bootscript/tizen-boot-rpi4.scr +++ b/tizen/bootscript/tizen-boot-rpi4.scr @@ -85,7 +85,17 @@ fi # setting console device if noting is set if test -z "${console}"; then; - setenv console "console=ttyS0,115200n8 earlycon=uart8250,mmio32,0xfe215040" + if test "$board_name" = "5 Model B"; then; + fdt addr $fdt_addr; + fdt get value uart "/axi/pcie@120000/rp1/serial@30000" status; + if test "$uart" = "okay"; then; + setenv console "console=ttyAMA0,115200n8"; + else + setenv console "console=ttyAMA10,115200n8 earlycon"; + fi + else + setenv console "console=ttyS0,115200n8 earlycon=uart8250,mmio32,0xfe215040"; + fi fi echo "console: ${console}" -- 2.7.4