linux-nokia-n900: update to latest stable kernel (MR 2964)

- update to kernel 5.15.25 stable
- add TUN as module, fixes pma#1435
- drop fully-upstreamed patches (lp55xx)
- add iio support for lis302dl (will send upstream)
- update N900 dts for lis302dl over iio (will send upstream)
- assign higher priority to patches from kernel.org (resolves pmb#2107)

[ci:skip-build] already built successfully in CI
This commit is contained in:
Sicelo A. Mhlongo 2022-02-26 14:16:31 +02:00 committed by Newbyte
parent 7c8e019085
commit 18046f68f2
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
6 changed files with 175 additions and 191 deletions

View file

@ -1,132 +0,0 @@
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,69 @@
From c594376d8ace517fe54e0d14716c341d071f4423 Mon Sep 17 00:00:00 2001
From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Date: Fri, 25 Feb 2022 19:47:56 +0200
Subject: [PATCH 1/2] iio: accel: st_accel: add support for lis302dl
---
drivers/iio/accel/st_accel.h | 2 ++
drivers/iio/accel/st_accel_core.c | 1 +
drivers/iio/accel/st_accel_i2c.c | 5 +++++
3 files changed, 8 insertions(+)
diff --git a/drivers/iio/accel/st_accel.h b/drivers/iio/accel/st_accel.h
index 8750dea56fcb..15f4b7944362 100644
--- a/drivers/iio/accel/st_accel.h
+++ b/drivers/iio/accel/st_accel.h
@@ -37,6 +37,7 @@ enum st_accel_type {
LIS2DE12,
LIS2HH12,
ST_ACCEL_MAX,
+ LIS302DL,
};
#define H3LIS331DL_ACCEL_DEV_NAME "h3lis331dl_accel"
@@ -61,6 +62,7 @@ enum st_accel_type {
#define LIS3DE_ACCEL_DEV_NAME "lis3de"
#define LIS2DE12_ACCEL_DEV_NAME "lis2de12"
#define LIS2HH12_ACCEL_DEV_NAME "lis2hh12"
+#define LIS302DL_ACCEL_DEV_NAME "lis302dl"
#ifdef CONFIG_IIO_BUFFER
int st_accel_allocate_ring(struct iio_dev *indio_dev);
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 31ea19d0ba71..2a353c51c84a 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -444,6 +444,7 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
.wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
.sensors_supported = {
[0] = LIS331DL_ACCEL_DEV_NAME,
+ [1] = LIS302DL_ACCEL_DEV_NAME,
},
.ch = (struct iio_chan_spec *)st_accel_8bit_channels,
.odr = {
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c
index c0ce78eebad9..086e8af89e18 100644
--- a/drivers/iio/accel/st_accel_i2c.c
+++ b/drivers/iio/accel/st_accel_i2c.c
@@ -107,6 +107,10 @@ static const struct of_device_id st_accel_of_match[] = {
.compatible = "st,lis2hh12",
.data = LIS2HH12_ACCEL_DEV_NAME,
},
+ {
+ .compatible = "st,lis302dl",
+ .data = LIS302DL_ACCEL_DEV_NAME,
+ },
{},
};
MODULE_DEVICE_TABLE(of, st_accel_of_match);
@@ -142,6 +146,7 @@ static const struct i2c_device_id st_accel_id_table[] = {
{ LIS3DE_ACCEL_DEV_NAME },
{ LIS2DE12_ACCEL_DEV_NAME },
{ LIS2HH12_ACCEL_DEV_NAME },
+ { LIS302DL_ACCEL_DEV_NAME },
{},
};
MODULE_DEVICE_TABLE(i2c, st_accel_id_table);
--
2.35.1

View file

@ -0,0 +1,81 @@
From 238a72c97399dfb6d5b7fcb74acf619351f72bcd Mon Sep 17 00:00:00 2001
From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Date: Fri, 25 Feb 2022 22:46:23 +0200
Subject: [PATCH] ARM: dts: N900: use iio driver for accelerometer
---
arch/arm/boot/dts/omap3-n900.dts | 53 +++++---------------------------
1 file changed, 8 insertions(+), 45 deletions(-)
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index d40c3d2c4914..f53234ed9c0c 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -767,56 +767,19 @@ &i2c3 {
clock-frequency = <400000>;
- lis302dl: lis3lv02d@1d {
- compatible = "st,lis3lv02d";
+ lis302dl: lis302dl@1d {
+ compatible = "st,lis302dl";
reg = <0x1d>;
- Vdd-supply = <&vaux1>;
- Vdd_IO-supply = <&vio>;
+ vdd-supply = <&vaux1>;
+ vddio-supply = <&vio>;
interrupt-parent = <&gpio6>;
- interrupts = <21 20>; /* 181 and 180 */
+ interrupts = <21 IRQ_TYPE_EDGE_RISING>, <20 IRQ_TYPE_EDGE_RISING>; /* 181 and 180 */
- /* click flags */
- st,click-single-x;
- st,click-single-y;
- st,click-single-z;
-
- /* Limits are 0.5g * value */
- st,click-threshold-x = <8>;
- st,click-threshold-y = <8>;
- st,click-threshold-z = <10>;
-
- /* Click must be longer than time limit */
- st,click-time-limit = <9>;
-
- /* Kind of debounce filter */
- st,click-latency = <50>;
-
- /* Interrupt line 2 for click detection */
- st,irq2-click;
-
- st,wakeup-x-hi;
- st,wakeup-y-hi;
- st,wakeup-threshold = <(800/18)>; /* millig-value / 18 to get HW values */
-
- st,wakeup2-z-hi;
- st,wakeup2-threshold = <(900/18)>; /* millig-value / 18 to get HW values */
-
- st,hipass1-disable;
- st,hipass2-disable;
-
- st,axis-x = <1>; /* LIS3_DEV_X */
- st,axis-y = <(-2)>; /* LIS3_INV_DEV_Y */
- st,axis-z = <(-3)>; /* LIS3_INV_DEV_Z */
-
- st,min-limit-x = <(-32)>;
- st,min-limit-y = <3>;
- st,min-limit-z = <3>;
-
- st,max-limit-x = <(-3)>;
- st,max-limit-y = <32>;
- st,max-limit-z = <32>;
+ mount-matrix = "-1", "0", "0",
+ "0", "1", "0",
+ "0", "0", "1";
};
cam1: camera@3e {
--
2.35.1

View file

@ -1,41 +0,0 @@
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

@ -2,8 +2,8 @@
# Co-Maintainer: Danct12 <danct12@disroot.org>
pkgname=linux-nokia-n900
pkgver=5.15.13
pkgrel=2
pkgver=5.15.25
pkgrel=0
pkgdesc="Mainline kernel fork for Nokia N900"
arch="armv7"
url="https://kernel.org/"
@ -25,15 +25,16 @@ source="
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
0005-iio-accel-st-accel-add-lis302dl.patch
0006-ARM-dts-N900-use-iio-driver-for-accelerometer.patch
0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
0008-wl1251-specify-max.-IE-length.patch
0009-wip-Revert-dma-direct-Fix-potential-NULL-pointer-der.patch
"
if [ "${pkgver%.0}" = "$pkgver" ]; then
source="$source
linux-$pkgver.patch.xz::https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-$pkgver.xz"
source="
linux-$pkgver.patch.xz::https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-$pkgver.xz
$source"
fi
builddir="$srcdir/linux-$_kernver"
@ -62,16 +63,16 @@ package() {
}
sha512sums="
6fb9c2744ec9c0fee7ac6e3e83714c95f4d31ee8e31929f3f816e88dea784ba6496d0c5df069fad92ecd4222667acad361966214697a859cff469e9f86b84f0a linux-5.15.25.patch.xz
d25ad40b5bcd6a4c6042fd0fd84e196e7a58024734c3e9a484fd0d5d54a0c1d87db8a3c784eff55e43b6f021709dc685eb0efa18d2aec327e4f88a79f405705a linux-5.15.tar.xz
0dd0386f430158e60ee788598686ae5b3df26a9e6d99e21d831ff6180317c5b2697cf49370f7e8432e0750e429dd7e0f72dc45b40cfff5cfbf88fe83665b5db5 config-nokia-n900.armv7
082de68f15bdbc4f2e0897c3885b0dcb68ee2b9e1afab9567f355630cf7a62fbcc2ff806e4a7c5abfa43c1f0837e77cb59126fc137f32e8b07408d441df0de13 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
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
fc23b8ee50e387a05d820f07281a9735d3073de07c5a6a13e44da7615b0c9a8030bba80f9e63f567557f69e8d75d6d51330b3ca3a6c719275a5a5ed8223a6d2a 0005-iio-accel-st-accel-add-lis302dl.patch
302aa8e6677e7ecfae473553806cdf5d47687c4f8e73322d0ace78486f9290ba503069ed6b41250fe38802b6c6091c7c4eac06ab387e011f1316b84ad5e2641d 0006-ARM-dts-N900-use-iio-driver-for-accelerometer.patch
acf3beef5448da7f3be19b862ac2fef65379d9f1617246baaab296083901174d891526cd9bf781162d4406089969c311701dfded04219bafd3c5c7784bc4c2e6 0007-Revert-ARM-omap3-enable-off-mode-automatically.patch
acaa153809c390957ee8d80caae440a41d84c78f045268ac226f05019dbdd69959b5cf56b6bac2e2c0300bcdb68649ffb847e7a0a333408bf5b4426fc969afe8 0008-wl1251-specify-max.-IE-length.patch
f0a02313f168970499faef51207644e69ca65aa380ada055a2f5faceaa8c85f6ea0a161729637205c2bc116e1a0ac62d07c44a83c4419cfec04d4141508f7845 0009-wip-Revert-dma-direct-Fix-potential-NULL-pointer-der.patch
36f2c500b7391d1d33eaf844c1f9f63ee54ae1a5284739dc438a0758837df088226921c0b3a51a9fc29b193fafef1aa44afbb3379f8fa0f550e040507b5004b4 linux-5.15.13.patch.xz
"

View file

@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 5.15.13 Kernel Configuration
# Linux/arm 5.15.25 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="armv7-alpine-linux-musleabihf-gcc (Alpine 11.2.1_git20220106) 11.2.1 20220106"
CONFIG_CC_VERSION_TEXT="armv7-alpine-linux-musleabihf-gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110201
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23700
CONFIG_AS_VERSION=23800
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=23700
CONFIG_LD_VERSION=23800
CONFIG_LLD_VERSION=0
CONFIG_CC_HAS_ASM_GOTO=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
@ -1668,7 +1668,6 @@ CONFIG_BLK_DEV_RAM_SIZE=16384
#
# Misc devices
#
CONFIG_SENSORS_LIS3LV02D=m
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_ICS932S401 is not set
@ -1708,7 +1707,7 @@ CONFIG_EEPROM_93CX6=y
# end of Texas Instruments shared transport line discipline
# CONFIG_SENSORS_LIS3_SPI is not set
CONFIG_SENSORS_LIS3_I2C=m
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_ALTERA_STAPL is not set
# CONFIG_ECHO is not set
# CONFIG_MISC_RTSX_USB is not set
@ -1770,7 +1769,7 @@ CONFIG_WIREGUARD=m
# CONFIG_GTP is not set
# CONFIG_MACSEC is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_TUN is not set
CONFIG_TUN=m
# CONFIG_TUN_VNET_CROSS_LE is not set
# CONFIG_VETH is not set
# CONFIG_VIRTIO_NET is not set
@ -3602,6 +3601,7 @@ CONFIG_HDMI=y
#
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
@ -4703,7 +4703,9 @@ CONFIG_IIO_SW_TRIGGER=m
# CONFIG_DMARD10 is not set
# CONFIG_FXLS8962AF_I2C is not set
# CONFIG_FXLS8962AF_SPI is not set
# CONFIG_IIO_ST_ACCEL_3AXIS is not set
CONFIG_IIO_ST_ACCEL_3AXIS=m
CONFIG_IIO_ST_ACCEL_I2C_3AXIS=m
CONFIG_IIO_ST_ACCEL_SPI_3AXIS=m
# CONFIG_KXSD9 is not set
# CONFIG_KXCJK1013 is not set
# CONFIG_MC3230 is not set
@ -4837,6 +4839,10 @@ CONFIG_TWL4030_MADC=m
# CONFIG_IIO_SSP_SENSORHUB is not set
# end of SSP Sensor Common
CONFIG_IIO_ST_SENSORS_I2C=m
CONFIG_IIO_ST_SENSORS_SPI=m
CONFIG_IIO_ST_SENSORS_CORE=m
#
# Digital to analog converters
#