linux-alcatel-5010d: drop python2 dependency (MR 3519)
Don't run python2 drvgen. Related: https://wiki.postmarketos.org/wiki/Porting_to_a_new_device#Removing_python2_dependency
This commit is contained in:
parent
6b2cd8133c
commit
4b045d8f33
2 changed files with 435 additions and 2 deletions
|
@ -0,0 +1,432 @@
|
|||
From 5016607e4b1ec9a3de1957c3f756c02c69d10389 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||
Date: Sun, 9 Oct 2022 02:29:46 +0200
|
||||
Subject: [PATCH] Include cust.dtsi, don't run python2 drvgen
|
||||
|
||||
Instead of running mediatek's python2 drvgen script to generate the
|
||||
cust.dtsi file, include the generated file. I've tried to forward port
|
||||
the tool to python3 first, but it is not trivial and the existing
|
||||
patches we have that do forward port it don't apply on this particular
|
||||
version. Just including the short generated file is the sane choice
|
||||
here, it's not like we are going to modify it anyway.
|
||||
|
||||
Related: https://wiki.postmarketos.org/wiki/Porting_to_a_new_device#Removing_python2_dependency
|
||||
---
|
||||
arch/arm/Makefile | 2 +-
|
||||
arch/arm/boot/dts/cust.dtsi | 391 ++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 392 insertions(+), 1 deletion(-)
|
||||
create mode 100644 arch/arm/boot/dts/cust.dtsi
|
||||
|
||||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
|
||||
index 2fe43bea..845dcd16 100644
|
||||
--- a/arch/arm/Makefile
|
||||
+++ b/arch/arm/Makefile
|
||||
@@ -300,7 +300,7 @@ MTK_PROJECT := $(CONFIG_ARCH_MTK_PROJECT:"%"=%)
|
||||
export MTK_PLATFORM MTK_PROJECT MTK_TARGET_PROJECT
|
||||
KBUILD_CPPFLAGS += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include
|
||||
KBUILD_CPPFLAGS += -I$(srctree)/arch/arm/mach-mediatek/include/
|
||||
--include $(srctree)/scripts/drvgen/drvgen.mk
|
||||
+#-include $(srctree)/scripts/drvgen/drvgen.mk
|
||||
archprepare: $(DRVGEN_FILE_LIST)
|
||||
dtbs: $(DRVGEN_FILE_LIST)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/cust.dtsi b/arch/arm/boot/dts/cust.dtsi
|
||||
new file mode 100644
|
||||
index 00000000..20b919c2
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/cust.dtsi
|
||||
@@ -0,0 +1,391 @@
|
||||
+/*
|
||||
+ * Generated by MTK SP DrvGen Version: 3.5.160809 for MT6580.
|
||||
+ * 2022-10-09 00:27:19
|
||||
+ * Do Not Modify The File.
|
||||
+ * Copyright Mediatek Inc. (c) 2016.
|
||||
+*/
|
||||
+
|
||||
+/*************************
|
||||
+ * ADC DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+&auxadc {
|
||||
+ adc_channel@ {
|
||||
+ compatible = "mediatek,adc_channel";
|
||||
+ mediatek,temperature0 = <0>;
|
||||
+ mediatek,temperature1 = <1>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * CLK_BUF DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+&rf_clock_buffer_ctrl {
|
||||
+ mediatek,clkbuf-quantity = <4>;
|
||||
+ mediatek,clkbuf-config = <>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * I2C DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+&i2c0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ clock-frequency = <400000>;
|
||||
+ mediatek,use-open-drain;
|
||||
+ camera_main@10 {
|
||||
+ compatible = "mediatek,camera_main";
|
||||
+ reg = <0x10>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ camera_sub@36 {
|
||||
+ compatible = "mediatek,camera_sub";
|
||||
+ reg = <0x36>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ camera_main_af@74 {
|
||||
+ compatible = "mediatek,camera_main_af";
|
||||
+ reg = <0x74>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ clock-frequency = <400000>;
|
||||
+ mediatek,use-open-drain;
|
||||
+ cap_touch@70 {
|
||||
+ compatible = "mediatek,cap_touch";
|
||||
+ reg = <0x70>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ clock-frequency = <400000>;
|
||||
+ mediatek,use-open-drain;
|
||||
+ gsensor@18 {
|
||||
+ compatible = "mediatek,gsensor";
|
||||
+ reg = <0x18>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+};
|
||||
+
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * GPIO DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+&gpio_usage_mapping {
|
||||
+ GPIO_SIM1_SCLK = <22>;
|
||||
+ GPIO_SIM1_SIO = <23>;
|
||||
+ GPIO_SIM2_SIO = <24>;
|
||||
+ GPIO_SIM2_SCLK = <25>;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * EINT DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+#include <dt-bindings/interrupt-controller/irq.h>
|
||||
+#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
+
|
||||
+&eintc {
|
||||
+ mediatek,mapping_table_entry = <26>;
|
||||
+ /* <gpio_pin, eint_pin> */
|
||||
+ mediatek,mapping_table = <0 0>,
|
||||
+ <1 1>,
|
||||
+ <2 2>,
|
||||
+ <3 3>,
|
||||
+ <4 4>,
|
||||
+ <5 5>,
|
||||
+ <6 6>,
|
||||
+ <7 7>,
|
||||
+ <8 8>,
|
||||
+ <9 9>,
|
||||
+ <10 10>,
|
||||
+ <11 11>,
|
||||
+ <12 12>,
|
||||
+ <13 13>,
|
||||
+ <14 14>,
|
||||
+ <15 15>,
|
||||
+ <16 16>,
|
||||
+ <17 17>,
|
||||
+ <18 18>,
|
||||
+ <19 19>,
|
||||
+ <20 20>,
|
||||
+ <21 21>,
|
||||
+ <22 22>,
|
||||
+ <23 23>,
|
||||
+ <24 24>,
|
||||
+ <25 25>,
|
||||
+ <26 26>,
|
||||
+ <27 27>,
|
||||
+ <28 28>,
|
||||
+ <29 29>,
|
||||
+ <30 30>,
|
||||
+ <31 31>,
|
||||
+ <32 32>,
|
||||
+ <33 33>,
|
||||
+ <34 34>,
|
||||
+ <35 35>,
|
||||
+ <36 36>,
|
||||
+ <37 37>,
|
||||
+ <38 38>,
|
||||
+ <39 39>,
|
||||
+ <40 40>,
|
||||
+ <41 41>,
|
||||
+ <42 42>,
|
||||
+ <43 43>,
|
||||
+ <44 44>,
|
||||
+ <45 45>,
|
||||
+ <46 46>,
|
||||
+ <47 47>,
|
||||
+ <48 48>,
|
||||
+ <49 49>,
|
||||
+ <50 50>,
|
||||
+ <51 51>,
|
||||
+ <52 52>,
|
||||
+ <53 53>,
|
||||
+ <54 54>,
|
||||
+ <55 55>,
|
||||
+ <56 56>,
|
||||
+ <57 57>,
|
||||
+ <58 58>,
|
||||
+ <59 59>,
|
||||
+ <60 60>,
|
||||
+ <61 61>,
|
||||
+ <62 62>,
|
||||
+ <63 63>,
|
||||
+ <64 64>,
|
||||
+ <65 65>,
|
||||
+ <66 66>,
|
||||
+ <67 67>,
|
||||
+ <68 68>,
|
||||
+ <69 69>,
|
||||
+ <70 70>,
|
||||
+ <71 71>,
|
||||
+ <72 72>,
|
||||
+ <73 73>,
|
||||
+ <74 74>,
|
||||
+ <75 75>,
|
||||
+ <76 76>,
|
||||
+ <77 77>,
|
||||
+ <78 78>,
|
||||
+ <79 79>,
|
||||
+ <80 80>,
|
||||
+ <81 81>,
|
||||
+ <82 82>,
|
||||
+ <83 83>,
|
||||
+ <84 84>,
|
||||
+ <85 85>,
|
||||
+ <86 86>,
|
||||
+ <87 87>,
|
||||
+ <88 88>,
|
||||
+ <89 89>,
|
||||
+ <90 90>,
|
||||
+ <91 91>,
|
||||
+ <92 92>;
|
||||
+ mediatek,builtin_entry = <0>;
|
||||
+};
|
||||
+
|
||||
+&msdc1_ins {
|
||||
+ interrupt-parent = <&eintc>;
|
||||
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ debounce = <3 1000>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&touch {
|
||||
+ interrupt-parent = <&eintc>;
|
||||
+ interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ debounce = <5 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&accdet {
|
||||
+ interrupt-parent = <&eintc>;
|
||||
+ interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ debounce = <9 256000>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&eint_dtv {
|
||||
+ interrupt-parent = <&eintc>;
|
||||
+ interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ debounce = <14 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * MD1_EINT DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+&eintc {
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * PMIC DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+&mt_pmic_vmc_ldo_reg {
|
||||
+ regulator-name = "vmc";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vmch_ldo_reg {
|
||||
+ regulator-name = "vmch";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vemc_3v3_ldo_reg {
|
||||
+ regulator-name = "vemc3v3";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vgp1_ldo_reg {
|
||||
+ regulator-name = "vgp1";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vgp2_ldo_reg {
|
||||
+ regulator-name = "vgp2";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vgp3_ldo_reg {
|
||||
+ regulator-name = "vgp3";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vcn_1v8_ldo_reg {
|
||||
+ regulator-name = "vcn1v8";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vsim1_ldo_reg {
|
||||
+ regulator-name = "vsim1";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vsim2_ldo_reg {
|
||||
+ regulator-name = "vsim2";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vcamaf_ldo_reg {
|
||||
+ regulator-name = "vcamaf";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vibr_ldo_reg {
|
||||
+ regulator-name = "vibr";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vm_ldo_reg {
|
||||
+ regulator-name = "vm";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vrf18_ldo_reg {
|
||||
+ regulator-name = "vrf18";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vcamd_ldo_reg {
|
||||
+ regulator-name = "vcamd";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vcamio_ldo_reg {
|
||||
+ regulator-name = "vcamio";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vcama_ldo_reg {
|
||||
+ regulator-name = "vcama";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vcn33_wifi_ldo_reg {
|
||||
+ regulator-name = "vcn33wifi";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+&mt_pmic_vcn28_ldo_reg {
|
||||
+ regulator-name = "vcn28";
|
||||
+ regulator-default-on = <0>; /* 0:skip, 1: off, 2:on */
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&kd_camera_hw1 {
|
||||
+ vcamaf-supply = <&mt_pmic_vcamaf_ldo_reg>;
|
||||
+ vcamaf_main2-supply = <&mt_pmic_vcamaf_ldo_reg>;
|
||||
+ vcamaf_sub-supply = <&mt_pmic_vcamaf_ldo_reg>;
|
||||
+ vcamd-supply = <&mt_pmic_vcamd_ldo_reg>;
|
||||
+ vcamd_main2-supply = <&mt_pmic_vcamd_ldo_reg>;
|
||||
+ vcamd_sub-supply = <&mt_pmic_vcamd_ldo_reg>;
|
||||
+ vcamio-supply = <&mt_pmic_vcamio_ldo_reg>;
|
||||
+ vcamio_main2-supply = <&mt_pmic_vcamio_ldo_reg>;
|
||||
+ vcamio_sub-supply = <&mt_pmic_vcamio_ldo_reg>;
|
||||
+ vcama-supply = <&mt_pmic_vcama_ldo_reg>;
|
||||
+ vcama_main2-supply = <&mt_pmic_vcama_ldo_reg>;
|
||||
+ vcama_sub-supply = <&mt_pmic_vcama_ldo_reg>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&touch {
|
||||
+ vtouch-supply = <&mt_pmic_vgp1_ldo_reg>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * POWER DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+
|
||||
+
|
||||
+/*************************
|
||||
+ * KPD DTSI File
|
||||
+*************************/
|
||||
+
|
||||
+&keypad {
|
||||
+ mediatek,kpd-key-debounce = <1024>;
|
||||
+ mediatek,kpd-sw-pwrkey = <116>;
|
||||
+ mediatek,kpd-hw-pwrkey = <8>;
|
||||
+ mediatek,kpd-use-extend-type = <0>;
|
||||
+ /*HW Keycode [0~71] -> Linux Keycode*/
|
||||
+ mediatek,kpd-hw-map-num = <72>;
|
||||
+ mediatek,kpd-hw-init-map = <115 0 0 0 0 0 0 0 0 114 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 >;
|
||||
+ mediatek,kpd-pwrkey-eint-gpio = <0>;
|
||||
+ mediatek,kpd-pwkey-gpio-din = <0>;
|
||||
+ mediatek,kpd-hw-dl-key0 = <9>;
|
||||
+ mediatek,kpd-hw-dl-key1 = <0>;
|
||||
+ mediatek,kpd-hw-dl-key2 = <8>;
|
||||
+ mediatek,kpd-hw-recovery-key = <0>;
|
||||
+ mediatek,kpd-hw-factory-key = <9>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+
|
||||
--
|
||||
2.34.1
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
pkgname=linux-alcatel-5010d
|
||||
pkgver=3.18.19
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Alcatel OneTouch Pixi 4 (5) 5010D kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
|
@ -20,7 +20,6 @@ makedepends="
|
|||
gcc6
|
||||
openssl-dev
|
||||
perl
|
||||
python2
|
||||
"
|
||||
|
||||
# Use GCC 6
|
||||
|
@ -41,6 +40,7 @@ source="
|
|||
gcc10-extern_YYLOC_global_declaration.patch
|
||||
gcc8-fix-put-user.patch
|
||||
gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
0001-Include-cust.dtsi-don-t-run-python2-drvgen.patch
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
|
||||
|
@ -67,4 +67,5 @@ sha512sums="
|
|||
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
|
||||
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
|
||||
77eba606a71eafb36c32e9c5fe5e77f5e4746caac292440d9fb720763d766074a964db1c12bc76fe583c5d1a5c864219c59941f5e53adad182dbc70bf2bc14a7 gcc7-give-up-on-ilog2-const-optimizations.patch
|
||||
ab3e3349341cbbec81240499f059e4c7b4ab65d2548e9fa91b65c226f47e3a8747bc8eb2263fa20cbd540e89115e2aedf3626f6535c3390fe988c731fe4cfe18 0001-Include-cust.dtsi-don-t-run-python2-drvgen.patch
|
||||
"
|
||||
|
|
Loading…
Reference in a new issue