mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Merge pull request #1801 from r3claimer/next
SM8550: Ayaneo DS lower screen
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 6.16.4 Kernel Configuration
|
||||
# Linux/arm64 6.16.3 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="aarch64-rocknix-linux-gnueabi-gcc-14.2.0 (GCC) 14.2.0"
|
||||
CONFIG_CC_IS_GCC=y
|
||||
@@ -11,8 +11,8 @@ CONFIG_AS_VERSION=24400
|
||||
CONFIG_LD_IS_BFD=y
|
||||
CONFIG_LD_VERSION=24400
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_RUSTC_VERSION=108900
|
||||
CONFIG_RUSTC_LLVM_VERSION=200107
|
||||
CONFIG_RUSTC_VERSION=0
|
||||
CONFIG_RUSTC_LLVM_VERSION=0
|
||||
CONFIG_CC_CAN_LINK=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
|
||||
@@ -20,9 +20,6 @@ CONFIG_TOOLS_SUPPORT_RELR=y
|
||||
CONFIG_CC_HAS_ASM_INLINE=y
|
||||
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
|
||||
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
|
||||
CONFIG_RUSTC_HAS_COERCE_POINTEE=y
|
||||
CONFIG_RUSTC_HAS_SPAN_FILE=y
|
||||
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
|
||||
CONFIG_PAHOLE_VERSION=0
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_BUILDTIME_TABLE_SORT=y
|
||||
@@ -3313,7 +3310,8 @@ CONFIG_GPIO_GENERIC_PLATFORM=y
|
||||
# CONFIG_GPIO_GW_PLD is not set
|
||||
# CONFIG_GPIO_MAX7300 is not set
|
||||
# CONFIG_GPIO_MAX732X is not set
|
||||
# CONFIG_GPIO_PCA953X is not set
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
# CONFIG_GPIO_PCA953X_IRQ is not set
|
||||
# CONFIG_GPIO_PCA9570 is not set
|
||||
# CONFIG_GPIO_PCF857X is not set
|
||||
# CONFIG_GPIO_TPIC2810 is not set
|
||||
@@ -4247,6 +4245,7 @@ CONFIG_DRM_PANEL=y
|
||||
# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set
|
||||
CONFIG_DRM_PANEL_AR06_4INCH=y
|
||||
CONFIG_DRM_PANEL_AR02_3INCH=y
|
||||
CONFIG_DRM_PANEL_AR11_5INCH=y
|
||||
# CONFIG_DRM_PANEL_ARM_VERSATILE is not set
|
||||
# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set
|
||||
# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
|
||||
|
||||
@@ -0,0 +1,341 @@
|
||||
diff -rupbN linux.orig/drivers/gpu/drm/panel/Kconfig linux/drivers/gpu/drm/panel/Kconfig
|
||||
--- linux.orig/drivers/gpu/drm/panel/Kconfig 2025-08-29 00:02:39.288684887 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/Kconfig 2025-08-29 19:45:04.120111724 +0000
|
||||
@@ -37,6 +37,16 @@ config DRM_PANEL_AR02_3INCH
|
||||
Say Y here if you want to enable support for Ayaneo Pocket DMG
|
||||
1080x1240 60hz Panel.
|
||||
|
||||
+config DRM_PANEL_AR11_5INCH
|
||||
+ tristate "Ayaneo Pocket DS lower panel driver"
|
||||
+ depends on OF
|
||||
+ depends on DRM_MIPI_DSI
|
||||
+ depends on BACKLIGHT_CLASS_DEVICE
|
||||
+ select DRM_DISPLAY_HELPER
|
||||
+ help
|
||||
+ Say Y here if you want to enable support for Ayaneo Pocket DS
|
||||
+ 1024x768Panel.
|
||||
+
|
||||
config DRM_PANEL_ARM_VERSATILE
|
||||
tristate "ARM Versatile panel driver"
|
||||
depends on OF
|
||||
diff -rupbN linux.orig/drivers/gpu/drm/panel/Makefile linux/drivers/gpu/drm/panel/Makefile
|
||||
--- linux.orig/drivers/gpu/drm/panel/Makefile 2025-08-29 00:02:39.288684887 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/Makefile 2025-08-29 19:45:39.516633171 +0000
|
||||
@@ -2,6 +2,7 @@
|
||||
obj-$(CONFIG_DRM_PANEL_ABT_Y030XX067A) += panel-abt-y030xx067a.o
|
||||
obj-$(CONFIG_DRM_PANEL_AR06_4INCH) += panel-ar06-4inch.o
|
||||
obj-$(CONFIG_DRM_PANEL_AR02_3INCH) += panel-ar02-3inch.o
|
||||
+obj-$(CONFIG_DRM_PANEL_AR11_5INCH) += panel-ar11-5inch.o
|
||||
obj-$(CONFIG_DRM_PANEL_ARM_VERSATILE) += panel-arm-versatile.o
|
||||
obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596.o
|
||||
obj-$(CONFIG_DRM_PANEL_AUO_A030JTN01) += panel-auo-a030jtn01.o
|
||||
diff -rupbN linux.orig/drivers/gpu/drm/panel/panel-ar11-5inch.c linux/drivers/gpu/drm/panel/panel-ar11-5inch.c
|
||||
--- linux.orig/drivers/gpu/drm/panel/panel-ar11-5inch.c 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/drivers/gpu/drm/panel/panel-ar11-5inch.c 2025-08-29 21:48:05.618147842 +0000
|
||||
@@ -0,0 +1,306 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0-only
|
||||
+// Copyright (c) 2025 FIXME
|
||||
+// Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree:
|
||||
+// Copyright (c) 2013, The Linux Foundation. All rights reserved. (FIXME)
|
||||
+
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
+#include <linux/mod_devicetable.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/regulator/consumer.h>
|
||||
+
|
||||
+#include <drm/drm_mipi_dsi.h>
|
||||
+#include <drm/drm_modes.h>
|
||||
+#include <drm/drm_panel.h>
|
||||
+#include <drm/drm_probe_helper.h>
|
||||
+
|
||||
+struct ar11_5inch {
|
||||
+ struct drm_panel panel;
|
||||
+ struct mipi_dsi_device *dsi;
|
||||
+ struct gpio_desc *reset_gpio;
|
||||
+ struct gpio_desc *enable_gpio;
|
||||
+ struct regulator_bulk_data *supplies;
|
||||
+ enum drm_panel_orientation orientation;
|
||||
+};
|
||||
+
|
||||
+static const struct regulator_bulk_data panel_supplies[] = {
|
||||
+ { .supply = "avdd" },
|
||||
+ { .supply = "vci" },
|
||||
+ { .supply = "vddio" },
|
||||
+};
|
||||
+
|
||||
+static inline struct ar11_5inch *to_ar11_5inch(struct drm_panel *panel)
|
||||
+{
|
||||
+ return container_of(panel, struct ar11_5inch, panel);
|
||||
+}
|
||||
+
|
||||
+static void ar11_5inch_reset(struct ar11_5inch *ctx)
|
||||
+{
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
+ usleep_range(10000, 11000);
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
+ usleep_range(10000, 11000);
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
|
||||
+ msleep(55);
|
||||
+}
|
||||
+
|
||||
+static int ar11_5inch_on(struct ar11_5inch *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
|
||||
+
|
||||
+ ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
|
||||
+
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb9, 0xf1, 0x12, 0x87);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb2, 0x00, 0x01, 0x78);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb3,
|
||||
+ 0x10, 0x10, 0x28, 0x28, 0x03, 0xff, 0x00,
|
||||
+ 0x00, 0x00, 0x00);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb4, 0x80);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb5, 0x0a, 0x0a);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb6, 0x90, 0x90);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb8, 0x76, 0x22, 0xf0, 0x13);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xba,
|
||||
+ 0x33, 0x81, 0x05, 0xf9, 0x0e, 0x0e, 0x20,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x44, 0x25, 0x00, 0x91, 0x0a, 0x00, 0x00,
|
||||
+ 0x01, 0x4f, 0x01, 0x00, 0x00, 0x37);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbc, 0x47);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbf,
|
||||
+ 0x02, 0x10, 0x00, 0x80, 0x04);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc0,
|
||||
+ 0x73, 0x73, 0x50, 0x50, 0x00, 0x00, 0x12,
|
||||
+ 0x73, 0x00);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc1,
|
||||
+ 0x55, 0x00, 0x32, 0x32, 0x77, 0xf1, 0xf7,
|
||||
+ 0xf7, 0xcc, 0xcc, 0x7f, 0x7f, 0x11, 0x11,
|
||||
+ 0x00, 0x00, 0x32);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc7,
|
||||
+ 0xb8, 0x00, 0x0a, 0x10, 0x01, 0x09, 0x00,
|
||||
+ 0x00, 0xed, 0xc5, 0x00, 0xa5);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xc8, 0x10, 0x40, 0x1e, 0x03);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xcc, 0x0b);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe0,
|
||||
+ 0x00, 0x00, 0x00, 0x25, 0x31, 0x3f, 0x26,
|
||||
+ 0x29, 0x04, 0x08, 0x0d, 0x0e, 0x12, 0x0f,
|
||||
+ 0x11, 0x12, 0x18, 0x00, 0x00, 0x00, 0x25,
|
||||
+ 0x31, 0x3f, 0x26, 0x29, 0x04, 0x08, 0x0d,
|
||||
+ 0x0e, 0x12, 0x0f, 0x11, 0x12, 0x18);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe1,
|
||||
+ 0x11, 0x11, 0x91, 0x00, 0x00, 0x00, 0x00);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe3,
|
||||
+ 0x07, 0x07, 0x0b, 0x0b, 0x0b, 0x0b, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0xff, 0x84, 0xc0, 0x10);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe9,
|
||||
+ 0xc8, 0x10, 0x04, 0x04, 0x02, 0x80, 0x81,
|
||||
+ 0x12, 0x31, 0x23, 0x2f, 0x80, 0x80, 0x81,
|
||||
+ 0x27, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
|
||||
+ 0x44, 0x00, 0x88, 0xff, 0x00, 0x22, 0x44,
|
||||
+ 0x66, 0x88, 0x88, 0x88, 0x55, 0x11, 0x88,
|
||||
+ 0xff, 0x11, 0x33, 0x55, 0x77, 0x88, 0x88,
|
||||
+ 0x88, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xea,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x55,
|
||||
+ 0xff, 0x88, 0x77, 0x55, 0x33, 0x11, 0x88,
|
||||
+ 0x88, 0x88, 0x00, 0x44, 0xff, 0x88, 0x66,
|
||||
+ 0x44, 0x22, 0x00, 0x88, 0x88, 0x88, 0x23,
|
||||
+ 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80,
|
||||
+ 0x81, 0x00, 0x00, 0x00, 0x00);
|
||||
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xef, 0xff, 0xff, 0x01);
|
||||
+ mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
|
||||
+ mipi_dsi_msleep(&dsi_ctx, 200);
|
||||
+ mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
|
||||
+ mipi_dsi_msleep(&dsi_ctx, 120);
|
||||
+
|
||||
+ return dsi_ctx.accum_err;
|
||||
+}
|
||||
+
|
||||
+static int ar11_5inch_off(struct ar11_5inch *ctx)
|
||||
+{
|
||||
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
|
||||
+
|
||||
+ ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
|
||||
+
|
||||
+ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
|
||||
+ mipi_dsi_msleep(&dsi_ctx, 120);
|
||||
+ mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
|
||||
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
|
||||
+
|
||||
+ return dsi_ctx.accum_err;
|
||||
+}
|
||||
+
|
||||
+static int ar11_5inch_prepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct ar11_5inch *ctx = to_ar11_5inch(panel);
|
||||
+ struct device *dev = &ctx->dsi->dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = regulator_bulk_enable(ARRAY_SIZE(panel_supplies), ctx->supplies);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(panel->dev, "failed to enable regulators: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ msleep(20);
|
||||
+
|
||||
+ gpiod_set_value_cansleep(ctx->enable_gpio, 1);
|
||||
+ msleep(20);
|
||||
+
|
||||
+ ar11_5inch_reset(ctx);
|
||||
+
|
||||
+ ret = ar11_5inch_on(ctx);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(dev, "Failed to initialize panel: %d\n", ret);
|
||||
+ regulator_bulk_disable(ARRAY_SIZE(panel_supplies), ctx->supplies);
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ar11_5inch_unprepare(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct ar11_5inch *ctx = to_ar11_5inch(panel);
|
||||
+ struct device *dev = &ctx->dsi->dev;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = ar11_5inch_off(ctx);
|
||||
+ if (ret < 0)
|
||||
+ dev_err(dev, "Failed to un-initialize panel: %d\n", ret);
|
||||
+
|
||||
+ regulator_bulk_disable(ARRAY_SIZE(panel_supplies), ctx->supplies);
|
||||
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_display_mode ar11_5inch_mode = {
|
||||
+ .clock = (768 + 110 + 45 + 110) * (1024 + 18 + 6 + 16) * 60 / 1000,
|
||||
+ .hdisplay = 768,
|
||||
+ .hsync_start = 768 + 110,
|
||||
+ .hsync_end = 768 + 110 + 45,
|
||||
+ .htotal = 768 + 110 + 45 + 110,
|
||||
+ .vdisplay = 1024,
|
||||
+ .vsync_start = 1024 + 18,
|
||||
+ .vsync_end = 1024 + 18 + 6,
|
||||
+ .vtotal = 1024 + 18 + 6 + 16,
|
||||
+ .width_mm = 0,
|
||||
+ .height_mm = 0,
|
||||
+ .type = DRM_MODE_TYPE_DRIVER,
|
||||
+};
|
||||
+
|
||||
+static int ar11_5inch_get_modes(struct drm_panel *panel,
|
||||
+ struct drm_connector *connector)
|
||||
+{
|
||||
+ return drm_connector_helper_get_modes_fixed(connector, &ar11_5inch_mode);
|
||||
+}
|
||||
+
|
||||
+static enum drm_panel_orientation ar11_5inch_get_orientation(struct drm_panel *panel)
|
||||
+{
|
||||
+ struct ar11_5inch *ctx = to_ar11_5inch(panel);
|
||||
+
|
||||
+ return ctx->orientation;
|
||||
+}
|
||||
+
|
||||
+static const struct drm_panel_funcs ar11_5inch_panel_funcs = {
|
||||
+ .prepare = ar11_5inch_prepare,
|
||||
+ .unprepare = ar11_5inch_unprepare,
|
||||
+ .get_modes = ar11_5inch_get_modes,
|
||||
+ .get_orientation = ar11_5inch_get_orientation,
|
||||
+};
|
||||
+
|
||||
+static int ar11_5inch_probe(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct device *dev = &dsi->dev;
|
||||
+ struct ar11_5inch *ctx;
|
||||
+ int ret;
|
||||
+
|
||||
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
+ if (!ctx)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ ret = devm_regulator_bulk_get_const(dev, ARRAY_SIZE(panel_supplies),
|
||||
+ panel_supplies, &ctx->supplies);
|
||||
+ if (ret < 0){
|
||||
+ return dev_err_probe(dev, ret, "Failed to get regulators\n");
|
||||
+ }
|
||||
+
|
||||
+ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
|
||||
+ if (IS_ERR(ctx->reset_gpio))
|
||||
+ return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
|
||||
+ "Failed to get reset-gpios\n");
|
||||
+
|
||||
+ ctx->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
|
||||
+ if (IS_ERR(ctx->enable_gpio))
|
||||
+ return dev_err_probe(dev, PTR_ERR(ctx->enable_gpio),
|
||||
+ "Failed to get enable-gpios\n");
|
||||
+
|
||||
+ ctx->dsi = dsi;
|
||||
+ mipi_dsi_set_drvdata(dsi, ctx);
|
||||
+
|
||||
+ dsi->lanes = 4;
|
||||
+ dsi->format = MIPI_DSI_FMT_RGB888;
|
||||
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
|
||||
+ MIPI_DSI_CLOCK_NON_CONTINUOUS;
|
||||
+
|
||||
+ /* Orientation */
|
||||
+ ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(dev, "failed to get orientation %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ drm_panel_init(&ctx->panel, dev, &ar11_5inch_panel_funcs,
|
||||
+ DRM_MODE_CONNECTOR_DSI);
|
||||
+ ctx->panel.prepare_prev_first = true;
|
||||
+
|
||||
+ ret = drm_panel_of_backlight(&ctx->panel);
|
||||
+ if (ret)
|
||||
+ return dev_err_probe(dev, ret, "Failed to get backlight\n");
|
||||
+
|
||||
+ drm_panel_add(&ctx->panel);
|
||||
+
|
||||
+ ret = mipi_dsi_attach(dsi);
|
||||
+ if (ret < 0) {
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+ return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void ar11_5inch_remove(struct mipi_dsi_device *dsi)
|
||||
+{
|
||||
+ struct ar11_5inch *ctx = mipi_dsi_get_drvdata(dsi);
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = mipi_dsi_detach(dsi);
|
||||
+ if (ret < 0)
|
||||
+ dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
|
||||
+
|
||||
+ drm_panel_remove(&ctx->panel);
|
||||
+}
|
||||
+
|
||||
+static const struct of_device_id ar11_5inch_of_match[] = {
|
||||
+ { .compatible = "ayaneo,pocket-ds-secondary-panel" }, // FIXME
|
||||
+ { /* sentinel */ }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, ar11_5inch_of_match);
|
||||
+
|
||||
+static struct mipi_dsi_driver ar11_5inch_driver = {
|
||||
+ .probe = ar11_5inch_probe,
|
||||
+ .remove = ar11_5inch_remove,
|
||||
+ .driver = {
|
||||
+ .name = "panel-ar11-5inch",
|
||||
+ .of_match_table = ar11_5inch_of_match,
|
||||
+ },
|
||||
+};
|
||||
+module_mipi_dsi_driver(ar11_5inch_driver);
|
||||
+
|
||||
+MODULE_AUTHOR("linux-mdss-dsi-panel-driver-generator <fix@me>"); // FIXME
|
||||
+MODULE_DESCRIPTION("DRM driver for ar11 5inch video mode dsi panel");
|
||||
+MODULE_LICENSE("GPL");
|
||||
@@ -1,7 +1,7 @@
|
||||
diff -rupbN linux.orig/arch/arm64/boot/dts/qcom/qcs8550-ayaneo-pocketds.dts linux/arch/arm64/boot/dts/qcom/qcs8550-ayaneo-pocketds.dts
|
||||
--- linux.orig/arch/arm64/boot/dts/qcom/qcs8550-ayaneo-pocketds.dts 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ linux/arch/arm64/boot/dts/qcom/qcs8550-ayaneo-pocketds.dts 2025-08-29 01:15:03.063872627 +0000
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -0,0 +1,200 @@
|
||||
+// SPDX-License-Identifier: BSD-3-Clause
|
||||
+/*
|
||||
+ * Copyright (c) 2025, Teguh Sobirin.
|
||||
@@ -17,12 +17,144 @@ diff -rupbN linux.orig/arch/arm64/boot/dts/qcom/qcs8550-ayaneo-pocketds.dts linu
|
||||
+ qcom,board-id = <0x1000b 0x01>;
|
||||
+ qcom,msm-id = <0x258 0x20000>, <0x259 0x20000>;
|
||||
+ compatible = "ayaneo,pocketds", "qcom,qcs8550", "qcom,sm8550";
|
||||
+
|
||||
+ tca6424_vcc: regulator-tca6424-vcc {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "tca6424_vcc";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+
|
||||
+ gpio = <&tlmm 168 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+
|
||||
+ //pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&tca6424_vcc_pin>;
|
||||
+
|
||||
+ regulator-state-mem {
|
||||
+ regulator-off-in-suspend;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tlmm {
|
||||
+ panel_pwr_active: panel-pwr-active-state {
|
||||
+ pins = "gpio152", "gpio153";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-disable;
|
||||
+ output-high;
|
||||
+ };
|
||||
+
|
||||
+ sde_dsi1_active: sde-dsi1-active-state {
|
||||
+ pins = "gpio137";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-disable;
|
||||
+ output-high;
|
||||
+ };
|
||||
+
|
||||
+ sde_dsi1_suspend: sde-dsi1-suspend-state {
|
||||
+ pins = "gpio137";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <2>;
|
||||
+ bias-pull-down;
|
||||
+ };
|
||||
+
|
||||
+ tca6424_vcc_pin: tca6424-vcc-pin {
|
||||
+ pins = "gpio168";
|
||||
+ function = "gpio";
|
||||
+ drive-strength = <8>;
|
||||
+ bias-pull-up;
|
||||
+ output-high;
|
||||
+ };
|
||||
+
|
||||
+ ts_rst_default: ts-rst-default-state {
|
||||
+ pins = "gpio24";
|
||||
+ function = "gpio";
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <8>;
|
||||
+ };
|
||||
+
|
||||
+ ts_rst_sleep: ts-rst-sleep-state {
|
||||
+ pins = "gpio24";
|
||||
+ function = "gpio";
|
||||
+ bias-pull-down;
|
||||
+ drive-strength = <2>;
|
||||
+ };
|
||||
+
|
||||
+ ts_int_default: ts-int-default-state {
|
||||
+ pins = "gpio25";
|
||||
+ function = "gpio";
|
||||
+ bias-pull-up;
|
||||
+ drive-strength = <8>;
|
||||
+ };
|
||||
+
|
||||
+ ts_int_sleep: ts-int-sleep-state {
|
||||
+ pins = "gpio25";
|
||||
+ function = "gpio";
|
||||
+ bias-pull-down;
|
||||
+ drive-strength = <2>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c0 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ /* Screen power */
|
||||
+ sgm3804: regulator@3e {
|
||||
+ compatible = "sgmicro,sgm3804";
|
||||
+ reg = <0x3e>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&panel_pwr_active>;
|
||||
+ regulator-name = "panel-avdd";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ reset-gpios = <&tlmm 152 GPIO_ACTIVE_HIGH>, <&tlmm 153 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ /* Backlight */
|
||||
+ backlight: backlight@2e {
|
||||
+ compatible = "silergy,sy7758";
|
||||
+ reg = <0x2e>;
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ tca6408: tca64_20@20 {
|
||||
+ gpio-controller;
|
||||
+ compatible = "ti,tca6408";
|
||||
+ status = "ok";
|
||||
+ reg = <0x20>;
|
||||
+ #gpio-cells = <0x02>;
|
||||
+ vcc-supply = <&tca6424_vcc>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ clock-frequency = <400000>;
|
||||
+ status = "okay";
|
||||
+ touchscreen: touchscreen@38 {
|
||||
+ compatible = "focaltech,ft5426";
|
||||
+ reg = <0x38>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ interrupt-parent = <&tlmm>;
|
||||
+ interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
|
||||
+
|
||||
+ reset-gpios = <&tlmm 24 GPIO_ACTIVE_LOW>;
|
||||
+
|
||||
+ vcc-supply = <&vreg_l14b_3p2>;
|
||||
+ iovcc-supply = <&vreg_l12b_1p8>;
|
||||
+
|
||||
+ pinctrl-0 = <&ts_int_default &ts_rst_default>;
|
||||
+ pinctrl-1 = <&ts_int_sleep &ts_rst_sleep>;
|
||||
+ pinctrl-names = "default", "sleep";
|
||||
+
|
||||
+ touchscreen-size-x = <1080>;
|
||||
+ touchscreen-size-y = <1920>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&display_panel {
|
||||
@@ -35,3 +167,38 @@ diff -rupbN linux.orig/arch/arm64/boot/dts/qcom/qcs8550-ayaneo-pocketds.dts linu
|
||||
+
|
||||
+ rotation = <270>;
|
||||
+};
|
||||
+
|
||||
+&mdss_dsi1 {
|
||||
+ vdda-supply = <&vreg_l3e_1p2>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ panel@0 {
|
||||
+ compatible = "ayaneo,pocket-ds-secondary-panel";
|
||||
+ reg = <0>;
|
||||
+ pinctrl-0 = <&sde_dsi1_active>;
|
||||
+ pinctrl-1 = <&sde_dsi1_suspend>;
|
||||
+ pinctrl-names = "default", "sleep";
|
||||
+
|
||||
+ avdd-supply = <&sgm3804>;
|
||||
+ enable-gpio = <&tca6408 0 GPIO_ACTIVE_HIGH>;
|
||||
+ reset-gpios = <&tca6408 2 GPIO_ACTIVE_LOW>;
|
||||
+ rotation = <90>;
|
||||
+ backlight = <&backlight>;
|
||||
+
|
||||
+ port {
|
||||
+ panel1_in: endpoint {
|
||||
+ remote-endpoint = <&mdss_dsi1_out>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdss_dsi1_out {
|
||||
+ remote-endpoint = <&panel1_in>;
|
||||
+ data-lanes = <0 1 2 3>;
|
||||
+};
|
||||
+
|
||||
+&mdss_dsi1_phy {
|
||||
+ vdds-supply = <&vreg_l1e_0p88>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
|
||||
Reference in New Issue
Block a user