From 6b1072a789e0dc65b929e895651a1919adbfc38c Mon Sep 17 00:00:00 2001 From: Sergey Larin Date: Sat, 9 Feb 2019 21:46:43 +0300 Subject: [PATCH] samsung-i927: Kernel updates (!217) - Use separated patches - Use new panel driver (with backlight support) - Battery fixes - Fix compass (AK8975) (not tested, only probing works, but sometimes doesn't - says "Unexpected device" - need to investigate that) - Touchkey is working + LED - Keyboard backlight + HALL for slideout detection --- ...panel-Add-Samsung-s6e63m0-panel-docu.patch | 71 + ...Add-driver-for-Samsung-S6E63M0-panel.patch | 620 ++++ .../0003-drm-tegra-Hacks-for-S6E63M0.patch | 38 + ...o-gyro-mpu3050-get-chip-ID-correctly.patch | 41 + .../0005-soc-tegra-fix-build-for-Tegra.patch | 28 + ...re-Add-a-quirk-for-NVIDIA-Tegra-EMMC.patch | 38 + ...lass-support-isa1200-vibration-motor.patch | 698 ++++ ...-accel-kxcjk-Add-device-tree-support.patch | 43 + ...gra20-glide-Samsung-SGH-I927-support.patch | 1331 +++++++ ...t-stmpe-keypad-add-STMPE1801-support.patch | 225 ++ .../0011-Add-tegra_wm8994-driver.patch | 520 +++ .../0012-HACK-Fix-wm8994-Kconfig.patch | 27 + .../0013-ASoC-tegra_wm8994-cleanup.patch | 211 ++ ...ts-tegra20-glide-Device-Tree-changes.patch | 141 + ...egra20-glide-add-memory-node-address.patch | 29 + ...RM-dts-tegra20-glide-comment-out-MHL.patch | 54 + ...-glide-fix-duplicate-i2c-bus-address.patch | 28 + ...ts-tegra20-glide-fix-USB-gadget-mode.patch | 59 + ...tegra20-glide-change-display-timings.patch | 43 + ...glide-add-intrrupt-binding-for-charg.patch | 29 + ...1-drm-panel-s6e63m0-disable-rotation.patch | 29 + ...glide-set-panel-reset-GPIO-pin-to-ac.patch | 29 + ...upply-max17040-Fix-voltage-reporting.patch | 30 + ...ply-max17040-Set-initial-RCOMP-value.patch | 27 + ...rm-panel-s6e63m0-Increase-back-porch.patch | 33 + ...026-ARM-dts-tegra20-glide-fix-AK8975.patch | 29 + ...ey-Add-parse-DT-function-from-device.patch | 127 + ...cs_touchkey-Convert-to-devm_-managed.patch | 83 + ...cs_touchkey-add-sentinel-into-array-.patch | 30 + ...nos4412-m0.dts-Add-mcs-touchkey-node.patch | 49 + ...s-tegra20-glide-Add-touchkey-binding.patch | 46 + ...a20-glide-Add-keyboard-backlight-LED.patch | 37 + ...ut-keyboard-mcs_touchkey-LED-support.patch | 157 + ...-tegra20-glide-Add-HALL-GPIO-binding.patch | 48 + device/linux-samsung-i927/APKBUILD | 74 +- .../config-samsung-i927.armhf | 61 +- device/linux-samsung-i927/kernel.patch | 3087 ----------------- 37 files changed, 5152 insertions(+), 3098 deletions(-) create mode 100644 device/linux-samsung-i927/0001-dt-bindings-drm-panel-Add-Samsung-s6e63m0-panel-docu.patch create mode 100644 device/linux-samsung-i927/0002-drm-panel-Add-driver-for-Samsung-S6E63M0-panel.patch create mode 100644 device/linux-samsung-i927/0003-drm-tegra-Hacks-for-S6E63M0.patch create mode 100644 device/linux-samsung-i927/0004-iio-gyro-mpu3050-get-chip-ID-correctly.patch create mode 100644 device/linux-samsung-i927/0005-soc-tegra-fix-build-for-Tegra.patch create mode 100644 device/linux-samsung-i927/0006-mmc-core-Add-a-quirk-for-NVIDIA-Tegra-EMMC.patch create mode 100644 device/linux-samsung-i927/0007-leds-Add-led-class-support-isa1200-vibration-motor.patch create mode 100644 device/linux-samsung-i927/0008-iio-accel-kxcjk-Add-device-tree-support.patch create mode 100644 device/linux-samsung-i927/0009-ARM-dts-tegra20-glide-Samsung-SGH-I927-support.patch create mode 100644 device/linux-samsung-i927/0010-Input-stmpe-keypad-add-STMPE1801-support.patch create mode 100644 device/linux-samsung-i927/0011-Add-tegra_wm8994-driver.patch create mode 100644 device/linux-samsung-i927/0012-HACK-Fix-wm8994-Kconfig.patch create mode 100644 device/linux-samsung-i927/0013-ASoC-tegra_wm8994-cleanup.patch create mode 100644 device/linux-samsung-i927/0014-ARM-dts-tegra20-glide-Device-Tree-changes.patch create mode 100644 device/linux-samsung-i927/0015-ARM-dts-tegra20-glide-add-memory-node-address.patch create mode 100644 device/linux-samsung-i927/0016-ARM-dts-tegra20-glide-comment-out-MHL.patch create mode 100644 device/linux-samsung-i927/0017-ARM-dts-tegra20-glide-fix-duplicate-i2c-bus-address.patch create mode 100644 device/linux-samsung-i927/0018-ARM-dts-tegra20-glide-fix-USB-gadget-mode.patch create mode 100644 device/linux-samsung-i927/0019-ARM-dts-tegra20-glide-change-display-timings.patch create mode 100644 device/linux-samsung-i927/0020-ARM-dts-tegra20-glide-add-intrrupt-binding-for-charg.patch create mode 100644 device/linux-samsung-i927/0021-drm-panel-s6e63m0-disable-rotation.patch create mode 100644 device/linux-samsung-i927/0022-ARM-dts-tegra20-glide-set-panel-reset-GPIO-pin-to-ac.patch create mode 100644 device/linux-samsung-i927/0023-power-supply-max17040-Fix-voltage-reporting.patch create mode 100644 device/linux-samsung-i927/0024-power-supply-max17040-Set-initial-RCOMP-value.patch create mode 100644 device/linux-samsung-i927/0025-drm-panel-s6e63m0-Increase-back-porch.patch create mode 100644 device/linux-samsung-i927/0026-ARM-dts-tegra20-glide-fix-AK8975.patch create mode 100644 device/linux-samsung-i927/0027-Input-mcs_touchkey-Add-parse-DT-function-from-device.patch create mode 100644 device/linux-samsung-i927/0028-input-keyboard-mcs_touchkey-Convert-to-devm_-managed.patch create mode 100644 device/linux-samsung-i927/0029-input-keyboard-mcs_touchkey-add-sentinel-into-array-.patch create mode 100644 device/linux-samsung-i927/0030-TRATS2-dts-exynos4412-m0.dts-Add-mcs-touchkey-node.patch create mode 100644 device/linux-samsung-i927/0031-ARM-dts-tegra20-glide-Add-touchkey-binding.patch create mode 100644 device/linux-samsung-i927/0032-ARM-dts-tegra20-glide-Add-keyboard-backlight-LED.patch create mode 100644 device/linux-samsung-i927/0033-input-keyboard-mcs_touchkey-LED-support.patch create mode 100644 device/linux-samsung-i927/0034-ARM-dts-tegra20-glide-Add-HALL-GPIO-binding.patch delete mode 100644 device/linux-samsung-i927/kernel.patch diff --git a/device/linux-samsung-i927/0001-dt-bindings-drm-panel-Add-Samsung-s6e63m0-panel-docu.patch b/device/linux-samsung-i927/0001-dt-bindings-drm-panel-Add-Samsung-s6e63m0-panel-docu.patch new file mode 100644 index 000000000..f2def815e --- /dev/null +++ b/device/linux-samsung-i927/0001-dt-bindings-drm-panel-Add-Samsung-s6e63m0-panel-docu.patch @@ -0,0 +1,71 @@ +From 2b9e681359e72c3ee0387dfc9b10ec9a7f548c97 Mon Sep 17 00:00:00 2001 +From: Jonathan Bakker +Date: Tue, 12 Jun 2018 11:32:26 -0700 +Subject: [PATCH 01/34] dt-bindings: drm: panel: Add Samsung s6e63m0 panel + documentation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This commit adds documentation for Samsung s6e63m0 AMOLED LCD panel +driver. + +Signed-off-by: Jonathan Bakker +Signed-off-by: Paweł Chmiel +--- +Changes from v1: + - Add missing subject prefix + - Rename reset-gpio to reset-gpios + - Add link to spi properites documentation. They're required + for driver to work + - Removed delay properties, which are now hardcoded in driver + - Removed display timings, which are now hardcoded in driver + +Signed-off-by: Sergey Larin +--- + .../display/panel/samsung,s6e63m0.txt | 33 +++++++++++++++++++ + 1 file changed, 33 insertions(+) + create mode 100644 Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt + +diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt b/Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt +new file mode 100644 +index 000000000000..9fb9ebeef8e4 +--- /dev/null ++++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e63m0.txt +@@ -0,0 +1,33 @@ ++Samsung s6e63m0 AMOLED LCD panel ++ ++Required properties: ++ - compatible: "samsung,s6e63m0" ++ - reset-gpios: GPIO spec for reset pin ++ - vdd3-supply: VDD regulator ++ - vci-supply: VCI regulator ++ ++The panel must obey rules for SPI slave device specified in document [1]. ++ ++The device node can contain one 'port' child node with one child ++'endpoint' node, according to the bindings defined in [2]. This ++node should describe panel's video bus. ++ ++[1]: Documentation/devicetree/bindings/spi/spi-bus.txt ++[2]: Documentation/devicetree/bindings/media/video-interfaces.txt ++ ++Example: ++ ++ s6e63m0: display@0 { ++ compatible = "samsung,s6e63m0"; ++ reg = <0>; ++ reset-gpio = <&mp05 5 1>; ++ vdd3-supply = <&ldo12_reg>; ++ vci-supply = <&ldo11_reg>; ++ spi-max-frequency = <1200000>; ++ ++ port { ++ lcd_ep: endpoint { ++ remote-endpoint = <&fimd_ep>; ++ }; ++ }; ++ }; +-- +2.20.1 + diff --git a/device/linux-samsung-i927/0002-drm-panel-Add-driver-for-Samsung-S6E63M0-panel.patch b/device/linux-samsung-i927/0002-drm-panel-Add-driver-for-Samsung-S6E63M0-panel.patch new file mode 100644 index 000000000..6b95742c3 --- /dev/null +++ b/device/linux-samsung-i927/0002-drm-panel-Add-driver-for-Samsung-S6E63M0-panel.patch @@ -0,0 +1,620 @@ +From 837ca6b151a2ffe19b622a22351ea4a19c1d2cfd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pawe=C5=82=20Chmiel?= +Date: Fri, 25 Jan 2019 16:32:08 +0100 +Subject: [PATCH 02/34] drm/panel: Add driver for Samsung S6E63M0 panel +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This patch adds Samsung S6E63M0 AMOLED LCD panel driver, connected over +spi. It's based on already removed, non dt s6e63m0 driver and +panel-samsung-ld9040. It can be found for example in some of Samsung +Aries based phones. + +Signed-off-by: Paweł Chmiel +Reviewed-by: Sam Ravnborg +--- +Changes from v2: + - VIDEOMODE_HELPERS is not needed in Kconfig + - Added help text to Kconfig + - Remove unneeded videomode includes/fields + - Add sentinel comment in s6e63m0_of_match struct + - Handle errors during registration of backlight device. We shouldn't + register panel if we fail to register backlight device + - Added Reviewed-by + +Changes from v1: + - Correct order of Kconfig/Makefile entry + - Fix SPDX tag, so it matches value of MODULE_LICENSE + - Remove inclusion of drmP.h + - Fix code formatting + - Use DRM_DEV_ERROR/DEBUG + - Extract hardcoded values + - Remove possibility to change gamma through sysfs, leaving only one + gamma table values + - Fix reset_gpio handling, so it'll be asserted in power_on and + deasserted in power_off. Also do it before turning voltage on. + - Disable backlight and enter sleep mode in disable callback. + Previously it was done in unprepare + - Enable display and backlight in enable callback. Previously it was + done in prepare + - Hardcode display timings and delays. Previously they were readed + from device tree + - We're using SPDX, so we don't need to have license body + - Use MIPI_DCS_EXIT_SLEEP_MODE and MIPI_DCS_SET_DISPLAY_ON + - Rename MAX_GAMMA_LEVEL to NUM_GAMMA_LEVELS + - Ommit get_brightness callback + - Use backlight_enable/disable API, like it's done in other panel + drivers (for example panel-simple) + - Make set_brightness called only from backlight api, like it's done + in other panel drivers (for example panel-simple). + - Reset gpio should be set to GPIOD_OUT_HIGH. It's declared as active + low in device tree + - Don't call power_off in remove callback + +Signed-off-by: Sergey Larin +--- + drivers/gpu/drm/panel/Kconfig | 9 + + drivers/gpu/drm/panel/Makefile | 1 + + drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 517 ++++++++++++++++++ + 3 files changed, 527 insertions(+) + create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e63m0.c + +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig +index 6020c30a33b3..1a2c1d756bd3 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -140,6 +140,15 @@ config DRM_PANEL_SAMSUNG_S6E63J0X03 + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + ++config DRM_PANEL_SAMSUNG_S6E63M0 ++ tristate "Samsung S6E63M0 RGB/SPI panel" ++ depends on OF ++ depends on SPI ++ depends on BACKLIGHT_CLASS_DEVICE ++ help ++ Say Y here if you want to enable support for Samsung s6e63m0 ++ AMOLED LCD panel. ++ + config DRM_PANEL_SAMSUNG_S6E8AA0 + tristate "Samsung S6E8AA0 DSI video mode panel" + depends on OF +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index 5ccaaa9d13af..fd6fbcf7808c 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -14,6 +14,7 @@ obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o ++obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o + obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o + obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o +diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +new file mode 100644 +index 000000000000..4312aa3e4386 +--- /dev/null ++++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +@@ -0,0 +1,517 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * S6E63M0 AMOLED LCD drm_panel driver. ++ * ++ * Copyright (C) 2019 Paweł Chmiel ++ * Derived from drivers/gpu/drm/panel-samsung-ld9040.c ++ * ++ * Andrzej Hajda ++ */ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include