Implement 0014 keypad debouncer, Sparkler LRA filter, standby fixes, and stage a1125 (ampere)

- Extend 0012 standby optimizations with removable-SD-only MMC_CAP_AGGRESSIVE_PM | MMC_CAP2_FULL_PWR_CYCLE in sdhci-msm, proxy mem clock and BIMC XO re-parenting + 0x45000 BIT(2) early-vote clear in qcom_q6v5_mss / gcc-msm8909, 100 MHz opp-99999975 floor across qcom-msm8909.dtsi and all 6 device DTS/DTBs, disabled-by-default Bluetooth with bt_enabled persistence, NM ipv6.method=ignore + standby wlan0/disable_ipv6 muting, and post-park DSDS signal hysteresis

- Add ABI-preserving system-core keypad debouncer patch 0014 (drivers/input/input.c key_debounce_ms + pm8941-pwrkey press/release chatter holdoff), replace ignored col-scan-delay-ms with col-scan-delay-us = <0x32> and raise DT debounce intervals across all 6 DTS/DTBs, configure per-target key_debounce_ms at boot and xset r rate 300 25, and add C/DTS verification in scripts/test-keypad-debouncer.py

- Isolate Nokia 8000 4G (nokia-sparkler / nokia-leo) media playback from the shared 157 Hz SPK_DRV vibrator channel via dynamic Speaker-only filtering in music.so, files.so, and ringtones.so, explicit RX3/SPK mixer zeroing on Earpiece/Headphones/Bluetooth routes in sxmo_audio.sh and preview plugins, and Sparkler/Leo-only /etc/mpv/mpv.conf provisioning

- Register upcoming build a1125 (ampere) in scripts/version.sh, scripts/check-rebuild.sh, AGENTS.md, and CHANGELOG.md, fix --for-rebuild pre-rebuild stale output checks in check-rebuild.sh/test-cover-dt.py, rebuild vmlinuz/DTBs/plugins and all 4 --mkinitfs target images stamped a1125 (ampere), and pin their verified SHA-256 checksums
This commit is contained in:
Luxferre committed 2026-11-23 15:26:56 +02:00
1 parent c529463ae3
commit 5d427e39ab
55 files changed
+78935 -77569

No files matched your search

