testing/linux-nokia-n900: new aport (!1073)
This commit is contained in:
parent
0e5ba649a5
commit
57556f30da
5 changed files with 6036 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
From fbc4ce7a84e59215914a8981afe918002b191493 Mon Sep 17 00:00:00 2001
|
||||
From: Arthur Demchenkov <spinal.by@gmail.com>
|
||||
Date: Fri, 21 Dec 2018 09:23:57 +0300
|
||||
Subject: [PATCH] ARM: dts: n900: increase charge current limit to 950mA
|
||||
|
||||
That was default in Maemo Fremantle
|
||||
---
|
||||
arch/arm/boot/dts/omap3-n900.dts | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
|
||||
index de7a31ae72207..7028a7cb2849e 100644
|
||||
--- a/arch/arm/boot/dts/omap3-n900.dts
|
||||
+++ b/arch/arm/boot/dts/omap3-n900.dts
|
||||
@@ -700,7 +700,7 @@
|
||||
ti,current-limit = <100>;
|
||||
ti,weak-battery-voltage = <3400>;
|
||||
ti,battery-regulation-voltage = <4200>;
|
||||
- ti,charge-current = <650>;
|
||||
+ ti,charge-current = <950>;
|
||||
ti,termination-current = <100>;
|
||||
ti,resistor-sense = <68>;
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
From 35e9c94fb265213848d4cd2b0d062dec62cdfb0a Mon Sep 17 00:00:00 2001
|
||||
From: Arthur Demchenkov <spinal.by@gmail.com>
|
||||
Date: Fri, 14 Dec 2018 16:36:04 +0300
|
||||
Subject: [PATCH] ARM: dts: n900: remove rx51-battery
|
||||
|
||||
N900 has bq27200 chip, which provides much better
|
||||
functionality when exposing battery properties.
|
||||
|
||||
No need to confuse userspace with two battery devices
|
||||
exposed by the kernel at the same time.
|
||||
---
|
||||
arch/arm/boot/dts/omap3-n900.dts | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
|
||||
index 826920e6b8787..de7a31ae72207 100644
|
||||
--- a/arch/arm/boot/dts/omap3-n900.dts
|
||||
+++ b/arch/arm/boot/dts/omap3-n900.dts
|
||||
@@ -137,12 +137,6 @@
|
||||
speaker-amplifier-gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
- battery: n900-battery {
|
||||
- compatible = "nokia,n900-battery";
|
||||
- io-channels = <&twl_madc 0>, <&twl_madc 4>, <&twl_madc 12>;
|
||||
- io-channel-names = "temp", "bsi", "vbat";
|
||||
- };
|
||||
-
|
||||
pwm9: dmtimer-pwm {
|
||||
compatible = "ti,omap-dmtimer-pwm";
|
||||
#pwm-cells = <3>;
|
|
@ -0,0 +1,27 @@
|
|||
diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c
|
||||
index 195c18c2f..be33a32cb 100644
|
||||
--- a/drivers/power/supply/bq27xxx_battery.c
|
||||
+++ b/drivers/power/supply/bq27xxx_battery.c
|
||||
@@ -1377,11 +1377,11 @@ static inline int bq27xxx_battery_read_nac(struct bq27xxx_device_info *di)
|
||||
{
|
||||
int flags;
|
||||
|
||||
- if (di->opts & BQ27XXX_O_ZERO) {
|
||||
+ /*if (di->opts & BQ27XXX_O_ZERO) {
|
||||
flags = bq27xxx_read(di, BQ27XXX_REG_FLAGS, true);
|
||||
if (flags >= 0 && (flags & BQ27000_FLAG_CI))
|
||||
return -ENODATA;
|
||||
- }
|
||||
+ }*/
|
||||
|
||||
return bq27xxx_battery_read_charge(di, BQ27XXX_REG_NAC);
|
||||
}
|
||||
@@ -1579,7 +1579,7 @@ void bq27xxx_battery_update(struct bq27xxx_device_info *di)
|
||||
cache.flags = -1; /* read error */
|
||||
if (cache.flags >= 0) {
|
||||
cache.temperature = bq27xxx_battery_read_temperature(di);
|
||||
- if (has_ci_flag && (cache.flags & BQ27000_FLAG_CI)) {
|
||||
+ if (false && has_ci_flag && (cache.flags & BQ27000_FLAG_CI)) {
|
||||
dev_info_once(di->dev, "battery is not calibrated! ignoring capacity values\n");
|
||||
cache.capacity = -ENODATA;
|
||||
cache.energy = -ENODATA;
|
66
device/testing/linux-nokia-n900/APKBUILD
Normal file
66
device/testing/linux-nokia-n900/APKBUILD
Normal file
|
@ -0,0 +1,66 @@
|
|||
# Contributor: Daniele Debernardi <drebrez@gmail.com>
|
||||
# Maintainer: Daniele Debernardi <drebrez@gmail.com>
|
||||
|
||||
pkgname=linux-nokia-n900
|
||||
pkgver=5.3.2
|
||||
pkgrel=2
|
||||
pkgdesc="Mainline kernel fork for Nokia N900"
|
||||
arch="armv7"
|
||||
url="https://kernel.org/"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps"
|
||||
makedepends="bison findutils flex installkernel openssl-dev perl"
|
||||
|
||||
_carch="arm"
|
||||
_flavor=nokia-n900
|
||||
_config="config-$_flavor.armv7"
|
||||
case $pkgver in
|
||||
*.*.*) _kernver=${pkgver%.*};;
|
||||
*.*) _kernver=$pkgver;;
|
||||
esac
|
||||
source="
|
||||
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/linux-$_kernver.tar.xz
|
||||
$_config
|
||||
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
|
||||
"
|
||||
if [ "${pkgver%.0}" = "$pkgver" ]; then
|
||||
source="$source
|
||||
https://cdn.kernel.org/pub/linux/kernel/v${pkgver%%.*}.x/patch-$pkgver.xz"
|
||||
fi
|
||||
builddir="$srcdir/linux-$_kernver"
|
||||
|
||||
prepare() {
|
||||
if [ "$_kernver" != "$pkgver" ]; then
|
||||
msg "Applying patch-$pkgver.xz"
|
||||
unxz -c < "$srcdir"/patch-$pkgver.xz | patch -p1 -N
|
||||
fi
|
||||
default_prepare
|
||||
cp -v "$srcdir"/$_config .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/boot
|
||||
make zinstall modules_install dtbs_install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_PATH="$pkgdir"/boot \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
||||
|
||||
install -D "$builddir"/include/config/kernel.release \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
}
|
||||
|
||||
sha512sums="6b5edef47c319a3fa7f6c20a3e0903a5acd89ec75e32dc5f99adcb60c9fe118ea312722d9c3d27e2e3900afa2455afb86e83a8b6bb131009bc79ddbe6fb0595d linux-5.3.tar.xz
|
||||
1bb77dba5753194437fae7304a8304d4f4f0a2e4c5bf9c8c410ee07486e7eccff44ffbd3fd81e937bf32a2c5ead766f0606203addc8a024cbf6b471040c3d051 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
|
||||
cca336961620cc8aea700bf22d4d788f514177c37fb2a660478b731cf2f01d4e63bfa0951aae39b7dfa722966a1692bc237eda1951e4fe1da3f597aa68b56ebe 0003-power-supply-bq27xxx_battery-ignore-inaccurate-flag.patch
|
||||
3528b4355ebbf1a1cbc4ac7efd7cdd5b5dddb28c30e182e8c0f3119c61a97d6bc1fb07ec8f2cf0a78067b098c27535bc006485428c76d6c8fb653f215218dff3 patch-5.3.2.xz"
|
5889
device/testing/linux-nokia-n900/config-nokia-n900.armv7
Normal file
5889
device/testing/linux-nokia-n900/config-nokia-n900.armv7
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue