pinebookpro-kernel: update to 5.9.8

[ci skip]
This commit is contained in:
Cameron Nemo 2020-09-26 22:36:28 +00:00 committed by Érico Nogueira Rolim
parent 9883408f65
commit 3c65add1b2
12 changed files with 9243 additions and 64 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
From 7e8fc396d34f6c9f536cb9540f212a2fd0f11685 Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:12:56 +0200
Subject: [PATCH 1/8] tty: serdev: support shutdown op
Allow serdev drivers to register a shutdown handler
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
drivers/tty/serdev/core.c | 11 +++++++++++
include/linux/serdev.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index c5f0d936b003..37e45c356540 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -432,11 +432,22 @@ static int serdev_drv_remove(struct device *dev)
return 0;
}
+static void serdev_drv_shutdown(struct device *dev)
+{
+ const struct serdev_device_driver *sdrv;
+ if (dev->driver) {
+ sdrv = to_serdev_device_driver(dev->driver);
+ if (sdrv->shutdown)
+ sdrv->shutdown(to_serdev_device(dev));
+ }
+}
+
static struct bus_type serdev_bus_type = {
.name = "serial",
.match = serdev_device_match,
.probe = serdev_drv_probe,
.remove = serdev_drv_remove,
+ .shutdown = serdev_drv_shutdown,
};
/**
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index 9f14f9c12ec4..94050561325c 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -63,6 +63,7 @@ struct serdev_device_driver {
struct device_driver driver;
int (*probe)(struct serdev_device *);
void (*remove)(struct serdev_device *);
+ void (*shutdown)(struct serdev_device *);
};
static inline struct serdev_device_driver *to_serdev_device_driver(struct device_driver *d)
--
2.28.0

View File

@ -0,0 +1,25 @@
From 8e3da546a76245e9f45323cc2725cf24637bc571 Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:14:06 +0200
Subject: [PATCH 2/8] bluetooth: hci_serdev: Clear registered bit on unregister
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
drivers/bluetooth/hci_serdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth/hci_serdev.c
index 7b233312e723..f2fcefeb99e0 100644
--- a/drivers/bluetooth/hci_serdev.c
+++ b/drivers/bluetooth/hci_serdev.c
@@ -363,5 +363,7 @@ void hci_uart_unregister_device(struct hci_uart *hu)
hu->proto->close(hu);
serdev_device_close(hu->serdev);
+
+ clear_bit(HCI_UART_REGISTERED, &hu->flags);
}
EXPORT_SYMBOL_GPL(hci_uart_unregister_device);
--
2.28.0

View File

@ -0,0 +1,51 @@
From c057897812518b6c2366d8102643bcdf66592c4b Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:15:08 +0200
Subject: [PATCH 3/8] bluetooth: hci_bcm: disable power on shutdown
Firmware behaves wonky when not power cycled over reboots
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
drivers/bluetooth/hci_bcm.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 8ea5ca8d71d6..6d5871992f79 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -1469,6 +1469,23 @@ static void bcm_serdev_remove(struct serdev_device *serdev)
hci_uart_unregister_device(&bcmdev->serdev_hu);
}
+static void bcm_serdev_shutdown(struct serdev_device *serdev)
+{
+ struct bcm_device *bcmdev = serdev_device_get_drvdata(serdev);
+
+/*
+ if (test_bit(HCI_UART_REGISTERED, &bcmdev->hu->flags)) {
+ hci_uart_unregister_device(&bcmdev->serdev_hu);
+ }
+*/
+ dev_info(bcmdev->dev, "Cutting power to bluetooth module\n");
+ if (bcm_gpio_set_power(bcmdev, false)) {
+ dev_err(bcmdev->dev, "Failed to power down\n");
+ }
+ usleep_range(500000, 1000000);
+}
+
+
#ifdef CONFIG_OF
static struct bcm_device_data bcm4354_device_data = {
.no_early_set_baudrate = true,
@@ -1494,6 +1511,7 @@ MODULE_DEVICE_TABLE(of, bcm_bluetooth_of_match);
static struct serdev_device_driver bcm_serdev_driver = {
.probe = bcm_serdev_probe,
.remove = bcm_serdev_remove,
+ .shutdown = bcm_serdev_shutdown,
.driver = {
.name = "hci_uart_bcm",
.of_match_table = of_match_ptr(bcm_bluetooth_of_match),
--
2.28.0

View File

@ -0,0 +1,64 @@
From 43f1e05b9b660d3d4763ebc406ef5ea667ba64f9 Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:16:52 +0200
Subject: [PATCH 4/8] mmc: core: pwrseq_simple: disable mmc power on shutdown
Fix for Broadcom SDIO WiFi modules. They misbehave if reinitialized
without a power cycle.
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
drivers/mmc/core/pwrseq_simple.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c
index ea4d3670560e..38fe7e29aba6 100644
--- a/drivers/mmc/core/pwrseq_simple.c
+++ b/drivers/mmc/core/pwrseq_simple.c
@@ -80,10 +80,8 @@ static void mmc_pwrseq_simple_post_power_on(struct mmc_host *host)
msleep(pwrseq->post_power_on_delay_ms);
}
-static void mmc_pwrseq_simple_power_off(struct mmc_host *host)
+static void __mmc_pwrseq_simple_power_off(struct mmc_pwrseq_simple *pwrseq)
{
- struct mmc_pwrseq_simple *pwrseq = to_pwrseq_simple(host->pwrseq);
-
mmc_pwrseq_simple_set_gpios_value(pwrseq, 1);
if (pwrseq->power_off_delay_us)
@@ -96,6 +94,12 @@ static void mmc_pwrseq_simple_power_off(struct mmc_host *host)
}
}
+static void mmc_pwrseq_simple_power_off(struct mmc_host *host)
+{
+ struct mmc_pwrseq_simple *pwrseq = to_pwrseq_simple(host->pwrseq);
+ __mmc_pwrseq_simple_power_off(pwrseq);
+}
+
static const struct mmc_pwrseq_ops mmc_pwrseq_simple_ops = {
.pre_power_on = mmc_pwrseq_simple_pre_power_on,
.post_power_on = mmc_pwrseq_simple_post_power_on,
@@ -151,9 +155,18 @@ static int mmc_pwrseq_simple_remove(struct platform_device *pdev)
return 0;
}
+static void mmc_pwrseq_simple_shutdown(struct platform_device *pdev)
+{
+ struct mmc_pwrseq_simple *pwrseq = platform_get_drvdata(pdev);
+
+ dev_info(&pdev->dev, "Turning off mmc\n");
+ __mmc_pwrseq_simple_power_off(pwrseq);
+}
+
static struct platform_driver mmc_pwrseq_simple_driver = {
.probe = mmc_pwrseq_simple_probe,
.remove = mmc_pwrseq_simple_remove,
+ .shutdown = mmc_pwrseq_simple_shutdown,
.driver = {
.name = "pwrseq_simple",
.of_match_table = mmc_pwrseq_simple_of_match,
--
2.28.0

View File

@ -0,0 +1,30 @@
From 719cceae6ab58d6d9e168ca7de92eb9e22a2d7ea Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:34:47 +0200
Subject: [PATCH 5/8] sound: soc: codecs: es8316: Run micdetect only if jack
status asserted
Think this is (was?) required to prevent flapping of detection status on
the PBP.
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
sound/soc/codecs/es8316.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index bd5d230c5df2..a2d8bf620b6f 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -688,7 +688,7 @@ static void es8316_disable_jack_detect(struct snd_soc_component *component)
snd_soc_component_update_bits(component, ES8316_GPIO_DEBOUNCE,
ES8316_GPIO_ENABLE_INTERRUPT, 0);
- if (es8316->jack->status & SND_JACK_MICROPHONE) {
+ if (es8316->jack && (es8316->jack->status & SND_JACK_MICROPHONE)) {
es8316_disable_micbias_for_mic_gnd_short_detect(component);
snd_soc_jack_report(es8316->jack, 0, SND_JACK_BTN_0);
}
--
2.28.0

View File

@ -0,0 +1,45 @@
From f4f362ffaf99101d69462b0579fd48fa632ef1dc Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:36:47 +0200
Subject: [PATCH 6/8] ASoC: soc-jack.c: supported inverted jack detect GPIOs
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
sound/soc/soc-jack.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 0f1820f36b4d..8d9d77814f33 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -216,8 +216,6 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio)
int report;
enable = gpiod_get_value_cansleep(gpio->desc);
- if (gpio->invert)
- enable = !enable;
if (enable)
report = gpio->report;
@@ -346,6 +344,9 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
goto undo;
}
} else {
+ int flags = GPIOF_IN;
+ if (gpios[i].invert)
+ flags |= GPIOF_ACTIVE_LOW;
/* legacy GPIO number */
if (!gpio_is_valid(gpios[i].gpio)) {
dev_err(jack->card->dev,
@@ -355,7 +356,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
goto undo;
}
- ret = gpio_request_one(gpios[i].gpio, GPIOF_IN,
+ ret = gpio_request_one(gpios[i].gpio, flags,
gpios[i].name);
if (ret)
goto undo;
--
2.28.0

View File

@ -0,0 +1,25 @@
From e7c2bf27666b74f47c1d64c34ac02e037afa5697 Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Thu, 28 May 2020 14:39:55 +0200
Subject: [PATCH 7/8] arm64: dts: rockchip: enable earlycon
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
index 06d48338c836..c1aad8f88b8a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
@@ -19,6 +19,7 @@ / {
compatible = "pine64,pinebook-pro", "rockchip,rk3399";
chosen {
+ bootargs = "earlycon=uart8250,mmio32,0xff1a0000";
stdout-path = "serial2:1500000n8";
};
--
2.28.0

View File

@ -0,0 +1,31 @@
From 4a4127fde03791fc42e36241cc5781ceb5273a1f Mon Sep 17 00:00:00 2001
From: Tobias Schramm <t.schramm@manjaro.org>
Date: Sat, 6 Jun 2020 23:45:10 +0200
Subject: [PATCH 8/8] arm64: dts: rockchip: setup USB type c port as dual data
role
Some chargers try to put the charged device into device data role.
Before this commit this condition caused the tcpm state machine to
issue a hard reset due to a capability missmatch.
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
---
arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
index c1aad8f88b8a..45a870ce5d22 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
@@ -706,7 +706,7 @@ fusb0: fusb30x@22 {
connector {
compatible = "usb-c-connector";
- data-role = "host";
+ data-role = "dual";
label = "USB-C";
op-sink-microwatt = <1000000>;
power-role = "dual";
--
2.28.0

View File

@ -1,19 +0,0 @@
diff --git a/crypto/aegis128-neon-inner.c b/crypto/aegis128-neon-inner.c
index 2a660ac1bc3a..41d39fcd6e54 100644
--- a/crypto/aegis128-neon-inner.c
+++ b/crypto/aegis128-neon-inner.c
@@ -15,13 +15,10 @@
#define AEGIS_BLOCK_SIZE 16
-#include <stddef.h>
+#include <linux/string.h>
extern int aegis128_have_aes_insn;
-void *memcpy(void *dest, const void *src, size_t n);
-void *memset(void *s, int c, size_t n);
-
struct aegis128_state {
uint8x16_t v[5];
};

View File

@ -1,37 +0,0 @@
This also affects aarch64-musl systems at very least.
From 1b9ae0c92925ac40489be526d67d0010d0724ce0 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Thu, 21 May 2020 22:14:22 +0200
Subject: [PATCH] wireless: Use linux/stddef.h instead of stddef.h
When compiling inside the kernel include linux/stddef.h instead of
stddef.h. When I compile this header file in backports for power PC I
run into a conflict with ptrdiff_t. I was unable to reproduce this in
mainline kernel. I still would like to fix this problem in the kernel.
Fixes: 6989310f5d43 ("wireless: Use offsetof instead of custom macro.")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://lore.kernel.org/r/20200521201422.16493-1-hauke@hauke-m.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
include/uapi/linux/wireless.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/wireless.h b/include/uapi/linux/wireless.h
index a2c006a364e0b..24f3371ad8262 100644
--- a/include/uapi/linux/wireless.h
+++ b/include/uapi/linux/wireless.h
@@ -74,7 +74,11 @@
#include <linux/socket.h> /* for "struct sockaddr" et al */
#include <linux/if.h> /* for IFNAMSIZ and co... */
-#include <stddef.h> /* for offsetof */
+#ifdef __KERNEL__
+# include <linux/stddef.h> /* for offsetof */
+#else
+# include <stddef.h> /* for offsetof */
+#endif
/***************************** VERSION *****************************/
/*

View File

@ -1,16 +1,15 @@
# Template file for 'pinebookpro-kernel'
pkgname=pinebookpro-kernel
version=5.7.0
version=5.9.12
revision=1
archs="aarch64*"
_commit=a8f4db8a726e5e4552e61333dcd9ea1ff35f39f9
wrksrc="linux-pinebook-pro-${_commit}"
short_desc="Linux kernel for Pinebook Pro (${version%.*} series)"
wrksrc="linux-${version}"
short_desc="Linux kernel for Pinebook Pro"
maintainer="Renato Aguiar <renato@renatoaguiar.net>"
license="GPL-2.0-only"
homepage="https://www.kernel.org"
distfiles="https://gitlab.manjaro.org/tsys/linux-pinebook-pro/-/archive/${_commit}/linux-pinebook-pro-${_commit}.tar.gz"
checksum=c76b54d62bdf58e40497846fe7cf236d9a923eeb7972c97d41a917329843268b
distfiles="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${version}.tar.xz"
checksum=d97f56192e3474c9c8a44ca39957d51800a26497c9a13c9c5e8cc0f1f5b0d9bd
patch_args="-Np1"
python_version=3
@ -21,7 +20,7 @@ noshlibprovides=yes
preserve=yes
hostmakedepends="tar xz bc elfutils-devel flex gmp-devel kmod libmpc-devel
libressl-devel perl uboot-mkimage cpio"
libressl-devel perl uboot-mkimage cpio python3"
_kernver="${version}_${revision}"
triggers="kernel-hooks"
@ -51,7 +50,9 @@ do_configure() {
_args="CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-"
fi
make ${makejobs} ARCH=$arch ${_args} pinebook_pro_defconfig
cp -f ${FILESDIR}/dotconfig .config
make ${makejobs} ARCH=$arch ${_args} oldconfig
# Always use our revision to CONFIG_LOCALVERSION to match our pkg version.
sed -i -e "s|^\(CONFIG_LOCALVERSION=\).*|\1\"_${revision}\"|" .config
}