Removed upstreamed pkg
This commit is contained in:
		
							parent
							
								
									280ef797bf
								
							
						
					
					
						commit
						3a3ff31ccd
					
				@ -1 +0,0 @@
 | 
			
		||||
DIST 1.0.1.tar.gz 80358 BLAKE2B 27ea71cb0d2dc044b3c870a87fd0920c3bd319c5561417a736790159887e7d16f158807163a5132c3a7bc1590a39762c1bfaa2c0dd8fa89cb42bb8a75d1a2123 SHA512 4d7e7f80405c6c1265855708f1ede0f7ddc3044a7afc3a8083e1c308ba4104a78fc98da1facb1ab3882182d7e30d32bef8bbb22a703e71b1e63a7660387896d4
 | 
			
		||||
@ -1,34 +0,0 @@
 | 
			
		||||
# Copyright 2020 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI=7
 | 
			
		||||
 | 
			
		||||
inherit gnome2-utils meson xdg
 | 
			
		||||
DESCRIPTION="A GTK3 camera application that knows how to deal with the media request api"
 | 
			
		||||
HOMEPAGE="https://git.sr.ht/~martijnbraam/megapixels"
 | 
			
		||||
SRC_URI="https://git.sr.ht/~martijnbraam/${PN}/archive/${PV}.tar.gz"
 | 
			
		||||
 | 
			
		||||
LICENSE="GPL-3"
 | 
			
		||||
SLOT="0"
 | 
			
		||||
KEYWORDS="~amd64 ~x86 ~arm64 ~arm"
 | 
			
		||||
IUSE=""
 | 
			
		||||
 | 
			
		||||
DEPEND="media-libs/tiff
 | 
			
		||||
		x11-libs/gtk+:3
 | 
			
		||||
		media-gfx/dcraw
 | 
			
		||||
		media-libs/hdr-plus
 | 
			
		||||
		media-gfx/zbar
 | 
			
		||||
"
 | 
			
		||||
RDEPEND="${DEPEND}"
 | 
			
		||||
BDEPEND=""
 | 
			
		||||
 | 
			
		||||
pkg_postinst() {
 | 
			
		||||
	xdg_pkg_postinst
 | 
			
		||||
	gnome2_schemas_update
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postrm() {
 | 
			
		||||
	xdg_pkg_postrm
 | 
			
		||||
	gnome2_schemas_update
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,5 +0,0 @@
 | 
			
		||||
DIST all-5.11.6.patch 15061885 BLAKE2B 8e5c483f90e1d2832dd74f26e8078b91fc16a50a5a2d6970c60760e899ec0bc4b39c9399691b31d9ebabc111878edcd09f2417b269b5379a645c02c0517d1f86 SHA512 c8d3d80b7a087c622863cdd17c88fdaf1b0432fbb91e4e8f36463fdcb038d38c0112c0ef31b6e9f7c6af54b3e8bbb9ccd2bd99354c46a34aaa5606e10d7172df
 | 
			
		||||
DIST all-5.12.0.patch 15068592 BLAKE2B 733858b59794cc45269ab89f557836fb8b3421edffebc7726a4ac455e4b97e6c0cc2e5bcc455a341c24a87b6c44203ecf192fe60b152a64bf4a9f5ec6a15fc20 SHA512 2841e9e28cb6cad5a4be04535e378fc8c25cdf0bacfcff190ed6c98d3f10d6dfa54cb771df35dd08cc21043163ca91be552e00805cf1ab06f884651f842bfb4a
 | 
			
		||||
DIST linux-5.11.tar.xz 117619104 BLAKE2B 81300c27bd5476387a83123aaeb4163c73eb61e9245806c23660cb5e6a4fa88ffc9def027031335fa0270fc4080506cd415990014364e3a98b9d2e8c58a29524 SHA512 a567ec133018bb5ec00c60281479b466c26e02137a93a9c690e83997947df02b6fd94e76e8df748f6d70ceb58a19bacc3b1467de10b7a1fad2763db32b3f1330
 | 
			
		||||
DIST linux-5.12.tar.xz 118112412 BLAKE2B 842d921b9a73d2aaade763dbd2ec67bdfe0275baa6d628b775f5c87574ad7dc86f0419afcd48c10c1235f4bffa16084243f2cf4556e6afcd391e975fe8ba530b SHA512 be03b6fee1d1ea8087b09874d27c0a602c0b04fd90ad38b975bd2c8455a07e83c29b56814aaf1389e82305fae0e4c2d1701075a7f0a7295dd28149f967ec5b3d
 | 
			
		||||
DIST patch-5.11.6.xz 304072 BLAKE2B a081369769bc28c83bae6c8b7ba7eea6e8f8ab784bdf66c7a85bbe9d9144d6cd7258edf7522c6e8ddafe87061be9ed0204aacc82373723d1e0d13d4b7e2962b4 SHA512 240a4aea2982963e96dd9a4714c7385dfaafb2adf8bcc8354038230e43cbf79fa244337aa4d40106cc8ecdf19cc069b4517ab5538a962b9a5126338de4813b7b
 | 
			
		||||
@ -1,40 +0,0 @@
 | 
			
		||||
From 7045054c96224ead00aae09246f475dfe6202def Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Danct12 <danct12@disroot.org>
 | 
			
		||||
Date: Tue, 19 Jan 2021 10:09:01 +0700
 | 
			
		||||
Subject: [PATCH] arm64: dts: allwinner: pinephone: stop LEDs on suspend
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Danct12 <danct12@disroot.org>
 | 
			
		||||
---
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 3 ---
 | 
			
		||||
 1 file changed, 3 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
index 02d82980c..00ed866ae 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
@@ -218,14 +218,12 @@
 | 
			
		||||
 			function = LED_FUNCTION_INDICATOR;
 | 
			
		||||
 			color = <LED_COLOR_ID_BLUE>;
 | 
			
		||||
 			gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
 | 
			
		||||
-			retain-state-suspended;
 | 
			
		||||
 		};
 | 
			
		||||
 
 | 
			
		||||
 		green {
 | 
			
		||||
 			function = LED_FUNCTION_INDICATOR;
 | 
			
		||||
 			color = <LED_COLOR_ID_GREEN>;
 | 
			
		||||
 			gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
 | 
			
		||||
-			retain-state-suspended;
 | 
			
		||||
 		};
 | 
			
		||||
 
 | 
			
		||||
 		red {
 | 
			
		||||
@@ -233,7 +231,6 @@
 | 
			
		||||
 			function = LED_FUNCTION_INDICATOR;
 | 
			
		||||
 			color = <LED_COLOR_ID_RED>;
 | 
			
		||||
 			gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
 | 
			
		||||
-			retain-state-suspended;
 | 
			
		||||
 		};
 | 
			
		||||
 	};
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
2.30.0
 | 
			
		||||
 | 
			
		||||
@ -1,61 +0,0 @@
 | 
			
		||||
From 33212e529708fd480eaf9cc76579f8e7044c0505 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Martijn Braam <martijn@brixit.nl>
 | 
			
		||||
Date: Tue, 20 Oct 2020 14:42:01 +0200
 | 
			
		||||
Subject: [PATCH] dts: add pinetab-dev (old display panel)
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/Makefile        |  1 +
 | 
			
		||||
 .../dts/allwinner/sun50i-a64-pinetab-dev.dts  | 29 +++++++++++++++++++
 | 
			
		||||
 2 files changed, 30 insertions(+)
 | 
			
		||||
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab-dev.dts
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
 | 
			
		||||
index a21cfdd8924d..2936092002b5 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/Makefile
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/Makefile
 | 
			
		||||
@@ -15,6 +15,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinephone-1.0.dtb
 | 
			
		||||
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinephone-1.1.dtb
 | 
			
		||||
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinephone-1.2.dtb
 | 
			
		||||
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinetab.dtb
 | 
			
		||||
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-pinetab-dev.dtb
 | 
			
		||||
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-sopine-baseboard.dtb
 | 
			
		||||
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-a64-teres-i.dtb
 | 
			
		||||
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-bananapi-m2-plus.dtb
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab-dev.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab-dev.dts
 | 
			
		||||
new file mode 100644
 | 
			
		||||
index 000000000000..1e287f2fb9f3
 | 
			
		||||
--- /dev/null
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab-dev.dts
 | 
			
		||||
@@ -0,0 +1,29 @@
 | 
			
		||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 | 
			
		||||
