From 1590461e923430cff04ddcbc7dc4161c299d58f5 Mon Sep 17 00:00:00 2001 From: Jan Paszkowski Date: Sat, 28 Feb 2026 18:10:00 +0100 Subject: [PATCH] sony-pdx215: new device For now, the phone generally boots from microsd, although ssh does not work. The only UIs that manage to stay launched is lomiri and sxmo. Part-of: --- device/testing/device-sony-pdx215/APKBUILD | 37 + device/testing/device-sony-pdx215/deviceinfo | 29 + device/testing/firmware-sony-pdx215/APKBUILD | 28 + .../firmware-sony-pdx215/firmware.files | 10 + .../0001-panel-driver-patch.patch | 508 + .../0002-Sagami-DTS-patch-with-panel.patch | 346 + ...ge-sync-mode-to-sync-on-DSI0-rather-.patch | 79 + .../0004-dual-DSI-dual-DSC-panel.patch | 88 + .../0005-CONFIRMATION-TE-is-used.patch | 25 + device/testing/linux-sony-pdx215/APKBUILD | 100 + .../config-sony-pdx215.aarch64 | 9440 +++++++++++++++++ 11 files changed, 10690 insertions(+) create mode 100644 device/testing/device-sony-pdx215/APKBUILD create mode 100644 device/testing/device-sony-pdx215/deviceinfo create mode 100644 device/testing/firmware-sony-pdx215/APKBUILD create mode 100644 device/testing/firmware-sony-pdx215/firmware.files create mode 100644 device/testing/linux-sony-pdx215/0001-panel-driver-patch.patch create mode 100644 device/testing/linux-sony-pdx215/0002-Sagami-DTS-patch-with-panel.patch create mode 100644 device/testing/linux-sony-pdx215/0003-drm-msm-dsi-change-sync-mode-to-sync-on-DSI0-rather-.patch create mode 100644 device/testing/linux-sony-pdx215/0004-dual-DSI-dual-DSC-panel.patch create mode 100644 device/testing/linux-sony-pdx215/0005-CONFIRMATION-TE-is-used.patch create mode 100644 device/testing/linux-sony-pdx215/APKBUILD create mode 100644 device/testing/linux-sony-pdx215/config-sony-pdx215.aarch64 diff --git a/device/testing/device-sony-pdx215/APKBUILD b/device/testing/device-sony-pdx215/APKBUILD new file mode 100644 index 000000000..3cb5a06bf --- /dev/null +++ b/device/testing/device-sony-pdx215/APKBUILD @@ -0,0 +1,37 @@ +# Reference: +maintainer="Jan Paszkowski " +pkgname=device-sony-pdx215 +pkgdesc="Sony Xperia 1 III" +pkgver=1 +pkgrel=0 +url="https://postmarketos.org" +license="MIT" +arch="aarch64" +options="!check !archcheck" +depends=" + linux-sony-pdx215 + mkbootimg + postmarketos-base + soc-qcom + soc-qcom-qbootctl +" + +makedepends="devicepkg-dev" +_pmb_recommends=" + firmware-sony-pdx215 + linux-firmware-qca + linux-firmware-qcom +" +source="deviceinfo" + +build() { + devicepkg_build $startdir $pkgname +} + +package() { + devicepkg_package $startdir $pkgname +} + +sha512sums=" +9c7bc283666f2d35f0939180e004de70b6b648dbd039d7356f8fb9be86abf12e52dabaebbcb95610b7edf483e4e94d9ea6131650b11584f3371f082e5e279efd deviceinfo +" diff --git a/device/testing/device-sony-pdx215/deviceinfo b/device/testing/device-sony-pdx215/deviceinfo new file mode 100644 index 000000000..81aba583b --- /dev/null +++ b/device/testing/device-sony-pdx215/deviceinfo @@ -0,0 +1,29 @@ +# Reference: +# Please use double quotes only. You can source this file in shell +# scripts. + +deviceinfo_format_version="0" +deviceinfo_name="Sony Xperia 1 III" +deviceinfo_manufacturer="Sony" +deviceinfo_codename="sony-pdx215" +deviceinfo_year="2021" +deviceinfo_dtb="qcom/sm8350-sony-xperia-sagami-pdx215" +deviceinfo_arch="aarch64" + +# Device related +deviceinfo_chassis="handset" +deviceinfo_external_storage="true" +deviceinfo_drm="true" + +# Bootloader related +deviceinfo_flash_method="fastboot" +deviceinfo_generate_bootimg="true" +deviceinfo_flash_pagesize="4096" +deviceinfo_header_version="1" +deviceinfo_flash_offset_base="0x00000000" +deviceinfo_flash_offset_dtb="0x01f00000" +deviceinfo_flash_offset_kernel="0x00008000" +deviceinfo_flash_offset_ramdisk="0x01000000" +deviceinfo_flash_offset_second="0x00000000" +deviceinfo_flash_offset_tags="0x00000100" +deviceinfo_append_dtb="true" diff --git a/device/testing/firmware-sony-pdx215/APKBUILD b/device/testing/firmware-sony-pdx215/APKBUILD new file mode 100644 index 000000000..152515f24 --- /dev/null +++ b/device/testing/firmware-sony-pdx215/APKBUILD @@ -0,0 +1,28 @@ +maintainer="Jan Paszkowski " +pkgname=firmware-sony-pdx215 +pkgver=1 +pkgrel=0 +pkgdesc="Firmware for Sony Xperia 1 III" +url="https://gitlab.com/janmpaszkowski/sony-pdx215-firmware" +_repository="sony-pdx215-firmware" +_commit="2a9eabd337b60ef1209cbb238f20784f676a4c7f" +arch="aarch64" +license="proprietary" +options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native" + +source="$pkgname-$_commit.tar.gz::https://gitlab.com/janmpaszkowski/$_repository/-/archive/$_commit/$_repository-$_commit.tar.gz +firmware.files" + +package() { + cd "$srcdir/$_repository-$_commit" + while IFS="" read -r _i || [ -n "$_i" ]; do + [ ! -d $(dirname $_i) ] && mkdir -p $(dirname $_i) + echo $_i + install -Dm644 $_i "$pkgdir/$_i" + done < "$srcdir/firmware.files" +} + +sha512sums=" +4028c7e0468df6d6072a6b88e00e0b24f5975b0c42fc37996d137780e24684278597d142f7a50167d8a8835569f3ec3745e81cf2b6cf8abff706efdf2202d189 firmware-sony-pdx215-2a9eabd337b60ef1209cbb238f20784f676a4c7f.tar.gz +ee2530dc90f96ddad464d092dd19c7a5834114d359266d94e5c14942da5a9c28c16f9ac2ac0dbde0cda28ae087b874dc3c96924b266bbb7fe09c7a6f02de8e1a firmware.files +" diff --git a/device/testing/firmware-sony-pdx215/firmware.files b/device/testing/firmware-sony-pdx215/firmware.files new file mode 100644 index 000000000..4ab29694e --- /dev/null +++ b/device/testing/firmware-sony-pdx215/firmware.files @@ -0,0 +1,10 @@ +./lib/firmware/qcom/sm8350/Sony/sagami/adsp.mbn +./lib/firmware/qcom/sm8350/Sony/sagami/cdsp.mbn +./lib/firmware/qcom/sm8350/Sony/sagami/slpi.mbn +./lib/firmware/qcom/sm8350/Sony/sagami/ipa_fws.mbn +./lib/firmware/qcom/sm8350/Sony/sagami/adspr.jsn +./lib/firmware/qcom/sm8350/Sony/sagami/adspua.jsn +./lib/firmware/qcom/sm8350/Sony/sagami/cdspr.jsn +./lib/firmware/qcom/sm8350/Sony/sagami/slpius.jsn +./lib/firmware/qcom/sm8350/Sony/sagami/slpir.jsn +./lib/firmware/qcom/sm8350/Sony/sagami/a660_zap.mbn \ No newline at end of file diff --git a/device/testing/linux-sony-pdx215/0001-panel-driver-patch.patch b/device/testing/linux-sony-pdx215/0001-panel-driver-patch.patch new file mode 100644 index 000000000..5a55fa254 --- /dev/null +++ b/device/testing/linux-sony-pdx215/0001-panel-driver-patch.patch @@ -0,0 +1,508 @@ + DRM DRIVER FOR SAMSUNG DB7430 PANELS + M: Linus Walleij +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig +index 3cca1c580d50..eda808b9d466 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -752,6 +752,22 @@ config DRM_PANEL_SAMSUNG_AMS639RQ08 + Say Y or M here if you want to enable support for the + Samsung AMS639RQ08 FHD Plus (2340x1080@60Hz) CMD mode panel. + ++config DRM_PANEL_SAMSUNG_ANA6707 ++ tristate "Samsung ANA6707 DSI cmd mode panels" ++ depends on GPIOLIB ++ depends on OF ++ depends on DRM_MIPI_DSI ++ depends on BACKLIGHT_CLASS_DEVICE ++ select DRM_DISPLAY_DSC_HELPER ++ select DRM_DISPLAY_HELPER ++ help ++ Say Y here if you want to enable support for the Samsung 4k 6.5" OLED dual-DSI ++ command mode amb650yl01 panel found in the Sony Xperia 1 III, Sony Xperia 1 IV ++ and Sony Xperia V smartphones. ++ ++ This Display-IC uses Display Stream Compression 1.1 and features a 1644x3840 ++ and 1096x2560 resolution which can both be driven at 60Hz and 120Hz. ++ + config DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24 + tristate "Samsung AMS427AP24 panel with S6E88A0 controller" + depends on GPIOLIB && OF && REGULATOR +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index c19429b9e48d..146750b93455 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -74,6 +74,7 @@ obj-$(CONFIG_DRM_PANEL_RENESAS_R69328) += panel-renesas-r69328.o + obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS581VF01) += panel-samsung-ams581vf01.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_AMS639RQ08) += panel-samsung-ams639rq08.o ++obj-$(CONFIG_DRM_PANEL_SAMSUNG_ANA6707) += panel-samsung-ana6707.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20) += panel-samsung-atna33xc20.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_DB7430) += panel-samsung-db7430.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o +diff --git a/drivers/gpu/drm/panel/panel-samsung-ana6707.c b/drivers/gpu/drm/panel/panel-samsung-ana6707.c +new file mode 100644 +index 000000000000..83bf954e89d3 +--- /dev/null ++++ b/drivers/gpu/drm/panel/panel-samsung-ana6707.c +@@ -0,0 +1,461 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (c) 2023 Marijn Suijten ++ * ++ * Based on the following Sony downstream DTS command sequences: ++ * - Xperia 1 III (sagami pdx215): https://github.com/sonyxperiadev/kernel-copyleft-dts/blob/61.2.A.0.xxx/somc/dsi-panel-ana6707_amb650yl01-uhd-pvt.dtsi ++ * - Xperia 1 IV (nagara pdx223): https://github.com/sonyxperiadev/kernel-copyleft-dts/blob/64.1.A.0.xxx/display-devicetree/display/dsi-panel-ana6707_amb650yl01-uhd-pdx223.dtsi ++ * - Xperia 1 V (yodo pdx234): https://github.com/sonyxperiadev/kernel-copyleft-dts/blob/67.0.A.1.xxx/display-devicetree/display/dsi-panel-ana6707_amb650yl01-uhd.dtsi ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include