linux-wiko-lenny5: drop python2 dependency (MR 3519)

Don't run python2 drvgen.

Related: https://wiki.postmarketos.org/wiki/Porting_to_a_new_device#Removing_python2_dependency

[ci:skip-build] Already built successfuly on CI in MR
This commit is contained in:
Oliver Smith 2022-10-10 16:13:40 +02:00 committed by Newbyte
parent ce93fd7188
commit 86a787ffd9
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
2 changed files with 354 additions and 2 deletions

View file

@ -0,0 +1,351 @@
From 5d758e1bcbeb9ad8b6568da0aa88be3ea9dbb502 Mon Sep 17 00:00:00 2001
From: Oliver Smith <ollieparanoid@postmarketos.org>
Date: Sun, 9 Oct 2022 03:23:48 +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.
Related: https://wiki.postmarketos.org/wiki/Porting_to_a_new_device#Removing_python2_dependency
---
arch/arm/Makefile | 2 +-
arch/arm/boot/dts/k400/cust.dtsi | 314 +++++++++++++++++++++++++++++++
2 files changed, 315 insertions(+), 1 deletion(-)
create mode 100644 arch/arm/boot/dts/k400/cust.dtsi
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 7d938748..00f7c70c 100755
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -309,7 +309,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/k400/cust.dtsi b/arch/arm/boot/dts/k400/cust.dtsi
new file mode 100644
index 00000000..f2b53580
--- /dev/null
+++ b/arch/arm/boot/dts/k400/cust.dtsi
@@ -0,0 +1,314 @@
+/*
+ * Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT6580. Copyright MediaTek Inc. (C) 2013.
+ * Sun Oct 9 01:14:45 2022
+ * Do Not Modify the File.
+ */
+
+/*************************
+ * I2C DTSI File
+*************************/
+
+&i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ camera_main_mtk:camera_main@36 {
+ compatible = "mediatek,camera_main";
+ reg = <0x36>;
+ status = "okay";
+ };
+ camera_main_af_mtk:camera_main_af@18 {
+ compatible = "mediatek,camera_main_af";
+ reg = <0x18>;
+ status = "okay";
+ };
+ camera_sub_mtk:camera_sub@21 {
+ compatible = "mediatek,camera_sub";
+ reg = <0x21>;
+ status = "okay";
+ };
+};
+
+&i2c1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ cap_touch_mtk:cap_touch@38 {
+ compatible = "mediatek,cap_touch";
+ reg = <0x38>;
+ status = "okay";
+ };
+ ext_buck_mtk:ext_buck@60 {
+ compatible = "mediatek,ext_buck";
+ reg = <0x60>;
+ status = "okay";
+ };
+};
+
+&i2c2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ strobe_main_mtk:strobe_main@63 {
+ compatible = "mediatek,strobe_main";
+ reg = <0x63>;
+ status = "okay";
+ };
+ msensor_mtk:msensor@0c {
+ compatible = "mediatek,msensor";
+ reg = <0x0c>;
+ status = "okay";
+ };
+ gsensor_mtk:gsensor@0e {
+ compatible = "mediatek,gsensor";
+ reg = <0x0e>;
+ status = "okay";
+ };
+ gyro_mtk:gyro@69 {
+ compatible = "mediatek,gyro";
+ reg = <0x69>;
+ status = "okay";
+ };
+ alsps_mtk:alsps@23 {
+ compatible = "mediatek,alsps";
+ reg = <0x23>;
+ status = "okay";
+ };
+};
+
+
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/*************************
+ * EINT DTSI File
+*************************/
+
+&accdet {
+ interrupt-parent = <&eintc>;
+ interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
+ debounce = <17 256000>;
+ status = "okay";
+};
+&mhall {
+ interrupt-parent = <&eintc>;
+ interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
+ debounce = <18 16000>;
+ status = "okay";
+};
+&touch {
+ interrupt-parent = <&eintc>;
+ interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
+ debounce = <20 0>;
+ status = "okay";
+};
+&alsps_mtk {
+ interrupt-parent = <&eintc>;
+ interrupts = <6 IRQ_TYPE_LEVEL_LOW>;
+ debounce = <6 0>;
+ status = "okay";
+};
+&gyro {
+ interrupt-parent = <&eintc>;
+ interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
+ debounce = <8 0>;
+ status = "okay";
+};
+&dsi_te {
+ interrupt-parent = <&eintc>;
+ interrupts = <68 IRQ_TYPE_EDGE_RISING>;
+ debounce = <68 0>;
+ status = "okay";
+};
+
+
+/********************
+ * GPIO USAGE MAPPING DTSI File
+****************/
+
+&gpio_usage_mapping {
+ GPIO_SIM1_SCLK = <22>;
+ GPIO_SIM1_SIO = <23>;
+ GPIO_SIM2_SIO = <24>;
+ GPIO_SIM2_SCLK = <25>;
+};
+
+
+&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 = "vemc_3v3";
+ 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 = "vcn_1v8";
+ 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_vcanio_ldo_reg {
+ regulator-name = "vcanio";
+ 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_ldo_reg {
+ regulator-name = "vcn33";
+ 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 {
+ vcamd-supply = <&mt_pmic_vgp3_ldo_reg>;
+
+ vcamaf-supply = <&mt_pmic_vcamaf_ldo_reg>;
+
+ vcamd_main2-supply = <&mt_pmic_vcamd_ldo_reg>;
+ vcamd_sub-supply = <&mt_pmic_vcamd_ldo_reg>;
+
+ vcamio-supply = <&mt_pmic_vcanio_ldo_reg>;
+ vcamio_main2-supply = <&mt_pmic_vcanio_ldo_reg>;
+ vcamio_sub-supply = <&mt_pmic_vcanio_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";
+};
+
+
+/********************************************
+ *ADC DTSI File
+********************************************/
+
+&auxadc {
+ adc_channel@ {
+ compatible = "mediatek,adc_channel";
+ mediatek,temperature0 = <0>;
+ mediatek,temperature1 = <1>;
+ mediatek,lcm_voltage = <12>;
+ status = "okay";
+ };
+};
+
+
+/**********************************************
+ *CLK_BUF DTSI File
+********************************************/
+
+&rf_clock_buffer_ctrl {
+ mediatek,clkbuf-quantity = <4>;
+ mediatek,clkbuf-config = <2 2 1 1>;
+ status = "okay";
+};
+
+
+/**********************************************
+ *Keypad 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 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
+ 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 = <0>;
+ mediatek,kpd-hw-dl-key1 = <1>;
+ mediatek,kpd-hw-dl-key2 = <8>;
+ mediatek,kpd-hw-recovery-key = <0>;
+ mediatek,kpd-hw-factory-key = <1>;
+ status = "okay";
+};
+
+
--
2.34.1

View file

@ -3,7 +3,7 @@
pkgname=linux-wiko-lenny5
pkgver=3.18.79
pkgrel=0
pkgrel=1
pkgdesc="Wiko Lenny 5 Kernel"
arch="armv7"
_carch="arm"
@ -21,7 +21,6 @@ makedepends="
openssl
perl
gcc6
python2
libc6-compat
"
@ -42,6 +41,7 @@ source="
vdsomunge_upstream.patch
gcc8-fix-put-user.patch
gcc10-extern_YYLOC_global_declaration.patch
0001-Include-cust.dtsi-don-t-run-python2-drvgen.patch
"
builddir="$srcdir/kernel-3.18"
@ -74,4 +74,5 @@ efdb0d3ba7a6e0525bf278db628affd881d2e67f7cc454e8921daa42b9921d46764c2bd304bf533e
19a6c3445bfd8057e4fabe1709f3d2344f3a99fef49b44636c07a18ba8791fab1bcff77f93aadff887946ae6f83c9d86e1c28f9b88d03c6ba156704d430b4470 vdsomunge_upstream.patch
197d40a214ada87fcb2dfc0ae4911704b9a93354b75179cd6b4aadbb627a37ec262cf516921c84a8b1806809b70a7b440cdc8310a4a55fca5d2c0baa988e3967 gcc8-fix-put-user.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch
f74ea59d7b43cf65cbf46417c7028152ef39c0234da5aef1a7f72d30dcc56a701cb374a87079fce2194d5e6807686ed46bd846db5f39090a28be745abe014ba6 0001-Include-cust.dtsi-don-t-run-python2-drvgen.patch
"