+/*
 | 
			
		||||
+ * Copyright (C) 2019 Icenowy Zheng <icenowy@aosc.xyz>
 | 
			
		||||
+ *
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+/dts-v1/;
 | 
			
		||||
+
 | 
			
		||||
+#include "sun50i-a64-pinetab.dts"
 | 
			
		||||
+
 | 
			
		||||
+/ {
 | 
			
		||||
+	model = "PineTab";
 | 
			
		||||
+	compatible = "pine64,pinetab", "allwinner,sun50i-a64";
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&dsi {
 | 
			
		||||
+	vcc-dsi-supply = <®_dldo1>;
 | 
			
		||||
+	status = "okay";
 | 
			
		||||
+
 | 
			
		||||
+	panel@0 {
 | 
			
		||||
+		compatible = "feixin,k101-im2ba02";
 | 
			
		||||
+		reg = <0>;
 | 
			
		||||
+		avdd-supply = <®_dc1sw>;
 | 
			
		||||
+		dvdd-supply = <®_dc1sw>;
 | 
			
		||||
+		cvdd-supply = <®_ldo_io1>;
 | 
			
		||||
+		reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
 | 
			
		||||
+		backlight = <&backlight>;
 | 
			
		||||
+	};
 | 
			
		||||
+};
 | 
			
		||||
-- 
 | 
			
		||||
2.25.4
 | 
			
		||||
 | 
			
		||||
@ -1,56 +0,0 @@
 | 
			
		||||
From 05044b9e4e4ae03f66e1c504d6fef57a1d135897 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Dylan Van Assche <me@dylanvanassche.be>
 | 
			
		||||
Date: Thu, 24 Dec 2020 19:57:12 +0100
 | 
			
		||||
Subject: [PATCH] dts: pinephone: Add 'pine64,pinephone' to compat list
 | 
			
		||||
 | 
			
		||||
Indicates that all PinePhone models share most of the hardware with each other.
 | 
			
		||||
Used for feedbackd configuration when retrieving a device specific config for
 | 
			
		||||
haptic feedbackd.
 | 
			
		||||
---
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 2 +-
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 2 +-
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts | 2 +-
 | 
			
		||||
 3 files changed, 3 insertions(+), 3 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
 | 
			
		||||
index 0f6faa44c..2e0892b32 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
 
 | 
			
		||||
 / {
 | 
			
		||||
 	model = "Pine64 PinePhone Developer Batch (1.0)";
 | 
			
		||||
-	compatible = "pine64,pinephone-1.0", "allwinner,sun50i-a64";
 | 
			
		||||
+	compatible = "pine64,pinephone-1.0", "pine64,pinephone", "allwinner,sun50i-a64";
 | 
			
		||||
 
 | 
			
		||||
 	reg_vbus: usb0-vbus {
 | 
			
		||||
 		compatible = "regulator-fixed";
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
index 95a880fdc..d6bad0838 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
 
 | 
			
		||||
 / {
 | 
			
		||||
 	model = "Pine64 PinePhone Braveheart (1.1)";
 | 
			
		||||
-	compatible = "pine64,pinephone-1.1", "allwinner,sun50i-a64";
 | 
			
		||||
+	compatible = "pine64,pinephone-1.1", "pine64,pinephone", "allwinner,sun50i-a64";
 | 
			
		||||
 
 | 
			
		||||
 	reg_vbus: usb0-vbus {
 | 
			
		||||
 		compatible = "regulator-fixed";
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
index 23ba72508..710493186 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
@@ -7,7 +7,7 @@
 | 
			
		||||
 
 | 
			
		||||
 / {
 | 
			
		||||
 	model = "Pine64 PinePhone (1.2)";
 | 
			
		||||
-	compatible = "pine64,pinephone-1.2", "allwinner,sun50i-a64";
 | 
			
		||||
+	compatible = "pine64,pinephone-1.2", "pine64,pinephone", "allwinner,sun50i-a64";
 | 
			
		||||
 
 | 
			
		||||
 	wifi_pwrseq: wifi-pwrseq {
 | 
			
		||||
 		compatible = "mmc-pwrseq-simple";
 | 
			
		||||
-- 
 | 
			
		||||
2.26.2
 | 
			
		||||
 | 
			
		||||
@ -1,29 +0,0 @@
 | 
			
		||||
From c965cb8a004c6cc370b4bf297c61fe5ac8ab0583 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Martijn Braam <martijn@brixit.nl>
 | 
			
		||||
Date: Wed, 6 Jan 2021 03:11:17 +0100
 | 
			
		||||
Subject: [PATCH] arm64: dts: sunxi: Add mmc aliases for the PineTab
 | 
			
		||||
 | 
			
		||||
The order for the mmc devices changed in the kernel without this change.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Martijn Braam <martijn@brixit.nl>
 | 
			
		||||
---
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts | 3 +++
 | 
			
		||||
 1 file changed, 3 insertions(+)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
index a87790df94b3..1cf3c3a9ad7f 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
@@ -18,6 +18,9 @@ / {
 | 
			
		||||
 	compatible = "pine64,pinetab", "allwinner,sun50i-a64";
 | 
			
		||||
 
 | 
			
		||||
 	aliases {
 | 
			
		||||
+		mmc0 = &mmc0;
 | 
			
		||||
+		mmc1 = &mmc1;
 | 
			
		||||
+		mmc2 = &mmc2;
 | 
			
		||||
 		serial0 = &uart0;
 | 
			
		||||
 		ethernet0 = &rtl8723cs;
 | 
			
		||||
 	};
 | 
			
		||||
-- 
 | 
			
		||||
2.29.2
 | 
			
		||||
 | 
			
		||||
@ -1,29 +0,0 @@
 | 
			
		||||
From d753557c64f6e85f63cffab53496d6271d724074 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Martijn Braam <martijn@brixit.nl>
 | 
			
		||||
Date: Mon, 15 Feb 2021 13:10:37 -0800
 | 
			
		||||
Subject: [PATCH] pinephone: fix pogopin i2c
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 6 +-----
 | 
			
		||||
 1 file changed, 1 insertion(+), 5 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
index 39fdf96fe95d..7d0dd52e2f9d 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
@@ -635,11 +635,7 @@ &pio {
 | 
			
		||||
 	vcc-pb-supply = <®_dcdc1>;
 | 
			
		||||
 	vcc-pc-supply = <®_dcdc1>;
 | 
			
		||||
 	vcc-pd-supply = <®_dcdc1>;
 | 
			
		||||
-	/* pinctrl would enable this even if no camera is powered,
 | 
			
		||||
-	 * which is wrong/not necessary
 | 
			
		||||
-	 *
 | 
			
		||||
-	 * vcc-pe-supply = <®_aldo1>; (also used by pogo pins i2c)
 | 
			
		||||
-	 */
 | 
			
		||||
+	vcc-pe-supply = <®_aldo1>; /* (also used by pogo pins i2c) */
 | 
			
		||||
 	vcc-pf-supply = <®_dcdc1>;
 | 
			
		||||
 	vcc-pg-supply = <®_dldo4>;
 | 
			
		||||
 	vcc-ph-supply = <®_dcdc1>;
 | 
			
		||||
-- 
 | 
			
		||||
2.30.1
 | 
			
		||||
 | 
			
		||||
@ -1,12 +0,0 @@
 | 
			
		||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
 | 
			
		||||
index 03b83aa91277..dfc6c7d1b0e7 100644
 | 
			
		||||
--- a/drivers/bluetooth/btusb.c
 | 
			
		||||
+++ b/drivers/bluetooth/btusb.c
 | 
			
		||||
