From f41cfe726a6fbeb78cbbad64e94578a8a57b8808 Mon Sep 17 00:00:00 2001 From: Jack Knightly Date: Sat, 19 Mar 2022 20:02:22 +0000 Subject: [PATCH] samsung-t0lte: add leds (MR 3012) --- device/testing/device-samsung-t0lte/APKBUILD | 6 +- .../device-samsung-t0lte/modules-load.conf | 5 + .../0010-ARM-dts-exynos-n710x-add-leds.patch | 95 +++++++++++++++++++ .../linux-postmarketos-exynos4/APKBUILD | 6 +- .../config-postmarketos-exynos4.armv7 | 10 +- 5 files changed, 113 insertions(+), 9 deletions(-) create mode 100644 device/testing/device-samsung-t0lte/modules-load.conf create mode 100644 device/testing/linux-postmarketos-exynos4/0010-ARM-dts-exynos-n710x-add-leds.patch diff --git a/device/testing/device-samsung-t0lte/APKBUILD b/device/testing/device-samsung-t0lte/APKBUILD index e1c96d7da..25727004c 100644 --- a/device/testing/device-samsung-t0lte/APKBUILD +++ b/device/testing/device-samsung-t0lte/APKBUILD @@ -1,8 +1,8 @@ # Reference: pkgname=device-samsung-t0lte pkgdesc="Samsung Galaxy Note II LTE" -pkgver=0.2 -pkgrel=1 +pkgver=0.3 +pkgrel=0 url="https://postmarketos.org" license="MIT" arch="armv7" @@ -20,6 +20,7 @@ source=" deviceinfo ucm/Midas.conf ucm/HiFi.conf + modules-load.conf " build() { @@ -46,4 +47,5 @@ sha512sums=" a2a1742e4868fb153b538c2340f3b5e25e31dae761bf07c8713a1b845b3c49a730d82c78636a998789fcbcc947ad819a9919ac9d3dc88b18c7ffb80419d18551 deviceinfo caa81e8ab6753c0ca24c22fb6742288765dfbf2469b8b8c35c5789edfcee546ef1c3b14ad6e540c417f434258399300f17d312b58157635eafab134587ef94cc Midas.conf a56ce19331a8997b1cc493b8ab6b16ecfc423254a380e13a9461ec94ec5bc124cb3283256ef8cc014db60937a5e7404c6f7728bc2cc2494a70c612ccb3fd4105 HiFi.conf +56a2bdffc273cb0a581192e65378ff50e71c7bc8a696af7d5e7c165a53c005aae104c4514c68afb668454c5a94ce78bd509f8a40e3401d67e16636b1ed81d051 modules-load.conf " diff --git a/device/testing/device-samsung-t0lte/modules-load.conf b/device/testing/device-samsung-t0lte/modules-load.conf new file mode 100644 index 000000000..70182721a --- /dev/null +++ b/device/testing/device-samsung-t0lte/modules-load.conf @@ -0,0 +1,5 @@ +# This file contains the names of kernel modules that should be loaded +# at boot time, one per line. Lines beginning with "#" are ignored. + +# notification led module +ledtrig-pattern diff --git a/device/testing/linux-postmarketos-exynos4/0010-ARM-dts-exynos-n710x-add-leds.patch b/device/testing/linux-postmarketos-exynos4/0010-ARM-dts-exynos-n710x-add-leds.patch new file mode 100644 index 000000000..8a7725037 --- /dev/null +++ b/device/testing/linux-postmarketos-exynos4/0010-ARM-dts-exynos-n710x-add-leds.patch @@ -0,0 +1,95 @@ +diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi +index 968c7943653e..73eda2984053 100644 +--- a/arch/arm/boot/dts/exynos4412-midas.dtsi ++++ b/arch/arm/boot/dts/exynos4412-midas.dtsi +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + / { + compatible = "samsung,midas", "samsung,exynos4412", "samsung,exynos4"; +@@ -24,6 +25,7 @@ / { + aliases { + i2c11 = &i2c_max77693; + i2c12 = &i2c_max77693_fuel; ++ i2c13 = &i2c_an30259a; + }; + + chosen { +@@ -170,7 +170,7 @@ i2c_max77693: i2c-gpio-1 { + #address-cells = <1>; + #size-cells = <0>; + +- pmic@66 { ++ max77693_pmic: pmic@66 { + compatible = "maxim,max77693"; + interrupt-parent = <&gpx1>; + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; +@@ -249,6 +251,39 @@ touchkey@20 { + linux,keycodes = ; + }; + }; ++ ++ i2c_an30259a: i2c-gpio-5 { ++ compatible = "i2c-gpio"; ++ gpios = <&gpf2 7 GPIO_ACTIVE_HIGH>, <&gpf2 6 GPIO_ACTIVE_HIGH>; ++ i2c-gpio,delay-us = <2>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ led-controller@30 { ++ compatible = "panasonic,an30259a"; ++ reg = <0x30>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ led@1 { ++ reg = <1>; ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ }; ++ ++ led@2 { ++ reg = <2>; ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ }; ++ ++ led@3 { ++ reg = <3>; ++ function = LED_FUNCTION_STATUS; ++ color = ; ++ }; ++ }; ++ }; + + i2c-mhl { + compatible = "i2c-gpio"; +diff --git a/arch/arm/boot/dts/exynos4412-n710x.dts b/arch/arm/boot/dts/exynos4412-n710x.dts +index 9ae05b0d684c..b63d6920aa13 100644 +--- a/arch/arm/boot/dts/exynos4412-n710x.dts ++++ b/arch/arm/boot/dts/exynos4412-n710x.dts +@@ -138,6 +138,21 @@ &ldo25_reg { + regulator-max-microvolt = <3000000>; + }; + ++&max77693_pmic { ++ led { ++ compatible = "maxim,max77693-led"; ++ maxim,boost-mode = ; ++ maxim,boost-mvout = <5000>; ++ camera-flash { ++ label = "white:flash"; ++ led-sources = <0>, <1>; ++ led-max-microamp = <140625>; ++ flash-max-microamp = <500000>; ++ flash-max-timeout-us = <500000>; ++ }; ++ }; ++}; ++ + &s5c73m3 { + standby-gpios = <&gpm0 6 GPIO_ACTIVE_LOW>; /* ISP_STANDBY */ + vdda-supply = <&cam_vdda_reg>; diff --git a/device/testing/linux-postmarketos-exynos4/APKBUILD b/device/testing/linux-postmarketos-exynos4/APKBUILD index a953b51b9..b031ef766 100644 --- a/device/testing/linux-postmarketos-exynos4/APKBUILD +++ b/device/testing/linux-postmarketos-exynos4/APKBUILD @@ -4,7 +4,7 @@ pkgname=linux-postmarketos-exynos4 pkgver=5.16.2 -pkgrel=0 +pkgrel=1 pkgdesc="Mainline kernel fork for Samsung Exynos4 devices" arch="armv7" _carch="arm" @@ -48,6 +48,7 @@ source=" 0007-power_supply-max77693-change-the-supply-type-to-POWE.patch 0008-ARM-dts-exynos-i9100-Use-interrupt-for-BCM4330-ho.patch 0009-ARM-dts-driver-exynos-n710x-add-panel.patch + 0010-ARM-dts-exynos-n710x-add-leds.patch initramfs.list init " @@ -88,7 +89,7 @@ package() { sha512sums=" 197f387d5e3a5029e354aaf50dc4fffc20a894c2579132678396e69c567c4072ea365ade7484a0b964572829f4bbfe518f21df5704ae1685f5786fddbb321097 linux-5.16.2.tar.xz -b3aae956d4f21c3d3e366ed322d849d10116d5d425d3535b3d2ed8228459c461309fbe3c0561660116b6c283b497e99eeec0857998abc01e277d63b7232a2f23 config-postmarketos-exynos4.armv7 +1f490ad510d27fc0e7120692ff37f6a3e6ea4c46479e629fa752889757ba3c25d7611a1f1e96308e056b38b04dd430d32b6c46776c8395e31cd26b481487c86a config-postmarketos-exynos4.armv7 a033fa9afa05825d5c923f1d5a224e230a8b02e75b02a21e0a0077f1b76c01d663ba54204e66db1e85096d9e44cc29fee0acaf919d3187cb47dba9005f94d8be 0001-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch 57590b105cb6d01e5f2d860a21c1417b197abbcaf8553bf57633b261ac1e161b0d424f8baeb7b14b3ed923ebac6f6e27401ef02c0b53a4b3e34600368fe85219 0002-ARM-dts-exynos-Add-reboot-modes-to-midas.patch 81430b484a0747717ed8dba45c04c40689d9546b7b9d3eb20f0520e78c94f1438afc1f21a0b06007f60ff718e924d1586acc98f4498671a1a7609ed6e6f2b3f0 0003-mmc-core-Workaround-VTU00M-0xf1-FTL-metadata-corrupt.patch @@ -98,6 +99,7 @@ a033fa9afa05825d5c923f1d5a224e230a8b02e75b02a21e0a0077f1b76c01d663ba54204e66db1e de87e6a6608165cdc35a03bd10dedef1c12a2a9e1f66f500879c05b287bae7181cc95021a3a2aad6abefd024f508ed61c19ee9341ad3cc24e260269b647e1010 0007-power_supply-max77693-change-the-supply-type-to-POWE.patch 4ad139898236dd7035ace862c4a9be2d92351977f2d0c38072434c82f2a7f89c224f9b366fcf44755849788f92ed8cdc019cf6c82453b85d5257bf6737a6bb68 0008-ARM-dts-exynos-i9100-Use-interrupt-for-BCM4330-ho.patch 054a03b327386b32b516cf7f9fdbf15adba9b3fb6d0d20473493f7e4538202496829443eb18f9a928b4959b1296ee98171d4a19d8fcf58439d4fdb122fbb97ac 0009-ARM-dts-driver-exynos-n710x-add-panel.patch +63c9e1a1d92e1deb286d6623e116e1cce36bfbae3f9b5db60dc1751573af7477003c7680afe054e7170fee632fd11e38c1bea12ec51299d547557112784f762f 0010-ARM-dts-exynos-n710x-add-leds.patch aaff0332b90e1f9f62de1128cace934717336e54ab09de46477369fa808302482d97334e43a85ee8597c1bcab64d3484750103559fea2ce8cd51776156bf7591 initramfs.list 09f1f214a24300696809727a7b04378887c06ca6f40803ca51a12bf2176a360b2eb8632139d6a0722094e05cb2038bdb04018a1e3d33fc2697674552ade03bee init " diff --git a/device/testing/linux-postmarketos-exynos4/config-postmarketos-exynos4.armv7 b/device/testing/linux-postmarketos-exynos4/config-postmarketos-exynos4.armv7 index e73bb0f1c..c552a2025 100644 --- a/device/testing/linux-postmarketos-exynos4/config-postmarketos-exynos4.armv7 +++ b/device/testing/linux-postmarketos-exynos4/config-postmarketos-exynos4.armv7 @@ -2,14 +2,14 @@ # Automatically generated file; DO NOT EDIT. # Linux/arm 5.16.2 Kernel Configuration # -CONFIG_CC_VERSION_TEXT="armv7-alpine-linux-musleabihf-gcc (Alpine 11.2.1_git20220117) 11.2.1 20220117" +CONFIG_CC_VERSION_TEXT="armv7-alpine-linux-musleabihf-gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219" CONFIG_CC_IS_GCC=y CONFIG_GCC_VERSION=110201 CONFIG_CLANG_VERSION=0 CONFIG_AS_IS_GNU=y -CONFIG_AS_VERSION=23700 +CONFIG_AS_VERSION=23800 CONFIG_LD_IS_BFD=y -CONFIG_LD_VERSION=23700 +CONFIG_LD_VERSION=23800 CONFIG_LLD_VERSION=0 CONFIG_CC_HAS_ASM_GOTO=y CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y @@ -4144,7 +4144,7 @@ CONFIG_LEDS_CLASS_FLASH=y # # LED drivers # -# CONFIG_LEDS_AN30259A is not set +CONFIG_LEDS_AN30259A=m # CONFIG_LEDS_AW2013 is not set # CONFIG_LEDS_BCM6328 is not set # CONFIG_LEDS_BCM6358 is not set @@ -4218,7 +4218,7 @@ CONFIG_LEDS_TRIGGER_HEARTBEAT=y # CONFIG_LEDS_TRIGGER_CAMERA is not set # CONFIG_LEDS_TRIGGER_PANIC is not set # CONFIG_LEDS_TRIGGER_NETDEV is not set -# CONFIG_LEDS_TRIGGER_PATTERN is not set +CONFIG_LEDS_TRIGGER_PATTERN=m # CONFIG_LEDS_TRIGGER_AUDIO is not set # CONFIG_LEDS_TRIGGER_TTY is not set # CONFIG_ACCESSIBILITY is not set