Version Bump:
This commit is contained in:
@@ -1,56 +1,24 @@
|
||||
From 54ddce1cf18b40b4e89b445885f5bf03a2fb6483 Mon Sep 17 00:00:00 2001
|
||||
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
|
||||
Date: Thu, 9 Dec 2021 16:52:29 +0100
|
||||
Subject: arm64: dts: rk3399-pinephone-pro: improve sound device definition
|
||||
Subject: [PATCH] arm64: dts: rk3399-pinephone-pro: improve sound device
|
||||
definition
|
||||
|
||||
This commit renames the sound card and the "Headphone" widget so they
|
||||
match the names used by the ALSA UCM profiles.
|
||||
|
||||
It also adds a jack detection GPIO to the sound card definition, and
|
||||
creates a new set of ADC keys for handling headset buttons.
|
||||
It also adds a jack detection GPIO to the sound card definition.
|
||||
|
||||
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@gmail.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3399-pinephone-pro.dts | 41 ++++++++++++++++++----
|
||||
1 file changed, 34 insertions(+), 7 deletions(-)
|
||||
.../boot/dts/rockchip/rk3399-pinephone-pro.dts | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
|
||||
index 91687f6..b63a153 100644
|
||||
index 13141c643..63f0d5a5c 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
|
||||
@@ -48,6 +48,32 @@ button-down {
|
||||
};
|
||||
};
|
||||
|
||||
+ headset-keys {
|
||||
+ compatible = "adc-keys";
|
||||
+ io-channels = <&saradc 2>;
|
||||
+ io-channel-names = "buttons";
|
||||
+ keyup-threshold-microvolt = <900000>;
|
||||
+ poll-interval = <100>;
|
||||
+
|
||||
+ headset-play {
|
||||
+ label = "Play";
|
||||
+ linux,code = <KEY_PLAYPAUSE>;
|
||||
+ press-threshold-microvolt = <650000>;
|
||||
+ };
|
||||
+
|
||||
+ headset-up {
|
||||
+ label = "Volume Up";
|
||||
+ linux,code = <KEY_VOLUMEUP>;
|
||||
+ press-threshold-microvolt = <750000>;
|
||||
+ };
|
||||
+
|
||||
+ headset-down {
|
||||
+ label = "Volume Down";
|
||||
+ linux,code = <KEY_VOLUMEDOWN>;
|
||||
+ press-threshold-microvolt = <850000>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
bat: battery {
|
||||
compatible = "simple-battery";
|
||||
voltage-min-design-microvolt = <3400000>;
|
||||
@@ -184,29 +210,30 @@ ring_indicator: ring-indicator {
|
||||
@@ -177,29 +177,30 @@ power {
|
||||
// spaker - amp enabled by SPK_CTL_H
|
||||
//
|
||||
// mclk - GPIO4_A0/I2S_CLK
|
||||
@@ -88,3 +56,6 @@ index 91687f6..b63a153 100644
|
||||
"Internal Earpiece", "SPOLP",
|
||||
"Internal Earpiece", "SPOLN",
|
||||
"Internal Speaker", "Speaker Amp OUTL",
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
From 0829026de2b951c7401340fed9925dd7d192a65f Mon Sep 17 00:00:00 2001
|
||||
From: Andrey Skvortsov
|
||||
Date: Sat, 15 Jan 2022 15:14:46 +0300
|
||||
Subject: mmc: core: Wait for command setting 'Power Off Notification' bit to
|
||||
complete
|
||||
|
||||
SD card is allowed to signal busy on DAT0 up to 1s after the
|
||||
CMD49. According to SD spec (version 6.0 section 5.8.1.3) first host
|
||||
waits until busy of CMD49 is released and only then polls Power
|
||||
Management Status register up to 1s until the card indicates ready to
|
||||
power off.
|
||||
|
||||
Without waiting for busy before polling status register sometimes card
|
||||
becomes unresponsive and system fails to suspend:
|
||||
|
||||
[ 205.907459] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
|
||||
[ 206.421274] sunxi-mmc 1c0f000.mmc: data error, sending stop command
|
||||
[ 206.421321] sunxi-mmc 1c0f000.mmc: send stop command failed
|
||||
[ 206.421347] mmc0: error -110 reading status reg of PM func
|
||||
[ 206.421366] PM: dpm_run_callback(): mmc_bus_suspend+0x0/0x74 returns -110
|
||||
[ 206.421402] mmcblk mmc0:aaaa: PM: failed to suspend async: error -110
|
||||
[ 206.437064] PM: Some devices failed to suspend, or early wake event detected
|
||||
|
||||
Tested with Sandisk Extreme PRO A2 64GB on Allwinner A64 system.
|
||||
|
||||
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
|
||||
---
|
||||
drivers/mmc/core/sd.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
|
||||
index c9db24e16af1..baaa37f22873 100644
|
||||
--- a/drivers/mmc/core/sd.c
|
||||
+++ b/drivers/mmc/core/sd.c
|
||||
@@ -67,7 +67,7 @@ static const unsigned int sd_au_size[] = {
|
||||
__res & __mask; \
|
||||
})
|
||||
|
||||
-#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 2000
|
||||
+#define SD_POWEROFF_NOTIFY_TIMEOUT_MS 1000
|
||||
#define SD_WRITE_EXTR_SINGLE_TIMEOUT_MS 1000
|
||||
|
||||
struct sd_busy_data {
|
||||
@@ -1664,6 +1664,13 @@ static int sd_poweroff_notify(struct mmc_card *card)
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ /* Find out when the command is completed. */
|
||||
+ err = mmc_poll_for_busy(card, SD_POWEROFF_NOTIFY_TIMEOUT_MS, false,
|
||||
+ MMC_BUSY_EXTR_SINGLE);
|
||||
+
|
||||
+ if (err)
|
||||
+ goto out;
|
||||
+
|
||||
cb_data.card = card;
|
||||
cb_data.reg_buf = reg_buf;
|
||||
err = __mmc_poll_for_busy(card, SD_POWEROFF_NOTIFY_TIMEOUT_MS,
|
||||
--
|
||||
cgit v1.2.3
|
||||
Reference in New Issue
Block a user