From c67e8ad9d23185ec7417115db8801a6808f033db Mon Sep 17 00:00:00 2001 From: int4_t Date: Wed, 17 Jun 2026 09:04:53 +0300 Subject: [PATCH] board: add support for nothing phone (2) Co-authored-by: user0-07161 board-pong: add video scale add copyright sort alphabetically --- README.md | 1 + board/Kconfig | 7 +++++++ board/Makefile | 1 + board/nothing/board-pong.c | 33 +++++++++++++++++++++++++++++++++ configs/pong_defconfig | 7 +++++++ 5 files changed, 49 insertions(+) create mode 100644 board/nothing/board-pong.c create mode 100644 configs/pong_defconfig diff --git a/README.md b/README.md index 16d3f92..a1958ad 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ environment in case of a forced and buggy bootloader. - Essential ### Nothing +- Pong - Tetris ### QEMU diff --git a/board/Kconfig b/board/Kconfig index 9e2554f..0816b5f 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -70,6 +70,13 @@ menu "Device Support" help Say Y if you want to include support for Nokia 3 + config NOTHING_PONG + bool "Support for Nothing Phone (2)" + default n + depends on SM8450 + help + Say Y if you want to include support for Nothing Phone (2) + config NOTHING_TETRIS bool "Support for CMF Phone 1" default n diff --git a/board/Makefile b/board/Makefile index 2451a9d..f7cdfc1 100644 --- a/board/Makefile +++ b/board/Makefile @@ -8,6 +8,7 @@ lib-$(CONFIG_ITEL_P682LPN) += itel/board-p682lpn.o lib-$(CONFIG_LENOVO_TB373FU) += lenovo/board-tb373fu.o lib-$(CONFIG_MOTOROLA_TUNDRA) += motorola/board-tundra.o lib-$(CONFIG_NOKIA_ESSENTIAL) += nokia/board-essential.o +lib-$(CONFIG_NOTHING_PONG) += nothing/board-pong.o lib-$(CONFIG_NOTHING_TETRIS) += nothing/board-tetris.o lib-$(CONFIG_QEMU_BOARD_VIRT) += qemu/board-virt.o lib-$(CONFIG_REALME_RMX3511) += realme/board-rmx3511.o diff --git a/board/nothing/board-pong.c b/board/nothing/board-pong.c new file mode 100644 index 0000000..72a8934 --- /dev/null +++ b/board/nothing/board-pong.c @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2026, Ivan + * + * Parts of this code are adapted from board/samsung/board-r0q.c + */ + +#include +#include +#include +#include + +static struct video_info pong_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1080, + .height = 2412, + .stride = 4, + .scale = 2, + .address = (void *)0xb8000000 +}; + +static const struct device pong_devices[] = { + { "simplefb", &pong_fb, "fb" }, +}; + +struct board_data board_ops = { + .name = "nothing-pong", + .ops = { + }, + .devices = pong_devices, + .num_devices = ARRAY_SIZE(pong_devices), + .quirks = 0 +}; diff --git a/configs/pong_defconfig b/configs/pong_defconfig new file mode 100644 index 0000000..39a17c9 --- /dev/null +++ b/configs/pong_defconfig @@ -0,0 +1,7 @@ +CONFIG_POSITION_INDEPENDENT=y +CONFIG_LINUX_KRNL_HEADER_IMG=y +CONFIG_SM8450=y +CONFIG_NOTHING_PONG=y +CONFIG_TEXT_BASE=0xa8000000 +CONFIG_PAYLOAD_ENTRY=0x80b900000 +CONFIG_RAMDISK_ENTRY=0xb6915000