From 94355f09c718b0dea7fa1ae077df80b2ddcf7227 Mon Sep 17 00:00:00 2001 From: yuweiyuan8 <871282669@qq.com> Date: Tue, 6 Feb 2024 08:48:22 +0800 Subject: [PATCH 01/10] add redmi k30 pro --- .../sm8250-6.7/0031-add-lmi-csot-panel.patch | 467 + .../0032-add-lmi-touchscreen-driver.patch | 38018 ++++++++++++++++ .../sm8250-6.7/dt/sm8250-xiaomi-lmi.dts | 977 + 3 files changed, 39462 insertions(+) create mode 100644 patch/kernel/archive/sm8250-6.7/0031-add-lmi-csot-panel.patch create mode 100644 patch/kernel/archive/sm8250-6.7/0032-add-lmi-touchscreen-driver.patch create mode 100644 patch/kernel/archive/sm8250-6.7/dt/sm8250-xiaomi-lmi.dts diff --git a/patch/kernel/archive/sm8250-6.7/0031-add-lmi-csot-panel.patch b/patch/kernel/archive/sm8250-6.7/0031-add-lmi-csot-panel.patch new file mode 100644 index 000000000000..571373652a1d --- /dev/null +++ b/patch/kernel/archive/sm8250-6.7/0031-add-lmi-csot-panel.patch @@ -0,0 +1,467 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: FantasyGmm <16450052+FantasyGmm@users.noreply.github.com> +Date: Mon, 29 Jan 2024 19:05:12 +0800 +Subject: Patching kernel arm64 files drivers/gpu/drm/panel/Kconfig + drivers/gpu/drm/panel/Makefile drivers/gpu/drm/panel/panel-xiaomi-lmi-csot.c + +Signed-off-by: FantasyGmm <16450052+FantasyGmm@users.noreply.github.com> +--- + drivers/gpu/drm/panel/Kconfig | 9 + + drivers/gpu/drm/panel/Makefile | 1 + + drivers/gpu/drm/panel/panel-xiaomi-lmi-csot.c | 416 ++++++++++ + 3 files changed, 426 insertions(+) + +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig +index 99e14dc212ec..2ab846e5cfaf 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -8,6 +8,15 @@ config DRM_PANEL + menu "Display Panels" + depends on DRM && DRM_PANEL + ++config DRM_PANEL_XIAOMI_LMI_CSOT ++ tristate "Redmi k30 pro (lmi) 1080x2340 CSOT AMOLED panel" ++ depends on OF ++ depends on DRM_MIPI_DSI ++ depends on BACKLIGHT_CLASS_DEVICE ++ help ++ Say Y here if you want to enable support for the CSOT 1080x2340 ++ dsc cmd mode panel as found in Xiaomi Mi 10 devices. ++ + config DRM_PANEL_ABT_Y030XX067A + tristate "ABT Y030XX067A 320x480 LCD panel" + depends on OF && SPI +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index d10c3de51c6d..687a239df8b1 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -88,3 +88,4 @@ obj-$(CONFIG_DRM_PANEL_VISIONOX_VTDR6130) += panel-visionox-vtdr6130.o + obj-$(CONFIG_DRM_PANEL_VISIONOX_R66451) += panel-visionox-r66451.o + obj-$(CONFIG_DRM_PANEL_WIDECHIPS_WS2401) += panel-widechips-ws2401.o + obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o ++obj-$(CONFIG_DRM_PANEL_XIAOMI_LMI_CSOT) += panel-xiaomi-lmi-csot.o +diff --git a/drivers/gpu/drm/panel/panel-xiaomi-lmi-csot.c b/drivers/gpu/drm/panel/panel-xiaomi-lmi-csot.c +new file mode 100644 +index 000000000000..5e1d3ec9c08d +--- /dev/null ++++ b/drivers/gpu/drm/panel/panel-xiaomi-lmi-csot.c +@@ -0,0 +1,416 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++// Copyright (c) 2024 FIXME ++// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree: ++// Copyright (c) 2013, The Linux Foundation. All rights reserved. (FIXME) ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include