@@ -4070,6 +4070,7 @@ static int btusb_setup_qca(struct hci_dev *hdev)
 | 
			
		||||
 	}
 | 
			
		||||
 	if (!info) {
 | 
			
		||||
 		bt_dev_err(hdev, "don't support firmware rome 0x%x", ver_rom);
 | 
			
		||||
+		if (ver_rom & ~0xffffU) return 0;
 | 
			
		||||
 		return -ENODEV;
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
@ -1,49 +0,0 @@
 | 
			
		||||
From cb408fb65a08bd45543724c1e9b8f38ae1bebc4a Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
 | 
			
		||||
Date: Tue, 4 Aug 2020 15:12:59 +0200
 | 
			
		||||
Subject: [PATCH 177/183] leds-gpio: make max_brightness configurable
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 drivers/leds/leds-gpio.c | 4 ++++
 | 
			
		||||
 include/linux/leds.h     | 3 ++-
 | 
			
		||||
 2 files changed, 6 insertions(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
 | 
			
		||||
index 93f5b1b60fde..f8483fab1164 100644
 | 
			
		||||
--- a/drivers/leds/leds-gpio.c
 | 
			
		||||
+++ b/drivers/leds/leds-gpio.c
 | 
			
		||||
@@ -108,6 +108,8 @@ static int create_gpio_led(const struct gpio_led *template,
 | 
			
		||||
 	if (ret < 0)
 | 
			
		||||
 		return ret;
 | 
			
		||||
 
 | 
			
		||||
+	led_dat->cdev.max_brightness = template->max_brightness;
 | 
			
		||||
+
 | 
			
		||||
 	if (template->name) {
 | 
			
		||||
 		led_dat->cdev.name = template->name;
 | 
			
		||||
 		ret = devm_led_classdev_register(parent, &led_dat->cdev);
 | 
			
		||||
@@ -177,6 +179,8 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
 | 
			
		||||
 		if (fwnode_property_present(child, "panic-indicator"))
 | 
			
		||||
 			led.panic_indicator = 1;
 | 
			
		||||
 
 | 
			
		||||
+		fwnode_property_read_u32(child, "max-brightness", &led.max_brightness);
 | 
			
		||||
+
 | 
			
		||||
 		ret = create_gpio_led(&led, led_dat, dev, child, NULL);
 | 
			
		||||
 		if (ret < 0) {
 | 
			
		||||
 			fwnode_handle_put(child);
 | 
			
		||||
diff --git a/include/linux/leds.h b/include/linux/leds.h
 | 
			
		||||
index 6a8d6409c993..99a80092114d 100644
 | 
			
		||||
--- a/include/linux/leds.h
 | 
			
		||||
+++ b/include/linux/leds.h
 | 
			
		||||
@@ -513,7 +513,8 @@ typedef int (*gpio_blink_set_t)(struct gpio_desc *desc, int state,
 | 
			
		||||
 struct gpio_led {
 | 
			
		||||
 	const char *name;
 | 
			
		||||
 	const char *default_trigger;
 | 
			
		||||
-	unsigned 	gpio;
 | 
			
		||||
+	unsigned	gpio;
 | 
			
		||||
+	unsigned	max_brightness;
 | 
			
		||||
 	unsigned	active_low : 1;
 | 
			
		||||
 	unsigned	retain_state_suspended : 1;
 | 
			
		||||
 	unsigned	panic_indicator : 1;
 | 
			
		||||
-- 
 | 
			
		||||
2.30.0
 | 
			
		||||
 | 
			
		||||
@ -1,25 +0,0 @@
 | 
			
		||||
From 2253c0d31cf17debb97db418bec21ad59cd47c14 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
 | 
			
		||||
Date: Tue, 3 Nov 2020 17:04:35 +0100
 | 
			
		||||
Subject: [PATCH 178/183] sun8i-codec: fix headphone jack pin name
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 sound/soc/sunxi/sun8i-codec.c | 2 +-
 | 
			
		||||
 1 file changed, 1 insertion(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
 | 
			
		||||
index 6128d861df90..ab751fd7c426 100644
 | 
			
		||||
--- a/sound/soc/sunxi/sun8i-codec.c
 | 
			
		||||
+++ b/sound/soc/sunxi/sun8i-codec.c
 | 
			
		||||
@@ -1272,7 +1272,7 @@ static const struct snd_soc_dapm_route sun8i_codec_legacy_routes[] = {
 | 
			
		||||
 
 | 
			
		||||
 static struct snd_soc_jack_pin sun8i_codec_jack_pins[] = {
 | 
			
		||||
 	{
 | 
			
		||||
-		.pin	= "Headphone Jack",
 | 
			
		||||
+		.pin	= "Headphone",
 | 
			
		||||
 		.mask	= SND_JACK_HEADPHONE,
 | 
			
		||||
 	},
 | 
			
		||||
 	{
 | 
			
		||||
-- 
 | 
			
		||||
2.30.0
 | 
			
		||||
 | 
			
		||||
@ -1,130 +0,0 @@
 | 
			
		||||
From 465a75a727ae5eb4c94859bfac4742cb14e38b3e Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
 | 
			
		||||
Date: Fri, 3 Apr 2020 17:13:55 +0200
 | 
			
		||||
Subject: [PATCH 179/183] arm64: dts: allwinner: pinephone: improve device tree
 | 
			
		||||
 | 
			
		||||
On PinePhone, the headset mic bias resistor isn't populated on the
 | 
			
		||||
schematics (R811), therefore we need to enable the codec's internal
 | 
			
		||||
resistor. Additionnally, the jack detection IRQ's are inverted due to the
 | 
			
		||||
connector wiring, so the necessary property is added to the codec node
 | 
			
		||||
to made the driver aware of this fact.
 | 
			
		||||
 | 
			
		||||
We also stop LEDs during suspend to improve battery life, lower
 | 
			
		||||
cpu_alert* temperatures so the phone doesn't get too hot and improve the
 | 
			
		||||
backlight brightness values so we have a wider usable range.
 | 
			
		||||
 | 
			
		||||
Finally, the RGB LED max_brightness is set to 1 as it isn't using a PWM
 | 
			
		||||
output.
 | 
			
		||||
---
 | 
			
		||||
 .../dts/allwinner/sun50i-a64-pinephone-1.1.dts | 10 +++++-----
 | 
			
		||||
 .../dts/allwinner/sun50i-a64-pinephone-1.2.dts | 13 ++++++-------
 | 
			
		||||
 .../dts/allwinner/sun50i-a64-pinephone.dtsi    | 18 +++++++++++++-----
 | 
			
		||||
 3 files changed, 24 insertions(+), 17 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
index f084c4f21f12..573f1929da4f 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
@@ -29,11 +29,11 @@ &backlight {
 | 
			
		||||
 	 * value here was chosen as a safe default.
 | 
			
		||||
 	 */
 | 
			
		||||
 	brightness-levels = <
 | 
			
		||||
-		774  793  814  842
 | 
			
		||||
-		882  935  1003 1088
 | 
			
		||||
-		1192 1316 1462 1633
 | 
			
		||||
-		1830 2054 2309 2596
 | 
			
		||||
-		2916 3271 3664 4096>;
 | 
			
		||||
+		392  413  436  468
 | 
			
		||||
+		512  571  647  742
 | 
			
		||||
+		857  995  1159 1349
 | 
			
		||||
+		1568 1819 2103 2423
 | 
			
		||||
+		2779 3176 3614 4096>;
 | 
			
		||||
 	num-interpolated-steps = <50>;
 | 
			
		||||
 	default-brightness-level = <400>;
 | 
			
		||||
 };
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
index bbf64677c22b..6c3922543fec 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
@@ -34,14 +34,13 @@ &backlight {
 | 
			
		||||
 	 * chosen as a safe default.
 | 
			
		||||
 	 */
 | 
			
		||||
 	brightness-levels = <
 | 
			
		||||
-		5000 5248 5506 5858 6345
 | 
			
		||||
-		6987 7805 8823 10062 11543
 | 
			
		||||
-		13287 15317 17654 20319 23336
 | 
			
		||||
-		26724 30505 34702 39335 44427
 | 
			
		||||
-		50000
 | 
			
		||||
-	>;
 | 
			
		||||
+		392  413  436  468
 | 
			
		||||
+		512  571  647  742
 | 
			
		||||
+		857  995  1159 1349
 | 
			
		||||
+		1568 1819 2103 2423
 | 
			
		||||
+		2779 3176 3614 4096>;
 | 
			
		||||
 	num-interpolated-steps = <50>;
 | 
			
		||||
-	default-brightness-level = <500>;
 | 
			
		||||
+	default-brightness-level = <400>;
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 &lis3mdl {
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
index c55709197804..441358592072 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
@@ -80,21 +80,21 @@ blue {
 | 
			
		||||
 			function = LED_FUNCTION_INDICATOR;
 | 
			
		||||
 			color = <LED_COLOR_ID_BLUE>;
 | 
			
		||||
 			gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
 | 
			
		||||
-			retain-state-suspended;
 | 
			
		||||
+			max-brightness = <1>;
 | 
			
		||||
 		};
 | 
			
		||||
 
 | 
			
		||||
 		green {
 | 
			
		||||
 			function = LED_FUNCTION_INDICATOR;
 | 
			
		||||
 			color = <LED_COLOR_ID_GREEN>;
 | 
			
		||||
 			gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
 | 
			
		||||
-			retain-state-suspended;
 | 
			
		||||
+			max-brightness = <1>;
 | 
			
		||||
 		};
 | 
			
		||||
 
 | 
			
		||||
 		red {
 | 
			
		||||
 			function = LED_FUNCTION_INDICATOR;
 | 
			
		||||
 			color = <LED_COLOR_ID_RED>;
 | 
			
		||||
 			gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
 | 
			
		||||
-			retain-state-suspended;
 | 
			
		||||
+			max-brightness = <1>;
 | 
			
		||||
 		};
 | 
			
		||||
 	};
 | 
			
		||||
 
 | 
			
		||||
@@ -198,6 +198,14 @@ &cpu3 {
 | 
			
		||||
 	cpu-supply = <®_dcdc2>;
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
+&cpu_alert0 {
 | 
			
		||||
+	temperature = <60000>;
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&cpu_alert1 {
 | 
			
		||||
+	temperature = <80000>;
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
 &csi {
 | 
			
		||||
 	pinctrl-0 = <&csi_pins>, <&csi_mclk_pin>;
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
@@ -671,11 +679,11 @@ &sound {
 | 
			
		||||
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
 | 
			
		||||
 	simple-audio-card,widgets = "Microphone", "Headset Microphone",
 | 
			
		||||
 				    "Microphone", "Internal Microphone",
 | 
			
		||||
-				    "Headphone", "Headphone Jack",
 | 
			
		||||
+				    "Headphone", "Headphone",
 | 
			
		||||
 				    "Speaker", "Internal Earpiece",
 | 
			
		||||
 				    "Speaker", "Internal Speaker";
 | 
			
		||||
 	simple-audio-card,routing =
 | 
			
		||||
-			"Headphone Jack", "HP",
 | 
			
		||||
+			"Headphone", "HP",
 | 
			
		||||
 			"Internal Earpiece", "EARPIECE",
 | 
			
		||||
 			"Internal Speaker", "Speaker Amp OUTL",
 | 
			
		||||
 			"Internal Speaker", "Speaker Amp OUTR",
 | 
			
		||||
-- 
 | 
			
		||||
2.30.0
 | 
			
		||||
 | 
			
		||||
@ -1,32 +0,0 @@
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
index 086b5ebfa512..b4a71b02c474 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
@@ -304,11 +304,13 @@ &codec {
 | 
			
		||||
 	pinctrl-names = "default";
 | 
			
		||||
 	pinctrl-0 = <&aif2_pins>, <&aif3_pins>;
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
+	allwinner,inverted-jack-detection;
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 &codec_analog {
 | 
			
		||||
 	cpvdd-supply = <®_eldo1>;
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
+	allwinner,internal-bias-resistor;
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 &cpu0 {
 | 
			
		||||
@@ -758,11 +760,11 @@ &sound {
 | 
			
		||||
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
 | 
			
		||||
 	simple-audio-card,widgets = "Microphone", "Headset Microphone",
 | 
			
		||||
 				    "Microphone", "Internal Microphone",
 | 
			
		||||
-				    "Headphone", "Headphone Jack",
 | 
			
		||||
+				    "Headphone", "Headphone",
 | 
			
		||||
 				    "Speaker", "Internal Earpiece",
 | 
			
		||||
 				    "Speaker", "Internal Speaker";
 | 
			
		||||
 	simple-audio-card,routing =
 | 
			
		||||
-			"Headphone Jack", "HP",
 | 
			
		||||
+			"Headphone", "HP",
 | 
			
		||||
 			"Internal Earpiece", "EARPIECE",
 | 
			
		||||
 			"Internal Speaker", "Speaker Amp OUTL",
 | 
			
		||||
 			"Internal Speaker", "Speaker Amp OUTR",
 | 
			
		||||
@ -1,175 +0,0 @@
 | 
			
		||||
From 5da6a7e3f4d6e11f4887893672f849d2d4fa5b58 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Clayton Craft <clayton@craftyguy.net>
 | 
			
		||||
Date: Wed, 16 Dec 2020 20:16:14 -0800
 | 
			
		||||
Subject: [PATCH] dts: pinephone: drop modem-power node
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 .../allwinner/sun50i-a64-pinephone-1.0.dts    | 26 +++---------------
 | 
			
		||||
 .../allwinner/sun50i-a64-pinephone-1.1.dts    | 27 +++----------------
 | 
			
		||||
 .../allwinner/sun50i-a64-pinephone-1.2.dts    | 27 +++----------------
 | 
			
		||||
 .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 12 +++++++++
 | 
			
		||||
 4 files changed, 24 insertions(+), 68 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
 | 
			
		||||
index 0f6faa44ce3e..2cc513772172 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts
 | 
			
		||||
@@ -86,28 +86,6 @@ ®_drivevbus {
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
-&uart3 {
 | 
			
		||||
-	modem {
 | 
			
		||||
-		compatible = "quectel,eg25";
 | 
			
		||||
-		char-device-name = "modem-power";
 | 
			
		||||
-
 | 
			
		||||
-		power-supply = <®_vbat_bb>; /* PL7 */
 | 
			
		||||
-
 | 
			
		||||
-		enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
 | 
			
		||||
-		reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
 | 
			
		||||
-		pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
 | 
			
		||||
-
 | 
			
		||||
-		sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
 | 
			
		||||
-		wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
 | 
			
		||||
-
 | 
			
		||||
-		cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
 | 
			
		||||
-		dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
 | 
			
		||||
-		rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
 | 
			
		||||
-
 | 
			
		||||
-		quectel,qdai = "1,1,0,1,0,0,1,1";
 | 
			
		||||
-	};
 | 
			
		||||
-};
 | 
			
		||||
-
 | 
			
		||||
 &usbphy {
 | 
			
		||||
 	usb-role-switch;
 | 
			
		||||
 
 | 
			
		||||
@@ -118,6 +96,10 @@ usb0_drd_sw: endpoint {
 | 
			
		||||
 	};
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
+&ring_indicator {
 | 
			
		||||
+	gpios = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 */
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
 &sgm3140 {
 | 
			
		||||
 	flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
 | 
			
		||||
 	enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
index 95a880fdc9ce..5f3b6a1a142f 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
@@ -109,34 +109,15 @@
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
+&ring_indicator {
 | 
			
		||||
+	gpios = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 */
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
 &sgm3140 {
 | 
			
		||||
 	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
 | 
			
		||||
 	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
-&uart3 {
 | 
			
		||||
-	modem {
 | 
			
		||||
-		compatible = "quectel,eg25";
 | 
			
		||||
-		char-device-name = "modem-power";
 | 
			
		||||
-
 | 
			
		||||
-		power-supply = <®_vbat_bb>; /* PL7 */
 | 
			
		||||
-
 | 
			
		||||
-		enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
 | 
			
		||||
-		reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
 | 
			
		||||
-		pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
 | 
			
		||||
-		//status-pwrkey-multiplexed; /* status acts as pwrkey */
 | 
			
		||||
-
 | 
			
		||||
-		sleep-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
 | 
			
		||||
-		wakeup-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-RI */
 | 
			
		||||
-
 | 
			
		||||
-		dtr-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-DTR */
 | 
			
		||||
-		cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
 | 
			
		||||
-		rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
 | 
			
		||||
-
 | 
			
		||||
-		quectel,qdai = "1,1,0,1,0,0,1,1";
 | 
			
		||||
-	};
 | 
			
		||||
-};
 | 
			
		||||
-
 | 
			
		||||
 &usbphy {
 | 
			
		||||
 	usb-role-switch;
 | 
			
		||||
 
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
index 23ba72508cfc..889841ca5b8a 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
@@ -101,34 +101,15 @@
 | 
			
		||||
 	enable-active-high;
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
+&ring_indicator {
 | 
			
		||||
+	gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL6 */
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
 &sgm3140 {
 | 
			
		||||
 	enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
 | 
			
		||||
 	flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
-&uart3 {
 | 
			
		||||
-	modem {
 | 
			
		||||
-		compatible = "quectel,eg25";
 | 
			
		||||
-		char-device-name = "modem-power";
 | 
			
		||||
-
 | 
			
		||||
-		power-supply = <®_vbat_bb>; /* PL7 */
 | 
			
		||||
-
 | 
			
		||||
-		enable-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
 | 
			
		||||
-		reset-gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
 | 
			
		||||
-		status-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
 | 
			
		||||
-		pwrkey-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
 | 
			
		||||
-
 | 
			
		||||
-		host-ready-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
 | 
			
		||||
-		wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6-RI */
 | 
			
		||||
-
 | 
			
		||||
-		dtr-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; /* PB2-DTR */
 | 
			
		||||
-		cts-gpios = <&pio 3 5 GPIO_ACTIVE_HIGH>; /* PD5-CTS */
 | 
			
		||||
-		rts-gpios = <&pio 3 4 GPIO_ACTIVE_HIGH>; /* PD4-RTS */
 | 
			
		||||
-
 | 
			
		||||
-		quectel,qdai = "1,1,0,1,0,0,1,1";
 | 
			
		||||
-	};
 | 
			
		||||
-};
 | 
			
		||||
-
 | 
			
		||||
 &usbphy {
 | 
			
		||||
 	usb-role-switch;
 | 
			
		||||
 
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
index 02d82980cf39..979d01de8d84 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
@@ -192,6 +192,17 @@ ec25_codec: ec25-codec {
 | 
			
		||||
 		compatible = "quectel,ec25";
 | 
			
		||||
 	};
 | 
			
		||||
 
 | 
			
		||||
+	gpio-keys {
 | 
			
		||||
+		compatible = "gpio-keys";
 | 
			
		||||
+
 | 
			
		||||
+		ring_indicator: ring-indicator {
 | 
			
		||||
+			label = "Ring Indicator";
 | 
			
		||||
+			linux,can-disable;
 | 
			
		||||
+			linux,code = <KEY_WAKEUP>;
 | 
			
		||||
+			wakeup-source;
 | 
			
		||||
+		};
 | 
			
		||||
+	};
 | 
			
		||||
+
 | 
			
		||||
 	i2c_csi: i2c-csi {
 | 
			
		||||
 		compatible = "i2c-gpio";
 | 
			
		||||
 		sda-gpios = <&pio 4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; /* PE13 */
 | 
			
		||||
@@ -256,6 +267,7 @@ reg_usb_5v: usb-5v {
 | 
			
		||||
 	reg_vbat_bb: vbat-bb {
 | 
			
		||||
 		compatible = "regulator-fixed";
 | 
			
		||||
 		regulator-name = "vbat-bb";
 | 
			
		||||
+		regulator-always-on;
 | 
			
		||||
 		regulator-min-microvolt = <3500000>;
 | 
			
		||||
 		regulator-max-microvolt = <3500000>;
 | 
			
		||||
 		gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
 | 
			
		||||
-- 
 | 
			
		||||
2.29.2
 | 
			
		||||
 | 
			
		||||
@ -1,57 +0,0 @@
 | 
			
		||||
From c8da73c7ae6192f0229aa728c6443c768bf3450f Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Danct12 <danct12@disroot.org>
 | 
			
		||||
Date: Tue, 13 Oct 2020 08:30:32 +0700
 | 
			
		||||
Subject: [PATCH] arm64: dts: allwinner: pinetab: enable HDMI
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Danct12 <danct12@disroot.org>
 | 
			
		||||
---
 | 
			
		||||
 .../boot/dts/allwinner/sun50i-a64-pinetab.dts | 26 +++++++++++++++++++
 | 
			
		||||
 1 file changed, 26 insertions(+)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
index 407837d7fbec..9c96c1532a1e 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
@@ -35,6 +35,17 @@ chosen {
 | 
			
		||||
 		stdout-path = "serial0:115200n8";
 | 
			
		||||
 	};
 | 
			
		||||
 
 | 
			
		||||
+	hdmi-connector {
 | 
			
		||||
+		compatible = "hdmi-connector";
 | 
			
		||||
+		type = "a";
 | 
			
		||||
+
 | 
			
		||||
+		port {
 | 
			
		||||
+			hdmi_con_in: endpoint {
 | 
			
		||||
+				remote-endpoint = <&hdmi_out_con>;
 | 
			
		||||
+			};
 | 
			
		||||
+		};
 | 
			
		||||
+	};
 | 
			
		||||
+
 | 
			
		||||
 	i2c-csi {
 | 
			
		||||
 		compatible = "i2c-gpio";
 | 
			
		||||
 		sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* PE13 */
 | 
			
		||||
@@ -462,6 +473,21 @@ ®_rtc_ldo {
 | 
			
		||||
 	regulator-name = "vcc-rtc";
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
+&simplefb_hdmi {
 | 
			
		||||
+	vcc-hdmi-supply = <®_dldo1>;
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&hdmi {
 | 
			
		||||
+	hvcc-supply = <®_dldo1>;
 | 
			
		||||
+	status = "okay";
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&hdmi_out {
 | 
			
		||||
+	hdmi_out_con: endpoint {
 | 
			
		||||
+		remote-endpoint = <&hdmi_con_in>;
 | 
			
		||||
+	};
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
 &sound {
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
 | 
			
		||||
-- 
 | 
			
		||||
2.28.0
 | 
			
		||||
 | 
			
		||||
@ -1,38 +0,0 @@
 | 
			
		||||
From 7dd3866d9c2bef4bb73a781861aeeec595510509 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
 | 
			
		||||
Date: Fri, 3 Apr 2020 17:13:55 +0200
 | 
			
		||||
Subject: [PATCH] arm64: dts: allwinner: pinetab: enable jack detection
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts | 3 +++
 | 
			
		||||
 1 file changed, 3 insertions(+)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
index a87790df9..a72c2ec8c 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
@@ -117,11 +117,13 @@ wifi_pwrseq: wifi_pwrseq {
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 &codec {
 | 
			
		||||
+	allwinner,inverted-jack-detection;
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 &codec_analog {
 | 
			
		||||
 	cpvdd-supply = <®_eldo1>;
 | 
			
		||||
+	allwinner,internal-bias-resistor;
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
@@ -448,6 +450,7 @@ ®_rtc_ldo {
 | 
			
		||||
 
 | 
			
		||||
 &sound {
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
+	simple-audio-card,name = "PineTab";
 | 
			
		||||
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
 | 
			
		||||
 	simple-audio-card,widgets = "Microphone", "Internal Microphone Left",
 | 
			
		||||
 				    "Microphone", "Internal Microphone Right",
 | 
			
		||||
-- 
 | 
			
		||||
2.28.0
 | 
			
		||||
 | 
			
		||||
@ -1,67 +0,0 @@
 | 
			
		||||
From de578360d41d166ca75b0624e72c5b14f56c0bdf Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
 | 
			
		||||
Date: Wed, 19 Aug 2020 13:10:02 +0200
 | 
			
		||||
Subject: [PATCH] arm64: dts: sun50i-a64-pinephone: improve brightness values
 | 
			
		||||
 on BH/CE
 | 
			
		||||
 | 
			
		||||
Commit aad90c10 caused a brightness increase with the previous values.
 | 
			
		||||
Subsequently, the lowest brightness value would still be fairly bright.
 | 
			
		||||
 | 
			
		||||
This commit aims at providing a wider range of usable brightness for
 | 
			
		||||
1.1+ devices.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
 | 
			
		||||
---
 | 
			
		||||
 .../boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 10 +++++-----
 | 
			
		||||
 .../boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts | 13 ++++++-------
 | 
			
		||||
 2 files changed, 11 insertions(+), 12 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
index 2f993ffc6..c8dcd2291 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts
 | 
			
		||||
@@ -34,11 +34,11 @@ &backlight {
 | 
			
		||||
 	 * value here was chosen as a safe default.
 | 
			
		||||
 	 */
 | 
			
		||||
 	brightness-levels = <
 | 
			
		||||
-		774  793  814  842
 | 
			
		||||
-		882  935  1003 1088
 | 
			
		||||
-		1192 1316 1462 1633
 | 
			
		||||
-		1830 2054 2309 2596
 | 
			
		||||
-		2916 3271 3664 4096>;
 | 
			
		||||
+		392  413  436  468
 | 
			
		||||
+		512  571  647  742
 | 
			
		||||
+		857  995  1159 1349
 | 
			
		||||
+		1568 1819 2103 2423
 | 
			
		||||
+		2779 3176 3614 4096>;
 | 
			
		||||
 	num-interpolated-steps = <50>;
 | 
			
		||||
 	default-brightness-level = <400>;
 | 
			
		||||
 };
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
index 6c3019933..017104df2 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts
 | 
			
		||||
@@ -24,14 +24,13 @@ &backlight {
 | 
			
		||||
 	 * chosen as a safe default.
 | 
			
		||||
 	 */
 | 
			
		||||
 	brightness-levels = <
 | 
			
		||||
-		5000 5248 5506 5858 6345
 | 
			
		||||
-		6987 7805 8823 10062 11543
 | 
			
		||||
-		13287 15317 17654 20319 23336
 | 
			
		||||
-		26724 30505 34702 39335 44427
 | 
			
		||||
-		50000
 | 
			
		||||
-	>;
 | 
			
		||||
+		392  413  436  468
 | 
			
		||||
+		512  571  647  742
 | 
			
		||||
+		857  995  1159 1349
 | 
			
		||||
+		1568 1819 2103 2423
 | 
			
		||||
+		2779 3176 3614 4096>;
 | 
			
		||||
 	num-interpolated-steps = <50>;
 | 
			
		||||
-	default-brightness-level = <500>;
 | 
			
		||||
+	default-brightness-level = <400>;
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 &lis3mdl {
 | 
			
		||||
-- 
 | 
			
		||||
2.28.0
 | 
			
		||||
 | 
			
		||||
@ -1,11 +0,0 @@
 | 
			
		||||
# mkinitcpio preset file for the '%PKGBASE%' package
 | 
			
		||||
 | 
			
		||||
ALL_config="/etc/mkinitcpio.conf"
 | 
			
		||||
ALL_kver="%KERNVER%"
 | 
			
		||||
 | 
			
		||||
PRESETS=('default')
 | 
			
		||||
 | 
			
		||||
#default_config="/etc/mkinitcpio.conf"
 | 
			
		||||
default_image="/boot/initramfs-linux.img"
 | 
			
		||||
#default_options=""
 | 
			
		||||
 | 
			
		||||
@ -1,409 +0,0 @@
 | 
			
		||||
From f062022f2a2781d6b8ca63c460b0e72ebac30870 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Martijn Braam <martijn@brixit.nl>
 | 
			
		||||
Date: Mon, 28 Sep 2020 14:26:11 +0200
 | 
			
		||||
Subject: [PATCH] media: ov5640: Implement autofocus
 | 
			
		||||
 | 
			
		||||
The autofocus functionality needs a firmware blob loaded into the
 | 
			
		||||
internal microcontroller.
 | 
			
		||||
 | 
			
		||||
V4L2 doesn't have an api to control all autofocus functionality, but
 | 
			
		||||
this at least makes it possible to focus on the center of the sensor.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Martijn Braam <martijn@brixit.nl>
 | 
			
		||||
---
 | 
			
		||||
 drivers/media/i2c/ov5640.c | 254 +++++++++++++++++++++++++++++++++++++
 | 
			
		||||
 1 file changed, 254 insertions(+)
 | 
			
		||||
 | 
			
		||||
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
 | 
			
		||||
index df0a507c211f..08a5304c0e95 100644
 | 
			
		||||
--- a/drivers/media/i2c/ov5640.c
 | 
			
		||||
+++ b/drivers/media/i2c/ov5640.c
 | 
			
		||||
@@ -9,6 +9,7 @@
 | 
			
		||||
 #include <linux/clkdev.h>
 | 
			
		||||
 #include <linux/ctype.h>
 | 
			
		||||
 #include <linux/delay.h>
 | 
			
		||||
+#include <linux/firmware.h>
 | 
			
		||||
 #include <linux/device.h>
 | 
			
		||||
 #include <linux/gpio/consumer.h>
 | 
			
		||||
 #include <linux/i2c.h>
 | 
			
		||||
@@ -31,7 +32,11 @@
 | 
			
		||||
 
 | 
			
		||||
 #define OV5640_DEFAULT_SLAVE_ID 0x3c
 | 
			
		||||
 
 | 
			
		||||
+#define OV5640_REG_SYS_RESET00		0x3000
 | 
			
		||||
+#define OV5640_REG_SYS_RESET01		0x3001
 | 
			
		||||
 #define OV5640_REG_SYS_RESET02		0x3002
 | 
			
		||||
+#define OV5640_REG_SYS_CLOCK_ENABLE00	0x3004
 | 
			
		||||
+#define OV5640_REG_SYS_CLOCK_ENABLE01	0x3005
 | 
			
		||||
 #define OV5640_REG_SYS_CLOCK_ENABLE02	0x3006
 | 
			
		||||
 #define OV5640_REG_SYS_CTRL0		0x3008
 | 
			
		||||
 #define OV5640_REG_SYS_CTRL0_SW_PWDN	0x42
 | 
			
		||||
@@ -41,6 +46,14 @@
 | 
			
		||||
 #define OV5640_REG_PAD_OUTPUT_ENABLE01	0x3017
 | 
			
		||||
 #define OV5640_REG_PAD_OUTPUT_ENABLE02	0x3018
 | 
			
		||||
 #define OV5640_REG_PAD_OUTPUT00		0x3019
 | 
			
		||||
+#define OV5640_REG_FW_CMD_MAIN		0x3022
 | 
			
		||||
+#define OV5640_REG_FW_CMD_ACK		0x3023
 | 
			
		||||
+#define OV5640_REG_FW_CMD_PARA0		0x3024
 | 
			
		||||
+#define OV5640_REG_FW_CMD_PARA1		0x3025
 | 
			
		||||
+#define OV5640_REG_FW_CMD_PARA2		0x3026
 | 
			
		||||
+#define OV5640_REG_FW_CMD_PARA3		0x3027
 | 
			
		||||
+#define OV5640_REG_FW_CMD_PARA4		0x3028
 | 
			
		||||
+#define OV5640_REG_FW_STATUS		0x3029
 | 
			
		||||
 #define OV5640_REG_SYSTEM_CONTROL1	0x302e
 | 
			
		||||
 #define OV5640_REG_SC_PLL_CTRL0		0x3034
 | 
			
		||||
 #define OV5640_REG_SC_PLL_CTRL1		0x3035
 | 
			
		||||
@@ -59,6 +72,7 @@
 | 
			
		||||
 #define OV5640_REG_AEC_PK_MANUAL	0x3503
 | 
			
		||||
 #define OV5640_REG_AEC_PK_REAL_GAIN	0x350a
 | 
			
		||||
 #define OV5640_REG_AEC_PK_VTS		0x350c
 | 
			
		||||
+#define OV5640_REG_VCM_CONTROL4		0x3606
 | 
			
		||||
 #define OV5640_REG_TIMING_DVPHO		0x3808
 | 
			
		||||
 #define OV5640_REG_TIMING_DVPVO		0x380a
 | 
			
		||||
 #define OV5640_REG_TIMING_HTS		0x380c
 | 
			
		||||
@@ -95,6 +109,20 @@
 | 
			
		||||
 #define OV5640_REG_SDE_CTRL4		0x5584
 | 
			
		||||
 #define OV5640_REG_SDE_CTRL5		0x5585
 | 
			
		||||
 #define OV5640_REG_AVG_READOUT		0x56a1
 | 
			
		||||
+#define OV5640_REG_FIRMWARE_BASE	0x8000
 | 
			
		||||
+
 | 
			
		||||
+#define OV5640_FW_STATUS_S_FIRMWARE	0x7f
 | 
			
		||||
+#define OV5640_FW_STATUS_S_STARTUP	0x7e
 | 
			
		||||
+#define OV5640_FW_STATUS_S_IDLE		0x70
 | 
			
		||||
+#define OV5640_FW_STATUS_S_FOCUSING	0x00
 | 
			
		||||
+#define OV5640_FW_STATUS_S_FOCUSED	0x10
 | 
			
		||||
+
 | 
			
		||||
+#define OV5640_FW_CMD_TRIGGER_FOCUS	0x03
 | 
			
		||||
+#define OV5640_FW_CMD_CONTINUOUS_FOCUS	0x04
 | 
			
		||||
+#define OV5640_FW_CMD_GET_FOCUS_RESULT	0x07
 | 
			
		||||
+#define OV5640_FW_CMD_RELEASE_FOCUS	0x08
 | 
			
		||||
+#define OV5640_FW_CMD_ZONE_CONFIG	0x12
 | 
			
		||||
+#define OV5640_FW_CMD_DEFAULT_ZONES	0x80
 | 
			
		||||
 
 | 
			
		||||
 enum ov5640_mode_id {
 | 
			
		||||
 	OV5640_MODE_QCIF_176_144 = 0,
 | 
			
		||||
@@ -218,6 +246,12 @@ struct ov5640_ctrls {
 | 
			
		||||
 		struct v4l2_ctrl *auto_gain;
 | 
			
		||||
 		struct v4l2_ctrl *gain;
 | 
			
		||||
 	};
 | 
			
		||||
+	struct {
 | 
			
		||||
+		struct v4l2_ctrl *focus_auto;
 | 
			
		||||
+		struct v4l2_ctrl *af_start;
 | 
			
		||||
+		struct v4l2_ctrl *af_stop;
 | 
			
		||||
+		struct v4l2_ctrl *af_status;
 | 
			
		||||
+	};
 | 
			
		||||
 	struct v4l2_ctrl *brightness;
 | 
			
		||||
 	struct v4l2_ctrl *light_freq;
 | 
			
		||||
 	struct v4l2_ctrl *saturation;
 | 
			
		||||
@@ -261,6 +295,8 @@ struct ov5640_dev {
 | 
			
		||||
 
 | 
			
		||||
 	bool pending_mode_change;
 | 
			
		||||
 	bool streaming;
 | 
			
		||||
+
 | 
			
		||||
+	bool af_initialized;
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 static inline struct ov5640_dev *to_ov5640_dev(struct v4l2_subdev *sd)
 | 
			
		||||
@@ -1967,6 +2003,118 @@ static void ov5640_reset(struct ov5640_dev *sensor)
 | 
			
		||||
 	usleep_range(20000, 25000);
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
+static int ov5640_copy_fw_to_device(struct ov5640_dev *sensor,
 | 
			
		||||
+					const struct firmware *fw)
 | 
			
		||||
+{
 | 
			
		||||
+	struct i2c_client *client = sensor->i2c_client;
 | 
			
		||||
+	const u8 *data = (const u8 *)fw->data;
 | 
			
		||||
+	u8 fw_status;
 | 
			
		||||
+	int i;
 | 
			
		||||
+	int ret;
 | 
			
		||||
+
 | 
			
		||||
+	// Putting MCU in reset state
 | 
			
		||||
+	ret = ov5640_write_reg(sensor, OV5640_REG_SYS_RESET00, 0x20);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	// Write firmware
 | 
			
		||||
+	for (i = 0; i < fw->size / sizeof(u8); i++)
 | 
			
		||||
+		ov5640_write_reg(sensor,
 | 
			
		||||
+				OV5640_REG_FIRMWARE_BASE + i, 
 | 
			
		||||
+				data[i]);
 | 
			
		||||
+
 | 
			
		||||
+	// Reset MCU state
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_CMD_MAIN, 0x00);
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_CMD_ACK, 0x00);
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_CMD_PARA0, 0x00);
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_CMD_PARA1, 0x00);
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_CMD_PARA2, 0x00);
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_CMD_PARA3, 0x00);
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_CMD_PARA4, 0x00);
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_FW_STATUS, 0x7f);
 | 
			
		||||
+
 | 
			
		||||
+	// Start AF MCU
 | 
			
		||||
+	ret = ov5640_write_reg(sensor, OV5640_REG_SYS_RESET00, 0x00);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	dev_info(&client->dev, "firmware upload success\n");
 | 
			
		||||
+
 | 
			
		||||
+	// Wait for firmware to be ready
 | 
			
		||||
+	for (i = 0; i < 5; i++) {
 | 
			
		||||
+		ret = ov5640_read_reg(sensor, OV5640_REG_FW_STATUS, &fw_status);
 | 
			
		||||
+		if (fw_status == OV5640_FW_STATUS_S_IDLE) {
 | 
			
		||||
+			dev_info(&client->dev, "fw started after %d ms\n", i * 50);
 | 
			
		||||
+			return ret;
 | 
			
		||||
+		}
 | 
			
		||||
+		msleep(50);
 | 
			
		||||
+	}
 | 
			
		||||
+	dev_err(&client->dev, "uploaded firmware didn't start, got to 0x%x, retrying...\n", fw_status);
 | 
			
		||||
+
 | 
			
		||||
+	// Putting MCU in reset state
 | 
			
		||||
+	ret = ov5640_write_reg(sensor, OV5640_REG_SYS_RESET00, 0x20);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+	// Start AF MCU
 | 
			
		||||
+	ret = ov5640_write_reg(sensor, OV5640_REG_SYS_RESET00, 0x00);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+	// Wait for firmware to be ready
 | 
			
		||||
+	for (i = 0; i < 5; i++) {
 | 
			
		||||
+		ret = ov5640_read_reg(sensor, OV5640_REG_FW_STATUS, &fw_status);
 | 
			
		||||
+		if (fw_status == OV5640_FW_STATUS_S_IDLE) {
 | 
			
		||||
+			dev_info(&client->dev, "fw started after %d ms\n", i * 50);
 | 
			
		||||
+			return ret;
 | 
			
		||||
+		}
 | 
			
		||||
+		msleep(50);
 | 
			
		||||
+	}
 | 
			
		||||
+	dev_err(&client->dev, "uploaded firmware didn't start, got to 0x%x\n", fw_status);
 | 
			
		||||
+	return -ETIMEDOUT;
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
+static int ov5640_af_init(struct ov5640_dev *sensor)
 | 
			
		||||
+{
 | 
			
		||||
+	struct i2c_client *client = sensor->i2c_client;
 | 
			
		||||
+	const char* fwname = "ov5640_af.bin";
 | 
			
		||||
+	const struct firmware *fw;
 | 
			
		||||
+	int ret;
 | 
			
		||||
+
 | 
			
		||||
+	if (sensor->af_initialized) {
 | 
			
		||||
+		return 0;
 | 
			
		||||
+	}
 | 
			
		||||
+
 | 
			
		||||
+	if (firmware_request_nowarn(&fw, fwname, &client->dev) == 0) {
 | 
			
		||||
+		ret = ov5640_copy_fw_to_device(sensor, fw);
 | 
			
		||||
+		if (ret == 0)
 | 
			
		||||
+			sensor->af_initialized = 1;
 | 
			
		||||
+	} else {
 | 
			
		||||
+		dev_warn(&client->dev, "%s: no autofocus firmware available (%s)\n",
 | 
			
		||||
+			__func__, fwname);
 | 
			
		||||
+		ret = -1;
 | 
			
		||||
+	}
 | 
			
		||||
+	release_firmware(fw);
 | 
			
		||||
+
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	// Enable AF systems
 | 
			
		||||
+	ret = ov5640_mod_reg(sensor, OV5640_REG_SYS_CLOCK_ENABLE00,
 | 
			
		||||
+			     (BIT(6) | BIT(5)), (BIT(6) | BIT(5)));
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+	ret = ov5640_mod_reg(sensor, OV5640_REG_SYS_CLOCK_ENABLE01,
 | 
			
		||||
+			     BIT(6), BIT(6));
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	// Set lens focus driver on
 | 
			
		||||
+	ov5640_write_reg(sensor, OV5640_REG_VCM_CONTROL4, 0x3f);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	return ret;
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
 static int ov5640_set_power_on(struct ov5640_dev *sensor)
 | 
			
		||||
 {
 | 
			
		||||
 	struct i2c_client *client = sensor->i2c_client;
 | 
			
		||||
@@ -1988,6 +2117,8 @@ static int ov5640_set_power_on(struct ov5640_dev *sensor)
 | 
			
		||||
 		goto xclk_off;
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
+	sensor->af_initialized = 0;
 | 
			
		||||
+
 | 
			
		||||
 	ov5640_reset(sensor);
 | 
			
		||||
 	ov5640_power(sensor, true);
 | 
			
		||||
 
 | 
			
		||||
@@ -2416,6 +2547,35 @@ static int ov5640_set_framefmt(struct ov5640_dev *sensor,
 | 
			
		||||
 			      is_jpeg ? (BIT(5) | BIT(3)) : 0);
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
+static int ov5640_fw_command(struct ov5640_dev *sensor, int command)
 | 
			
		||||
+{
 | 
			
		||||
+	u8 fw_ack;
 | 
			
		||||
+	int i;
 | 
			
		||||
+	int ret;
 | 
			
		||||
+
 | 
			
		||||
+	ret = ov5640_write_reg(sensor, OV5640_REG_FW_CMD_ACK, 0x01);
 | 
			
		||||
+	if(ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+	
 | 
			
		||||
+	ret = ov5640_write_reg(sensor, OV5640_REG_FW_CMD_MAIN, command);
 | 
			
		||||
+	if(ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	for (i = 0; i < 100; i++) {
 | 
			
		||||
+		ret = ov5640_read_reg(sensor, OV5640_REG_FW_CMD_ACK, &fw_ack);
 | 
			
		||||
+		if (ret)
 | 
			
		||||
+			return ret;
 | 
			
		||||
+
 | 
			
		||||
+		if (fw_ack == 0){
 | 
			
		||||
+			return ret;
 | 
			
		||||
+		}
 | 
			
		||||
+
 | 
			
		||||
+		msleep(50);
 | 
			
		||||
+	}
 | 
			
		||||
+	return -ETIMEDOUT;
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
+
 | 
			
		||||
 /*
 | 
			
		||||
  * Sensor Controls.
 | 
			
		||||
  */
 | 
			
		||||
@@ -2532,6 +2692,41 @@ static int ov5640_set_ctrl_exposure(struct ov5640_dev *sensor,
 | 
			
		||||
 	return ret;
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
+static int ov5640_set_ctrl_focus(struct ov5640_dev *sensor, int command)
 | 
			
		||||
+{
 | 
			
		||||
+	struct i2c_client *client = sensor->i2c_client;
 | 
			
		||||
+	int ret;
 | 
			
		||||
+
 | 
			
		||||
+	ret = ov5640_af_init(sensor);
 | 
			
		||||
+	if (ret) {
 | 
			
		||||
+		dev_err(&client->dev, "%s: no autofocus firmware loaded\n",
 | 
			
		||||
+			__func__);
 | 
			
		||||
+		return 0;
 | 
			
		||||
+	}
 | 
			
		||||
+
 | 
			
		||||
+	if (command == OV5640_FW_CMD_RELEASE_FOCUS) {
 | 
			
		||||
+		dev_dbg(&client->dev, "%s: Releasing autofocus\n",
 | 
			
		||||
+			__func__);
 | 
			
		||||
+		return ov5640_fw_command(sensor, OV5640_FW_CMD_RELEASE_FOCUS);
 | 
			
		||||
+	}
 | 
			
		||||
+	
 | 
			
		||||
+	// Restart zone config
 | 
			
		||||
+	ret = ov5640_fw_command(sensor, OV5640_FW_CMD_ZONE_CONFIG);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	// Set default focus zones
 | 
			
		||||
+	ret = ov5640_fw_command(sensor, OV5640_FW_CMD_DEFAULT_ZONES);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	dev_dbg(&client->dev, "%s: Triggering autofocus\n",
 | 
			
		||||
+		__func__);
 | 
			
		||||
+
 | 
			
		||||
+	// Start focussing
 | 
			
		||||
+	return ov5640_fw_command(sensor, command);
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
 static int ov5640_set_ctrl_gain(struct ov5640_dev *sensor, bool auto_gain)
 | 
			
		||||
 {
 | 
			
		||||
 	struct ov5640_ctrls *ctrls = &sensor->ctrls;
 | 
			
		||||
@@ -2638,6 +2833,32 @@ static int ov5640_set_ctrl_vflip(struct ov5640_dev *sensor, int value)
 | 
			
		||||
 			      (BIT(2) | BIT(1)) : 0);
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
+static int ov5640_get_af_status(struct ov5640_dev *sensor)
 | 
			
		||||
+{
 | 
			
		||||
+	u8 fw_status;
 | 
			
		||||
+	int ret;
 | 
			
		||||
+
 | 
			
		||||
+	ret = ov5640_read_reg(sensor, OV5640_REG_FW_STATUS, &fw_status);
 | 
			
		||||
+	if (ret)
 | 
			
		||||
+		return ret;
 | 
			
		||||
+
 | 
			
		||||
+	switch (fw_status) {
 | 
			
		||||
+		case OV5640_FW_STATUS_S_FIRMWARE:
 | 
			
		||||
+		case OV5640_FW_STATUS_S_STARTUP:
 | 
			
		||||
+			return V4L2_AUTO_FOCUS_STATUS_FAILED;
 | 
			
		||||
+			break;
 | 
			
		||||
+		case OV5640_FW_STATUS_S_IDLE:
 | 
			
		||||
+			return V4L2_AUTO_FOCUS_STATUS_IDLE;
 | 
			
		||||
+			break;
 | 
			
		||||
+		case OV5640_FW_STATUS_S_FOCUSED:
 | 
			
		||||
+			return V4L2_AUTO_FOCUS_STATUS_REACHED;
 | 
			
		||||
+			break;
 | 
			
		||||
+		default:
 | 
			
		||||
+			return V4L2_AUTO_FOCUS_STATUS_BUSY;
 | 
			
		||||
+			break;
 | 
			
		||||
+	}
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
 static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 | 
			
		||||
 {
 | 
			
		||||
 	struct v4l2_subdev *sd = ctrl_to_sd(ctrl);
 | 
			
		||||
@@ -2659,6 +2880,12 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 | 
			
		||||
 			return val;
 | 
			
		||||
 		sensor->ctrls.exposure->val = val;
 | 
			
		||||
 		break;
 | 
			
		||||
+	case V4L2_CID_FOCUS_AUTO:
 | 
			
		||||
+		val = ov5640_get_af_status(sensor);
 | 
			
		||||
+		if (val < 0)
 | 
			
		||||
+			return val;
 | 
			
		||||
+		sensor->ctrls.af_status->val = val;
 | 
			
		||||
+		break;
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
 	return 0;
 | 
			
		||||
@@ -2690,6 +2917,18 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
 | 
			
		||||
 	case V4L2_CID_AUTO_WHITE_BALANCE:
 | 
			
		||||
 		ret = ov5640_set_ctrl_white_balance(sensor, ctrl->val);
 | 
			
		||||
 		break;
 | 
			
		||||
+	case V4L2_CID_FOCUS_AUTO:
 | 
			
		||||
+		if (ctrl->val)
 | 
			
		||||
+			ret = ov5640_set_ctrl_focus(sensor, OV5640_FW_CMD_CONTINUOUS_FOCUS);
 | 
			
		||||
+		else
 | 
			
		||||
+			ret = ov5640_set_ctrl_focus(sensor, OV5640_FW_CMD_RELEASE_FOCUS);
 | 
			
		||||
+		break;
 | 
			
		||||
+	case V4L2_CID_AUTO_FOCUS_START:
 | 
			
		||||
+		ret = ov5640_set_ctrl_focus(sensor, OV5640_FW_CMD_TRIGGER_FOCUS);
 | 
			
		||||
+		break;
 | 
			
		||||
+	case V4L2_CID_AUTO_FOCUS_STOP:
 | 
			
		||||
+		ret = ov5640_set_ctrl_focus(sensor, OV5640_FW_CMD_RELEASE_FOCUS);
 | 
			
		||||
+		break;
 | 
			
		||||
 	case V4L2_CID_HUE:
 | 
			
		||||
 		ret = ov5640_set_ctrl_hue(sensor, ctrl->val);
 | 
			
		||||
 		break;
 | 
			
		||||
@@ -2762,6 +3001,20 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
 | 
			
		||||
 	ctrls->gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_GAIN,
 | 
			
		||||
 					0, 1023, 1, 0);
 | 
			
		||||
 
 | 
			
		||||
+	/* Autofocus */
 | 
			
		||||
+	ctrls->focus_auto = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_FOCUS_AUTO,
 | 
			
		||||
+					    0, 1, 1, 0);
 | 
			
		||||
+	ctrls->af_start = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_AUTO_FOCUS_START,
 | 
			
		||||
+					    0, 1, 1, 0);
 | 
			
		||||
+	ctrls->af_stop = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_AUTO_FOCUS_STOP,
 | 
			
		||||
+					   0, 1, 1, 0);
 | 
			
		||||
+	ctrls->af_status = v4l2_ctrl_new_std(hdl, ops,
 | 
			
		||||
+					     V4L2_CID_AUTO_FOCUS_STATUS, 0,
 | 
			
		||||
+					     (V4L2_AUTO_FOCUS_STATUS_BUSY |
 | 
			
		||||
+					      V4L2_AUTO_FOCUS_STATUS_REACHED |
 | 
			
		||||
+					      V4L2_AUTO_FOCUS_STATUS_FAILED),
 | 
			
		||||
+					     0, V4L2_AUTO_FOCUS_STATUS_IDLE);
 | 
			
		||||
+
 | 
			
		||||
 	ctrls->saturation = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION,
 | 
			
		||||
 					      0, 255, 1, 64);
 | 
			
		||||
 	ctrls->hue = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_HUE,
 | 
			
		||||
@@ -2795,6 +3048,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
 | 
			
		||||
 	v4l2_ctrl_auto_cluster(3, &ctrls->auto_wb, 0, false);
 | 
			
		||||
 	v4l2_ctrl_auto_cluster(2, &ctrls->auto_gain, 0, true);
 | 
			
		||||
 	v4l2_ctrl_auto_cluster(2, &ctrls->auto_exp, 1, true);
 | 
			
		||||
+	v4l2_ctrl_cluster(4, &ctrls->focus_auto);
 | 
			
		||||
 
 | 
			
		||||
 	sensor->sd.ctrl_handler = hdl;
 | 
			
		||||
 	return 0;
 | 
			
		||||
-- 
 | 
			
		||||
2.25.4
 | 
			
		||||
 | 
			
		||||
@ -1,12 +0,0 @@
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
index 1c555456b..05fab5d79 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
 | 
			
		||||
@@ -78,6 +78,7 @@ green {
 | 
			
		||||
 		};
 | 
			
		||||
 
 | 
			
		||||
 		red {
 | 
			
		||||
+			linux,default-trigger = "panic";
 | 
			
		||||
 			function = LED_FUNCTION_INDICATOR;
 | 
			
		||||
 			color = <LED_COLOR_ID_RED>;
 | 
			
		||||
 			gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
 | 
			
		||||
@ -1,21 +0,0 @@
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
index a72c2ec8c..b3a7bef13 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
@@ -227,7 +227,15 @@ &i2c0_pins {
 | 
			
		||||
 &i2c1 {
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
 
 | 
			
		||||
-	/* TODO: add Bochs BMA223 accelerometer here */
 | 
			
		||||
+	bma223@18 {
 | 
			
		||||
+		compatible = "bosch,bma223", "bosch,bma222e";
 | 
			
		||||
+		reg = <0x18>;
 | 
			
		||||
+		interrupt-parent = <&pio>;
 | 
			
		||||
+		interrupts = <7 5 IRQ_TYPE_LEVEL_HIGH>; /* PH5 */
 | 
			
		||||
+		mount-matrix = "0", "-1", "0",
 | 
			
		||||
+			       "-1", "0", "0",
 | 
			
		||||
+			       "0", "0", "-1";
 | 
			
		||||
+	};
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
 &lradc {
 | 
			
		||||
@ -1,44 +0,0 @@
 | 
			
		||||
From 330d05da1b6e8118c9c4655f0b234cf32a2f1ce4 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Icenowy Zheng <icenowy@aosc.io>
 | 
			
		||||
Date: Sun, 14 Apr 2019 23:46:47 +0800
 | 
			
		||||
Subject: [PATCH] arm64: allwinner: a64: pinetab: enable RTL8723CS bluetooth
 | 
			
		||||
 | 
			
		||||
PineTab has a RTL8723CS Wi-Fi/BT combo chip on board, the bluetooth part
 | 
			
		||||
of it communicates with A64 via UART, and the power of it is controlled
 | 
			
		||||
with some GPIO at PL bank.
 | 
			
		||||
 | 
			
		||||
Enable the bluetooth in the device tree.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
 | 
			
		||||
---
 | 
			
		||||
 .../boot/dts/allwinner/sun50i-a64-pinetab.dts      | 14 ++++++++++++++
 | 
			
		||||
 1 file changed, 14 insertions(+)
 | 
			
		||||
 | 
			
		||||
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
index 84d6e8cb2b88..e8b823875740 100644
 | 
			
		||||
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinetab.dts
 | 
			
		||||
@@ -447,6 +447,20 @@ &uart0 {
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
+&uart1 {
 | 
			
		||||
+	pinctrl-names = "default";
 | 
			
		||||
+	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
 | 
			
		||||
+	status = "okay";
 | 
			
		||||
+
 | 
			
		||||
+	bluetooth {
 | 
			
		||||
+		compatible = "realtek,rtl8723cs-bt";
 | 
			
		||||
+		reset-gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
 | 
			
		||||
+		device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
 | 
			
		||||
+		host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
 | 
			
		||||
+		firmware-postfix = "pinebook";
 | 
			
		||||
+	};
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
 &usb_otg {
 | 
			
		||||
 	dr_mode = "otg";
 | 
			
		||||
 	status = "okay";
 | 
			
		||||
-- 
 | 
			
		||||
GitLab
 | 
			
		||||
 | 
			
		||||
@ -1,62 +0,0 @@
 | 
			
		||||
# Copyright 1999-2020 Gentoo Authors
 | 
			
		||||
# Distributed under the terms of the GNU General Public License v2
 | 
			
		||||
 | 
			
		||||
EAPI="6"
 | 
			
		||||
K_NOUSENAME="yes"
 | 
			
		||||
K_NOSETEXTRAVERSION="yes"
 | 
			
		||||
K_SECURITY_UNSUPPORTED="1"
 | 
			
		||||
ETYPE="sources"
 | 
			
		||||
inherit kernel-2
 | 
			
		||||
detect_version
 | 
			
		||||
 | 
			
		||||
DESCRIPTION="Full sources for the Linux kernel, with megi's patch for pinephone"
 | 
			
		||||
HOMEPAGE="https://www.kernel.org"
 | 
			
		||||
 | 
			
		||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
 | 
			
		||||
MEGI_PATCH_URI="https://xff.cz/kernels/${PV:0:4}/patches/all.patch"
 | 
			
		||||
SRC_URI="${KERNEL_URI} ${MEGI_PATCH_URI} -> all-${PV}.patch"
 | 
			
		||||
 | 
			
		||||
PATCHES=(
 | 
			
		||||
    ${DISTDIR}/all-${PV}.patch
 | 
			
		||||
    ${FILESDIR}/panic-led.patch
 | 
			
		||||
    ${FILESDIR}/enable-hdmi-output-pinetab.patch
 | 
			
		||||
    ${FILESDIR}/improve-brightness.patch
 | 
			
		||||
    ${FILESDIR}/enable-jack-detection-pinetab.patch
 | 
			
		||||
    ${FILESDIR}/pinetab-bluetooth.patch
 | 
			
		||||
    ${FILESDIR}/pinetab-accelerometer.patch
 | 
			
		||||
	${FILESDIR}/dts-pinephone-drop-modem-power-node.patch
 | 
			
		||||
	${FILESDIR}/dts-headphone-jack-detection.patch
 | 
			
		||||
	${FILESDIR}/media-ov5640-Implement-autofocus.patch
 | 
			
		||||
	${FILESDIR}/0011-dts-pinetab-hardcode-mmc-numbers.patch
 | 
			
		||||
	${FILESDIR}/0002-dts-add-pinetab-dev-old-display-panel.patch
 | 
			
		||||
	${FILESDIR}/0001-arm64-dts-allwinner-pinephone-stop-LEDs-on-suspend.patch
 | 
			
		||||
	${FILESDIR}/0010-dts-pinephone-Add-pine64-pinephone-to-compat-list.patch
 | 
			
		||||
	${FILESDIR}/0012-pinephone-fix-pogopin-i2c.patch
 | 
			
		||||
	${FILESDIR}/0107-quirk-kernel-org-bug-210681-firmware_rome_error.patch
 | 
			
		||||
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
src_prepare() {
 | 
			
		||||
	default
 | 
			
		||||
	eapply_user
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postinst() {
 | 
			
		||||
	kernel-2_pkg_postinst
 | 
			
		||||
	einfo "For more info on this patchset, and how to report problems, see:"
 | 
			
		||||
	einfo "${HOMEPAGE}"
 | 
			
		||||
	einfo "To build the kernel use the following command:"
 | 
			
		||||
	einfo "make Image Image.gz modules"
 | 
			
		||||
	einfo "make DTC_FLAGS="-@" dtbs"
 | 
			
		||||
	einfo "make install; make modules_install; make dtbs_install"
 | 
			
		||||
	einfo "If you use kernel config coming with this ebuild, don't forget to also copy dracut-pp.conf to /etc/dracut.conf.d/"
 | 
			
		||||
	einfo "to make sure proper kernel modules are loaded into initramfs"
 | 
			
		||||
	einfo "if you want to cross compile pinephone kernel on amd64 host, follow the https://wiki.gentoo.org/wiki/Cross_build_environment"
 | 
			
		||||
	einfo "to setup cross toolchain environment, then create a xmake wrapper like the following, and replace make with xmake in above commands"
 | 
			
		||||
	einfo "#!/bin/sh"
 | 
			
		||||
	einfo "exec make ARCH='arm64' CROSS_COMPILE='aarch64-unknown-linux-gnu-' INSTALL_MOD_PATH='${SYSROOT}' '$@'"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pkg_postrm() {
 | 
			
		||||
	kernel-2_pkg_postrm
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user