From bf92aced2814b8539fdf0f25cb6777d5387c62fa Mon Sep 17 00:00:00 2001 From: oboev <122733416+oboev@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:28:08 +0100 Subject: [PATCH] board: add support for OnePlus 13r (giulia) --- board/Kconfig | 7 +++++++ board/Makefile | 1 + board/oneplus/board-giulia.c | 32 ++++++++++++++++++++++++++++++++ configs/giulia_defconfig | 8 ++++++++ 4 files changed, 48 insertions(+) create mode 100644 board/oneplus/board-giulia.c create mode 100644 configs/giulia_defconfig diff --git a/board/Kconfig b/board/Kconfig index 4b69650..759746e 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -119,6 +119,13 @@ menu "Device Support" developers may want to leave this on to avoid holding down the power button every time. + config ONEPLUS_GIULIA + bool "Support for OnePlus 13R" + default n + depends on SM8650 + help + Say Y if you want to include support for OnePlus 13R + config QEMU_BOARD_VIRT bool "Support for QEMU virt platform (aarch64)" default n diff --git a/board/Makefile b/board/Makefile index 00768c2..cd20595 100644 --- a/board/Makefile +++ b/board/Makefile @@ -12,6 +12,7 @@ lib-$(CONFIG_NOKIA_ESSENTIAL) += nokia/board-essential.o lib-$(CONFIG_NOTHING_PONG) += nothing/board-pong.o lib-$(CONFIG_NOTHING_SPACEWAR) += nothing/board-spacewar.o lib-$(CONFIG_NOTHING_TETRIS) += nothing/board-tetris.o +lib-$(CONFIG_ONEPLUS_GIULIA) += oneplus/board-giulia.o lib-$(CONFIG_QEMU_BOARD_VIRT) += qemu/board-virt.o lib-$(CONFIG_REALME_RMX3511) += realme/board-rmx3511.o lib-$(CONFIG_SAMSUNG_A3XELTE) += samsung/board-a3xelte.o diff --git a/board/oneplus/board-giulia.c b/board/oneplus/board-giulia.c new file mode 100644 index 0000000..57642ac --- /dev/null +++ b/board/oneplus/board-giulia.c @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2026, Aleksey Solovyev + */ + +#include +#include +#include +#include +#include + +static struct video_info giulia_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1264, + .height = 2780, + .stride = 4, + .address = (void *)0xd5100000, + .scale = 2 +}; + +static const struct device giulia_devices[] = { + { "simplefb", &giulia_fb, "fb" }, +}; + +struct board_data board_ops = { + .name = "oneplus-giulia", + .ops = { + }, + .devices = giulia_devices, + .num_devices = ARRAY_SIZE(giulia_devices), + .quirks = 0 +}; diff --git a/configs/giulia_defconfig b/configs/giulia_defconfig new file mode 100644 index 0000000..dbef636 --- /dev/null +++ b/configs/giulia_defconfig @@ -0,0 +1,8 @@ +CONFIG_POSITION_INDEPENDENT=y +CONFIG_LINUX_KRNL_HEADER_IMG=y +# CONFIG_COMPRESS_GZIP is not set +CONFIG_SM8650=y +CONFIG_ONEPLUS_GIULIA=y +CONFIG_TEXT_BASE=0xe1bb0000 +CONFIG_PAYLOAD_ENTRY=0xb8000000 +CONFIG_RAMDISK_ENTRY=0xb0000000