linux-nokia-n900: upgrade kernel to 5.15.12 (MR 2814)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Danct12 2022-01-03 03:21:17 +07:00 committed by Oliver Smith
parent 6d206fde57
commit 97d48d1e34
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
6 changed files with 1885 additions and 1527 deletions

View file

@ -0,0 +1,38 @@
From 5f13cdce615165f5a623faa4a642ecc723202b0f Mon Sep 17 00:00:00 2001
From: Merlijn Wajer <merlijn@wizzup.org>
Date: Mon, 20 Dec 2021 22:27:03 +0100
Subject: [PATCH] ARM: dts: omap3-n900: disable thermal for now
See "Oops while booting 5.15.2 on Nokia N900" on linux-omap mailing list
---
arch/arm/boot/dts/omap3-n900.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 1746a44e96bc..fe7c884da27c 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -28,6 +28,23 @@
status = "disabled";
};
+/* Disable cpu_thermal and bandgap, they causes oopses on mmc access in OFF
+ mode at the moment. Let's just disable thermal_zones as well, although the
+ system works without it...
+*/
+&cpu_thermal {
+ status = "disabled";
+};
+
+&bandgap {
+ status = "disabled";
+};
+
+&thermal_zones {
+ status = "disabled";
+};
+
+
/ {
model = "Nokia N900";
compatible = "nokia,omap3-n900", "ti,omap3430", "ti,omap3";

View file

@ -0,0 +1,132 @@
From 1eb45227f4be701096bd1228f72c62d0e0616020 Mon Sep 17 00:00:00 2001
From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Date: Sun, 12 Dec 2021 14:00:42 +0100
Subject: [PATCH] ARM: dts: omap3-n900: Fix lp5523 for multi color
Since the LED multicolor framework support was added in commit
92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx")
LEDs on this platform stopped working.
Fixes: 92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx")
Fixes: ac219bf3c9bd ("leds: lp55xx: Convert to use GPIO descriptors")
Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
---
arch/arm/boot/dts/omap3-n900.dts | 50 +++++++++++++++++++++++++-------
1 file changed, 40 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index c89b6c87271f..1746a44e96bc 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -8,6 +8,7 @@
#include "omap34xx.dtsi"
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
/*
* Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
@@ -630,63 +631,92 @@
};
lp5523: lp5523@32 {
+ #address-cells = <1>;
+ #size-cells = <0>;
compatible = "national,lp5523";
reg = <0x32>;
clock-mode = /bits/ 8 <0>; /* LP55XX_CLOCK_AUTO */
- enable-gpio = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
+ enable-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>; /* 41 */
- chan0 {
+ led@0 {
+ reg = <0>;
chan-name = "lp5523:kb1";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_KBD_BACKLIGHT;
};
- chan1 {
+ led@1 {
+ reg = <1>;
chan-name = "lp5523:kb2";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_KBD_BACKLIGHT;
};
- chan2 {
+ led@2 {
+ reg = <2>;
chan-name = "lp5523:kb3";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_KBD_BACKLIGHT;
};
- chan3 {
+ led@3 {
+ reg = <3>;
chan-name = "lp5523:kb4";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_KBD_BACKLIGHT;
};
- chan4 {
+ led@4 {
+ reg = <4>;
chan-name = "lp5523:b";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
};
- chan5 {
+ led@5 {
+ reg = <5>;
chan-name = "lp5523:g";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
};
- chan6 {
+ led@6 {
+ reg = <6>;
chan-name = "lp5523:r";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_STATUS;
};
- chan7 {
+ led@7 {
+ reg = <7>;
chan-name = "lp5523:kb5";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_KBD_BACKLIGHT;
};
- chan8 {
+ led@8 {
+ reg = <8>;
chan-name = "lp5523:kb6";
led-cur = /bits/ 8 <50>;
max-cur = /bits/ 8 <100>;
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_KBD_BACKLIGHT;
};
};

View file

@ -0,0 +1,41 @@
From 0f3fc1e0f46c0a02e049e3500220d156630bcfc8 Mon Sep 17 00:00:00 2001
From: Merlijn Wajer <merlijn@wizzup.org>
Date: Sun, 12 Dec 2021 15:18:59 +0100
Subject: [PATCH] leds: lp55xx: initialise output direction from dts
Commit a5d3d1adc95f ("leds: lp55xx: Initialize enable GPIO direction to
output") attempts to fix this, but the fix did not work since at least
for the Nokia N900 the value needs to be set to HIGH, per the device
tree. So rather than hardcoding the value to a potentially invalid value
for some devices, let's set direction in lp55xx_init_device.
Fixes: a5d3d1adc95f ("leds: lp55xx: Initialize enable GPIO direction to output")
Fixes: 92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx")
Fixes: ac219bf3c9bd ("leds: lp55xx: Convert to use GPIO descriptors")
Signed-off-by: Merlijn Wajer <merlijn@wizzup.org>
---
drivers/leds/leds-lp55xx-common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c
index d1657c46ee2f..9fdfc1b9a1a0 100644
--- a/drivers/leds/leds-lp55xx-common.c
+++ b/drivers/leds/leds-lp55xx-common.c
@@ -439,6 +439,8 @@ int lp55xx_init_device(struct lp55xx_chip *chip)
return -EINVAL;
if (pdata->enable_gpiod) {
+ gpiod_direction_output(pdata->enable_gpiod, 0);
+
gpiod_set_consumer_name(pdata->enable_gpiod, "LP55xx enable");
gpiod_set_value(pdata->enable_gpiod, 0);
usleep_range(1000, 2000); /* Keep enable down at least 1ms */
@@ -694,7 +696,7 @@ struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev,
of_property_read_u8(np, "clock-mode", &pdata->clock_mode);
pdata->enable_gpiod = devm_gpiod_get_optional(dev, "enable",
- GPIOD_OUT_LOW);
+ GPIOD_ASIS);
if (IS_ERR(pdata->enable_gpiod))
return ERR_CAST(pdata->enable_gpiod);

View file

@ -0,0 +1,117 @@
From d3b8625fd76fc839fc95e90b9117fafaf2d377bb Mon Sep 17 00:00:00 2001
From: Merlijn Wajer <merlijn@wizzup.org>
Date: Wed, 8 Dec 2021 15:28:59 +0100
Subject: [PATCH] Revert "ARM: omap3: enable off mode automatically"
This reverts commit fb2c599f056640d289b2147fbe6d9eaee689f1b2.
This commit surfaces problems on the Nokia N900 when the system is
actually in idle mode - causing oopses.
---
arch/arm/mach-omap2/pm-debug.c | 2 ++
arch/arm/mach-omap2/pm.c | 2 --
arch/arm/mach-omap2/pm.h | 4 ++++
arch/arm/mach-omap2/pm34xx.c | 27 ++-------------------------
4 files changed, 8 insertions(+), 27 deletions(-)
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index b3110399a3fb..104634a9b5b3 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -34,6 +34,8 @@
#include "prm2xxx_3xxx.h"
#include "pm.h"
+u32 enable_off_mode;
+
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#include <linux/seq_file.h>
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index da829a90fe8c..01ec1ba4878b 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -28,8 +28,6 @@
#include "clockdomain.h"
#include "pm.h"
-u32 enable_off_mode;
-
#ifdef CONFIG_SUSPEND
/*
* omap_pm_suspend: points to a function that does the SoC-specific
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 80e84ae66aee..2a883a0c1fcd 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -49,7 +49,11 @@ static inline int omap4_opp_init(void)
extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
+#ifdef CONFIG_PM_DEBUG
extern u32 enable_off_mode;
+#else
+#define enable_off_mode 0
+#endif
#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index d73c7b692116..d37fb3304a2e 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -25,7 +25,7 @@
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/slab.h>
-#include <linux/of.h>
+#include <linux/omap-gpmc.h>
#include <trace/events/power.h>
@@ -406,12 +406,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
if (!pwrst)
return -ENOMEM;
pwrst->pwrdm = pwrdm;
-
- if (enable_off_mode)
- pwrst->next_state = PWRDM_POWER_OFF;
- else
- pwrst->next_state = PWRDM_POWER_RET;
-
+ pwrst->next_state = PWRDM_POWER_RET;
list_add(&pwrst->node, &pwrst_list);
if (pwrdm_has_hdwr_sar(pwrdm))
@@ -445,22 +440,6 @@ static void __init pm_errata_configure(void)
}
}
-static void __init omap3_pm_check_pmic(void)
-{
- struct device_node *np;
-
- np = of_find_compatible_node(NULL, NULL, "ti,twl4030-power-idle");
- if (!np)
- np = of_find_compatible_node(NULL, NULL, "ti,twl4030-power-idle-osc-off");
-
- if (np) {
- of_node_put(np);
- enable_off_mode = 1;
- } else {
- enable_off_mode = 0;
- }
-}
-
int __init omap3_pm_init(void)
{
struct power_state *pwrst, *tmp;
@@ -494,8 +473,6 @@ int __init omap3_pm_init(void)
goto err2;
}
- omap3_pm_check_pmic();
-
ret = pwrdm_for_each(pwrdms_setup, NULL);
if (ret) {
pr_err("Failed to setup powerdomains\n");

View file

@ -1,14 +1,14 @@
# Maintainer: Daniele Debernardi <drebrez@gmail.com>
pkgname=linux-nokia-n900
pkgver=5.7.19
pkgrel=1
pkgver=5.15.12
pkgrel=0
pkgdesc="Mainline kernel fork for Nokia N900"
arch="armv7"
url="https://kernel.org/"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native pmb:kconfigcheck-nftables"
makedepends="bison findutils flex openssl-dev perl postmarketos-installkernel"
makedepends="bison findutils flex openssl-dev perl gmp-dev mpc1-dev mpfr-dev postmarketos-installkernel"
_carch="arm"
_flavor=nokia-n900
@ -23,6 +23,10 @@ source="
0001-ARM-dts-n900-increase-charge-current-limit-to-950mA.patch
0002-ARM-dts-n900-remove-rx51-battery.patch
0003-power-supply-bq27xxx_battery-ignore-inaccurate-flag.patch
0004-ARM-dts-omap3_n900-disable-thermal-for-now.patch
0005-ARM-dts-omap3_n900-fix-lp5523-for-multi-color.patch
0006-leds-lp55xx-initialise-output-direction-from-dts.patch
0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
"
if [ "${pkgver%.0}" = "$pkgver" ]; then
source="$source
@ -55,10 +59,14 @@ package() {
}
sha512sums="
45bde01593f6147c8c169b9e46b4b56eee998142552ae0ff82f1dd21b1fd54f3b32f6283f6bd77ea717d374672167849e468c157f235d2f12f7d7816e4623bf6 linux-5.7.tar.xz
734e59bdfc7071e41194db7581104dbe64f8aa32e85489f5896f82fb4e91f2a73f1aaac29e9b4e2866e57e835795ec964db1ab2d48f6e6f6ff66d9ad87bda8ea config-nokia-n900.armv7
d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a linux-5.15.tar.xz
92113a5c8810a78ea95cc5049bb7bc1f85ff426aa5acbdbc5d0b042da44138027d8db0e4f21f467dfc4a2014a706bc99e27ebe844f2c37f0d1cc3982baab0d9f config-nokia-n900.armv7
04a39253afd25a7de03dc45ff322161672005406543c44b97d2dc293f202de7de446aee9707a690a290641c55c7bed6e78bbe096ca323dd7d88d3207427c8d31 0001-ARM-dts-n900-increase-charge-current-limit-to-950mA.patch
c1055c7a4d2e39ce13db3871d948022b62eb7ebeb898777d197169b3e7c04d705ce7f52f28214754e3cefe99d1dd66f339a1a5770bae1ee970d5926067032061 0002-ARM-dts-n900-remove-rx51-battery.patch
93e82f7041e347b63fc32ce54176ee3fe7e8260cc793810bcf0146a3699567b63a0cb7ce8c531b0484390907a25c51bfbeb15b32dddb2220c2481ec1f86e5eb5 0003-power-supply-bq27xxx_battery-ignore-inaccurate-flag.patch
0f908677886be528213655d3f307bbf6dde53d475f59e6731ba9729b3ea653af5b3da070cedef7f80ed15f7576ea6506c54333d17e427448ac005c243d5beb9a linux-5.7.19.patch.xz
ea33adda06e1fb64b763c34f1f598bb00ccfdba5400d0996871138284b4cb8a51e021c7c0ace9d4bc16027530027fb2a443d5013c6f0b22ed3d64f36152c8854 0004-ARM-dts-omap3_n900-disable-thermal-for-now.patch
95699ddfa06c7eb59c8a55c931322ac25fa93f23886a67155e7b3db31db74be8ff2e72c304747b9a6fe3971005dc0d804daf3d1e3ce5953a9a99ada8cf703a5c 0005-ARM-dts-omap3_n900-fix-lp5523-for-multi-color.patch
066e05a285f9a93f718461cd29eb6d917ca0e7cfa532660825059142391925ab780201b99e7d1966f90b8ca092ad0722209ae8bbe260ac40fa16a76d761debfe 0006-leds-lp55xx-initialise-output-direction-from-dts.patch
acf3beef5448da7f3be19b862ac2fef65379d9f1617246baaab296083901174d891526cd9bf781162d4406089969c311701dfded04219bafd3c5c7784bc4c2e6 0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
0e2dbfa675f00ddcb72369d1aed76470ed37a0968856e00d620bdc4bc7891a1646b4f9dcf864a57c26a5b9ab6afec43c8a62ad5c7e0549aaf0e8bae2852a752b linux-5.15.12.patch.xz
"

File diff suppressed because it is too large Load diff