lib: utils/serial: Add support for Altera JTAG UART

Altera provides a JTAG UART core that provides virtual UART over JTAG
and can coexist with their virtual JTAG. [1] This core has already been
supported by Linux and the programming interface has always been stable.

Add support for it to OpenSBI to ease JTAG prototype bringing up.

The driver follows the device tree binding in mainline Linux. [2]

[1] https://docs.altera.com/r/docs/683130/25.3/embedded-peripherals-ip-user-guide/jtag-uart-core
[2] https://github.com/torvalds/linux/blob/v6.19-rc1/Documentation/devicetree/bindings/serial/altr%2Cjuart-1.0.yaml

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260104065506.70182-1-zhengxingda@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Icenowy Zheng
2026-01-04 14:55:06 +08:00
committed by Anup Patel
parent ecdb6c90c8
commit b07e449d15
6 changed files with 145 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
/*
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2025 ISCAS
*
* Authors:
* Icenowy Zheng <zhengxingda@iscas.ac.cn>
*/
#ifndef __SERIAL_ALTR_JUART_H__
#define __SERIAL_ALTR_JUART_H__
#include <sbi/sbi_types.h>
int altr_juart_init(unsigned long base);
#endif