@@ -54,7 +54,28 @@ diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
sdhci_msm_set_regulator_caps(msm_host);
return 0;
@@ -2704,6 +2713,10 @@
@@ -2628,6 +2637,20 @@
msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_NEED_RSP_BUSY;
+ /*
+ * Enable aggressive runtime PM (power-cycle off during idle) strictly
+ * on removable SD slots. Never enable it on eMMC (mmc0 / 8-bit /
+ * no-sd / HS200/HS400) because the rootfs lives on mmc0.
+ */
+ if (of_alias_get_id(node, "mmc") != 0 &&
+ !(msm_host->mmc->caps & MMC_CAP_8_BIT_DATA) &&
+ !(msm_host->mmc->caps2 & (MMC_CAP2_NO_SD |
+ MMC_CAP2_HS200_1_8V_SDR |
+ MMC_CAP2_HS400_1_8V))) {
+ msm_host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM;
+ msm_host->mmc->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;
+ }
+
/* Set the timeout value to max possible */
host->max_timeout_count = 0xF;
@@ -2704,6 +2727,10 @@
dev_pm_opp_set_rate(dev, 0);
clk_bulk_disable_unprepare(ARRAY_SIZE(msm_host->bulk_clks),
msm_host->bulk_clks);
@@ -65,7 +86,7 @@ diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
return sdhci_msm_ice_suspend(msm_host);
}
@@ -2716,6 +2729,11 @@
@@ -2716,6 +2743,11 @@
unsigned long flags;
int ret;
@@ -685,3 +706,106 @@ index b0934faa7..257f78057 100644
ret = pm8916_wcd_analog_parse_dt(dev, priv);
if (ret < 0)
return ret;
diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
--- a/drivers/remoteproc/qcom_q6v5_mss.c
+++ b/drivers/remoteproc/qcom_q6v5_mss.c
@@ -2359,12 +2359,12 @@
},
.proxy_clk_names = (char*[]){
"xo",
+ "mem",
NULL
},
.active_clk_names = (char*[]){
"iface",
"bus",
- "mem",
NULL
},
.proxy_pd_names = (char*[]){
@@ -2404,12 +2404,12 @@
},
.proxy_clk_names = (char*[]){
"xo",
+ "mem",
NULL
},
.active_clk_names = (char*[]){
"iface",
"bus",
- "mem",
NULL
},
.proxy_pd_names = (char*[]){
diff --git a/drivers/clk/qcom/gcc-msm8909.c b/drivers/clk/qcom/gcc-msm8909.c
--- a/drivers/clk/qcom/gcc-msm8909.c
+++ b/drivers/clk/qcom/gcc-msm8909.c
@@ -844,6 +844,7 @@
.parent_data = gcc_xo_gpll0_bimc_data,
.num_parents = ARRAY_SIZE(gcc_xo_gpll0_bimc_data),
.ops = &clk_rcg2_ops,
+ .flags = CLK_GET_RATE_NOCACHE,
},
};
@@ -914,6 +915,7 @@
.parent_data = gcc_xo_gpll0_bimc_data,
.num_parents = ARRAY_SIZE(gcc_xo_gpll0_bimc_data),
.ops = &clk_rcg2_ops,
+ .flags = CLK_GET_RATE_NOCACHE,
},
};
@@ -2151,10 +2153,8 @@
.enable_mask = BIT(0),
.hw.init = &(struct clk_init_data) {
.name = "gcc_mss_q6_bimc_axi_clk",
- .parent_hws = (const struct clk_hw*[]) {
- &bimc_ddr_clk_src.clkr.hw,
- },
- .num_parents = 1,
+ .parent_data = gcc_xo_data,
+ .num_parents = ARRAY_SIZE(gcc_xo_data),
.ops = &clk_branch2_ops,
}
}
@@ -2716,7 +2716,22 @@
static int gcc_msm8909_probe(struct platform_device *pdev)
{
- return qcom_cc_probe(pdev, &gcc_msm8909_desc);
+ struct regmap *regmap;
+ int ret;
+
+ ret = qcom_cc_probe(pdev, &gcc_msm8909_desc);
+ if (ret)
+ return ret;
+
+ /*
+ * Clear the bootloader APSS vote on bimc_pll_early (BIT(2)) so
+ * BIMC PLL can gate when neither APSS nor MSS needs it.
+ */
+ regmap = dev_get_regmap(&pdev->dev, NULL);
+ if (regmap)
+ regmap_update_bits(regmap, 0x45000, BIT(2), 0);
+
+ return 0;
}
static struct platform_driver gcc_msm8909_driver = {
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi
--- a/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8909.dtsi
@@ -137,6 +137,12 @@
* 800 MHz. However, they are generated from GPLL0 which does
* not run at exactly 800 MHz but rather 799999804 Hz.
*/
+ opp-99999975 {
+ opp-hz = /bits/ 64 <99999975>;
+ clock-latency-ns = <100000>;
+ required-opps = <&rpmpd_opp_ret>;
+ opp-supported-hw = <0xff>;
+ };
opp-199999951 {
opp-hz = /bits/ 64 <199999951>;
clock-latency-ns = <100000>;
@@ -0,0 +1,213 @@
diff --git a/drivers/input/input.c b/drivers/input/input.c
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -25,6 +25,8 @@
#include <linux/kstrtox.h>
#include <linux/mutex.h>
#include <linux/rcupdate.h>
+#include <linux/ktime.h>
+#include <linux/moduleparam.h>
#include "input-compat.h"
#include "input-core-private.h"
#include "input-poller.h"
@@ -48,6 +50,155 @@
*/
static DEFINE_MUTEX(input_mutex);
+static unsigned int ba_key_debounce_ms = 45;
+module_param_named(key_debounce_ms, ba_key_debounce_ms, uint, 0644);
+MODULE_PARM_DESC(key_debounce_ms,
+ "Post-release chatter debounce window in ms for built-in physical keys (0=off)");
+
+#define BA_KEY_DEBOUNCE_SLOTS 64
+
+struct ba_key_debounce_slot {
+ const struct input_dev *dev;
+ unsigned int code;
+ ktime_t last_press;
+ ktime_t last_release;
+ ktime_t settle_until;
+ bool suppressed_press;
+};
+
+static struct ba_key_debounce_slot ba_key_slots[BA_KEY_DEBOUNCE_SLOTS];
+static DEFINE_SPINLOCK(ba_key_debounce_lock);
+
+static bool ba_should_debounce_key(const struct input_dev *dev,
+ unsigned int code)
+{
+ if (!READ_ONCE(ba_key_debounce_ms))
+ return false;
+
+ if (dev->id.bustype == BUS_VIRTUAL ||
+ dev->id.bustype == BUS_BLUETOOTH ||
+ dev->id.bustype == BUS_USB)
+ return false;
+
+ if (code >= BTN_MISC && code < KEY_OK)
+ return false;
+
+ return true;
+}
+
+static void ba_pop_trailing_msc_scan(struct input_dev *dev)
+{
+ if (dev->num_vals > 0 &&
+ dev->vals[dev->num_vals - 1].type == EV_MSC &&
+ dev->vals[dev->num_vals - 1].code == MSC_SCAN)
+ dev->num_vals--;
+}
+
+static bool ba_filter_key_bounce(struct input_dev *dev, unsigned int code,
+ int value)
+{
+ unsigned int db_ms = min(READ_ONCE(ba_key_debounce_ms), 250U);
+ struct ba_key_debounce_slot *slot = NULL;
+ struct ba_key_debounce_slot *empty = NULL;
+ struct ba_key_debounce_slot *oldest = NULL;
+ ktime_t oldest_ts = 0;
+ ktime_t now;
+ s64 db_ns;
+ unsigned long flags;
+ bool was_down;
+ int i;
+
+ if (!db_ms || !ba_should_debounce_key(dev, code))
+ return false;
+
+ now = ktime_get();
+ db_ns = (s64)db_ms * NSEC_PER_MSEC;
+ was_down = test_bit(code, dev->key);
+
+ spin_lock_irqsave(&ba_key_debounce_lock, flags);
+
+ for (i = 0; i < BA_KEY_DEBOUNCE_SLOTS; i++) {
+ struct ba_key_debounce_slot *s = &ba_key_slots[i];
+
+ if (s->dev == dev && s->code == code) {
+ slot = s;
+ break;
+ }
+ if (!s->dev && !empty)
+ empty = s;
+ if (s->dev) {
+ ktime_t ts = ktime_after(s->last_release, s->last_press) ?
+ s->last_release : s->last_press;
+ if (!oldest || ktime_before(ts, oldest_ts)) {
+ oldest = s;
+ oldest_ts = ts;
+ }
+ }
+ }
+
+ if (!slot) {
+ slot = empty ? empty : oldest;
+ memset(slot, 0, sizeof(*slot));
+ slot->dev = dev;
+ slot->code = code;
+ }
+
+ if (value) {
+ if (was_down) {
+ spin_unlock_irqrestore(&ba_key_debounce_lock, flags);
+ return false;
+ }
+ if ((ktime_to_ns(slot->settle_until) != 0 &&
+ ktime_before(now, slot->settle_until)) ||
+ (ktime_to_ns(slot->last_press) != 0 &&
+ ktime_sub(now, slot->last_press) < db_ns)) {
+ slot->suppressed_press = true;
+ spin_unlock_irqrestore(&ba_key_debounce_lock, flags);
+ ba_pop_trailing_msc_scan(dev);
+ return true;
+ }
+ slot->last_press = now;
+ slot->suppressed_press = false;
+ spin_unlock_irqrestore(&ba_key_debounce_lock, flags);
+ return false;
+ }
+
+ if (was_down) {
+ slot->last_release = now;
+ slot->settle_until = ktime_add_ns(now, db_ns);
+ slot->suppressed_press = false;
+ spin_unlock_irqrestore(&ba_key_debounce_lock, flags);
+ return false;
+ }
+
+ if (slot->suppressed_press) {
+ ktime_t ext = ktime_add_ns(now, db_ns / 2);
+ ktime_t cap = ktime_add_ns(slot->last_release, db_ns + db_ns / 2);
+
+ if (ktime_after(ext, cap))
+ ext = cap;
+ if (ktime_after(ext, slot->settle_until))
+ slot->settle_until = ext;
+ slot->suppressed_press = false;
+ }
+ spin_unlock_irqrestore(&ba_key_debounce_lock, flags);
+ ba_pop_trailing_msc_scan(dev);
+ return true;
+}
+
+static void ba_clear_key_debounce_dev(const struct input_dev *dev)
+{
+ unsigned long flags;
+ int i;
+
+ spin_lock_irqsave(&ba_key_debounce_lock, flags);
+ for (i = 0; i < BA_KEY_DEBOUNCE_SLOTS; i++) {
+ if (ba_key_slots[i].dev == dev)
+ memset(&ba_key_slots[i], 0, sizeof(ba_key_slots[i]));
+ }
+ spin_unlock_irqrestore(&ba_key_debounce_lock, flags);
+}
+
static const struct input_value input_value_sync = { EV_SYN, SYN_REPORT, 1 };
static const unsigned int input_max_code[EV_CNT] = {
@@ -240,6 +391,9 @@
break;
}
+ if (ba_filter_key_bounce(dev, code, value))
+ break;
+
if (!!test_bit(code, dev->key) != !!value) {
__change_bit(code, dev->key);
@@ -2267,6 +2421,7 @@
{
struct input_handle *handle, *next;
+ ba_clear_key_debounce_dev(dev);
input_disconnect_device(dev);
mutex_lock(&input_mutex);
diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c
--- a/drivers/input/misc/pm8941-pwrkey.c
+++ b/drivers/input/misc/pm8941-pwrkey.c
@@ -151,7 +151,7 @@
unsigned int sts;
int err;
- if (pwrkey->sw_debounce_time_us) {
+ if (ktime_to_ns(pwrkey->sw_debounce_end_time)) {
if (ktime_before(ktime_get(), pwrkey->sw_debounce_end_time)) {
dev_dbg(pwrkey->dev,
"ignoring key event received before debounce end %llu us\n",
@@ -166,9 +166,12 @@
sts &= pwrkey->data->status_bit;
- if (pwrkey->sw_debounce_time_us && !sts)
+ if (!sts)
pwrkey->sw_debounce_end_time = ktime_add_us(ktime_get(),
- pwrkey->sw_debounce_time_us);
+ max_t(u32, pwrkey->sw_debounce_time_us, 45000U));
+ else
+ pwrkey->sw_debounce_end_time = ktime_add_us(ktime_get(),
+ min_t(u32, max_t(u32, pwrkey->sw_debounce_time_us, 15000U), 25000U));
/*
* Simulate a press event in case a release event occurred without a