diff --git a/device/community/linux-pine64-pinenote/APKBUILD b/device/community/linux-pine64-pinenote/APKBUILD index 7ad351293..d01279a3d 100644 --- a/device/community/linux-pine64-pinenote/APKBUILD +++ b/device/community/linux-pine64-pinenote/APKBUILD @@ -2,7 +2,7 @@ # Kernel config based on: arch/arm64/configs/pinenote_defconfig maintainer="Antoine Martin (ayakael) " pkgname=linux-pine64-pinenote -pkgver=6.19.3 +pkgver=6.19.8 _kernver=${pkgver%.*} pkgrel=0 pkgdesc="Pine64 PineNote close to mainline fork" @@ -34,6 +34,7 @@ _commit="526524233b7156b194cf6f0869d2059dfa4c90e9" source=" https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/linux-$_kernver.tar.xz $pkgname-$_kernver-$_commit.patch::https://ayakael.net/forge/linux-pinenote/compare/$_commit..v$_kernver.patch + enable-ultra-suspend.patch $_config " # get patch releases @@ -82,6 +83,7 @@ package() { sha512sums=" 01b29c7f4e5bc0c9802794c2cd027fece825f90417be229a71e60eefce530010d5d301749c54ae744e9d4a483518e769e2bb7e6e9209687681ad7fff11c3ed86 linux-6.19.tar.xz 468c7d0ab2463adc8b9a56448ddd0819d56a5914b99baa921e2989ec1fdc5c414c02ef72e55691acc9b75ddd1afff5c17953fc2d2e1ed81210e5f7c40cd01765 linux-pine64-pinenote-6.19-526524233b7156b194cf6f0869d2059dfa4c90e9.patch -7e8071c98f94b6cc5c6dae72e9045a3956145cae4b25ac07868379ddda0d22b17413136bff4ff92700a728d07c520c878fad163693fa1e6c3258b7deb0bdc400 config-pine64-pinenote.aarch64 -42cf563be07254942e3873a91241f423753d4a4dc70e18bc8ac210519c0642aef45ea91fdd0e359b7e428a87c5e091e8be3e1199ebeaf679bfc7a09af5e1206e linux-pine64-pinenote-6.19.3.patch.xz +665bdc843912a22bc9f1840bf89195f6cccabd2b8ca3313f3c61b5503c84f98395e3de0d28bc31cbc9f1b4be4a41a483db156fad353506bb5be7abdc22e46501 enable-ultra-suspend.patch +b58e25a844d1cef9179a71fc0b93e0e97e3a5f7b54e40ae086771a1c3ff30da2f83c3325da5912f09f749f9c8a8b669bf38d97d765feedf007d9126d198ecf75 config-pine64-pinenote.aarch64 +21954614fc95f8e6f76f82d702eaea7e7ce75af041e95fe0e230b8030825c6538e4f8b20df7d98e955d8d353ab5cdf4025868f0ca074efd417064c72f5c42631 linux-pine64-pinenote-6.19.8.patch.xz " diff --git a/device/community/linux-pine64-pinenote/config-pine64-pinenote.aarch64 b/device/community/linux-pine64-pinenote/config-pine64-pinenote.aarch64 index 283cbfc87..4645536ef 100644 --- a/device/community/linux-pine64-pinenote/config-pine64-pinenote.aarch64 +++ b/device/community/linux-pine64-pinenote/config-pine64-pinenote.aarch64 @@ -1,16 +1,16 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/arm64 6.19.3 Kernel Configuration +# Linux/arm64 6.19.8 Kernel Configuration # -CONFIG_CC_VERSION_TEXT="Alpine clang version 21.1.8" +CONFIG_CC_VERSION_TEXT="Alpine clang version 22.1.1" CONFIG_GCC_VERSION=0 CONFIG_CC_IS_CLANG=y -CONFIG_CLANG_VERSION=210108 +CONFIG_CLANG_VERSION=220101 CONFIG_AS_IS_LLVM=y -CONFIG_AS_VERSION=210108 +CONFIG_AS_VERSION=220101 CONFIG_LD_VERSION=0 CONFIG_LD_IS_LLD=y -CONFIG_LLD_VERSION=210108 +CONFIG_LLD_VERSION=220101 CONFIG_RUSTC_VERSION=0 CONFIG_RUSTC_LLVM_VERSION=0 CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y @@ -110,6 +110,7 @@ CONFIG_BPF_JIT_ALWAYS_ON=y CONFIG_BPF_JIT_DEFAULT_ON=y CONFIG_BPF_UNPRIV_DEFAULT_OFF=y # CONFIG_BPF_PRELOAD is not set +CONFIG_BPF_LSM=y # end of BPF subsystem CONFIG_PREEMPT_NONE_BUILD=y @@ -682,10 +683,11 @@ CONFIG_SCHED_MC=y CONFIG_HOTPLUG_CORE_SYNC=y CONFIG_HOTPLUG_CORE_SYNC_DEAD=y CONFIG_GENERIC_IRQ_ENTRY=y -# CONFIG_KPROBES is not set +CONFIG_KPROBES=y CONFIG_JUMP_LABEL=y # CONFIG_STATIC_KEYS_SELFTEST is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_KRETPROBES=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y @@ -1086,7 +1088,7 @@ CONFIG_AF_UNIX_OOB=y # CONFIG_TLS is not set CONFIG_XFRM=y CONFIG_XFRM_ALGO=m -CONFIG_XFRM_USER=m +# CONFIG_XFRM_USER is not set # CONFIG_XFRM_INTERFACE is not set # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set @@ -1157,6 +1159,7 @@ CONFIG_IPV6_MULTIPLE_TABLES=y # CONFIG_IPV6_SEG6_HMAC is not set # CONFIG_IPV6_RPL_LWTUNNEL is not set # CONFIG_IPV6_IOAM6_LWTUNNEL is not set +# CONFIG_NETLABEL is not set # CONFIG_MPTCP is not set # CONFIG_NETWORK_SECMARK is not set CONFIG_NET_PTP_CLASSIFY=y @@ -1258,11 +1261,13 @@ CONFIG_NETFILTER_XT_NAT=m # CONFIG_NETFILTER_XT_TARGET_NETMAP is not set # CONFIG_NETFILTER_XT_TARGET_NFLOG is not set # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set # CONFIG_NETFILTER_XT_TARGET_RATEEST is not set CONFIG_NETFILTER_XT_TARGET_REDIRECT=m CONFIG_NETFILTER_XT_TARGET_MASQUERADE=m # CONFIG_NETFILTER_XT_TARGET_TEE is not set # CONFIG_NETFILTER_XT_TARGET_TPROXY is not set +# CONFIG_NETFILTER_XT_TARGET_TRACE is not set CONFIG_NETFILTER_XT_TARGET_TCPMSS=m # CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set @@ -1396,7 +1401,8 @@ CONFIG_IP_NF_TARGET_REDIRECT=m CONFIG_IP_NF_MANGLE=m # CONFIG_IP_NF_TARGET_ECN is not set # CONFIG_IP_NF_TARGET_TTL is not set -# CONFIG_IP_NF_RAW is not set +CONFIG_IP_NF_RAW=m +# CONFIG_IP_NF_SECURITY is not set # CONFIG_IP_NF_ARPTABLES is not set # CONFIG_IP_NF_ARPFILTER is not set # end of IP: Netfilter Configuration @@ -1430,7 +1436,8 @@ CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_REJECT=m # CONFIG_IP6_NF_TARGET_SYNPROXY is not set CONFIG_IP6_NF_MANGLE=m -# CONFIG_IP6_NF_RAW is not set +CONFIG_IP6_NF_RAW=m +# CONFIG_IP6_NF_SECURITY is not set CONFIG_IP6_NF_NAT=m CONFIG_IP6_NF_TARGET_MASQUERADE=m # CONFIG_IP6_NF_TARGET_NPT is not set @@ -6035,7 +6042,6 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_HYM8563 is not set # CONFIG_RTC_DRV_MAX6900 is not set # CONFIG_RTC_DRV_MAX31335 is not set -# CONFIG_RTC_DRV_NVIDIA_VRS10 is not set # CONFIG_RTC_DRV_NCT3018Y is not set CONFIG_RTC_DRV_RK808=y # CONFIG_RTC_DRV_RS5C372 is not set @@ -7474,6 +7480,7 @@ CONFIG_PNFS_BLOCK=m CONFIG_PNFS_FLEXFILE_LAYOUT=m CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" # CONFIG_NFS_V4_1_MIGRATION is not set +CONFIG_NFS_V4_SECURITY_LABEL=y CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set CONFIG_NFS_USE_KERNEL_DNS=y @@ -7582,11 +7589,26 @@ CONFIG_KEY_DH_OPERATIONS=y CONFIG_PROC_MEM_ALWAYS_FORCE=y # CONFIG_PROC_MEM_FORCE_PTRACE is not set # CONFIG_PROC_MEM_NO_FORCE is not set -# CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set +CONFIG_SECURITY=y +CONFIG_SECURITYFS=y +# CONFIG_SECURITY_NETWORK is not set +# CONFIG_SECURITY_PATH is not set # CONFIG_STATIC_USERMODEHELPER is not set +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_SECURITY_APPARMOR is not set +# CONFIG_SECURITY_LOADPIN is not set +# CONFIG_SECURITY_YAMA is not set +# CONFIG_SECURITY_SAFESETID is not set +# CONFIG_SECURITY_LOCKDOWN_LSM is not set +# CONFIG_SECURITY_LANDLOCK is not set +CONFIG_INTEGRITY=y +# CONFIG_INTEGRITY_SIGNATURE is not set +# CONFIG_IMA is not set # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set +# CONFIG_EVM is not set CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,ipe,bpf" # # Kernel hardening options @@ -8182,7 +8204,6 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y # CONFIG_DEBUG_IRQFLAGS is not set CONFIG_STACKTRACE=y -# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set # CONFIG_DEBUG_KOBJECT is not set # @@ -8211,6 +8232,7 @@ CONFIG_RCU_TRACE=y # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set CONFIG_CPU_HOTPLUG_STATE_CONTROL=y # CONFIG_LATENCYTOP is not set +# CONFIG_DEBUG_CGROUP_REF is not set CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y @@ -8255,8 +8277,11 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set # CONFIG_PROFILE_ALL_BRANCHES is not set # CONFIG_BLK_DEV_IO_TRACE is not set +CONFIG_KPROBE_EVENTS=y +# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set # CONFIG_UPROBE_EVENTS is not set CONFIG_EPROBE_EVENTS=y +CONFIG_BPF_EVENTS=y CONFIG_DYNAMIC_EVENTS=y CONFIG_PROBE_EVENTS=y CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY=y @@ -8274,6 +8299,7 @@ CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY=y # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set # CONFIG_PREEMPTIRQ_DELAY_TEST is not set +# CONFIG_KPROBE_EVENT_GEN_TEST is not set # CONFIG_RV is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y @@ -8294,6 +8320,7 @@ CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y # # CONFIG_KUNIT is not set # CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FUNCTION_ERROR_INJECTION is not set # CONFIG_FAULT_INJECTION is not set CONFIG_ARCH_HAS_KCOV=y # CONFIG_KCOV is not set diff --git a/device/community/linux-pine64-pinenote/enable-ultra-suspend.patch b/device/community/linux-pine64-pinenote/enable-ultra-suspend.patch new file mode 100644 index 000000000..a5334820d --- /dev/null +++ b/device/community/linux-pine64-pinenote/enable-ultra-suspend.patch @@ -0,0 +1,160 @@ +Patch-Source: https://git.sr.ht/~hrdl/linux/log/v6.19_ultra_suspend +From af0f33629aefaa75ea6318352debdb8b64655c15 Mon Sep 17 00:00:00 2001 +From: hrdl +Date: Sun, 15 Mar 2026 21:35:31 +0100 +Subject: [PATCH] [rockchip suspend driver] allow overriding suspend_state + +Rockchip's bl31 behaves differently when configured with +suspend_state=5, which identifies rockchip's ultra suspend mode. This +is a prerequisite to achieve significant power savings in suspend mode +with rockchip's bl31. + +Signed-off-by: hrdl +--- + drivers/soc/rockchip/rockchip_pm_config.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/soc/rockchip/rockchip_pm_config.c b/drivers/soc/rockchip/rockchip_pm_config.c +index 65524181695fb8eafa0c09adf5d9c9860f1f6654..e5f982879c42b9f4ca5ac751cd973f880917b1b6 100644 +--- a/drivers/soc/rockchip/rockchip_pm_config.c ++++ b/drivers/soc/rockchip/rockchip_pm_config.c +@@ -38,6 +38,8 @@ static struct rk_on_off_regulator_list { + struct regulator_dev *off_reg_list[MAX_ON_OFF_REG_NUM]; + } on_off_regs_list[RK_PM_STATE_MAX]; + ++static int suspend_state_override = 0; ++ + static const struct of_device_id pm_match_table[] = { + { .compatible = "rockchip,pm-px30",}, + { .compatible = "rockchip,pm-rk1808",}, +@@ -190,6 +192,9 @@ static int pm_config_probe(struct platform_device *pdev) + else + sip_smc_set_suspend_mode(WKUP_SOURCE_CONFIG, wakeup_config, 0); + ++ of_property_read_u32(node, "rockchip,suspend-state-override", ++ &suspend_state_override); ++ + if (of_property_read_u32_array(node, + "rockchip,pwm-regulator-config", + &pwm_regulator_config, 1)) +@@ -250,6 +255,9 @@ static int pm_config_prepare(struct device *dev) + struct regulator_dev **on_list; + struct regulator_dev **off_list; + ++ if (suspend_state_override) ++ suspend_state = suspend_state_override; ++ + sip_smc_set_suspend_mode(LINUX_PM_STATE, + suspend_state, + 0); +From 693fee19336c7b348e30222a31de06eb34f70e25 Mon Sep 17 00:00:00 2001 +From: hrdl +Date: Sun, 15 Mar 2026 21:35:31 +0100 +Subject: [PATCH] [HACK]: Input: cyttsp5: support resume from ultra suspend + +Signed-off-by: hrdl +--- + drivers/input/touchscreen/cyttsp5.c | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + +diff --git a/drivers/input/touchscreen/cyttsp5.c b/drivers/input/touchscreen/cyttsp5.c +index 63e71f3b1ff2c40ec29d5c01a37afeee20512c33..c163ef2d87b80267b7cf28f7967162be8ac3177d 100644 +--- a/drivers/input/touchscreen/cyttsp5.c ++++ b/drivers/input/touchscreen/cyttsp5.c +@@ -1008,11 +1008,22 @@ static int __maybe_unused cyttsp5_suspend(struct device *dev) + static int __maybe_unused cyttsp5_resume(struct device *dev) + { + struct cyttsp5 *ts = dev_get_drvdata(dev); ++ int error = 0; ++ ++ if (!device_may_wakeup(dev)) { ++ error = cyttsp5_power_control(ts, true); ++ ++ if (error) { ++ gpiod_set_value_cansleep(ts->reset_gpio, 1); ++ msleep(10); ++ gpiod_set_value_cansleep(ts->reset_gpio, 0); ++ msleep(20); ++ error = 0; ++ // error = cyttsp5_startup(ts); ++ } ++ } + +- if (!device_may_wakeup(dev)) +- cyttsp5_power_control(ts, true); +- +- return 0; ++ return error; + } + + static SIMPLE_DEV_PM_OPS(cyttsp5_pm, cyttsp5_suspend, cyttsp5_resume); +From ee2c553f7893e82223e42436cebbcf8c4958464d Mon Sep 17 00:00:00 2001 +From: hrdl +Date: Sun, 15 Mar 2026 21:35:32 +0100 +Subject: [PATCH] arm64: dts: rockchip: pinenote: enable rockchip's ultra + suspend mode + +This reduces suspend power consumption from about 60 mW to about 11 +mW, extending the battery life in suspend mode from a week to about +1.5 months. This is achieved by + +1. Disabling the *_pmu regulators in suspend to save power. +2. Overriding the suspend mode to instruct bl31 to configure the + system for ultra suspend (suspend mode 5). This is needed for the + system to resume. +3. Indicate that the wifi mmc module will be powered off during + suspend. Without it the driver will not try to reinitialise it. + +Signed-off-by: hrdl +--- + arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +index 15118c7ea8aa70f8ddcd26ebe4411dfe0b04e7b4..fe2219961b2420874626941ac56d42f7a444ce34 100644 +--- a/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3566-pinenote.dtsi +@@ -137,6 +137,7 @@ + compatible = "rockchip,pm-rk3568"; + status = "okay"; + rockchip,sleep-debug-en = <0>; ++ rockchip,suspend-state-override = <5>; + rockchip,sleep-mode-config = < + (0 + | RKPM_SLP_CENTER_OFF +@@ -486,7 +487,7 @@ + regulator-max-microvolt = <1800000>; + + regulator-state-mem { +- regulator-on-in-suspend; ++ regulator-off-in-suspend; + }; + }; + +@@ -508,7 +509,7 @@ + regulator-max-microvolt = <900000>; + + regulator-state-mem { +- regulator-on-in-suspend; ++ regulator-off-in-suspend; + }; + }; + +@@ -541,7 +542,7 @@ + regulator-max-microvolt = <3300000>; + + regulator-state-mem { +- regulator-on-in-suspend; ++ regulator-off-in-suspend; + }; + }; + +@@ -981,7 +982,7 @@ + bus-width = <4>; + cap-sd-highspeed; + cap-sdio-irq; +- keep-power-in-suspend; ++ cap-power-off-card; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + pinctrl-0 = <&sdmmc1_bus4>, <&sdmmc1_clk>, <&sdmmc1_cmd>;