diff --git a/device/community/linux-postmarketos-exynos4/0001-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch b/device/community/linux-postmarketos-exynos4/0001-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch deleted file mode 100644 index c8f7a979c..000000000 --- a/device/community/linux-postmarketos-exynos4/0001-ARM-decompressor-Flush-tlb-before-swiching-domain-0-.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 2a8827ae4e19cfe78d57c45cfffb7b2a010a77b6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= -Date: Fri, 30 Nov 2012 17:05:40 -0800 -Subject: [PATCH 01/13] ARM: decompressor: Flush tlb before swiching domain 0 - to client mode -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If the bootloader used a page table that is incompatible with domain 0 -in client mode, and boots with the mmu on, then swithing domain 0 to -client mode causes a fault if we don't flush the tlb after updating -the page table pointer. - -v2: Add ISB before loading dacr. - -Signed-off-by: Arve Hjønnevåg ---- - arch/arm/boot/compressed/head.S | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S -index 9f406e9c0ea6..750c8c0d5d9e 100644 ---- a/arch/arm/boot/compressed/head.S -+++ b/arch/arm/boot/compressed/head.S -@@ -892,6 +892,8 @@ __armv7_mmu_cache_on: - bic r6, r6, #1 << 31 @ 32-bit translation system - bic r6, r6, #(7 << 0) | (1 << 4) @ use only ttbr0 - mcrne p15, 0, r3, c2, c0, 0 @ load page table pointer -+ mcrne p15, 0, r0, c8, c7, 0 @ flush I,D TLBs -+ mcr p15, 0, r0, c7, c5, 4 @ ISB - mcrne p15, 0, r1, c3, c0, 0 @ load domain access control - mcrne p15, 0, r6, c2, c0, 2 @ load ttb control - #endif --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0002-ARM-dts-exynos-Add-reboot-modes-to-midas.patch b/device/community/linux-postmarketos-exynos4/0002-ARM-dts-exynos-Add-reboot-modes-to-midas.patch deleted file mode 100644 index ac0b47822..000000000 --- a/device/community/linux-postmarketos-exynos4/0002-ARM-dts-exynos-Add-reboot-modes-to-midas.patch +++ /dev/null @@ -1,61 +0,0 @@ -From d5af6b882084222f9b41ff1fa80116ffc82c857a Mon Sep 17 00:00:00 2001 -From: Denis 'GNUtoo' Carikli -Date: Wed, 4 Nov 2020 00:06:26 +0100 -Subject: [PATCH 02/13] ARM: dts: exynos: Add reboot modes to midas - -The values have been taken from the sec-reboot.c driver in -the 3.0.101 smdk4412 kernel used in LineageOS which is based -on Samsung source code releases for various devices. - -Only the strict minimum modes have been added: the S-Boot 4.0 -bootloader is nonfree, so exporting less well known modes could -potentially have unwanted consequences. - -TODO: -- After reboot to download, heimdall doesn't work while it works - with the SMDK4412 kernel. -- Fix reboot without arguments (Test: Try "Reboot system now" - in a recovery after rebooting to the recovery) - -Signed-off-by: Denis 'GNUtoo' Carikli ---- - arch/arm/boot/dts/exynos4412-midas.dtsi | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi -index 8e1c19a8ad06..1f9cd7474b16 100644 ---- a/arch/arm/boot/dts/exynos4412-midas.dtsi -+++ b/arch/arm/boot/dts/exynos4412-midas.dtsi -@@ -982,6 +982,29 @@ &mshc_0 { - &pmu_system_controller { - assigned-clocks = <&pmu_system_controller 0>; - assigned-clock-parents = <&clock CLK_XUSBXTI>; -+ -+ /* S-Boot 4.0 */ -+ #define S5P_INFORM2 0xF008 -+ #define S5P_INFORM3 0x080C -+ #define BOOT_MODE_PREFIX 0x12345670 -+ #define BOOT_NORMAL (BOOT_MODE_PREFIX | 0) -+ #define BOOT_DOWNLOAD (BOOT_MODE_PREFIX | 1) -+ #define BOOT_RECOVERY (BOOT_MODE_PREFIX | 4) -+ -+ no-lpm-mode { -+ compatible = "syscon-reboot"; -+ offset = ; -+ value = <0x12345678>; -+ }; -+ -+ reboot-mode { -+ compatible = "syscon-reboot-mode"; -+ offset = ; -+ mode-normal = ; -+ mode-recovery = ; -+ mode-bootloader = ; -+ mode-download = ; -+ }; - }; - - &pinctrl_0 { --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0003-mmc-core-Workaround-VTU00M-0xf1-FTL-metadata-corrupt.patch b/device/community/linux-postmarketos-exynos4/0003-mmc-core-Workaround-VTU00M-0xf1-FTL-metadata-corrupt.patch deleted file mode 100644 index c17ad94d6..000000000 --- a/device/community/linux-postmarketos-exynos4/0003-mmc-core-Workaround-VTU00M-0xf1-FTL-metadata-corrupt.patch +++ /dev/null @@ -1,343 +0,0 @@ -From 8e9623270952885f0b4a45c56c965c4295ce709c Mon Sep 17 00:00:00 2001 -From: belgin -Date: Tue, 29 Jun 2021 20:31:12 +0300 -Subject: [PATCH 03/13] mmc: core: Workaround VTU00M 0xf1 FTL metadata - corruption bug - -Some versions of the 0xf1 revision of the firmware of the -VTU00M eMMC from Samsung have a bug that triggers an FTL -metadata corruption. - -These eMMC are used at least in the Samsung Galaxy SIII -(GT-I9300) and Galaxy Note II (GT-N7100). - -The corrupted FTL metadata can make the eMMC CPU crash. - -In practice as the eMMC has several hardware partitions, in -some cases the bootloader hadware partition (which is used -to store the phone bootloader in the Galaxy SIII and Note II) -still works, while the main hardware partition (that contains -the phone operating system) doesn't. - -In other cases the eMMC crashes during the very begining of -its boot procedure. In that case the phones botloaders can't -be loaded anymore, which results in a black screen and no -visible signs that the phone has been powered on. - -This patch has been ported from the Samsung patch made to -address this issue. - -It uses MMC vendor specific commands to patch the eMMC -firmware in RAM. The patch hangs the eMMC CPU right before -the corruption is about to happen. - -So while it's not ideal, it still better to have devices -hanging, even repetedly, than breaking devices completely. - -Since VTU00M eMMC firmwares are not free software nor -redistributable, we cannot simply dump newer firmwares, -and redistribute them. In addition the only tested way -to do a firmware update destroys all the data on the -eMMC (including the FTL metadata as well) in the process. - -A proper fix would be to write a compatible free software -eMMC firmware and to investigate the firmware update command -that doesn't erase the FTL metadata and/or the data, however -this could be quite time consuming. - -References: -- https://media.ccc.de/v/34c3-8784-emmc_hacking_or_how_i_fixed_long-dead_galaxy_s3_phones - -TODO: -- Adapt this patch to use the SD/eMMC hook system for eMMC cards. -- upstream it - -Signed-off-by: belgin -GNUtoo: Rewrite the commit message -Signed-off-by: Denis 'GNUtoo' Carikli ---- - drivers/mmc/core/mmc.c | 17 +++ - drivers/mmc/core/mmc_ops.c | 206 +++++++++++++++++++++++++++++++++++++ - include/linux/mmc/card.h | 1 + - include/linux/mmc/core.h | 3 + - 4 files changed, 227 insertions(+) - -diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c -index 89cd48fcec79..dc6fe015f872 100644 ---- a/drivers/mmc/core/mmc.c -+++ b/drivers/mmc/core/mmc.c -@@ -1929,6 +1929,12 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, - if (!oldcard) - host->card = card; - -+ err = mmc_start_movi_operation(host->card); -+ if (err) { -+ pr_warn("%s: movi operation failed\n", mmc_hostname(host)); -+ goto free_card; -+ } -+ - return 0; - - free_card: -@@ -2329,6 +2335,17 @@ int mmc_attach_mmc(struct mmc_host *host) - if (err) - goto remove_card; - -+ if (!strncmp(host->card->cid.prod_name, "VTU00M", 6) && -+ (host->card->cid.prv == 0xf1) && -+ (mmc_start_movi_smart(host->card) == 0x2)) -+ host->card->movi_ops = 0x2; -+ -+ err = mmc_start_movi_operation(host->card); -+ if (err) { -+ pr_warn("%s: movi operation failed\n", mmc_hostname(host)); -+ goto remove_card; -+ } -+ - mmc_claim_host(host); - return 0; - -diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c -index 81c55bfd6e0c..07e67b62515d 100644 ---- a/drivers/mmc/core/mmc_ops.c -+++ b/drivers/mmc/core/mmc_ops.c -@@ -856,6 +856,212 @@ int mmc_bus_test(struct mmc_card *card, u8 bus_width) - return mmc_send_bus_test(card, card->host, MMC_BUS_TEST_R, width); - } - -+static int mmc_send_cmd(struct mmc_host *host, -+ u32 opcode, u32 arg, unsigned int flags, u32 *resp) -+{ -+ int err; -+ struct mmc_command cmd; -+ -+ memset(&cmd, 0, sizeof(struct mmc_command)); -+ -+ cmd.opcode = opcode; -+ cmd.arg = arg; -+ cmd.flags = flags; -+ *resp = 0; -+ -+ err = mmc_wait_for_cmd(host, &cmd, 0); -+ -+ if (!err) -+ *resp = cmd.resp[0]; -+ else -+ printk(KERN_ERR "[CMD%d] FAILED!!\n", cmd.opcode); -+ -+ return err; -+} -+ -+static int mmc_movi_cmd(struct mmc_host *host, u32 arg) -+{ -+ int err; -+ u32 resp; -+ -+ err = mmc_send_cmd(host, 62, arg, -+ MMC_RSP_R1B | MMC_CMD_AC, &resp); -+ mdelay(10); -+ -+ if (!err) -+ do { -+ err = mmc_send_cmd(host, MMC_SEND_STATUS, -+ host->card->rca << 16, -+ MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC, -+ &resp); -+ if (err) { -+ printk(KERN_ERR "CMD13(VC) failed\n"); -+ break; -+ } -+ /*wait until READY_FOR_DATA*/ -+ } while (!(resp & 1<<8)); -+ -+ return err; -+} -+ -+static int mmc_movi_erase_cmd(struct mmc_host *host, u32 arg1, u32 arg2) -+{ -+ int err; -+ u32 resp; -+ -+ err = mmc_send_cmd(host, MMC_ERASE_GROUP_START, arg1, -+ MMC_RSP_R1 | MMC_CMD_AC, &resp); -+ if (err) -+ return err; -+ -+ err = mmc_send_cmd(host, MMC_ERASE_GROUP_END, arg2, -+ MMC_RSP_R1 | MMC_CMD_AC, &resp); -+ if (err) -+ return err; -+ -+ err = mmc_send_cmd(host, MMC_ERASE, 0, -+ MMC_RSP_R1B | MMC_CMD_AC, &resp); -+ if (!err) -+ do { -+ err = mmc_send_cmd(host, MMC_SEND_STATUS, -+ host->card->rca << 16, -+ MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC, -+ &resp); -+ if (err) { -+ printk(KERN_ERR "CMD13(VC) failed\n"); -+ break; -+ } -+ /*wait until READY_FOR_DATA*/ -+ } while (!(resp & 1<<8)); -+ -+ return err; -+} -+ -+ -+static int mmc_movi_read_req(struct mmc_card *card, -+ void *data_buf, u32 arg, u32 blocks) -+{ -+ struct mmc_request mrq = {0}; -+ struct mmc_command cmd = {0}; -+ struct mmc_data data = {0}; -+ struct scatterlist sg; -+ -+ /*send request*/ -+ mrq.cmd = &cmd; -+ mrq.data = &data; -+ -+ if (blocks > 1) -+ cmd.opcode = MMC_READ_MULTIPLE_BLOCK; -+ else -+ cmd.opcode = MMC_READ_SINGLE_BLOCK; -+ cmd.arg = arg; -+ -+ cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC; -+ -+ data.blksz = 512; -+ data.blocks = blocks; -+ data.flags = MMC_DATA_READ; -+ data.sg = &sg; -+ data.sg_len = 1; -+ -+ sg_init_one(&sg, data_buf, data.blksz * data.blocks); -+ -+ mmc_set_data_timeout(&data, card); -+ -+ mmc_wait_for_req(card->host, &mrq); -+ -+ if (cmd.error) -+ return cmd.error; -+ -+ if (data.error) -+ return data.error; -+ -+ return 0; -+} -+ -+int mmc_start_movi_smart(struct mmc_card *card) -+{ -+ int err; -+ u8 data_buf[512]; -+ u32 date = 0; -+ -+ err = mmc_movi_cmd(card->host, 0xEFAC62EC); -+ if (err) -+ return err; -+ -+ err = mmc_movi_cmd(card->host, 0x0000CCEE); -+ if (err) -+ return err; -+ -+ err = mmc_movi_read_req(card, (void *)data_buf, 0x1000, 1); -+ if (err) -+ return err; -+ -+ err = mmc_movi_cmd(card->host, 0xEFAC62EC); -+ if (err) -+ return err; -+ -+ err = mmc_movi_cmd(card->host, 0x00DECCEE); -+ if (err) -+ return err; -+ -+ date = ((data_buf[327] << 24) | (data_buf[326] << 16) | -+ (data_buf[325] << 8) | data_buf[324]); -+ -+ if (date != 0x20120413) { -+ err = -1; -+ return err; -+ } -+ -+ return 0x2; -+} -+EXPORT_SYMBOL_GPL(mmc_start_movi_smart); -+ -+int mmc_start_movi_operation(struct mmc_card *card) -+{ -+ int err = 0; -+ -+ if (card->movi_ops != 0x2) -+ return 0; -+ -+ err = mmc_movi_cmd(card->host, 0xEFAC62EC); -+ if (err) -+ return err; -+ err = mmc_movi_cmd(card->host, 0x10210000); -+ if (err) -+ return err; -+ -+ err = mmc_movi_erase_cmd(card->host, 0x00040300, 0x4A03B510); -+ if (err) -+ return err; -+ err = mmc_movi_erase_cmd(card->host, 0x00040304, 0x28004790); -+ if (err) -+ return err; -+ err = mmc_movi_erase_cmd(card->host, 0x00040308, 0xE7FED100); -+ if (err) -+ return err; -+ err = mmc_movi_erase_cmd(card->host, 0x0004030C, 0x0000BD10); -+ if (err) -+ return err; -+ err = mmc_movi_erase_cmd(card->host, 0x00040310, 0x00059D73); -+ if (err) -+ return err; -+ err = mmc_movi_erase_cmd(card->host, 0x0005C7EA, 0xFD89F7E3); -+ if (err) -+ return err; -+ -+ err = mmc_movi_cmd(card->host, 0xEFAC62EC); -+ if (err) -+ return err; -+ err = mmc_movi_cmd(card->host, 0x00DECCEE); -+ if (err) -+ return err; -+ -+ return err; -+} -+EXPORT_SYMBOL_GPL(mmc_start_movi_operation); -+ -+ - static int mmc_send_hpi_cmd(struct mmc_card *card) - { - unsigned int busy_timeout_ms = card->ext_csd.out_of_int_time; -diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h -index c726ea781255..e6e168651b35 100644 ---- a/include/linux/mmc/card.h -+++ b/include/linux/mmc/card.h -@@ -338,6 +338,7 @@ struct mmc_card { - unsigned int nr_parts; - - struct workqueue_struct *complete_wq; /* Private workqueue */ -+ unsigned int movi_ops; - }; - - static inline bool mmc_large_sector(struct mmc_card *card) -diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h -index 6efec0b9820c..9bfbe8a2d22d 100644 ---- a/include/linux/mmc/core.h -+++ b/include/linux/mmc/core.h -@@ -179,4 +179,7 @@ int mmc_hw_reset(struct mmc_card *card); - int mmc_sw_reset(struct mmc_card *card); - void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card); - -+int mmc_start_movi_smart(struct mmc_card *card); -+int mmc_start_movi_operation(struct mmc_card *card); -+ - #endif /* LINUX_MMC_CORE_H */ --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0004-drivers-drm-Add-backlight-control-support-for-s6e8aa.patch b/device/community/linux-postmarketos-exynos4/0004-drivers-drm-Add-backlight-control-support-for-s6e8aa.patch deleted file mode 100644 index 203bb48b3..000000000 --- a/device/community/linux-postmarketos-exynos4/0004-drivers-drm-Add-backlight-control-support-for-s6e8aa.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 5cd8e7d2ec843996eebb37246d828255c182f4f4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= -Date: Tue, 3 Sep 2019 10:45:08 -0400 -Subject: [PATCH 04/13] drivers: drm: Add backlight control support for s6e8aa0 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Joonas Kylmälä ---- - drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 83 ++++++++++++++----- - 1 file changed, 61 insertions(+), 22 deletions(-) - -diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c -index 54213beafaf5..635336208fef 100644 ---- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c -+++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c -@@ -3,6 +3,8 @@ - * MIPI-DSI based s6e8aa0 AMOLED LCD 5.3 inch panel driver. - * - * Copyright (c) 2013 Samsung Electronics Co., Ltd -+ * Copyright (C) 2019 Paweł Chmiel -+ * Derived from drivers/gpu/drm/panel/panel-samsung-s6e63m0.c - * - * Inki Dae, - * Donghwa Lee, -@@ -12,6 +14,7 @@ - * Andrzej Hajda - */ - -+#include - #include - #include - #include -@@ -25,6 +28,7 @@ - #include - #include - #include -+#include - - #define LDI_MTP_LENGTH 24 - #define GAMMA_LEVEL_NUM 25 -@@ -84,6 +88,8 @@ - #define AID_2 (0x6) - #define AID_3 (0x7) - -+#define MAX_BRIGHTNESS (GAMMA_LEVEL_NUM - 1) -+ - typedef u8 s6e8aa0_gamma_table[GAMMA_TABLE_LEN]; - - struct s6e8aa0_variant { -@@ -94,6 +100,7 @@ struct s6e8aa0_variant { - struct s6e8aa0 { - struct device *dev; - struct drm_panel panel; -+ struct backlight_device *bl_dev; - - struct regulator_bulk_data supplies[2]; - struct gpio_desc *reset_gpio; -@@ -109,7 +116,6 @@ struct s6e8aa0 { - u8 version; - u8 id; - const struct s6e8aa0_variant *variant; -- int brightness; - - /* This field is tested by functions directly accessing DSI bus before - * transfer, transfer is skipped if it is set. In case of transfer -@@ -320,9 +326,10 @@ static void s6e8aa0_etc_elvss_control(struct s6e8aa0 *ctx) - - static void s6e8aa0_elvss_nvm_set_v142(struct s6e8aa0 *ctx) - { -+ struct backlight_device *bd = ctx->bl_dev; - u8 br; - -- switch (ctx->brightness) { -+ switch (bd->props.brightness) { - case 0 ... 6: /* 30cd ~ 100cd */ - br = 0xdf; - break; -@@ -761,24 +768,6 @@ static const struct s6e8aa0_variant s6e8aa0_variants[] = { - } - }; - --static void s6e8aa0_brightness_set(struct s6e8aa0 *ctx) --{ -- const u8 *gamma; -- -- if (ctx->error) -- return; -- -- gamma = ctx->variant->gamma_tables[ctx->brightness]; -- -- if (ctx->version >= 142) -- s6e8aa0_elvss_nvm_set(ctx); -- -- s6e8aa0_dcs_write(ctx, gamma, GAMMA_TABLE_LEN); -- -- /* update gamma table. */ -- s6e8aa0_dcs_write_seq_static(ctx, 0xf7, 0x03); --} -- - static void s6e8aa0_panel_init(struct s6e8aa0 *ctx) - { - s6e8aa0_apply_level_1_key(ctx); -@@ -790,7 +779,7 @@ static void s6e8aa0_panel_init(struct s6e8aa0 *ctx) - - s6e8aa0_panel_cond_set(ctx); - s6e8aa0_display_condition_set(ctx); -- s6e8aa0_brightness_set(ctx); -+ backlight_enable(ctx->bl_dev); - s6e8aa0_etc_source_control(ctx); - s6e8aa0_etc_pentile_control(ctx); - s6e8aa0_elvss_nvm_set(ctx); -@@ -973,6 +962,54 @@ static int s6e8aa0_parse_dt(struct s6e8aa0 *ctx) - return 0; - } - -+static int s6e8aa0_set_brightness(struct backlight_device *bd) -+{ -+ struct s6e8aa0 *ctx = bl_get_data(bd); -+ int brightness = bd->props.brightness; -+ const u8 *gamma; -+ -+ if (ctx->error) -+ return ctx->error; -+ -+ gamma = ctx->variant->gamma_tables[brightness]; -+ -+ if (ctx->version >= 142) -+ s6e8aa0_elvss_nvm_set(ctx); -+ -+ s6e8aa0_dcs_write(ctx, gamma, GAMMA_TABLE_LEN); -+ -+ /* update gamma table. */ -+ s6e8aa0_dcs_write_seq_static(ctx, 0xf7, 0x03); -+ -+ return s6e8aa0_clear_error(ctx); -+} -+ -+static const struct backlight_ops s6e8aa0_backlight_ops = { -+ .update_status = s6e8aa0_set_brightness, -+}; -+ -+static int s6e8aa0_backlight_register(struct s6e8aa0 *ctx) -+{ -+ struct backlight_properties props = { -+ .type = BACKLIGHT_RAW, -+ .brightness = MAX_BRIGHTNESS, -+ .max_brightness = MAX_BRIGHTNESS -+ }; -+ struct device *dev = ctx->dev; -+ int ret = 0; -+ -+ ctx->bl_dev = devm_backlight_device_register(dev, "panel", dev, ctx, -+ &s6e8aa0_backlight_ops, -+ &props); -+ if (IS_ERR(ctx->bl_dev)) { -+ ret = PTR_ERR(ctx->bl_dev); -+ DRM_DEV_ERROR(dev, "error registering backlight device (%d)\n", -+ ret); -+ } -+ -+ return ret; -+} -+ - static int s6e8aa0_probe(struct mipi_dsi_device *dsi) - { - struct device *dev = &dsi->dev; -@@ -1014,7 +1051,9 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) - return PTR_ERR(ctx->reset_gpio); - } - -- ctx->brightness = GAMMA_LEVEL_NUM - 1; -+ ret = s6e8aa0_backlight_register(ctx); -+ if (ret < 0) -+ return ret; - - drm_panel_init(&ctx->panel, dev, &s6e8aa0_drm_funcs, - DRM_MODE_CONNECTOR_DSI); --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0005-power_supply-max77693-Listen-for-cable-events-and-en.patch b/device/community/linux-postmarketos-exynos4/0005-power_supply-max77693-Listen-for-cable-events-and-en.patch deleted file mode 100644 index 6257426c6..000000000 --- a/device/community/linux-postmarketos-exynos4/0005-power_supply-max77693-Listen-for-cable-events-and-en.patch +++ /dev/null @@ -1,300 +0,0 @@ -From 0694eec6b1da62d19cf5334471c0bce7cabfa8e2 Mon Sep 17 00:00:00 2001 -From: Wolfgang Wiedmeyer -Date: Tue, 27 Sep 2016 00:56:37 +0200 -Subject: [PATCH 05/13] power_supply: max77693: Listen for cable events and - enable charging - -This patch adds a listener for extcon cable events and enables -charging if an USB cable is connected. It recognizes SDP and DCP cable -types and treats them the same (same input current and fast charge -current). The maximum input current is set before the charger is -enabled and before the charger gets disabled, the maximum input -current is set to zero. The listener is inspired by the listener -implementation that was used for the AXP288 Charger driver. - -The patch also adds support for the CURRENT_NOW property. It reads the -fast charge current that gets set before the charger is enabled or -disabled. - -Signed-off-by: Wolfgang Wiedmeyer -GNUtoo@cyberdimension.org: small fixes -Signed-off-by: Denis 'GNUtoo' Carikli ---- - drivers/power/supply/Kconfig | 2 +- - drivers/power/supply/max77693_charger.c | 177 ++++++++++++++++++++++++ - 2 files changed, 178 insertions(+), 1 deletion(-) - -diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig -index 0bbfe6a7ce4d..2364095abf31 100644 ---- a/drivers/power/supply/Kconfig -+++ b/drivers/power/supply/Kconfig -@@ -567,7 +567,7 @@ config CHARGER_MAX77650 - - config CHARGER_MAX77693 - tristate "Maxim MAX77693 battery charger driver" -- depends on MFD_MAX77693 -+ depends on MFD_MAX77693 && REGULATOR_MAX77693 - help - Say Y to enable support for the Maxim MAX77693 battery charger. - -diff --git a/drivers/power/supply/max77693_charger.c b/drivers/power/supply/max77693_charger.c -index a2c5c9858639..f2b5ef7df446 100644 ---- a/drivers/power/supply/max77693_charger.c -+++ b/drivers/power/supply/max77693_charger.c -@@ -12,8 +12,11 @@ - #include - #include - #include -+#include -+#include - - #define MAX77693_CHARGER_NAME "max77693-charger" -+#define MAX77693_EXTCON_DEV_NAME "max77693-muic" - static const char *max77693_charger_model = "MAX77693"; - static const char *max77693_charger_manufacturer = "Maxim Integrated"; - -@@ -21,12 +24,21 @@ struct max77693_charger { - struct device *dev; - struct max77693_dev *max77693; - struct power_supply *charger; -+ struct regulator *regu; - - u32 constant_volt; - u32 min_system_volt; - u32 thermal_regulation_temp; - u32 batttery_overcurrent; - u32 charge_input_threshold_volt; -+ -+ /* SDP/DCP USB charging cable notifications */ -+ struct { -+ struct extcon_dev *edev; -+ bool connected; -+ struct notifier_block nb; -+ struct work_struct work; -+ } cable; - }; - - static int max77693_get_charger_state(struct regmap *regmap, int *val) -@@ -197,12 +209,28 @@ static int max77693_get_online(struct regmap *regmap, int *val) - return 0; - } - -+int max77693_get_charge_current(struct regmap *regmap, int *val) -+{ -+ unsigned int data; -+ int ret; -+ -+ ret = regmap_read(regmap, MAX77693_CHG_REG_CHG_CNFG_02, &data); -+ if (ret < 0) -+ return ret; -+ -+ data &= CHG_CNFG_02_CC_MASK; -+ *val = data * 333 / 10; /* 3 steps/0.1A */ -+ -+ return 0; -+} -+ - static enum power_supply_property max77693_charger_props[] = { - POWER_SUPPLY_PROP_STATUS, - POWER_SUPPLY_PROP_CHARGE_TYPE, - POWER_SUPPLY_PROP_HEALTH, - POWER_SUPPLY_PROP_PRESENT, - POWER_SUPPLY_PROP_ONLINE, -+ POWER_SUPPLY_PROP_CURRENT_NOW, - POWER_SUPPLY_PROP_MODEL_NAME, - POWER_SUPPLY_PROP_MANUFACTURER, - }; -@@ -231,6 +259,9 @@ static int max77693_charger_get_property(struct power_supply *psy, - case POWER_SUPPLY_PROP_ONLINE: - ret = max77693_get_online(regmap, &val->intval); - break; -+ case POWER_SUPPLY_PROP_CURRENT_NOW: -+ ret = max77693_get_charge_current(regmap, &val->intval); -+ break; - case POWER_SUPPLY_PROP_MODEL_NAME: - val->strval = max77693_charger_model; - break; -@@ -285,6 +316,7 @@ static ssize_t fast_charge_timer_show(struct device *dev, - - data &= CHG_CNFG_01_FCHGTIME_MASK; - data >>= CHG_CNFG_01_FCHGTIME_SHIFT; -+ - switch (data) { - case 0x1 ... 0x7: - /* Starting from 4 hours, step by 2 hours */ -@@ -573,6 +605,102 @@ static int max77693_set_charge_input_threshold_volt(struct max77693_charger *chg - CHG_CNFG_12_VCHGINREG_MASK, data); - } - -+static int max77693_enable_charger(struct max77693_charger *chg, bool enable) -+{ -+ int ret; -+ -+ if (enable) { -+ ret = regulator_set_current_limit( -+ chg->regu, -+ CHG_CNFG_09_CHGIN_ILIM_500_MIN, -+ CHG_CNFG_09_CHGIN_ILIM_500_MAX); -+ -+ if (ret < 0) -+ return ret; -+ -+ ret = regulator_enable(chg->regu); -+ if (ret < 0) -+ return ret; -+ } else { -+ /* sets fast charge current to zero */ -+ ret = regulator_set_current_limit(chg->regu, -+ CHG_CNFG_09_CHGIN_ILIM_0_MIN, -+ CHG_CNFG_09_CHGIN_ILIM_0_MAX); -+ if (ret < 0) -+ return ret; -+ -+ ret = regulator_disable(chg->regu); -+ if (ret < 0) -+ return ret; -+ } -+ -+ return ret; -+} -+ -+static void max77693_extcon_evt_worker(struct work_struct *work) -+{ -+ struct max77693_charger *chg = container_of(work, -+ struct max77693_charger, -+ cable.work); -+ bool changed = false; -+ struct extcon_dev *edev = chg->cable.edev; -+ bool old_connected = chg->cable.connected; -+ bool is_charger_enabled; -+ int ret; -+ -+ /* Determine cable/charger type */ -+ if (extcon_get_state(edev, EXTCON_CHG_USB_SDP) || -+ extcon_get_state(edev, EXTCON_CHG_USB_DCP)) { -+ dev_dbg(chg->dev, "USB charger is connected"); -+ chg->cable.connected = true; -+ } else { -+ if (old_connected) -+ dev_dbg(chg->dev, "USB charger disconnected"); -+ chg->cable.connected = false; -+ } -+ -+ /* Cable status changed */ -+ if (old_connected != chg->cable.connected) -+ changed = true; -+ -+ if (!changed) -+ return; -+ -+ if (regulator_is_enabled(chg->regu)) -+ is_charger_enabled = true; -+ else -+ is_charger_enabled = false; -+ -+ if (is_charger_enabled && !chg->cable.connected) { -+ ret = max77693_enable_charger(chg, false); -+ if (ret < 0) { -+ dev_err(chg->dev, -+ "failed to disable charger (%d)", ret); -+ } -+ } else if (!is_charger_enabled && chg->cable.connected) { -+ ret = max77693_enable_charger(chg, true); -+ if (ret < 0) { -+ dev_err(chg->dev, -+ "cannot enable charger (%d)", ret); -+ } -+ } -+ -+ if (changed) -+ power_supply_changed(chg->charger); -+} -+ -+static int max77693_handle_cable_evt(struct notifier_block *nb, -+ unsigned long event, void *param) -+{ -+ struct max77693_charger *chg = container_of(nb, -+ struct max77693_charger, -+ cable.nb); -+ -+ schedule_work(&chg->cable.work); -+ -+ return NOTIFY_OK; -+} -+ - /* - * Sets charger registers to proper and safe default values. - */ -@@ -684,6 +812,46 @@ static int max77693_charger_probe(struct platform_device *pdev) - if (ret) - return ret; - -+ chg->regu = devm_regulator_get(chg->dev, "CHARGER"); -+ if (IS_ERR(chg->regu)) { -+ ret = PTR_ERR(chg->regu); -+ dev_err(&pdev->dev, -+ "failed to get charger regulator %d\n", ret); -+ return ret; -+ } -+ -+ chg->cable.edev = extcon_get_extcon_dev(MAX77693_EXTCON_DEV_NAME); -+ if (IS_ERR(chg->cable.edev)) { -+ dev_err_probe(&pdev->dev, PTR_ERR(chg->cable.edev), -+ "extcon_get_extcon_dev(%s) failed\n", -+ MAX77693_EXTCON_DEV_NAME); -+ return PTR_ERR(chg->cable.edev); -+ } -+ -+ /* set initial value */ -+ chg->cable.connected = false; -+ -+ /* Register for extcon notification */ -+ INIT_WORK(&chg->cable.work, max77693_extcon_evt_worker); -+ chg->cable.nb.notifier_call = max77693_handle_cable_evt; -+ ret = extcon_register_notifier(chg->cable.edev, EXTCON_CHG_USB_SDP, -+ &chg->cable.nb); -+ if (ret) { -+ dev_err(&pdev->dev, -+ "failed to register extcon notifier for SDP %d\n", ret); -+ return ret; -+ } -+ -+ ret = extcon_register_notifier(chg->cable.edev, EXTCON_CHG_USB_DCP, -+ &chg->cable.nb); -+ if (ret) { -+ dev_err(&pdev->dev, -+ "failed to register extcon notifier for DCP %d\n", ret); -+ extcon_unregister_notifier(chg->cable.edev, -+ EXTCON_CHG_USB_SDP, &chg->cable.nb); -+ return ret; -+ } -+ - ret = max77693_reg_init(chg); - if (ret) - return ret; -@@ -724,6 +892,10 @@ static int max77693_charger_probe(struct platform_device *pdev) - device_remove_file(&pdev->dev, &dev_attr_top_off_timer); - device_remove_file(&pdev->dev, &dev_attr_top_off_threshold_current); - device_remove_file(&pdev->dev, &dev_attr_fast_charge_timer); -+ extcon_unregister_notifier(chg->cable.edev, EXTCON_CHG_USB_SDP, -+ &chg->cable.nb); -+ extcon_unregister_notifier(chg->cable.edev, EXTCON_CHG_USB_DCP, -+ &chg->cable.nb); - - return ret; - } -@@ -736,6 +908,11 @@ static int max77693_charger_remove(struct platform_device *pdev) - device_remove_file(&pdev->dev, &dev_attr_top_off_threshold_current); - device_remove_file(&pdev->dev, &dev_attr_fast_charge_timer); - -+ extcon_unregister_notifier(chg->cable.edev, EXTCON_CHG_USB_SDP, -+ &chg->cable.nb); -+ extcon_unregister_notifier(chg->cable.edev, EXTCON_CHG_USB_DCP, -+ &chg->cable.nb); -+ - power_supply_unregister(chg->charger); - - return 0; --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0006-mfd-max77693-Add-defines-for-charger-current-control.patch b/device/community/linux-postmarketos-exynos4/0006-mfd-max77693-Add-defines-for-charger-current-control.patch deleted file mode 100644 index eade981ab..000000000 --- a/device/community/linux-postmarketos-exynos4/0006-mfd-max77693-Add-defines-for-charger-current-control.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 44b7e1cb569c6bd3b2ef30304dac8fff80414506 Mon Sep 17 00:00:00 2001 -From: Wolfgang Wiedmeyer -Date: Mon, 26 Sep 2016 23:33:05 +0200 -Subject: [PATCH 06/13] mfd: max77693: Add defines for charger current control - -This prepares for an updated regulator and charger driver. The defines -are needed to set the maximum input current and the fast charge -current. - -Signed-off-by: Wolfgang Wiedmeyer -GNUtoo@cyberdimension.org: small fix -Signed-off-by: Denis 'GNUtoo' Carikli ---- - include/linux/mfd/max77693-private.h | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h -index 311f7d3d2323..f6df8bafe996 100644 ---- a/include/linux/mfd/max77693-private.h -+++ b/include/linux/mfd/max77693-private.h -@@ -217,6 +217,9 @@ enum max77693_charger_battery_state { - #define CHG_CNFG_01_CHGRSTRT_MASK (0x3 << CHG_CNFG_01_CHGRSTRT_SHIFT) - #define CHG_CNFG_01_PQEN_MAKS BIT(CHG_CNFG_01_PQEN_SHIFT) - -+/* MAX77693_CHG_REG_CHG_CNFG_02 register */ -+#define CHG_CNFG_02_CC_MASK 0x3F -+ - /* MAX77693_CHG_REG_CHG_CNFG_03 register */ - #define CHG_CNFG_03_TOITH_SHIFT 0 - #define CHG_CNFG_03_TOTIME_SHIFT 3 -@@ -245,6 +248,10 @@ enum max77693_charger_battery_state { - - /* MAX77693 CHG_CNFG_09 Register */ - #define CHG_CNFG_09_CHGIN_ILIM_MASK 0x7F -+#define CHG_CNFG_09_CHGIN_ILIM_500_MAX 500000 -+#define CHG_CNFG_09_CHGIN_ILIM_500_MIN 470000 -+#define CHG_CNFG_09_CHGIN_ILIM_0_MAX 60000 -+#define CHG_CNFG_09_CHGIN_ILIM_0_MIN 0 - - /* MAX77693 CHG_CTRL Register */ - #define SAFEOUT_CTRL_SAFEOUT1_MASK 0x3 --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0007-power_supply-max77693-change-the-supply-type-to-POWE.patch b/device/community/linux-postmarketos-exynos4/0007-power_supply-max77693-change-the-supply-type-to-POWE.patch deleted file mode 100644 index 4a21a72fb..000000000 --- a/device/community/linux-postmarketos-exynos4/0007-power_supply-max77693-change-the-supply-type-to-POWE.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5e23168b43df9f888bab09090d8d9df868cf8d24 Mon Sep 17 00:00:00 2001 -From: Shilin Victor -Date: Fri, 19 Mar 2021 19:10:37 +0300 -Subject: [PATCH 07/13] power_supply: max77693: change the supply type to - POWER_SUPPLY_TYPE_MAINS - ---- - drivers/power/supply/max77693_charger.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/power/supply/max77693_charger.c b/drivers/power/supply/max77693_charger.c -index f2b5ef7df446..3962701989e5 100644 ---- a/drivers/power/supply/max77693_charger.c -+++ b/drivers/power/supply/max77693_charger.c -@@ -277,7 +277,7 @@ static int max77693_charger_get_property(struct power_supply *psy, - - static const struct power_supply_desc max77693_charger_desc = { - .name = MAX77693_CHARGER_NAME, -- .type = POWER_SUPPLY_TYPE_BATTERY, -+ .type = POWER_SUPPLY_TYPE_MAINS, - .properties = max77693_charger_props, - .num_properties = ARRAY_SIZE(max77693_charger_props), - .get_property = max77693_charger_get_property, --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0008-samsung-t0lte-add-leds.patch b/device/community/linux-postmarketos-exynos4/0008-samsung-t0lte-add-leds.patch deleted file mode 100644 index cbee94c2f..000000000 --- a/device/community/linux-postmarketos-exynos4/0008-samsung-t0lte-add-leds.patch +++ /dev/null @@ -1,112 +0,0 @@ -From b582d2cc9352ba4dc5679e74eb8e1f25ee7f6f0f Mon Sep 17 00:00:00 2001 -From: Jack Knightly -Date: Fri, 14 Oct 2022 20:59:44 +0200 -Subject: [PATCH 08/13] samsung-t0lte: add leds - -Adds flash/torch LED for samsung-t0lte - -AND notification LED to t0lte and other midas devices (samsung-m0, -samsung-m3). ---- - arch/arm/boot/dts/exynos4412-midas.dtsi | 37 ++++++++++++++++++++++++- - arch/arm/boot/dts/exynos4412-n710x.dts | 15 ++++++++++ - 2 files changed, 51 insertions(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/exynos4412-midas.dtsi b/arch/arm/boot/dts/exynos4412-midas.dtsi -index 1f9cd7474b16..3d6faa222f1d 100644 ---- a/arch/arm/boot/dts/exynos4412-midas.dtsi -+++ b/arch/arm/boot/dts/exynos4412-midas.dtsi -@@ -18,6 +18,7 @@ - #include - #include - #include "exynos-pinctrl.h" -+#include - - / { - compatible = "samsung,midas", "samsung,exynos4412", "samsung,exynos4"; -@@ -25,6 +26,7 @@ / { - aliases { - i2c11 = &i2c_max77693; - i2c12 = &i2c_max77693_fuel; -+ i2c13 = &i2c_an30259a; - }; - - chosen { -@@ -171,7 +173,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>; -@@ -251,6 +253,39 @@ touchkey@20 { - }; - }; - -+ 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"; - sda-gpios = <&gpf0 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; -diff --git a/arch/arm/boot/dts/exynos4412-n710x.dts b/arch/arm/boot/dts/exynos4412-n710x.dts -index 9ae05b0d684c..5f2888816e4a 100644 ---- a/arch/arm/boot/dts/exynos4412-n710x.dts -+++ b/arch/arm/boot/dts/exynos4412-n710x.dts -@@ -69,6 +69,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>; --- -2.30.2 - diff --git a/device/community/linux-postmarketos-exynos4/0009-drm-panel-add-S6EVR02-panel-driver.patch b/device/community/linux-postmarketos-exynos4/0009-drm-panel-add-S6EVR02-panel-driver.patch deleted file mode 100644 index b7de6975c..000000000 --- a/device/community/linux-postmarketos-exynos4/0009-drm-panel-add-S6EVR02-panel-driver.patch +++ /dev/null @@ -1,817 +0,0 @@ -From e1172d70d3a3eb4f174c73503202d6351a16608d Mon Sep 17 00:00:00 2001 -From: Simon Shields -Date: Thu, 16 Nov 2017 22:29:35 +1100 -Subject: [PATCH 09/13] drm: panel: add S6EVR02 panel driver - -Gamma table values have been dumped from vendor kernel based on -Linux 3.0. - -[ bring up to 5.17.4 and squash with backlight addition patch ] -Signed-off-by: Jack Knightly ---- - drivers/gpu/drm/panel/Kconfig | 6 + - drivers/gpu/drm/panel/Makefile | 1 + - drivers/gpu/drm/panel/panel-samsung-s6evr02.c | 762 ++++++++++++++++++ - 3 files changed, 769 insertions(+) - create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6evr02.c - -diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig -index a582ddd583c2..5ae25fe5bbb9 100644 ---- a/drivers/gpu/drm/panel/Kconfig -+++ b/drivers/gpu/drm/panel/Kconfig -@@ -537,6 +537,12 @@ config DRM_PANEL_SAMSUNG_S6E8AA0 - select DRM_MIPI_DSI - select VIDEOMODE_HELPERS - -+config DRM_PANEL_SAMSUNG_S6EVR02 -+ tristate "Samsung S6EVR02 DSI video mode panel" -+ depends on OF -+ select DRM_MIPI_DSI -+ select VIDEOMODE_HELPERS -+ - config DRM_PANEL_SAMSUNG_SOFEF00 - tristate "Samsung sofef00/s6e3fc2x01 OnePlus 6/6T DSI cmd mode panels" - depends on OF -diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile -index 34e717382dbb..b3d149475a38 100644 ---- a/drivers/gpu/drm/panel/Makefile -+++ b/drivers/gpu/drm/panel/Makefile -@@ -54,6 +54,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_SPI) += panel-samsung-s6e63m0-spi.o - obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI) += panel-samsung-s6e63m0-dsi.o - obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01) += panel-samsung-s6e88a0-ams452ef01.o - obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o -+obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6EVR02) += panel-samsung-s6evr02.o - obj-$(CONFIG_DRM_PANEL_SAMSUNG_SOFEF00) += panel-samsung-sofef00.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-s6evr02.c b/drivers/gpu/drm/panel/panel-samsung-s6evr02.c -new file mode 100644 -index 000000000000..037b4364cdd4 ---- /dev/null -+++ b/drivers/gpu/drm/panel/panel-samsung-s6evr02.c -@@ -0,0 +1,762 @@ -+// SPDX-License-Identifier: GPL-2.0-only -+/* -+ * MIPI-DSI based S6EVR02 AMOLED LCD 5.5 inch panel driver. -+ * -+ * Copyright (c) 2017 Simon Shields, -+ * -+ * Based on the s6e8aa0 panel driver, -+ * Copyright (c) 2013 Samsung Electronics Co., Ltd -+ * -+ * Inki Dae, -+ * Donghwa Lee, -+ * Joongmock Shin -+ * Eunchul Kim -+ * Tomasz Figa -+ * Andrzej Hajda -+*/ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include