From 72226d6b204e87a32a6a06f2ad8fefe7a5bb4722 Mon Sep 17 00:00:00 2001 From: Igor Belwon Date: Thu, 14 May 2026 22:37:52 +0200 Subject: [PATCH] board: Add support for Sony Xperia 1 VI (pdx245) Xperia 1 VI is a flagship phone manufactured by Sony, based on the Qualcomm Snapdragon 8 Gen 3 Mobile Platform. Add support for this board. NOTE: This board is new, and as such, it requires some ugly hax and a fallback boot method to boot any sort of [u-boot/uniLoader/mainline] In short: - build: - ARCH=aarch64 CROSS_COMPILE=aarch64-linux-gnu- make -j32 - cat uniLoader.gz dummy.dtb > uni.dtb - mkbootimg --kernel uni.dtb --ramdisk \ --pagesize 4096 --base 0x0 --kernel_offset 0x8000 \ --ramdisk_offset 0x1000000 --tags_offset 0x100 \ --dtb_offset 0x1f00000 --header_version 0 --os_version 16.0.0 \ --os_patch_level 2026-04 -o boot.img (yes, all properties are required.) - prepare device: - boot to fastboot mode (volume up and plug in USB) - fastboot erase dtbo erase vendor_boot - flash: - fastboot flash boot boot.img continue Where: - dummy.dtb is a skeleton.dtsi with a reserved memory node called splash_region as a child of the chosen node. Signed-off-by: Igor Belwon --- README.md | 1 + board/Kconfig | 7 +++++++ board/Makefile | 1 + board/sony/board-pdx245.c | 38 ++++++++++++++++++++++++++++++++++++++ configs/pdx245_defconfig | 7 +++++++ 5 files changed, 54 insertions(+) create mode 100644 board/sony/board-pdx245.c create mode 100644 configs/pdx245_defconfig diff --git a/README.md b/README.md index 4af1acf..a2bc20d 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ environment in case of a forced and buggy bootloader. - ZEROFLTE ### Sony +- PDX245 - PSVITA ### Volla diff --git a/board/Kconfig b/board/Kconfig index 4fed500..ce6eec2 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -242,6 +242,13 @@ menu "Device Support" help Say Y if you want to include support for Samsung Galaxy S6 + config SONY_PDX245 + bool "Support for Sony Xperia 1 VI" + default n + depends on SM8650 + help + Say Y if you want to include support for Sony Xperia 1 VI + config SONY_PSVITA bool "Support for Sony PlayStation Vita" default n diff --git a/board/Makefile b/board/Makefile index ce57b79..8be1857 100644 --- a/board/Makefile +++ b/board/Makefile @@ -31,6 +31,7 @@ lib-$(CONFIG_SAMSUNG_R8S) += samsung/board-r8s.o lib-$(CONFIG_SAMSUNG_STARLTE) += samsung/board-starlte.o lib-$(CONFIG_SAMSUNG_X1S) += samsung/board-x1s.o lib-$(CONFIG_SAMSUNG_ZEROFLTE) += samsung/board-zeroflte.o +lib-$(CONFIG_SONY_PDX245) += sony/board-pdx245.o lib-$(CONFIG_SONY_PSVITA) += sony/board-vita.o lib-$(CONFIG_VOLLA_ALGIZ) += volla/board-algiz.o lib-$(CONFIG_XIAOMI_BEGONIA) += xiaomi/board-begonia.o diff --git a/board/sony/board-pdx245.c b/board/sony/board-pdx245.c new file mode 100644 index 0000000..c0d1832 --- /dev/null +++ b/board/sony/board-pdx245.c @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2026, Igor Belwon + */ + +#include +#include +#include +#include + +#ifdef CONFIG_SIMPLE_FB +static struct video_info pdx245_fb = { + .format = FB_FORMAT_ARGB8888, + .width = 1080, + .height = 2340, + .stride = 4, + .address = (void *)0xd5100000, + + // The scale that is set by default is extremely large. + .scale = 2 +}; +#endif + +int pdx245_drv(void) +{ +#ifdef CONFIG_SIMPLE_FB + REGISTER_DRIVER("simplefb", simplefb_probe, &pdx245_fb); +#endif + return 0; +} + +struct board_data board_ops = { + .name = "sony-pdx245", + .ops = { + .drivers_init = pdx245_drv, + }, + .quirks = 0 +}; diff --git a/configs/pdx245_defconfig b/configs/pdx245_defconfig new file mode 100644 index 0000000..dbc9f79 --- /dev/null +++ b/configs/pdx245_defconfig @@ -0,0 +1,7 @@ +CONFIG_POSITION_INDEPENDENT=y +CONFIG_LINUX_KRNL_HEADER_IMG=y +CONFIG_SM8650=y +CONFIG_SONY_PDX245=y +CONFIG_TEXT_BASE=0xe1bb0000 +CONFIG_PAYLOAD_ENTRY=0xe5bb0000 +CONFIG_RAMDISK_ENTRY=0xefbb0000