remarkable-zero-gravitas: new device
This commit is contained in:
parent
890256c201
commit
bb537ff677
24 changed files with 6048 additions and 0 deletions
31
device/testing/device-remarkable-zero-gravitas/APKBUILD
Normal file
31
device/testing/device-remarkable-zero-gravitas/APKBUILD
Normal file
|
@ -0,0 +1,31 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-remarkable-zero-gravitas
|
||||
pkgdesc="remarkable reMarkable 1"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-remarkable-zero-gravitas
|
||||
postmarketos-base
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
modules-initfs
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a334eee970ae609a535bb31e730ee042278eb7275be0b42c200001e77d53dbb0c63a6657b714e69e3edadf96ccb11c8e4a839450b5cfa3125d9bce6cba0db91d deviceinfo
|
||||
e70bae17df23dcaaaea0e2d3616556f04baa23f8ee1357785c0f539bf97282d8ddff53953e155b72689bb73beb38c2da3d08de2a61e866684edfa10a6593885d modules-initfs
|
||||
"
|
20
device/testing/device-remarkable-zero-gravitas/deviceinfo
Normal file
20
device/testing/device-remarkable-zero-gravitas/deviceinfo
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="remarkable reMarkable 1"
|
||||
deviceinfo_manufacturer="remarkable"
|
||||
deviceinfo_codename="remarkable-zero-gravitas"
|
||||
deviceinfo_year="2017"
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_arch="armv7"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="tablet"
|
||||
deviceinfo_keyboard="false"
|
||||
deviceinfo_external_storage="false"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="uuu"
|
||||
deviceinfo_generate_legacy_uboot_initfs="true"
|
|
@ -0,0 +1,23 @@
|
|||
uuu_version 1.0.1
|
||||
|
||||
# Note: This script is meant to be used by uuu running in the native chroot, so
|
||||
# all paths are relative to the native chroot and not to the device rootfs
|
||||
# chroot.
|
||||
|
||||
SDP: boot -f /mnt/rootfs_purism-librem5dev/usr/share/u-boot/librem5/devkit-boot.img
|
||||
|
||||
SDPU: delay 1000
|
||||
SDPU: write -f /mnt/rootfs_purism-librem5dev/usr/share/u-boot/librem5/devkit-boot.img -offset 0x57c00
|
||||
SDPU: jump
|
||||
|
||||
SDPV: delay 1000
|
||||
SDPV: write -f /mnt/rootfs_purism-librem5dev/usr/share/u-boot/librem5/devkit-boot.img -skipspl
|
||||
SDPV: jump
|
||||
|
||||
SDPS: boot -f /mnt/rootfs_purism-librem5dev/usr/share/u-boot/librem5/devkit-boot.img
|
||||
|
||||
FB: ucmd mmc dev 0
|
||||
FB: ucmd setenv fastboot_dev mmc
|
||||
FB: ucmd setenv mmcdev 0
|
||||
FB: flash -raw2sparse all /home/pmos/rootfs/purism-librem5dev.img
|
||||
FB: Done
|
|
@ -0,0 +1,9 @@
|
|||
# Remove this file if unnecessary (CHANGEME!)
|
||||
# This file shall contain a list of modules to be included in the initramfs,
|
||||
# so that they are available in early boot stages. In general, it should
|
||||
# include modules to support unlocking FDE (touchscreen, panel, etc),
|
||||
# USB networking, and telnet in the debug-shell.
|
||||
# The format is one module name per line. Lines starting with the character
|
||||
# '#', and empty lines are ignored. If there are multiple kernel variants
|
||||
# with different initramfs module requirements, one modules-initfs.$variant
|
||||
# file should be created for each of them.
|
18
device/testing/firmware-remarkable-zero-gravitas/APKBUILD
Normal file
18
device/testing/firmware-remarkable-zero-gravitas/APKBUILD
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=firmware-remarkable-zero-gravitas
|
||||
pkgver=0
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for reMarkable rM1 (remarkable-zero-gravitas)"
|
||||
url="https://github.com/ichaozi/RemarkableFramebuffer"
|
||||
arch="armv7"
|
||||
license="custom:proprietary"
|
||||
options="!check !strip !archcheck !spdx !tracedeps pmb:cross-native"
|
||||
source="https://raw.githubusercontent.com/ichaozi/RemarkableFramebuffer/0f37dc8c06d340dc1af52ff2d4d6d5789ccf14bb/kernel-mxc-epdc-fb-reference/epdc_ES103CS1.fw"
|
||||
|
||||
package() {
|
||||
install -vDm644 "$srcdir"/epdc_ES103CS1.fw "$pkgdir"/lib/firmware/imx/epdc/epdc_ES103CS1.fw
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ad4bd6f332319aceee7a1c7b71b49439e8217621214b6249c7e20198360d02ea442f31edfc8e1af1b85ed71e6f97c1cb7decf7b0885c9d0293361eef47f218b2 epdc_ES103CS1.fw
|
||||
"
|
86
device/testing/linux-remarkable-zero-gravitas/APKBUILD
Normal file
86
device/testing/linux-remarkable-zero-gravitas/APKBUILD
Normal file
|
@ -0,0 +1,86 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/(CHANGEME!)
|
||||
|
||||
pkgname=linux-remarkable-zero-gravitas
|
||||
pkgver=5.4.70
|
||||
_rmver=1.3.4
|
||||
pkgrel=0
|
||||
pkgdesc="remarkable reMarkable 1 kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="remarkable-zero-gravitas"
|
||||
_abi_release=$pkgver
|
||||
url="https://github.com/reMarkable/linux"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
devicepkg-dev
|
||||
findutils
|
||||
flex
|
||||
openssl-dev
|
||||
lzop
|
||||
perl
|
||||
rsync
|
||||
"
|
||||
|
||||
# Source
|
||||
_commit="RM1XX_${pkgver}_v$_rmver"
|
||||
_config="config-$_flavor.$arch"
|
||||
source="
|
||||
https://github.com/reMarkable/linux/archive/refs/tags/RM1XX_${pkgver}_v$_rmver.tar.gz
|
||||
linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
|
||||
brcmfmac-disable-power-management.patch
|
||||
brcmfmac-fix-suspend-resume-when-power-is-cut-off.patch
|
||||
enable-automatic-partial-refreshing.patch
|
||||
$_config
|
||||
"
|
||||
subpackages="$pkgname-dev"
|
||||
builddir="$srcdir"/linux-RM1XX_${pkgver}_v$_rmver
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
REPLACE_GCCH=0 . downstreamkernel_prepare
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" KLZOP="/usr/bin/lzop" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" \
|
||||
"$_flavor" "$_outdir"
|
||||
}
|
||||
|
||||
dev() {
|
||||
pkgdesc="Headers and script for third party modules for $pkgname kernel"
|
||||
depends="gmp-dev bash perl"
|
||||
cd "$builddir"
|
||||
|
||||
local dir="$subpkgdir"/usr/src/linux-headers-$_abi_release
|
||||
mkdir -p "$dir"
|
||||
make -j1 headers_install ARCH="$_carch" INSTALL_HDR_PATH="$dir"
|
||||
|
||||
mkdir -p "$subpkgdir"/lib/modules/$_abi_release
|
||||
|
||||
install -Dm644 "$builddir"/$_outdir/Module.symvers \
|
||||
"$subpkgdir"/lib/modules/$_abi_release/Module.symvers
|
||||
|
||||
ln -sf /usr/src/linux-headers-$_abi_release \
|
||||
"$subpkgdir"/lib/modules/$_abi_release/build
|
||||
}
|
||||
|
||||
|
||||
sha512sums="
|
||||
0409c8443f5a705e8254858f966eed571b935f1be952f64c1d74b52a043d0638ba358370ca20f665d69b70aabe06f03e0bfa02ccd1a4a2a174d5b9579a10b44e RM1XX_5.4.70_v1.3.4.tar.gz
|
||||
ee80928d83189a6b71f853c97551326e3ac74167dee3bda0ae85a034278ca69403bbfbbd9dfaf9f77426e46d7260e4fda8e8900649f1b6355bac62a8cda83776 linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
|
||||
c5fc4f2f70112cc66a91a2948f7fd4adcd7172a95191b4c862084c7b80093cfa696925aa9a825c41bddac7441ba153eb264b8146e52a4556a73349e6fd10e641 brcmfmac-disable-power-management.patch
|
||||
27ec1bc1d916dbd2258192c1ed864eacbd2746b49caa554fbaf1124bac478bab0b729e7fabbab8705ae175bb098800f795d415f4de4964da921c1b802560b67a brcmfmac-fix-suspend-resume-when-power-is-cut-off.patch
|
||||
0f47278c5bfafb939e46224fbf16f9491e3cc560ac128dcf430a1f6cf9064fb1c5bf5db1a3076c35d30c004aec525a7d6616a647564f197bb29c57701c1db982 enable-automatic-partial-refreshing.patch
|
||||
d9d928409229f005116d8040f4f42673293c09310ab2d38c51f9d1705cbc56bada8ea855dee74f7ab64d4ce0a8bbc08dd44d9e1c8a677de949a90522cc7639ee config-remarkable-zero-gravitas.armv7
|
||||
"
|
|
@ -0,0 +1,428 @@
|
|||
From 790756c7e0229dedc83bf058ac69633045b1000e Mon Sep 17 00:00:00 2001
|
||||
From: Nick Desaulniers <ndesaulniers@google.com>
|
||||
Date: Mon, 4 Nov 2019 19:31:45 +0100
|
||||
Subject: [PATCH] ARM: 8933/1: replace Sun/Solaris style flag on section
|
||||
directive
|
||||
|
||||
It looks like a section directive was using "Solaris style" to declare
|
||||
the section flags. Replace this with the GNU style so that Clang's
|
||||
integrated assembler can assemble this directive.
|
||||
|
||||
The modified instances were identified via:
|
||||
$ ag \.section | grep #
|
||||
|
||||
Link: https://ftp.gnu.org/old-gnu/Manuals/gas-2.9.1/html_chapter/as_7.html#SEC119
|
||||
Link: https://github.com/ClangBuiltLinux/linux/issues/744
|
||||
Link: https://bugs.llvm.org/show_bug.cgi?id=43759
|
||||
Link: https://reviews.llvm.org/D69296
|
||||
|
||||
Acked-by: Nicolas Pitre <nico@fluxnic.net>
|
||||
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
||||
Reviewed-by: Stefan Agner <stefan@agner.ch>
|
||||
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
|
||||
Suggested-by: Fangrui Song <maskray@google.com>
|
||||
Suggested-by: Jian Cai <jiancai@google.com>
|
||||
Suggested-by: Peter Smith <peter.smith@linaro.org>
|
||||
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
arch/arm/boot/bootp/init.S | 2 +-
|
||||
arch/arm/boot/compressed/big-endian.S | 2 +-
|
||||
arch/arm/boot/compressed/head.S | 2 +-
|
||||
arch/arm/boot/compressed/piggy.S | 2 +-
|
||||
arch/arm/mm/proc-arm1020.S | 2 +-
|
||||
arch/arm/mm/proc-arm1020e.S | 2 +-
|
||||
arch/arm/mm/proc-arm1022.S | 2 +-
|
||||
arch/arm/mm/proc-arm1026.S | 2 +-
|
||||
arch/arm/mm/proc-arm720.S | 2 +-
|
||||
arch/arm/mm/proc-arm740.S | 2 +-
|
||||
arch/arm/mm/proc-arm7tdmi.S | 2 +-
|
||||
arch/arm/mm/proc-arm920.S | 2 +-
|
||||
arch/arm/mm/proc-arm922.S | 2 +-
|
||||
arch/arm/mm/proc-arm925.S | 2 +-
|
||||
arch/arm/mm/proc-arm926.S | 2 +-
|
||||
arch/arm/mm/proc-arm940.S | 2 +-
|
||||
arch/arm/mm/proc-arm946.S | 2 +-
|
||||
arch/arm/mm/proc-arm9tdmi.S | 2 +-
|
||||
arch/arm/mm/proc-fa526.S | 2 +-
|
||||
arch/arm/mm/proc-feroceon.S | 2 +-
|
||||
arch/arm/mm/proc-mohawk.S | 2 +-
|
||||
arch/arm/mm/proc-sa110.S | 2 +-
|
||||
arch/arm/mm/proc-sa1100.S | 2 +-
|
||||
arch/arm/mm/proc-v6.S | 2 +-
|
||||
arch/arm/mm/proc-v7.S | 2 +-
|
||||
arch/arm/mm/proc-v7m.S | 4 ++--
|
||||
arch/arm/mm/proc-xsc3.S | 2 +-
|
||||
arch/arm/mm/proc-xscale.S | 2 +-
|
||||
28 files changed, 29 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/boot/bootp/init.S b/arch/arm/boot/bootp/init.S
|
||||
index 5c476bd2b4ce9c..b562da2f704088 100644
|
||||
--- a/arch/arm/boot/bootp/init.S
|
||||
+++ b/arch/arm/boot/bootp/init.S
|
||||
@@ -13,7 +13,7 @@
|
||||
* size immediately following the kernel, we could build this into
|
||||
* a binary blob, and concatenate the zImage using the cat command.
|
||||
*/
|
||||
- .section .start,#alloc,#execinstr
|
||||
+ .section .start, "ax"
|
||||
.type _start, #function
|
||||
.globl _start
|
||||
|
||||
diff --git a/arch/arm/boot/compressed/big-endian.S b/arch/arm/boot/compressed/big-endian.S
|
||||
index 88e2a88d324b25..0e092c36da2f27 100644
|
||||
--- a/arch/arm/boot/compressed/big-endian.S
|
||||
+++ b/arch/arm/boot/compressed/big-endian.S
|
||||
@@ -6,7 +6,7 @@
|
||||
* Author: Nicolas Pitre
|
||||
*/
|
||||
|
||||
- .section ".start", #alloc, #execinstr
|
||||
+ .section ".start", "ax"
|
||||
|
||||
mrc p15, 0, r0, c1, c0, 0 @ read control reg
|
||||
orr r0, r0, #(1 << 7) @ enable big endian mode
|
||||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
|
||||
index ae70754d003daa..ead21e5f2b8032 100644
|
||||
--- a/arch/arm/boot/compressed/head.S
|
||||
+++ b/arch/arm/boot/compressed/head.S
|
||||
@@ -140,7 +140,7 @@
|
||||
#endif
|
||||
.endm
|
||||
|
||||
- .section ".start", #alloc, #execinstr
|
||||
+ .section ".start", "ax"
|
||||
/*
|
||||
* sort out different calling conventions
|
||||
*/
|
||||
diff --git a/arch/arm/boot/compressed/piggy.S b/arch/arm/boot/compressed/piggy.S
|
||||
index 0284f84dcf3804..27577644ee721a 100644
|
||||
--- a/arch/arm/boot/compressed/piggy.S
|
||||
+++ b/arch/arm/boot/compressed/piggy.S
|
||||
@@ -1,5 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
- .section .piggydata,#alloc
|
||||
+ .section .piggydata, "a"
|
||||
.globl input_data
|
||||
input_data:
|
||||
.incbin "arch/arm/boot/compressed/piggy_data"
|
||||
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
|
||||
index 4fa5371bc6624c..2785da387c9104 100644
|
||||
--- a/arch/arm/mm/proc-arm1020.S
|
||||
+++ b/arch/arm/mm/proc-arm1020.S
|
||||
@@ -491,7 +491,7 @@ cpu_arm1020_name:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm1020_proc_info,#object
|
||||
__arm1020_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
|
||||
index 5d8a8339e09a4e..e9ea237ed78525 100644
|
||||
--- a/arch/arm/mm/proc-arm1020e.S
|
||||
+++ b/arch/arm/mm/proc-arm1020e.S
|
||||
@@ -449,7 +449,7 @@ arm1020e_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm1020e_proc_info,#object
|
||||
__arm1020e_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S
|
||||
index b3dd95c345e482..920c279e7879d8 100644
|
||||
--- a/arch/arm/mm/proc-arm1022.S
|
||||
+++ b/arch/arm/mm/proc-arm1022.S
|
||||
@@ -443,7 +443,7 @@ arm1022_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm1022_proc_info,#object
|
||||
__arm1022_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S
|
||||
index e927187157d7d5..0bdf25a95b107d 100644
|
||||
--- a/arch/arm/mm/proc-arm1026.S
|
||||
+++ b/arch/arm/mm/proc-arm1026.S
|
||||
@@ -437,7 +437,7 @@ arm1026_crval:
|
||||
string cpu_arm1026_name, "ARM1026EJ-S"
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm1026_proc_info,#object
|
||||
__arm1026_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
|
||||
index c99d24363f32ee..39361e196d61b8 100644
|
||||
--- a/arch/arm/mm/proc-arm720.S
|
||||
+++ b/arch/arm/mm/proc-arm720.S
|
||||
@@ -172,7 +172,7 @@ arm720_crval:
|
||||
* See <asm/procinfo.h> for a definition of this structure.
|
||||
*/
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro arm720_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cpu_flush:req
|
||||
.type __\name\()_proc_info,#object
|
||||
diff --git a/arch/arm/mm/proc-arm740.S b/arch/arm/mm/proc-arm740.S
|
||||
index 1b4a3838393fbd..1a94bbf6e53fc2 100644
|
||||
--- a/arch/arm/mm/proc-arm740.S
|
||||
+++ b/arch/arm/mm/proc-arm740.S
|
||||
@@ -128,7 +128,7 @@ __arm740_setup:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
.type __arm740_proc_info,#object
|
||||
__arm740_proc_info:
|
||||
.long 0x41807400
|
||||
diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S
|
||||
index 17a4687065c7f9..52b66cf0259e3f 100644
|
||||
--- a/arch/arm/mm/proc-arm7tdmi.S
|
||||
+++ b/arch/arm/mm/proc-arm7tdmi.S
|
||||
@@ -72,7 +72,7 @@ __arm7tdmi_setup:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro arm7tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, \
|
||||
extra_hwcaps=0
|
||||
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
|
||||
index 298c76b47749f9..31ac8acc34dc55 100644
|
||||
--- a/arch/arm/mm/proc-arm920.S
|
||||
+++ b/arch/arm/mm/proc-arm920.S
|
||||
@@ -434,7 +434,7 @@ arm920_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm920_proc_info,#object
|
||||
__arm920_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
|
||||
index 824be3a0bc2382..ca2c7ca8af2146 100644
|
||||
--- a/arch/arm/mm/proc-arm922.S
|
||||
+++ b/arch/arm/mm/proc-arm922.S
|
||||
@@ -412,7 +412,7 @@ arm922_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm922_proc_info,#object
|
||||
__arm922_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
|
||||
index d40cff8f102c2b..a381a0c9f1092e 100644
|
||||
--- a/arch/arm/mm/proc-arm925.S
|
||||
+++ b/arch/arm/mm/proc-arm925.S
|
||||
@@ -477,7 +477,7 @@ arm925_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro arm925_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache
|
||||
.type __\name\()_proc_info,#object
|
||||
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
|
||||
index 4ef89e1d11276e..1ba253c2bce190 100644
|
||||
--- a/arch/arm/mm/proc-arm926.S
|
||||
+++ b/arch/arm/mm/proc-arm926.S
|
||||
@@ -460,7 +460,7 @@ arm926_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm926_proc_info,#object
|
||||
__arm926_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm940.S b/arch/arm/mm/proc-arm940.S
|
||||
index 1c26d991386d7d..4b8a00220cc976 100644
|
||||
--- a/arch/arm/mm/proc-arm940.S
|
||||
+++ b/arch/arm/mm/proc-arm940.S
|
||||
@@ -340,7 +340,7 @@ __arm940_setup:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __arm940_proc_info,#object
|
||||
__arm940_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-arm946.S b/arch/arm/mm/proc-arm946.S
|
||||
index 2dc1c75a4fd4a8..555becf9c758d1 100644
|
||||
--- a/arch/arm/mm/proc-arm946.S
|
||||
+++ b/arch/arm/mm/proc-arm946.S
|
||||
@@ -395,7 +395,7 @@ __arm946_setup:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
.type __arm946_proc_info,#object
|
||||
__arm946_proc_info:
|
||||
.long 0x41009460
|
||||
diff --git a/arch/arm/mm/proc-arm9tdmi.S b/arch/arm/mm/proc-arm9tdmi.S
|
||||
index 913c06e590af51..ef517530130b03 100644
|
||||
--- a/arch/arm/mm/proc-arm9tdmi.S
|
||||
+++ b/arch/arm/mm/proc-arm9tdmi.S
|
||||
@@ -66,7 +66,7 @@ __arm9tdmi_setup:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro arm9tdmi_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
|
||||
.type __\name\()_proc_info, #object
|
||||
diff --git a/arch/arm/mm/proc-fa526.S b/arch/arm/mm/proc-fa526.S
|
||||
index 8120b6f4dbb83e..dddf833fe00078 100644
|
||||
--- a/arch/arm/mm/proc-fa526.S
|
||||
+++ b/arch/arm/mm/proc-fa526.S
|
||||
@@ -185,7 +185,7 @@ fa526_cr1_set:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __fa526_proc_info,#object
|
||||
__fa526_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-feroceon.S b/arch/arm/mm/proc-feroceon.S
|
||||
index bb6dc34d42a374..b12b76bc8d30ca 100644
|
||||
--- a/arch/arm/mm/proc-feroceon.S
|
||||
+++ b/arch/arm/mm/proc-feroceon.S
|
||||
@@ -571,7 +571,7 @@ feroceon_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro feroceon_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache:req
|
||||
.type __\name\()_proc_info,#object
|
||||
diff --git a/arch/arm/mm/proc-mohawk.S b/arch/arm/mm/proc-mohawk.S
|
||||
index f083085788857b..d47d6c5cee63a6 100644
|
||||
--- a/arch/arm/mm/proc-mohawk.S
|
||||
+++ b/arch/arm/mm/proc-mohawk.S
|
||||
@@ -416,7 +416,7 @@ mohawk_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __88sv331x_proc_info,#object
|
||||
__88sv331x_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
|
||||
index d5bc5d70256399..baba503ba81669 100644
|
||||
--- a/arch/arm/mm/proc-sa110.S
|
||||
+++ b/arch/arm/mm/proc-sa110.S
|
||||
@@ -196,7 +196,7 @@ sa110_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.type __sa110_proc_info,#object
|
||||
__sa110_proc_info:
|
||||
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
|
||||
index be7b611c76c76a..75ebacc8e4e5cb 100644
|
||||
--- a/arch/arm/mm/proc-sa1100.S
|
||||
+++ b/arch/arm/mm/proc-sa1100.S
|
||||
@@ -239,7 +239,7 @@ sa1100_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro sa1100_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req
|
||||
.type __\name\()_proc_info,#object
|
||||
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
|
||||
index c1c85eb3484f31..1dd0d5ca27da8f 100644
|
||||
--- a/arch/arm/mm/proc-v6.S
|
||||
+++ b/arch/arm/mm/proc-v6.S
|
||||
@@ -261,7 +261,7 @@ v6_crval:
|
||||
string cpu_elf_name, "v6"
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
/*
|
||||
* Match any ARMv6 processor core.
|
||||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
|
||||
index c4e8006a1a8cdd..48e0ef6f0dccfe 100644
|
||||
--- a/arch/arm/mm/proc-v7.S
|
||||
+++ b/arch/arm/mm/proc-v7.S
|
||||
@@ -644,7 +644,7 @@ __v7_setup_stack:
|
||||
string cpu_elf_name, "v7"
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
/*
|
||||
* Standard v7 proc info content
|
||||
diff --git a/arch/arm/mm/proc-v7m.S b/arch/arm/mm/proc-v7m.S
|
||||
index 1a49d503eafc80..84459c1d31b87f 100644
|
||||
--- a/arch/arm/mm/proc-v7m.S
|
||||
+++ b/arch/arm/mm/proc-v7m.S
|
||||
@@ -93,7 +93,7 @@ ENTRY(cpu_cm7_proc_fin)
|
||||
ret lr
|
||||
ENDPROC(cpu_cm7_proc_fin)
|
||||
|
||||
- .section ".init.text", #alloc, #execinstr
|
||||
+ .section ".init.text", "ax"
|
||||
|
||||
__v7m_cm7_setup:
|
||||
mov r8, #(V7M_SCB_CCR_DC | V7M_SCB_CCR_IC| V7M_SCB_CCR_BP)
|
||||
@@ -177,7 +177,7 @@ ENDPROC(__v7m_setup)
|
||||
string cpu_elf_name "v7m"
|
||||
string cpu_v7m_name "ARMv7-M"
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro __v7m_proc name, initfunc, cache_fns = nop_cache_fns, hwcaps = 0, proc_fns = v7m_processor_functions
|
||||
.long 0 /* proc_info_list.__cpu_mm_mmu_flags */
|
||||
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
|
||||
index 1ac0fbbe9f127f..42eaecc43cfeff 100644
|
||||
--- a/arch/arm/mm/proc-xsc3.S
|
||||
+++ b/arch/arm/mm/proc-xsc3.S
|
||||
@@ -496,7 +496,7 @@ xsc3_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro xsc3_proc_info name:req, cpu_val:req, cpu_mask:req
|
||||
.type __\name\()_proc_info,#object
|
||||
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
|
||||
index bdb2b7749b0393..18ac5a1f892258 100644
|
||||
--- a/arch/arm/mm/proc-xscale.S
|
||||
+++ b/arch/arm/mm/proc-xscale.S
|
||||
@@ -610,7 +610,7 @@ xscale_crval:
|
||||
|
||||
.align
|
||||
|
||||
- .section ".proc.info.init", #alloc
|
||||
+ .section ".proc.info.init", "a"
|
||||
|
||||
.macro xscale_proc_info name:req, cpu_val:req, cpu_mask:req, cpu_name:req, cache
|
||||
.type __\name\()_proc_info,#object
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/./drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c.orig b/./drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
index f507d82..6c06044 100644
|
||||
--- a/./drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c.orig
|
||||
+++ b/./drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
|
||||
@@ -2743,6 +2743,8 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
|
||||
* preference in cfg struct to apply this to
|
||||
* FW later while initializing the dongle
|
||||
*/
|
||||
+ pr_info("power management disabled\n");
|
||||
+ enabled = false;
|
||||
cfg->pwr_save = enabled;
|
||||
if (!check_vif_up(ifp->vif)) {
|
||||
|
|
@ -0,0 +1,221 @@
|
|||
From patchwork Wed Sep 25 13:44:57 2019
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
X-Patchwork-Id: 11160709
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <SRS0=Sl5Z=XU=vger.kernel.org=linux-wireless-owner@kernel.org>
|
||||
Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org
|
||||
[172.30.200.123])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6264924
|
||||
for <patchwork-linux-wireless@patchwork.kernel.org>;
|
||||
Wed, 25 Sep 2019 13:45:07 +0000 (UTC)
|
||||
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
|
||||
by mail.kernel.org (Postfix) with ESMTP id CEE8421D7E
|
||||
for <patchwork-linux-wireless@patchwork.kernel.org>;
|
||||
Wed, 25 Sep 2019 13:45:07 +0000 (UTC)
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S2406776AbfIYNo5 (ORCPT
|
||||
<rfc822;patchwork-linux-wireless@patchwork.kernel.org>);
|
||||
Wed, 25 Sep 2019 09:44:57 -0400
|
||||
Received: from bhuna.collabora.co.uk ([46.235.227.227]:57998 "EHLO
|
||||
bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||
with ESMTP id S2406646AbfIYNo5 (ORCPT
|
||||
<rfc822;linux-wireless@vger.kernel.org>);
|
||||
Wed, 25 Sep 2019 09:44:57 -0400
|
||||
Received: from [127.0.0.1] (localhost [127.0.0.1])
|
||||
(Authenticated sender: aratiu)
|
||||
with ESMTPSA id 34818280400
|
||||
From: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
To: brcm80211-dev-list.pdl@broadcom.com
|
||||
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org,
|
||||
Martyn Welch <martyn.welch@collabora.com>
|
||||
Subject: [PATCH 1/2] brcmfmac: don't WARN when there are no requests
|
||||
Date: Wed, 25 Sep 2019 16:44:57 +0300
|
||||
Message-Id: <20190925134458.1413790-1-adrian.ratiu@collabora.com>
|
||||
X-Mailer: git-send-email 2.23.0
|
||||
MIME-Version: 1.0
|
||||
Sender: linux-wireless-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
When n_reqs == 0 there is nothing to do so it doesn't make sense to
|
||||
search for requests and issue a warning because none is found.
|
||||
|
||||
Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
|
||||
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
---
|
||||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
|
||||
index 14e530601ef3..fabfbb0b40b0 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
|
||||
@@ -57,6 +57,10 @@ static int brcmf_pno_remove_request(struct brcmf_pno_info *pi, u64 reqid)
|
||||
|
||||
mutex_lock(&pi->req_lock);
|
||||
|
||||
+ /* Nothing to do if we have no requests */
|
||||
+ if (pi->n_reqs == 0)
|
||||
+ goto done;
|
||||
+
|
||||
/* find request */
|
||||
for (i = 0; i < pi->n_reqs; i++) {
|
||||
if (pi->reqs[i]->reqid == reqid)
|
||||
|
||||
From patchwork Wed Sep 25 13:44:58 2019
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
X-Patchwork-Submitter: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
X-Patchwork-Id: 11160707
|
||||
X-Patchwork-Delegate: kvalo@adurom.com
|
||||
Return-Path: <SRS0=Sl5Z=XU=vger.kernel.org=linux-wireless-owner@kernel.org>
|
||||
Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org
|
||||
[172.30.200.123])
|
||||
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47A3C14DB
|
||||
for <patchwork-linux-wireless@patchwork.kernel.org>;
|
||||
Wed, 25 Sep 2019 13:45:03 +0000 (UTC)
|
||||
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
|
||||
by mail.kernel.org (Postfix) with ESMTP id 2F3CC21D7F
|
||||
for <patchwork-linux-wireless@patchwork.kernel.org>;
|
||||
Wed, 25 Sep 2019 13:45:03 +0000 (UTC)
|
||||
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
|
||||
id S2406832AbfIYNo6 (ORCPT
|
||||
<rfc822;patchwork-linux-wireless@patchwork.kernel.org>);
|
||||
Wed, 25 Sep 2019 09:44:58 -0400
|
||||
Received: from bhuna.collabora.co.uk ([46.235.227.227]:58004 "EHLO
|
||||
bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
|
||||
with ESMTP id S2406650AbfIYNo5 (ORCPT
|
||||
<rfc822;linux-wireless@vger.kernel.org>);
|
||||
Wed, 25 Sep 2019 09:44:57 -0400
|
||||
Received: from [127.0.0.1] (localhost [127.0.0.1])
|
||||
(Authenticated sender: aratiu)
|
||||
with ESMTPSA id 8EFA628BCCF
|
||||
From: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
To: brcm80211-dev-list.pdl@broadcom.com
|
||||
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org,
|
||||
Gustavo Padovan <gustavo.padovan@collabora.com>
|
||||
Subject: [PATCH 2/2] brcmfmac: fix suspend/resume when power is cut off
|
||||
Date: Wed, 25 Sep 2019 16:44:58 +0300
|
||||
Message-Id: <20190925134458.1413790-2-adrian.ratiu@collabora.com>
|
||||
X-Mailer: git-send-email 2.23.0
|
||||
In-Reply-To: <20190925134458.1413790-1-adrian.ratiu@collabora.com>
|
||||
References: <20190925134458.1413790-1-adrian.ratiu@collabora.com>
|
||||
MIME-Version: 1.0
|
||||
Sender: linux-wireless-owner@vger.kernel.org
|
||||
Precedence: bulk
|
||||
List-ID: <linux-wireless.vger.kernel.org>
|
||||
X-Mailing-List: linux-wireless@vger.kernel.org
|
||||
|
||||
brcmfmac assumed the wifi device always remains powered on and thus
|
||||
hardcoded the MMC_PM_KEEP_POWER flag expecting the wifi device to
|
||||
remain on even during suspend/resume cycles.
|
||||
|
||||
This is not always the case, some appliances cut power to everything
|
||||
connected via SDIO for efficiency reasons and this leads to wifi not
|
||||
being usable after coming out of suspend because the device was not
|
||||
correctly reinitialized.
|
||||
|
||||
So we check for the keep_power capability and if it's not present then
|
||||
we remove the device and probe it again during resume to mirror what's
|
||||
happening in hardware and ensure correct reinitialization in the case
|
||||
when MMC_PM_KEEP_POWER is not supported.
|
||||
|
||||
Suggested-by: Gustavo Padovan <gustavo.padovan@collabora.com>
|
||||
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||
---
|
||||
.../broadcom/brcm80211/brcmfmac/bcmsdh.c | 53 ++++++++++++++-----
|
||||
1 file changed, 39 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
index 987731b..dac4685 100644
|
||||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
|
||||
@@ -1136,7 +1136,8 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
|
||||
struct sdio_func *func;
|
||||
struct brcmf_bus *bus_if;
|
||||
struct brcmf_sdio_dev *sdiodev;
|
||||
- mmc_pm_flag_t sdio_flags;
|
||||
+ mmc_pm_flag_t pm_caps, sdio_flags;
|
||||
+ int ret = 0;
|
||||
struct brcmf_cfg80211_info *config;
|
||||
int retry = BRCMF_PM_WAIT_MAXRETRY;
|
||||
|
||||
@@ -1159,19 +1160,33 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
|
||||
|
||||
sdiodev = bus_if->bus_priv.sdio;
|
||||
|
||||
- brcmf_sdiod_freezer_on(sdiodev);
|
||||
- brcmf_sdio_wd_timer(sdiodev->bus, 0);
|
||||
-
|
||||
- sdio_flags = MMC_PM_KEEP_POWER;
|
||||
- if (sdiodev->wowl_enabled) {
|
||||
- if (sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
- enable_irq_wake(sdiodev->settings->bus.sdio.oob_irq_nr);
|
||||
- else
|
||||
- sdio_flags |= MMC_PM_WAKE_SDIO_IRQ;
|
||||
+ pm_caps = sdio_get_host_pm_caps(func);
|
||||
+
|
||||
+ if (pm_caps & MMC_PM_KEEP_POWER) {
|
||||
+ /* preserve card power during suspend */
|
||||
+ brcmf_sdiod_freezer_on(sdiodev);
|
||||
+ brcmf_sdio_wd_timer(sdiodev->bus, 0);
|
||||
+
|
||||
+ sdio_flags = MMC_PM_KEEP_POWER;
|
||||
+ if (sdiodev->wowl_enabled) {
|
||||
+ if (sdiodev->settings->bus.sdio.oob_irq_supported)
|
||||
+ enable_irq_wake(sdiodev->settings->bus.sdio.oob_irq_nr);
|
||||
+ else
|
||||
+ sdio_flags |= MMC_PM_WAKE_SDIO_IRQ;
|
||||
+ }
|
||||
+
|
||||
+ if (sdio_set_host_pm_flags(sdiodev->func1, sdio_flags))
|
||||
+ brcmf_err("Failed to set pm_flags %x\n", sdio_flags);
|
||||
+
|
||||
+ } else {
|
||||
+ /* power will be cut so remove device, probe again in resume */
|
||||
+ brcmf_sdiod_intr_unregister(sdiodev);
|
||||
+ ret = brcmf_sdiod_remove(sdiodev);
|
||||
+ if (ret)
|
||||
+ brcmf_err("Failed to remove device on suspend\n");
|
||||
}
|
||||
- if (sdio_set_host_pm_flags(sdiodev->func1, sdio_flags))
|
||||
- brcmf_err("Failed to set pm_flags %x\n", sdio_flags);
|
||||
- return 0;
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int brcmf_ops_sdio_resume(struct device *dev)
|
||||
@@ -1179,13 +1194,23 @@ static int brcmf_ops_sdio_resume(struct device *dev)
|
||||
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
|
||||
struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
|
||||
struct sdio_func *func = container_of(dev, struct sdio_func, dev);
|
||||
+ mmc_pm_flag_t pm_caps = sdio_get_host_pm_caps(func);
|
||||
+ int ret = 0;
|
||||
|
||||
brcmf_dbg(SDIO, "Enter: F%d\n", func->num);
|
||||
if (func->num != 2)
|
||||
return 0;
|
||||
|
||||
- brcmf_sdiod_freezer_off(sdiodev);
|
||||
- return 0;
|
||||
+ if (!(pm_caps & MMC_PM_KEEP_POWER)) {
|
||||
+ /* bus was powered off and device removed, probe again */
|
||||
+ ret = brcmf_sdiod_probe(sdiodev);
|
||||
+ if (ret)
|
||||
+ brcmf_err("Failed to probe device on resume\n");
|
||||
+ } else {
|
||||
+ brcmf_sdiod_freezer_off(sdiodev);
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops brcmf_sdio_pm_ops = {
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,26 @@
|
|||
diff --git a/drivers/video/fbdev/mxc/mxc_epdc_fb.c.orig b/drivers/video/fbdev/mxc/mxc_epdc_fb.c
|
||||
index 5c7d87d..5c31379 100644
|
||||
--- a/drivers/video/fbdev/mxc/mxc_epdc_fb.c.orig
|
||||
+++ b/drivers/video/fbdev/mxc/mxc_epdc_fb.c
|
||||
@@ -3489,10 +3489,10 @@ static void mxc_epdc_fb_update_pages(struct mxc_epdc_fb_data *fb_data,
|
||||
update.update_region.top = y1;
|
||||
update.update_region.height = y2 - y1;
|
||||
update.waveform_mode = WAVEFORM_MODE_AUTO;
|
||||
- update.update_mode = UPDATE_MODE_FULL;
|
||||
+ update.update_mode = UPDATE_MODE_PARTIAL;
|
||||
update.update_marker = 0;
|
||||
update.temp = TEMP_USE_AMBIENT;
|
||||
- update.flags = 0;
|
||||
+ update.flags = EPDC_FLAG_USE_REGAL;
|
||||
|
||||
mxc_epdc_fb_send_update(&update, &fb_data->info);
|
||||
}
|
||||
@@ -3687,7 +3687,7 @@ static struct fb_ops mxc_epdc_fb_ops = {
|
||||
};
|
||||
|
||||
static struct fb_deferred_io mxc_epdc_fb_defio = {
|
||||
- .delay = HZ,
|
||||
+ .delay = HZ / 30,
|
||||
.deferred_io = mxc_epdc_fb_deferred_io,
|
||||
};
|
||||
|
790
device/testing/linux-remarkable-zero-gravitas/enable-sdhc1.patch
Normal file
790
device/testing/linux-remarkable-zero-gravitas/enable-sdhc1.patch
Normal file
|
@ -0,0 +1,790 @@
|
|||
diff --git a/arch/arm/boot/dts/zero-gravitas.dts b/arch/arm/boot/dts/zero-gravitas.dts
|
||||
index f51edfdedf8a..947f43c3434c 100644
|
||||
--- a/arch/arm/boot/dts/zero-gravitas.dts
|
||||
+++ b/arch/arm/boot/dts/zero-gravitas.dts
|
||||
@@ -1,6 +1,783 @@
|
||||
-#include "zero-gravitas-factory.dts"
|
||||
+/*
|
||||
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include <dt-bindings/gpio/gpio.h>
|
||||
+#include <dt-bindings/input/input.h>
|
||||
+#include "imx6sl.dtsi"
|
||||
+#include "zero-gravitas-padctl.h"
|
||||
+
|
||||
+/ {
|
||||
+ model = "reMarkable 1.0";
|
||||
+ compatible = "remarkable,zero-gravitas", "fsl,imx6sl";
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x80000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ wifi_pwrseq: wifi_pwrseq {
|
||||
+ compatible = "mmc-pwrseq-simple";
|
||||
+ reset-gpios = <&gpio3 30 GPIO_ACTIVE_LOW>,
|
||||
+ <&gpio4 0 GPIO_ACTIVE_LOW>;
|
||||
+ clocks = <&clks IMX6SL_CLK_OSC>;
|
||||
+ clock-names = "ext_clock";
|
||||
+ };
|
||||
+
|
||||
+ regulators {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ reg_usb_otg1_vbus: regulator@0 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ reg = <0>;
|
||||
+ regulator-name = "usb_otg1_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio4 15 0>;
|
||||
+ enable-active-high;
|
||||
+ vin-supply = <&swbst_reg>;
|
||||
+ };
|
||||
+
|
||||
+ charger_regulator: regulator@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "charger-regulator";
|
||||
+ regulator-min-microamp = <5000000>;
|
||||
+ regulator-max-microamp = <5000000>;
|
||||
+ gpios = <&gpio3 27 GPIO_ACTIVE_LOW>;
|
||||
+ enable-active-high; /* Don't invert twice */
|
||||
+ regulator-boot-on;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ wacom_reset: wacom-reset {
|
||||
+ compatible = "gpio-reset";
|
||||
+ reset-gpios = <&gpio4 4 1>;
|
||||
+ reset-delay-us = <100000>;
|
||||
+ #reset-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ pinctrl-0 = <&pinctrl_keys>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ button_0 {
|
||||
+ label = "Power";
|
||||
+ gpios = <&gpio4 9 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_POWER>;
|
||||
+ gpio-key,wakeup;
|
||||
+ debounce-interval = <10>;
|
||||
+ };
|
||||
+
|
||||
+ button_1 {
|
||||
+ label = "Left";
|
||||
+ gpios = <&gpio3 24 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_LEFT>;
|
||||
+ gpio-key,wakeup;
|
||||
+ debounce-interval = <5>;
|
||||
+ };
|
||||
+
|
||||
+ button_2 {
|
||||
+ label = "Home";
|
||||
+ gpios = <&gpio3 26 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_HOME>;
|
||||
+ gpio-key,wakeup;
|
||||
+ debounce-interval = <5>;
|
||||
+ };
|
||||
+ button_3 {
|
||||
+ label = "Right";
|
||||
+ gpios = <&gpio3 28 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RIGHT>;
|
||||
+ gpio-key,wakeup;
|
||||
+ debounce-interval = <5>;
|
||||
+ };
|
||||
+ button_4 {
|
||||
+ label = "LowPower";
|
||||
+ gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_WAKEUP>;
|
||||
+ gpio-key,wakeup;
|
||||
+ debounce-interval = <100>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb_charger: usb_charger {
|
||||
+ compatible = "gpio-charger";
|
||||
+ gpios = <&gpio4 1 0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&epdc {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_epdc_0>;
|
||||
+ VCOM-supply = <&VCOM_reg>;
|
||||
+ DISPLAY-supply = <&DISPLAY_reg>;
|
||||
+ TMST-supply = <&TMST_reg>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&gpc {
|
||||
+ fsl,ldo-bypass = <1>;
|
||||
+};
|
||||
+
|
||||
+®_arm {
|
||||
+ vin-supply = <&sw1a_reg>;
|
||||
+ regulator-allow-bypass;
|
||||
+};
|
||||
+
|
||||
+®_soc {
|
||||
+ vin-supply = <&sw1c_reg>;
|
||||
+ regulator-allow-bypass;
|
||||
+};
|
||||
+
|
||||
+®_pu {
|
||||
+ vin-supply = <&sw1c_reg>;
|
||||
+ regulator-allow-bypass;
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_i2c1>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ battery: bq27441@55 {
|
||||
+ reg = <0x55>;
|
||||
+ compatible = "ti,bq27441";
|
||||
+ /*power-supplies = <&usb_charger>;*/
|
||||
+ /*charger-supply = <&charger_regulator>;*/
|
||||
+ /*interrupt-parent = <&gpio3>;
|
||||
+ interrupts = <31 IRQ_TYPE_LEVEL_HIGH>;*/
|
||||
+ ti,resistor-sense = <10>;
|
||||
+ };
|
||||
+
|
||||
+ pmic: pfuze100@8 {
|
||||
+ compatible = "fsl,pfuze100";
|
||||
+ reg = <0x08>;
|
||||
+
|
||||
+ regulators {
|
||||
+ sw1a_reg: sw1ab {
|
||||
+ regulator-min-microvolt = <300000>;
|
||||
+ regulator-max-microvolt = <1875000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-ramp-delay = <6250>;
|
||||
+ };
|
||||
+
|
||||
+ sw1c_reg: sw1c {
|
||||
+ regulator-min-microvolt = <300000>;
|
||||
+ regulator-max-microvolt = <1875000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ regulator-ramp-delay = <6250>;
|
||||
+ };
|
||||
+
|
||||
+ sw2_reg: sw2 {
|
||||
+ regulator-min-microvolt = <400000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ sw3a_reg: sw3a {
|
||||
+ regulator-min-microvolt = <400000>;
|
||||
+ regulator-max-microvolt = <1975000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ sw3b_reg: sw3b {
|
||||
+ regulator-min-microvolt = <400000>;
|
||||
+ regulator-max-microvolt = <1975000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ sw4_reg: sw4 {
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ swbst_reg: swbst {
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5150000>;
|
||||
+ };
|
||||
+
|
||||
+ snvs_reg: vsnvs {
|
||||
+ regulator-min-microvolt = <1000000>;
|
||||
+ regulator-max-microvolt = <3000000>;
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vref_reg: vrefddr {
|
||||
+ regulator-boot-on;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vgen1_reg: vgen1 {
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1550000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vgen2_reg: vgen2 {
|
||||
+ regulator-min-microvolt = <800000>;
|
||||
+ regulator-max-microvolt = <1550000>;
|
||||
+ };
|
||||
+
|
||||
+ vgen3_reg: vgen3 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ };
|
||||
+
|
||||
+ vgen4_reg: vgen4 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vgen5_reg: vgen5 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ vgen6_reg: vgen6 {
|
||||
+ regulator-min-microvolt = <1800000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ max17135@48 {
|
||||
+ compatible = "maxim,max17135";
|
||||
+ reg = <0x48>;
|
||||
+ pass_num = <2>;
|
||||
+ gvee_pwrup = <0>; /* ms */
|
||||
+ vneg_pwrup = <3>;
|
||||
+ vpos_pwrup = <6>;
|
||||
+ gvdd_pwrup = <3>;
|
||||
+
|
||||
+ gvdd_pwrdn = <1>;
|
||||
+ vpos_pwrdn = <2>;
|
||||
+ vneg_pwrdn = <6>;
|
||||
+ gvee_pwrdn = <50>;
|
||||
+ /* These are only for passnum 1, we use i2c */
|
||||
+ gpio_pmic_pwrgood = <&gpio2 13 0>;
|
||||
+ gpio_pmic_vcom_ctrl = <&gpio2 3 0>;
|
||||
+ gpio_pmic_wakeup = <&gpio2 14 0>;
|
||||
+ gpio_pmic_v3p3 = <&gpio2 7 0>;
|
||||
+ gpio_pmic_intr = <&gpio2 12 0>;
|
||||
+
|
||||
+ regulators {
|
||||
+ DISPLAY_reg: DISPLAY {
|
||||
+ regulator-name = "DISPLAY";
|
||||
+ };
|
||||
+
|
||||
+ GVDD_reg: GVDD {
|
||||
+ /* 20v */
|
||||
+ regulator-name = "GVDD";
|
||||
+ };
|
||||
+
|
||||
+ GVEE_reg: GVEE {
|
||||
+ /* -22v */
|
||||
+ regulator-name = "GVEE";
|
||||
+ };
|
||||
+
|
||||
+ HVINN_reg: HVINN {
|
||||
+ /* -22v */
|
||||
+ regulator-name = "HVINN";
|
||||
+ };
|
||||
+
|
||||
+ HVINP_reg: HVINP {
|
||||
+ /* 20v */
|
||||
+ regulator-name = "HVINP";
|
||||
+ };
|
||||
+
|
||||
+ VCOM_reg: VCOM {
|
||||
+ regulator-name = "VCOM";
|
||||
+ /* Real max value: -500000 */
|
||||
+ regulator-max-microvolt = <4325000>;
|
||||
+ /* Real min value: -4325000 */
|
||||
+ regulator-min-microvolt = <500000>;
|
||||
+ };
|
||||
+
|
||||
+ VNEG_reg: VNEG {
|
||||
+ /* -15v */
|
||||
+ regulator-name = "VNEG";
|
||||
+ };
|
||||
+
|
||||
+ VPOS_reg: VPOS {
|
||||
+ /* 15v */
|
||||
+ regulator-name = "VPOS";
|
||||
+ };
|
||||
+
|
||||
+ TMST_reg: TMST {
|
||||
+ regulator-name = "TMST";
|
||||
+ /* 2's-compliment, -127 */
|
||||
+ regulator-min-microvolt = <0xffffff81>;
|
||||
+ /* 2's-compliment, +127 */
|
||||
+ regulator-max-microvolt = <0x0000007f>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_i2c2>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ digitizer: wacom-i2c@9 {
|
||||
+ compatible = "wacom,wacom-i2c";
|
||||
+ reg = <0x09>;
|
||||
+ interrupt-parent = <&gpio2>;
|
||||
+ interrupts = <10 2>;
|
||||
+ resets = <&wacom_reset>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c3 {
|
||||
+ clock-frequency = <100000>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_i2c3>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ tsc@24 {
|
||||
+ compatible = "cy,cyttsp5_i2c_adapter";
|
||||
+ reg = <0x24>;
|
||||
+ interrupt-parent = <&gpio4>;
|
||||
+ interrupts = <3 2>;
|
||||
+ cy,adapter_id = "cyttsp5_i2c_adapter";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ cy,core {
|
||||
+ cy,name = "cyttsp5_core";
|
||||
+
|
||||
+ cy,irq_gpio = <&gpio4 3 0>;
|
||||
+ cy,rst_gpio = <&gpio4 5 0>;
|
||||
+ cy,hid_desc_register = <1>;
|
||||
+ /* CY_CORE_FLAG_RESTORE_PARAMETERS */
|
||||
+ cy,flags = <4>;
|
||||
+ /* CY_CORE_EWG_NONE */
|
||||
+ cy,easy_wakeup_gesture = <0>;
|
||||
+ cy,btn_keys = <172 /* KEY_HOMEPAGE */
|
||||
+ /* previously was KEY_HOME, new Android versions use KEY_HOMEPAGE */
|
||||
+ 139 /* KEY_MENU */
|
||||
+ 158 /* KEY_BACK */
|
||||
+ 217 /* KEY_SEARCH */
|
||||
+ 114 /* KEY_VOLUMEDOWN */
|
||||
+ 115 /* KEY_VOLUMEUP */
|
||||
+ 212 /* KEY_CAMERA */
|
||||
+ 116>; /* KEY_POWER */
|
||||
+ cy,btn_keys-tag = <0>;
|
||||
+
|
||||
+ cy,mt {
|
||||
+ cy,name = "cyttsp5_mt";
|
||||
+
|
||||
+ cy,inp_dev_name = "cyttsp5_mt";
|
||||
+ cy,flags = <0>;
|
||||
+ cy,abs =
|
||||
+ /* ABS_MT_POSITION_X, CY_ABS_MIN_X, CY_ABS_MAX_X, 0, 0 */
|
||||
+ <0x35 0 880 0 0
|
||||
+ /* ABS_MT_POSITION_Y, CY_ABS_MIN_Y, CY_ABS_MAX_Y, 0, 0 */
|
||||
+ 0x36 0 1280 0 0
|
||||
+ /* ABS_MT_PRESSURE, CY_ABS_MIN_P, CY_ABS_MAX_P, 0, 0 */
|
||||
+ 0x3a 0 255 0 0
|
||||
+ /* CY_IGNORE_VALUE, CY_ABS_MIN_W, CY_ABS_MAX_W, 0, 0 */
|
||||
+ 0xffff 0 255 0 0
|
||||
+ /* ABS_MT_TRACKING_ID, CY_ABS_MIN_T, CY_ABS_MAX_T, 0, 0 */
|
||||
+ 0x39 0 15 0 0
|
||||
+ /* ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0 */
|
||||
+ 0x30 0 255 0 0
|
||||
+ /* ABS_MT_TOUCH_MINOR, 0, 255, 0, 0 */
|
||||
+ 0x31 0 255 0 0
|
||||
+ /* ABS_MT_ORIENTATION, -127, 127, 0, 0 */
|
||||
+ 0x34 0xffffff81 127 0 0
|
||||
+ /* ABS_MT_TOOL_TYPE, 0, MT_TOOL_MAX, 0, 0 */
|
||||
+ 0x37 0 1 0 0
|
||||
+ /* ABS_DISTANCE, 0, 255, 0, 0 */
|
||||
+ 0x19 0 255 0 0>;
|
||||
+
|
||||
+ cy,vkeys_x = <720>;
|
||||
+ cy,vkeys_y = <1280>;
|
||||
+
|
||||
+ cy,virtual_keys = /* KeyCode CenterX CenterY Width Height */
|
||||
+ /* KEY_BACK */
|
||||
+ <158 1360 90 160 180
|
||||
+ /* KEY_MENU */
|
||||
+ 139 1360 270 160 180
|
||||
+ /* KEY_HOMEPAGE */
|
||||
+ 172 1360 450 160 180
|
||||
+ /* KEY SEARCH */
|
||||
+ 217 1360 630 160 180>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&iomuxc {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hog>;
|
||||
+
|
||||
+ zero-gravitas {
|
||||
+ pinctrl_hog: hoggrp {
|
||||
+ fsl,pins = <
|
||||
+ /* MAX17135 pwrgood */
|
||||
+ MX6SL_PAD_EPDC_PWRSTAT__GPIO2_IO13 PAD_CTL_NONE
|
||||
+ /* MAX17135 vcom ctrl */
|
||||
+ MX6SL_PAD_EPDC_VCOM0__GPIO2_IO03 PAD_CTL_NONE
|
||||
+ /* MAX17135 wakeup */
|
||||
+ MX6SL_PAD_EPDC_PWRWAKEUP__GPIO2_IO14 PAD_CTL_NONE
|
||||
+ /* MAX17135 v3p3 */
|
||||
+ MX6SL_PAD_EPDC_PWRCTRL0__GPIO2_IO07 PAD_CTL_NONE
|
||||
+ /* MAX17135 intr */
|
||||
+ MX6SL_PAD_EPDC_PWRINT__GPIO2_IO12 PAD_CTL_NONE
|
||||
+
|
||||
+ /* BQ27441 low power */
|
||||
+ MX6SL_PAD_KEY_ROW3__GPIO3_IO31 0x17000
|
||||
+
|
||||
+ /* Wacom interrupt */
|
||||
+ MX6SL_PAD_EPDC_PWRCTRL3__GPIO2_IO10 0x17000
|
||||
+ /* Wacom reset */
|
||||
+ MX6SL_PAD_KEY_COL6__GPIO4_IO04 0x110b0
|
||||
+
|
||||
+ /* CYTTSP interrupt */
|
||||
+ MX6SL_PAD_KEY_ROW5__GPIO4_IO03 0x17000
|
||||
+ /* CYTTSP reset */
|
||||
+ MX6SL_PAD_KEY_ROW6__GPIO4_IO05 0x110b0
|
||||
+
|
||||
+ /* USB OTG1 voltage control */
|
||||
+ /*MX6SL_PAD_ECSPI2_SS0__GPIO4_IO15 0x17000*/
|
||||
+ /*MX6SL_PAD_ECSPI2_SS0__GPIO4_IO15 0x000b0*/
|
||||
+ MX6SL_PAD_ECSPI2_SS0__GPIO4_IO15 PAD_CTL_NONE
|
||||
+ /*MX6SL_PAD_ECSPI2_SS0__USB_OTG1_PWR 0x17000*/
|
||||
+ /* USB OTG1 over current detection */
|
||||
+ MX6SL_PAD_ECSPI2_MISO__USB_OTG1_OC 0x1b0b0
|
||||
+
|
||||
+ /* Charger control */
|
||||
+ MX6SL_PAD_KEY_ROW1__GPIO3_IO27 0x110b0
|
||||
+ /* Charger status */
|
||||
+ MX6SL_PAD_KEY_ROW4__GPIO4_IO01 PAD_CTL_NONE
|
||||
+
|
||||
+ /* USDHC1 card detect */
|
||||
+ MX6SL_PAD_KEY_ROW7__GPIO4_IO07 0x17059
|
||||
+
|
||||
+ /* CHIP_WAKE_HOST */
|
||||
+ MX6SL_PAD_KEY_COL5__GPIO4_IO02 PAD_CTL_NONE
|
||||
+ /* POWER_WIFI: WiFi external power control */
|
||||
+ MX6SL_PAD_KEY_COL3__GPIO3_IO30 PAD_CTL_NONE
|
||||
+ /* WL_DIS: WiFi internal power control */
|
||||
+ MX6SL_PAD_KEY_COL4__GPIO4_IO00 PAD_CTL_NONE
|
||||
+
|
||||
+ /* 32Khz clock from i.MX6 to WiFi for power saving */
|
||||
+ MX6SL_PAD_REF_CLK_32K__XTALOSC_REF_CLK_32K 0x1b0b0
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_epdc_0: epdcgrp-0 {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_EPDC_D0__EPDC_DATA00 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D1__EPDC_DATA01 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D2__EPDC_DATA02 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D3__EPDC_DATA03 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D4__EPDC_DATA04 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D5__EPDC_DATA05 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D6__EPDC_DATA06 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D7__EPDC_DATA07 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D8__EPDC_DATA08 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D9__EPDC_DATA09 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D10__EPDC_DATA10 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D11__EPDC_DATA11 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D12__EPDC_DATA12 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D13__EPDC_DATA13 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D14__EPDC_DATA14 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_D15__EPDC_DATA15 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_GDCLK__EPDC_GDCLK PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_GDOE__EPDC_GDOE PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_GDSP__EPDC_GDSP PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_SDCE0__EPDC_SDCE0 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_SDCLK__EPDC_SDCLK_P PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_SDLE__EPDC_SDLE PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_SDOE__EPDC_SDOE PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_BDR0__EPDC_BDR0 PAD_CTL_NONE
|
||||
+ MX6SL_PAD_EPDC_BDR1__EPDC_BDR1 PAD_CTL_NONE
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_i2c1: i2c1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_I2C1_SCL__I2C1_SCL 0x4001b8b1
|
||||
+ MX6SL_PAD_I2C1_SDA__I2C1_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+
|
||||
+ pinctrl_i2c2: i2c2grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_I2C2_SCL__I2C2_SCL 0x4001b8b1
|
||||
+ MX6SL_PAD_I2C2_SDA__I2C2_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_i2c3: i2c3grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_AUD_RXFS__I2C3_SCL 0x4001b8b1
|
||||
+ MX6SL_PAD_AUD_RXC__I2C3_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_keys: keygrp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_ECSPI1_MOSI__GPIO4_IO09 0x100b1
|
||||
+ MX6SL_PAD_KEY_COL0__GPIO3_IO24 0x100b1
|
||||
+ MX6SL_PAD_KEY_COL1__GPIO3_IO26 0x100b1
|
||||
+ MX6SL_PAD_KEY_COL2__GPIO3_IO28 0x100b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_uart1: uart1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_UART1_RXD__UART1_RX_DATA 0x1b0b1
|
||||
+ MX6SL_PAD_UART1_TXD__UART1_TX_DATA 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usbotg1: usbotg1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_EPDC_PWRCOM__USB_OTG1_ID 0x17059
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc1: usdhc1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD1_CMD__SD1_CMD PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD1_CLK__SD1_CLK PAD_CTL_USDHC_CLK_DEFAULT
|
||||
+ MX6SL_PAD_SD1_DAT0__SD1_DATA0 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD1_DAT1__SD1_DATA1 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD1_DAT2__SD1_DATA2 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD1_DAT3__SD1_DATA3 PAD_CTL_USDHC_DEFAULT
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD1_CMD__SD1_CMD PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD1_CLK__SD1_CLK PAD_CTL_USDHC_CLK_100MHZ
|
||||
+ MX6SL_PAD_SD1_DAT0__SD1_DATA0 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD1_DAT1__SD1_DATA1 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD1_DAT2__SD1_DATA2 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD1_DAT3__SD1_DATA3 PAD_CTL_USDHC_100MHZ
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD1_CMD__SD1_CMD PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD1_CLK__SD1_CLK PAD_CTL_USDHC_CLK_200MHZ
|
||||
+ MX6SL_PAD_SD1_DAT0__SD1_DATA0 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD1_DAT1__SD1_DATA1 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD1_DAT2__SD1_DATA2 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD1_DAT3__SD1_DATA3 PAD_CTL_USDHC_200MHZ
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc2: usdhc2grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD2_CMD__SD2_CMD PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_CLK__SD2_CLK PAD_CTL_USDHC_CLK_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT0__SD2_DATA0 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT1__SD2_DATA1 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT2__SD2_DATA2 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT3__SD2_DATA3 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT4__SD2_DATA4 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT5__SD2_DATA5 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT6__SD2_DATA6 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_DAT7__SD2_DATA7 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD2_RST__SD2_RESET PAD_CTL_USDHC_CLK_DEFAULT
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD2_CMD__SD2_CMD PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_CLK__SD2_CLK PAD_CTL_USDHC_CLK_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT0__SD2_DATA0 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT1__SD2_DATA1 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT2__SD2_DATA2 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT3__SD2_DATA3 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT4__SD2_DATA4 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT5__SD2_DATA5 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT6__SD2_DATA6 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_DAT7__SD2_DATA7 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD2_RST__SD2_RESET PAD_CTL_USDHC_CLK_DEFAULT
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD2_CMD__SD2_CMD PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_CLK__SD2_CLK PAD_CTL_USDHC_CLK_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT0__SD2_DATA0 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT1__SD2_DATA1 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT2__SD2_DATA2 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT3__SD2_DATA3 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT4__SD2_DATA4 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT5__SD2_DATA5 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT6__SD2_DATA6 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_DAT7__SD2_DATA7 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD2_RST__SD2_RESET PAD_CTL_USDHC_CLK_DEFAULT
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc3: usdhc3grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD3_CMD__SD3_CMD PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD3_CLK__SD3_CLK PAD_CTL_USDHC_CLK_DEFAULT
|
||||
+ MX6SL_PAD_SD3_DAT0__SD3_DATA0 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD3_DAT1__SD3_DATA1 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD3_DAT2__SD3_DATA2 PAD_CTL_USDHC_DEFAULT
|
||||
+ MX6SL_PAD_SD3_DAT3__SD3_DATA3 PAD_CTL_USDHC_DEFAULT
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc3_100mhz: usdhc3grp100mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD3_CMD__SD3_CMD PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD3_CLK__SD3_CLK PAD_CTL_USDHC_CLK_100MHZ
|
||||
+ MX6SL_PAD_SD3_DAT0__SD3_DATA0 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD3_DAT1__SD3_DATA1 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD3_DAT2__SD3_DATA2 PAD_CTL_USDHC_100MHZ
|
||||
+ MX6SL_PAD_SD3_DAT3__SD3_DATA3 PAD_CTL_USDHC_100MHZ
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usdhc3_200mhz: usdhc3grp200mhz {
|
||||
+ fsl,pins = <
|
||||
+ MX6SL_PAD_SD3_CMD__SD3_CMD PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD3_CLK__SD3_CLK PAD_CTL_USDHC_CLK_200MHZ
|
||||
+ MX6SL_PAD_SD3_DAT0__SD3_DATA0 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD3_DAT1__SD3_DATA1 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD3_DAT2__SD3_DATA2 PAD_CTL_USDHC_200MHZ
|
||||
+ MX6SL_PAD_SD3_DAT3__SD3_DATA3 PAD_CTL_USDHC_200MHZ
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pxp {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&snvs_poweroff {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_uart1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+/*&usbmisc {
|
||||
+ vbus-wakeup-supply = <®_usb_otg1_vbus>;
|
||||
+};*/
|
||||
|
||||
&usbotg1 {
|
||||
- vbus-supply = <®_usb_otg1_vbus>;
|
||||
+ /*vbus-supply = <®_usb_otg1_vbus>;*/
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_usbotg1>;
|
||||
+ disable-over-current;
|
||||
+ /* This kills the speed */
|
||||
+ imx-usb-charger-detection;
|
||||
+ srp-disable;
|
||||
+ hnp-disable;
|
||||
+ adp-disable;
|
||||
+ status = "okay";
|
||||
};
|
||||
|
||||
+&usbotg2 {
|
||||
+ dr_mode = "host";
|
||||
+ disable-over-current;
|
||||
+ srp-disable;
|
||||
+ hnp-disable;
|
||||
+ adp-disable;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+&usbphy1 {
|
||||
+ tx-d-cal = <0x5>;
|
||||
+};
|
||||
+
|
||||
+&usbphy2 {
|
||||
+ tx-d-cal = <0x5>;
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usdhc1 {
|
||||
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
|
||||
+ pinctrl-0 = <&pinctrl_usdhc1>;
|
||||
+ pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
|
||||
+ pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
|
||||
+ bus-width = <4>;
|
||||
+ cd-gpios = <&gpio4 7 GPIO_ACTIVE_LOW>;
|
||||
+ disable-wp;
|
||||
+ wp-controller;
|
||||
+ keep-power-in-suspend;
|
||||
+ enable-sdio-wakeup;
|
||||
+ no-1-8-v;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usdhc2 {
|
||||
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
|
||||
+ pinctrl-0 = <&pinctrl_usdhc2>;
|
||||
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
|
||||
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
|
||||
+ bus-width = <8>;
|
||||
+ non-removable;
|
||||
+ keep-power-in-suspend;
|
||||
+ no-1-8-v;
|
||||
+ disable-wp;
|
||||
+ cap-mmc-highspeed;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usdhc3 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
|
||||
+ pinctrl-0 = <&pinctrl_usdhc3>;
|
||||
+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
|
||||
+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
|
||||
+ mmc-pwrseq = <&wifi_pwrseq>;
|
||||
+ bus-width = <4>;
|
||||
+ enable-sdio-wakeup;
|
||||
+ non-removable;
|
||||
+ disable-wp;
|
||||
+ no-1-8-v;
|
||||
+ wifi-host;
|
||||
+ keep-power-in-suspend;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ brcmf: bcrmf@1 {
|
||||
+ reg = <1>;
|
||||
+ compatible = "brcm,bcm4329-fmac";
|
||||
+ /*resets = <&wifi_reset>;*/
|
||||
+ };
|
||||
+};
|
|
@ -0,0 +1 @@
|
|||
../../.shared-patches/linux/linux5.4-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch
|
40
device/testing/remarkable-zero-gravitas-utils/APKBUILD
Normal file
40
device/testing/remarkable-zero-gravitas-utils/APKBUILD
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=remarkable-zero-gravitas-utils
|
||||
pkgver=0.0.1
|
||||
_kver=5.4.70
|
||||
pkgrel=0
|
||||
pkgdesc="Utility files for reMarkable tablet"
|
||||
arch="armv7"
|
||||
url="http://www.davisr.me/projects/parabola-rm/"
|
||||
license="GPL-3.0-only"
|
||||
makedepends="musl-dev linux-remarkable-zero-gravitas-dev"
|
||||
options="!check" # No testsuite
|
||||
builddir="$srcdir"
|
||||
source="
|
||||
battery-monitor.sh
|
||||
epdc-init-auto.c
|
||||
epdc-show-bitmap.c
|
||||
xorg.conf
|
||||
"
|
||||
|
||||
build() {
|
||||
export CFLAGS="$CFLAGS -I/usr/src/linux-headers-$_kver/include -Wno-implicit-function-declaration"
|
||||
$CC $CFLAGS epdc-init-auto.c -o epdc-init-auto
|
||||
$CC $CFLAGS epdc-show-bitmap.c -o epdc-show-bitmap
|
||||
}
|
||||
|
||||
package() {
|
||||
install -vDm755 battery-monitor.sh "$pkgdir"/usr/bin/battery-monitor
|
||||
install -vDm755 epdc-show-bitmap -t "$pkgdir"/usr/bin/
|
||||
install -vDm755 epdc-init-auto -t "$pkgdir"/usr/bin/
|
||||
install -vDm644 xorg.conf -t "$pkgdir"/etc/defaults/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7f0e6cb276357983b76c37c81a91c0d278dbec16d8982a97618f2217ef5e4d706211d921af6c79db3aad912d50aaed8cf5ce67f52a1081f61585eb97322c8deb battery-monitor.sh
|
||||
f145d6af541828e69217a73f7b848f7fe57cce37426e15469a1d6a5540604f4078d4cd1f67e69e77b961b608a7b8e2930e1e82b13fe9dd181361e361895a66be epdc-init-auto.c
|
||||
409744c4bbcac462c38add2b19d3b433e44cb326905fe3af240931e27bb2b71b14696229c46187bf7c060f83d77920376b5c6161f62949a2fa2c0a5464753cc0 epdc-show-bitmap.c
|
||||
e14a61751e4c830652e7a849b9d596c6bc213fed87ba3f9f7c3df0d5fe35ddf28bde7de2fa977c0321639503ceff5abffd0d856380eacce24389fd50eaf3372a xorg.conf
|
||||
"
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# battery-monitor.sh
|
||||
# Prints the state of charge of the tablet's battery
|
||||
#
|
||||
# Parabola-rM is a free operating system for the reMarakble tablet.
|
||||
# Copyright (C) 2020
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program.
|
||||
|
||||
# Path for Linux 4.9
|
||||
battpath="/sys/class/power_supply/bq27441-0"
|
||||
|
||||
chargenow="$(cat $battpath/charge_now)"
|
||||
chargefull="$(cat $battpath/charge_full)"
|
||||
status="$(cat $battpath/status)"
|
||||
|
||||
chargepct="$(echo $chargenow $chargefull \
|
||||
| awk '{printf "%f", $1 / $2 * 100}' \
|
||||
| cut -d'.' -f1)"
|
||||
symbol=""
|
||||
if [[ "Charging" == "$status" ]]; then
|
||||
symbol=$'\u26a1' # Lightning symbol
|
||||
fi
|
||||
|
||||
echo "${symbol}${chargepct}%"
|
126
device/testing/remarkable-zero-gravitas-utils/epdc-init-auto.c
Normal file
126
device/testing/remarkable-zero-gravitas-utils/epdc-init-auto.c
Normal file
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
epdc-init-auto.c
|
||||
Initializes the EPDC framebuffer into a deferred-IO automatic-update
|
||||
mode
|
||||
|
||||
Parabola-rM is a free operating system for the reMarakble tablet.
|
||||
Copyright (C) 2020 Davis Remmel
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fb.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <linux/mxcfb.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
int ret;
|
||||
int fb = open("/dev/fb0", O_RDWR);
|
||||
struct fb_var_screeninfo vinfo;
|
||||
ret = ioctl(fb, FBIOGET_VSCREENINFO, &vinfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOGET_VSCREENINFO failed with error "
|
||||
"%d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
vinfo.xres = 1872;
|
||||
vinfo.yres = 1404;
|
||||
vinfo.pixclock = 160000000;
|
||||
vinfo.left_margin = 32;
|
||||
vinfo.right_margin = 326;
|
||||
vinfo.upper_margin = 4;
|
||||
vinfo.lower_margin = 12;
|
||||
vinfo.hsync_len = 44;
|
||||
vinfo.vsync_len = 1;
|
||||
vinfo.sync = 0;
|
||||
vinfo.vmode = FB_VMODE_NONINTERLACED;
|
||||
vinfo.accel_flags = 0;
|
||||
vinfo.activate = FB_ACTIVATE_FORCE;
|
||||
|
||||
// Put screen info. Sometimes this fails when trying to set the
|
||||
// pixclock. This may be a bug in the driver's arithmetic.
|
||||
ret = ioctl(fb, FBIOPUT_VSCREENINFO, &vinfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOPUT_VSCREENINFO failed with error "
|
||||
"%d, attempting to reset pixclock\n", ret);
|
||||
vinfo.pixclock = 6250;
|
||||
ioctl(fb, FBIOPUT_VSCREENINFO, &vinfo);
|
||||
vinfo.pixclock = 160000000;
|
||||
ret = ioctl(fb, FBIOPUT_VSCREENINFO, &vinfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOPUT_VSCREENINFO failed "
|
||||
"with error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Pull the screeninfo agian
|
||||
ret = ioctl(fb, FBIOGET_VSCREENINFO, &vinfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOGET_VSCREENINFO failed with error "
|
||||
"%d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("x:%d y:%d activate:%d bpp:%d rotate:%d hsync_len:%d"
|
||||
"vsync_len: %d sync:%d\n",
|
||||
vinfo.xres, vinfo.yres, vinfo.activate,
|
||||
vinfo.bits_per_pixel, vinfo.rotate, vinfo.hsync_len,
|
||||
vinfo.vsync_len, vinfo.sync);
|
||||
|
||||
struct fb_fix_screeninfo finfo;
|
||||
ret = ioctl(fb, FBIOGET_FSCREENINFO, &finfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOGET_FSCREENINFO failed with error "
|
||||
"%d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// In case the EPDC wasn't accessible
|
||||
ret = ioctl(fb, MXCFB_ENABLE_EPDC_ACCESS);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "MXCFB_ENABLE_EPDC_ACCESS failed with "
|
||||
"error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Set auto update mode
|
||||
__u32 aumode = AUTO_UPDATE_MODE_AUTOMATIC_MODE;
|
||||
ret = ioctl(fb, MXCFB_SET_AUTO_UPDATE_MODE, &aumode);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "MXCFB_SET_AUTO_UPDATE_MODE failed "
|
||||
"with error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Queue-and-merge is best-performing
|
||||
__u32 uscheme = UPDATE_SCHEME_QUEUE_AND_MERGE;
|
||||
ret = ioctl(fb, MXCFB_SET_UPDATE_SCHEME, &uscheme);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "MXCFB_SET_UPDATE_SCHEME failed with "
|
||||
"error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
close(fb);
|
||||
return 0;
|
||||
}
|
||||
|
184
device/testing/remarkable-zero-gravitas-utils/epdc-show-bitmap.c
Normal file
184
device/testing/remarkable-zero-gravitas-utils/epdc-show-bitmap.c
Normal file
|
@ -0,0 +1,184 @@
|
|||
/*
|
||||
epdc-show-bitmap.c
|
||||
Displays a raw image to the EPDC framebuffer
|
||||
|
||||
Parabola-rM is a free operating system for the reMarakble tablet.
|
||||
Copyright (C) 2020 Davis Remmel
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fb.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <linux/mxcfb.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc < 2) {
|
||||
printf("Must pass an image as an argument.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ret;
|
||||
int fb = open("/dev/fb0", O_RDWR);
|
||||
struct fb_var_screeninfo vinfo;
|
||||
ret = ioctl(fb, FBIOGET_VSCREENINFO, &vinfo);
|
||||
if (0 != ret) {
|
||||
printf("FBIOGET_VSCREENINFO failed with error %d"
|
||||
", aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
vinfo.xres = 1872;
|
||||
vinfo.yres = 1404;
|
||||
vinfo.pixclock = 160000000;
|
||||
vinfo.left_margin = 32;
|
||||
vinfo.right_margin = 326;
|
||||
vinfo.upper_margin = 4;
|
||||
vinfo.lower_margin = 12;
|
||||
vinfo.hsync_len = 44;
|
||||
vinfo.vsync_len = 1;
|
||||
vinfo.sync = 0;
|
||||
vinfo.vmode = FB_VMODE_NONINTERLACED;
|
||||
vinfo.accel_flags = 0;
|
||||
vinfo.activate = FB_ACTIVATE_FORCE;
|
||||
|
||||
// Put screen info. Sometimes this fails when trying to set the
|
||||
// pixclock. This may be a bug in the driver's arithmetic.
|
||||
ret = ioctl(fb, FBIOPUT_VSCREENINFO, &vinfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOPUT_VSCREENINFO failed with error "
|
||||
"%d, attempting To reset pixclock\n", ret);
|
||||
vinfo.pixclock = 6250;
|
||||
ioctl(fb, FBIOPUT_VSCREENINFO, &vinfo);
|
||||
vinfo.pixclock = 160000000;
|
||||
ret = ioctl(fb, FBIOPUT_VSCREENINFO, &vinfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOPUT_VSCREENINFO failed "
|
||||
"with error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
printf("x:%d y:%d activate:%d bpp:%d rotate:%d hsync_len:%d"
|
||||
"vsync_len: %d sync:%d\n",
|
||||
vinfo.xres, vinfo.yres, vinfo.activate,
|
||||
vinfo.bits_per_pixel, vinfo.rotate, vinfo.hsync_len,
|
||||
vinfo.vsync_len, vinfo.sync);
|
||||
|
||||
struct fb_fix_screeninfo finfo;
|
||||
ret = ioctl(fb, FBIOGET_FSCREENINFO, &finfo);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "FBIOGET_FSCREENINFO failed with error "
|
||||
"%d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// In case the EPDC wasn't accessible
|
||||
ret = ioctl(fb, MXCFB_ENABLE_EPDC_ACCESS);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "MXCFB_ENABLE_EPDC_ACCESS failed with "
|
||||
"error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Set to partial mode to control update parameters
|
||||
__u32 aumode = AUTO_UPDATE_MODE_REGION_MODE;
|
||||
ret = ioctl(fb, MXCFB_SET_AUTO_UPDATE_MODE, &aumode);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "MXCFB_SET_AUTO_UPDATE_MODE failed "
|
||||
"with error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// No artifacts in display output
|
||||
__u32 uscheme = UPDATE_SCHEME_SNAPSHOT;
|
||||
ret = ioctl(fb, MXCFB_SET_UPDATE_SCHEME, &uscheme);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "MXCFB_SET_UPDATE_SCHEME failed with "
|
||||
"error %d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Set up update (same region for all writes, gets reused)
|
||||
struct mxcfb_update_data bupdate;
|
||||
bupdate.update_region.left = 0;
|
||||
bupdate.update_region.top = 0;
|
||||
bupdate.update_region.width = 1872;
|
||||
bupdate.update_region.height = 1404;
|
||||
bupdate.waveform_mode = WAVEFORM_MODE_AUTO;
|
||||
bupdate.update_mode = UPDATE_MODE_FULL;
|
||||
bupdate.update_marker = 0;
|
||||
bupdate.temp = TEMP_USE_AMBIENT;
|
||||
bupdate.flags = 0;
|
||||
|
||||
struct mxcfb_update_marker_data updm;
|
||||
updm.update_marker = 0;
|
||||
|
||||
// mmap to framebuffer
|
||||
int buflength = vinfo.yres_virtual * finfo.line_length;
|
||||
printf("buflength %d\n", buflength);
|
||||
char * region = mmap(0, buflength, PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, fb, (off_t)0);
|
||||
if (region == MAP_FAILED) {
|
||||
fprintf(stderr, "map failed!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Write black
|
||||
memset(region, 0x00, buflength);
|
||||
ioctl(fb, MXCFB_SEND_UPDATE, &bupdate);
|
||||
ioctl(fb, MXCFB_WAIT_FOR_UPDATE_COMPLETE, &updm);
|
||||
|
||||
// Write white
|
||||
memset(region, 0xff, buflength);
|
||||
ioctl(fb, MXCFB_SEND_UPDATE, &bupdate);
|
||||
ioctl(fb, MXCFB_WAIT_FOR_UPDATE_COMPLETE, &updm);
|
||||
|
||||
// Write image
|
||||
FILE *pattern = fopen(argv[1], "rb");
|
||||
fseek(pattern, 0, SEEK_END);
|
||||
long psize = ftell(pattern);
|
||||
printf("psize is %d\n", psize);
|
||||
fseek(pattern, 0, SEEK_SET);
|
||||
|
||||
if (psize != buflength) {
|
||||
fprintf(stderr, "Image must match framebuffer size\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
char *buffer = malloc(psize);
|
||||
fread(buffer, psize, 1, pattern);
|
||||
fclose(pattern);
|
||||
|
||||
memcpy(region, buffer, psize);
|
||||
ret = ioctl(fb, MXCFB_SEND_UPDATE, &bupdate);
|
||||
ioctl(fb, MXCFB_WAIT_FOR_UPDATE_COMPLETE, &updm);
|
||||
if (0 != ret) {
|
||||
fprintf(stderr, "MXCFB_SEND_UPDATE failed with error "
|
||||
"%d, aborting\n", ret);
|
||||
return 1;
|
||||
}
|
||||
|
||||
close(fb);
|
||||
return 0;
|
||||
}
|
62
device/testing/remarkable-zero-gravitas-utils/xorg.conf
Normal file
62
device/testing/remarkable-zero-gravitas-utils/xorg.conf
Normal file
|
@ -0,0 +1,62 @@
|
|||
Section "ServerLayout"
|
||||
Identifier "reMarkable Tablet RM100"
|
||||
Screen 0 "Screen0"
|
||||
InputDevice "wacom" "CorePointer"
|
||||
EndSection
|
||||
|
||||
Section "ServerFlags"
|
||||
Option "BlankTime" "0"
|
||||
Option "StandbyTime" "0"
|
||||
Option "SuspendTime" "0"
|
||||
Option "OffTime" "0"
|
||||
EndSection
|
||||
|
||||
Section "Monitor"
|
||||
Identifier "Monitor0"
|
||||
DisplaySize 210 158 # mm, sets DPI
|
||||
Modeline "1872x1404_30.00" 104.26 1872 1960 2152 2432 1404 1405 \
|
||||
1408 1429 -HSync +Vsync
|
||||
Option "PreferredMode" "1872x1404_30.00"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "Screen0"
|
||||
Monitor "Monitor0"
|
||||
Device "epdc0"
|
||||
DefaultDepth 16
|
||||
SubSectionSub "Display"
|
||||
Depth 16
|
||||
Modes "1872x1404_30.00"
|
||||
EndSubSection
|
||||
EndSection
|
||||
|
||||
Section "Device"
|
||||
Identifier "epdc0"
|
||||
Driver "fbdev"
|
||||
Option "fbdev" "/dev/fb0"
|
||||
Option "Rotate" "CW"
|
||||
EndSection
|
||||
|
||||
Section "InputDevice"
|
||||
Identifier "wacom"
|
||||
Driver "evdev"
|
||||
Option "Protocol" "Auto"
|
||||
Option "Device" "/dev/input/event0"
|
||||
Option "SwapAxes" "1"
|
||||
Option "InvertY" "1"
|
||||
EndSection
|
||||
|
||||
Section "InputClass"
|
||||
Identifier "touchscreen"
|
||||
MatchIsTouchscreen "on"
|
||||
MatchDevicePath "/dev/input/event1"
|
||||
Driver "libinput"
|
||||
Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1" # Rot 180
|
||||
EndSection
|
||||
|
||||
Section "InputClass"
|
||||
Identifier "facialbuttons"
|
||||
MatchIsKeyboard "on"
|
||||
MatchDevicePath "/dev/input/event2"
|
||||
Driver "libinput"
|
||||
EndSection
|
33
device/testing/u-boot-remarkable-zero-gravitas/APKBUILD
Normal file
33
device/testing/u-boot-remarkable-zero-gravitas/APKBUILD
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
pkgname=u-boot-remarkable-zero-gravitas
|
||||
pkgver=2020.09
|
||||
pkgrel=0
|
||||
pkgdesc="U-Boot for reMarkable zero-gravitas tablet"
|
||||
_gittag=97b35fdddf0077abd2e0f0409b94ef20adbe8565
|
||||
url="https://github.com/reMarkable/uboot"
|
||||
arch="armv7"
|
||||
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
|
||||
ISC LGPL-2.0-only LGPL-2.1-only X11"
|
||||
options="!check"
|
||||
makedepends="$depends_dev bc dtc python3-dev swig bison flex openssl-dev
|
||||
py3-setuptools linux-headers u-boot-tools"
|
||||
source="
|
||||
u-boot-remarkable-zero-gravitas-$_gittag.tar.gz::https://github.com/reMarkable/uboot/archive/$_gittag.tar.gz
|
||||
gcc-12-u-boot-2020-fix-read-only-segment-has-dynamic-relocations-error.patch
|
||||
uboot-config.patch
|
||||
"
|
||||
builddir="$srcdir/uboot-$_gittag"
|
||||
|
||||
build() {
|
||||
make ARCH=arm zero-gravitas_config
|
||||
make ARCH=arm CC="${CC:-gcc}"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm755 "$builddir"/u-boot.imx "$pkgdir"/usr/share/u-boot/remarkable-zero-gravitas/u-boot.imx
|
||||
}
|
||||
sha512sums="
|
||||
7cc8d513cac1d63ee5119529caa056164ee3bc3633da5d880fbfb344b770c7c53c41475d42dd129b505390dcd5449e14524afc06f7cdba9354af7e70a7035ef9 u-boot-remarkable-zero-gravitas-97b35fdddf0077abd2e0f0409b94ef20adbe8565.tar.gz
|
||||
b894955579d5a163dc33d689feed7bd6e6d8fcf76952fbf50051debe1f39c60cfde774827e6bb888ecec8f1d22c2ec3d487ee17bae695f63a2357b14e7adf33b gcc-12-u-boot-2020-fix-read-only-segment-has-dynamic-relocations-error.patch
|
||||
673cb917cc565ae245d4a7d659227bc240473112bc9c73ae184a64ce74be7994273d6dc4db17194d348941f83a42b3b67d3140f6f23c37c13d6dc93f7d76cc39 uboot-config.patch
|
||||
"
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Makefile.orig b/Makefile
|
||||
index a4c2adce3..f8ff517a3 100644
|
||||
--- a/Makefile.orig
|
||||
+++ b/Makefile
|
||||
@@ -771,6 +771,8 @@ ifneq ($(CONFIG_BUILD_TARGET),)
|
||||
ALL-y += $(CONFIG_BUILD_TARGET:"%"=%)
|
||||
endif
|
||||
|
||||
+LDFLAGS_u-boot += -z notext $(call ld-option, --apply-dynamic-relocs)
|
||||
+
|
||||
LDFLAGS_u-boot += $(LDFLAGS_FINAL)
|
||||
ifneq ($(CONFIG_SYS_TEXT_BASE),)
|
||||
LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
|
|
@ -0,0 +1,83 @@
|
|||
diff --git a/include/configs/zero-gravitas.h b/include/configs/zero-gravitas.h
|
||||
index 074f171422..818ed56892 100644
|
||||
--- a/include/configs/zero-gravitas.h
|
||||
+++ b/include/configs/zero-gravitas.h
|
||||
@@ -71,12 +71,10 @@
|
||||
"splashimage=0x80000000\0" \
|
||||
"splashpos=m,m\0" \
|
||||
"active_partition=2\0" \
|
||||
- "fallback_partition=3\0" \
|
||||
"bootlimit=1\0" \
|
||||
"por=undefined\0" \
|
||||
"mmcargs=setenv bootargs console=${console},${baudrate} " \
|
||||
- "systemd.crash_reboot=true memtest " \
|
||||
- "root=/dev/mmcblk1p${active_partition} rootwait rootfstype=ext4 quiet rw por=${por};\0" \
|
||||
+ "root=/dev/mmcblk1p2 rootwait rootfstype=ext4 rw por=${por};\0" \
|
||||
"loadimage=ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
|
||||
"loadfdt=ext4load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
|
||||
"mmcboot=echo Booting from mmc ...; " \
|
||||
@@ -89,41 +87,13 @@
|
||||
"echo WARN: Cannot load the DT; " \
|
||||
"fi; " \
|
||||
"fi; " \
|
||||
- "fi;\0" \
|
||||
- "memboot=echo Booting from memory...; " \
|
||||
- "setenv bootargs console=${console},${baudrate} " \
|
||||
- "g_mass_storage.stall=0 g_mass_storage.removable=1 " \
|
||||
- "g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
|
||||
- "g_mass_storage.iSerialNumber=\"\" rdinit=/linuxrc; "\
|
||||
- "bootz ${loadaddr} ${initrd} ${fdt_addr};\0" \
|
||||
- "altbootcmd=echo Running from fallback root...; " \
|
||||
- "run memboot; " \
|
||||
- "if test ${bootcount} -gt 10; then " \
|
||||
- "echo WARN: Failed too much, resetting bootcount and turning off; " \
|
||||
- "setenv bootcount 0; " \
|
||||
- "saveenv; " \
|
||||
- "poweroff; " \
|
||||
- "fi; " \
|
||||
- "setenv mmcpart ${fallback_partition}; " \
|
||||
- "setenv bootargs console=${console},${baudrate} " \
|
||||
- "root=/dev/mmcblk1p${fallback_partition} rootwait rootfstype=ext4 quiet rw " \
|
||||
- "systemd.log_level=debug systemd.log_target=kmsg memtest " \
|
||||
- "log_buf_len=1M printk.devkmsg systemd.journald.forward_to_console=1; " \
|
||||
- "run mmcboot;\0" \
|
||||
+ "fi;\0"
|
||||
|
||||
/* Always try to boot from memory first, in case of USB download mode */
|
||||
#define CONFIG_BOOTCOMMAND \
|
||||
- "if test ! -e mmc 1:1 uboot.env; then " \
|
||||
- "saveenv; " \
|
||||
- "fi; " \
|
||||
- "run memboot; " \
|
||||
"run mmcargs; " \
|
||||
"setenv mmcpart ${active_partition}; " \
|
||||
- "run mmcboot; " \
|
||||
- "echo WARN: unable to boot from either RAM or eMMC; " \
|
||||
- "setenv upgrade_available 1; " \
|
||||
- "saveenv; " \
|
||||
- "reset; "
|
||||
+ "run mmcboot; "
|
||||
|
||||
#ifdef CONFIG_BOOTDELAY
|
||||
#undef CONFIG_BOOTDELAY
|
||||
@@ -157,18 +127,8 @@
|
||||
/* Environment organization */
|
||||
#define CONFIG_ENV_SIZE SZ_8K
|
||||
|
||||
-#define CONFIG_ENV_IS_IN_FAT
|
||||
-/*#define CONFIG_ENV_IS_NOWHERE*/
|
||||
-
|
||||
-#ifdef CONFIG_ENV_IS_IN_FAT
|
||||
-#define CONFIG_BOOTCOUNT_LIMIT
|
||||
-#define CONFIG_BOOTCOUNT_ENV
|
||||
-
|
||||
-#define FAT_ENV_INTERFACE "mmc"
|
||||
-#define FAT_ENV_DEVICE_AND_PART "1:1"
|
||||
-#define CONFIG_FAT_WRITE
|
||||
-#define FAT_ENV_FILE "uboot.env"
|
||||
-#endif
|
||||
+/*#define CONFIG_ENV_IS_IN_FAT*/
|
||||
+#define CONFIG_ENV_IS_NOWHERE
|
||||
|
||||
#ifdef CONFIG_CMD_SF
|
||||
#define CONFIG_MXC_SPI
|
|
@ -0,0 +1,44 @@
|
|||
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
|
||||
|
||||
pkgname=xf86-video-fbdev-remarkable-zero-gravitas
|
||||
pkgver=0.5.0
|
||||
_kver=5.4.70
|
||||
pkgrel=0
|
||||
pkgdesc="Video driver for framebuffer device with support for reMarkable rM1 (remarkable-zero-gravitas)"
|
||||
url="https://www.x.org"
|
||||
arch="armv7"
|
||||
license="MIT"
|
||||
subpackages="$pkgname-doc"
|
||||
provides="xf86-video-fbdev=$pkgver-r$pkgrel"
|
||||
makedepends="xorg-server-dev libxi-dev util-macros xorgproto linux-remarkable-zero-gravitas-dev"
|
||||
builddir="$srcdir"/xf86-video-fbdev-$pkgver
|
||||
source="
|
||||
https://www.x.org/releases/individual/driver/xf86-video-fbdev-$pkgver.tar.bz2
|
||||
epdc_auto-update-patch.patch
|
||||
fix-build.patch
|
||||
"
|
||||
|
||||
build() {
|
||||
export LDFLAGS="$LDFLAGS -Wl,-z,lazy -I/usr/src/linux-headers-$_kver/include"
|
||||
export CPPFLAGS="$CPPFLAGS -I/usr/src/linux-headers-$_kver/include"
|
||||
export CFLAGS="$CFLAGS -I/usr/src/linux-headers-$_kver/include"
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
c1217b943bbe3301b3c2a8649ed1004c3c67b02607bd56bbc14f6dfa05e7f0184332c81a6a19595514745501ed88526aee932e555779b7c3a8233646b0979448 xf86-video-fbdev-0.5.0.tar.bz2
|
||||
c211a2edf90b622d522a0513358431afa33c7b3b958b054221ff3a6e8ff72d1012b0141b073ea070f4bb2d2f9042d8e092434f14a91bea3bf8bf188c78c0bcb7 epdc_auto-update-patch.patch
|
||||
19c6680d8e8b0ba3903fb76438b54f294a1715b93d50e1cb2ef95bb04770add5fdad1df4260ab7eb00bb26578baa79b7cfed3f7fa6cba70348611cc3797af3ee fix-build.patch
|
||||
"
|
|
@ -0,0 +1,128 @@
|
|||
diff --git a/src/fbdev.c.orig b/src/fbdev.c
|
||||
index f25ef72..46b3c8c 100644
|
||||
--- a/src/fbdev.c.orig
|
||||
+++ b/src/fbdev.c
|
||||
@@ -8,6 +8,8 @@
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <linux/mxcfb.h>
|
||||
|
||||
/* all driver need this */
|
||||
#include "xf86.h"
|
||||
@@ -18,6 +20,7 @@
|
||||
#include "colormapst.h"
|
||||
#include "xf86cmap.h"
|
||||
#include "shadow.h"
|
||||
+#include "os.h"
|
||||
#include "dgaproc.h"
|
||||
|
||||
/* for visuals */
|
||||
@@ -186,6 +189,9 @@ typedef struct {
|
||||
int rotate;
|
||||
Bool shadowFB;
|
||||
Bool shadow24;
|
||||
+ Bool timerActive;
|
||||
+ OsTimerPtr timer;
|
||||
+ RegionPtr region_queue;
|
||||
void *shadow;
|
||||
CloseScreenProcPtr CloseScreen;
|
||||
CreateScreenResourcesProcPtr CreateScreenResources;
|
||||
@@ -697,6 +703,87 @@ fbdevUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||
shadowUpdatePacked(pScreen, pBuf);
|
||||
}
|
||||
|
||||
+static CARD32 FBDevEPDUpdateWork(OsTimerPtr timer,
|
||||
+ CARD32 time,
|
||||
+ void *arg);
|
||||
+
|
||||
+static void FBDevEPDUpdate(ScreenPtr pScreen, shadowBufPtr pBuf)
|
||||
+{
|
||||
+ RegionPtr damage = DamageRegion(pBuf->pDamage);
|
||||
+
|
||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||
+ FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
+ shadowUpdateProc update;
|
||||
+ if (fPtr->shadow24)
|
||||
+ update = fbdevUpdate32to24;
|
||||
+ else if (fPtr->rotate)
|
||||
+ update = fbdevUpdateRotatePacked;
|
||||
+ else
|
||||
+ update = fbdevUpdatePacked;
|
||||
+
|
||||
+ update(pScreen, pBuf);
|
||||
+
|
||||
+ if (fPtr->region_queue) {
|
||||
+ RegionAppend(fPtr->region_queue, damage);
|
||||
+ } else {
|
||||
+ fPtr->region_queue = RegionDuplicate(damage);
|
||||
+ }
|
||||
+
|
||||
+ if (!fPtr->timerActive) {
|
||||
+ FBDevEPDUpdateWork(fPtr->timer, GetTimeInMillis(),
|
||||
+ pScreen);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static CARD32 FBDevEPDUpdateWork(OsTimerPtr timer,
|
||||
+ CARD32 time,
|
||||
+ void *arg)
|
||||
+{
|
||||
+ ScreenPtr pScreen = (void *)arg;
|
||||
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
|
||||
+ FBDevPtr fPtr = FBDEVPTR(pScrn);
|
||||
+ BoxPtr pbox;
|
||||
+ Bool overlap;
|
||||
+ int nbox;
|
||||
+ int fd = fbdevHWGetFD(pScrn);
|
||||
+ if (fPtr->region_queue == NULL) {
|
||||
+ fPtr->timerActive = FALSE;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ struct mxcfb_update_data upd_region;
|
||||
+ RegionValidate(fPtr->region_queue, &overlap);
|
||||
+ pbox = RegionRects(fPtr->region_queue);
|
||||
+ nbox = RegionNumRects(fPtr->region_queue);
|
||||
+
|
||||
+ while(nbox--) {
|
||||
+ int x, y, w, h;
|
||||
+ int ret;
|
||||
+ x = pbox->x1;
|
||||
+ y = pbox->y1;
|
||||
+ w = (pbox->x2 - pbox->x1);
|
||||
+ h = pbox->y2 - pbox->y1;
|
||||
+ memset(&upd_region, 0, sizeof(upd_region));
|
||||
+ upd_region.update_region.left = x;
|
||||
+ upd_region.update_region.top = y;
|
||||
+ upd_region.update_region.width = w;
|
||||
+ upd_region.update_region.height = h;
|
||||
+ upd_region.waveform_mode = WAVEFORM_MODE_AUTO;
|
||||
+ upd_region.temp = TEMP_USE_AMBIENT;
|
||||
+ upd_region.update_mode = UPDATE_MODE_PARTIAL;
|
||||
+ upd_region.flags = 0;
|
||||
+ ret = ioctl(fd, MXCFB_SEND_UPDATE, &upd_region);
|
||||
+ if (ret < 0)
|
||||
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,"update ioctl failed: %d\n", ret);
|
||||
+ pbox++;
|
||||
+ }
|
||||
+ fPtr->timer = TimerSet(timer, 0, 50, FBDevEPDUpdateWork, pScreen);
|
||||
+ fPtr->timerActive = TRUE;
|
||||
+ RegionDestroy(fPtr->region_queue);
|
||||
+ fPtr->region_queue = NULL;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static Bool
|
||||
FBDevCreateScreenResources(ScreenPtr pScreen)
|
||||
{
|
||||
@@ -722,7 +809,7 @@ FBDevCreateScreenResources(ScreenPtr pScreen)
|
||||
else
|
||||
update = fbdevUpdatePacked;
|
||||
|
||||
- if (!shadowAdd(pScreen, pPixmap, update, FBDevWindowLinear, fPtr->rotate,
|
||||
+ if (!shadowAdd(pScreen, pPixmap, FBDevEPDUpdate, FBDevWindowLinear, fPtr->rotate,
|
||||
NULL)) {
|
||||
return FALSE;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
Upstream: no (too lazy)
|
||||
Reason: fixes build by getting rid of old cpp macro
|
||||
|
||||
diff --git a/src/fbdev.c b/src/fbdev.c
|
||||
index f25ef72..02a2b7a 100644
|
||||
--- a/src/fbdev.c
|
||||
+++ b/src/fbdev.c
|
||||
@@ -1010,7 +1010,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
|
||||
fPtr->CloseScreen = pScreen->CloseScreen;
|
||||
pScreen->CloseScreen = FBDevCloseScreen;
|
||||
|
||||
-#if XV
|
||||
+#if defined(XV)
|
||||
{
|
||||
XF86VideoAdaptorPtr *ptr;
|
||||
|
||||
|
Loading…
Reference in a new issue