serial: Add Goldfish TTY driver

Add support for the Google Goldfish TTY serial device. This virtual
device is commonly used in QEMU virtual machines (such as the m68k
virt machine) and Android emulators.

The driver implements basic console output and input polling using the
Goldfish MMIO interface.

Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Yao Zi <me@ziyao.cc>
Tested-by: Daniel Palmer <daniel@0x0f.com>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
Acked-by: Angelo Dureghello <angelo@kernel-space.org>
This commit is contained in:
Kuan-Wei Chiu
2026-01-07 20:18:30 +00:00
committed by Tom Rini
parent f2f69886ac
commit bf55b84736
5 changed files with 150 additions and 0 deletions

18
include/goldfish_tty.h Normal file
View File

@@ -0,0 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>
*/
#ifndef _GOLDFISH_TTY_H_
#define _GOLDFISH_TTY_H_
#include <linux/types.h>
/* Platform data for the Goldfish TTY driver
* Used to pass hardware base address from Board to Driver
*/
struct goldfish_tty_plat {
phys_addr_t reg;
};
#endif /* _GOLDFISH_TTY_H_ */