diff options
38 files changed, 1517 insertions, 705 deletions
diff --git a/0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch b/0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch deleted file mode 100644 index e3b07c2bb..000000000 --- a/0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng <icenowy@aosc.io> -Date: Mon, 16 Mar 2020 21:35:03 +0800 -Subject: [PATCH] arm64: allwinner: dts: a64: add LCD-related device nodes for - PinePhone - -PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for -display. - -Add its device nodes. - -Signed-off-by: Icenowy Zheng <icenowy@aosc.io> ---- - .../dts/allwinner/sun50i-a64-pinephone.dtsi | 37 +++++++++++++++++++ - 1 file changed, 37 insertions(+) - -diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -index cefda145c3c9..96d9150423e0 100644 ---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi -@@ -16,6 +16,15 @@ aliases { - serial0 = &uart0; - }; - -+ backlight: backlight { -+ compatible = "pwm-backlight"; -+ pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; -+ brightness-levels = <0 16 18 20 22 24 26 29 32 35 38 42 46 51 56 62 68 75 83 91 100>; -+ default-brightness-level = <15>; -+ enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ -+ power-supply = <®_ldo_io0>; -+ }; -+ - chosen { - stdout-path = "serial0:115200n8"; - }; -@@ -84,6 +93,30 @@ &dai { - status = "okay"; - }; - -+&de { -+ status = "okay"; -+}; -+ -+&dphy { -+ status = "okay"; -+}; -+ -+&dsi { -+ vcc-dsi-supply = <®_dldo1>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ status = "okay"; -+ -+ panel@0 { -+ compatible = "xingbangda,xbd599"; -+ reg = <0>; -+ reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */ -+ iovcc-supply = <®_dldo2>; -+ vcc-supply = <®_ldo_io0>; -+ backlight = <&backlight>; -+ }; -+}; -+ - &ehci0 { - status = "okay"; - }; -@@ -188,6 +221,10 @@ &r_pio { - */ - }; - -+&r_pwm { -+ status = "okay"; -+}; -+ - &r_rsb { - status = "okay"; - --- -2.26.2 - diff --git a/0001-drm-panel-add-Xingbangda-XBD599-panel.patch b/0001-drm-panel-add-Xingbangda-XBD599-panel.patch deleted file mode 100644 index ae0850b8a..000000000 --- a/0001-drm-panel-add-Xingbangda-XBD599-panel.patch +++ /dev/null @@ -1,423 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng <icenowy@aosc.io> -Date: Mon, 16 Mar 2020 21:35:01 +0800 -Subject: [PATCH] drm: panel: add Xingbangda XBD599 panel - -Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI IPS LCD panel made by -Xingbangda, which is used on PinePhone final assembled phones. - -Add support for it. - -Signed-off-by: Icenowy Zheng <icenowy@aosc.io> ---- - drivers/gpu/drm/panel/Kconfig | 9 + - drivers/gpu/drm/panel/Makefile | 1 + - .../gpu/drm/panel/panel-xingbangda-xbd599.c | 366 ++++++++++++++++++ - 3 files changed, 376 insertions(+) - create mode 100644 drivers/gpu/drm/panel/panel-xingbangda-xbd599.c - -diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig -index a1723c1b5fbf..cf0c59015a44 100644 ---- a/drivers/gpu/drm/panel/Kconfig -+++ b/drivers/gpu/drm/panel/Kconfig -@@ -433,6 +433,15 @@ config DRM_PANEL_TRULY_NT35597_WQXGA - Say Y here if you want to enable support for Truly NT35597 WQXGA Dual DSI - Video Mode panel - -+config DRM_PANEL_XINGBANGDA_XBD599 -+ tristate "Xingbangda XBD599 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 Xingbangda XBD599 -+ MIPI DSI Video Mode panel. -+ - config DRM_PANEL_XINPENG_XPP055C272 - tristate "Xinpeng XPP055C272 panel driver" - depends on OF -diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile -index 96a883cd6630..c84ed5215984 100644 ---- a/drivers/gpu/drm/panel/Makefile -+++ b/drivers/gpu/drm/panel/Makefile -@@ -46,4 +46,5 @@ obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o - obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o - obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o - obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o -+obj-$(CONFIG_DRM_PANEL_XINGBANGDA_XBD599) += panel-xingbangda-xbd599.o - obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o -diff --git a/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c -new file mode 100644 -index 000000000000..b483f96ee1db ---- /dev/null -+++ b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c -@@ -0,0 +1,366 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Xingbangda XBD599 MIPI-DSI panel driver -+ * -+ * Copyright (C) 2019-2020 Icenowy Zheng <icenowy@aosc.io> -+ * -+ * Based on panel-rocktech-jh057n00900.c, which is: -+ * Copyright (C) Purism SPC 2019 -+ */ -+ -+#include <linux/delay.h> -+#include <linux/gpio/consumer.h> -+#include <linux/mod_devicetable.h> -+#include <linux/module.h> -+#include <linux/of_device.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_print.h> -+ -+/* Manufacturer specific Commands send via DSI */ -+#define ST7703_CMD_ALL_PIXEL_OFF 0x22 -+#define ST7703_CMD_ALL_PIXEL_ON 0x23 -+#define ST7703_CMD_SETDISP 0xB2 -+#define ST7703_CMD_SETRGBIF 0xB3 -+#define ST7703_CMD_SETCYC 0xB4 -+#define ST7703_CMD_SETBGP 0xB5 -+#define ST7703_CMD_SETVCOM 0xB6 -+#define ST7703_CMD_SETOTP 0xB7 -+#define ST7703_CMD_SETPOWER_EXT 0xB8 -+#define ST7703_CMD_SETEXTC 0xB9 -+#define ST7703_CMD_SETMIPI 0xBA -+#define ST7703_CMD_SETVDC 0xBC -+#define ST7703_CMD_SETSCR 0xC0 -+#define ST7703_CMD_SETPOWER 0xC1 -+#define ST7703_CMD_UNK_C6 0xC6 -+#define ST7703_CMD_SETPANEL 0xCC -+#define ST7703_CMD_SETGAMMA 0xE0 -+#define ST7703_CMD_SETEQ 0xE3 -+#define ST7703_CMD_SETGIP1 0xE9 -+#define ST7703_CMD_SETGIP2 0xEA -+ -+static const char * const regulator_names[] = { -+ "iovcc", -+ "vcc", -+}; -+ -+struct xbd599 { -+ struct device *dev; -+ struct drm_panel panel; -+ struct gpio_desc *reset_gpio; -+ struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)]; -+ bool prepared; -+}; -+ -+static inline struct xbd599 *panel_to_xbd599(struct drm_panel *panel) -+{ -+ return container_of(panel, struct xbd599, panel); -+} -+ -+#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \ -+ static const u8 d[] = { seq }; \ -+ int ret; \ -+ ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \ -+ if (ret < 0) \ -+ return ret; \ -+ } while (0) -+ -+static int xbd599_init_sequence(struct xbd599 *ctx) -+{ -+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); -+ struct device *dev = ctx->dev; -+ int ret; -+ -+ /* -+ * Init sequence was supplied by the panel vendor. -+ */ -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, -+ 0xF1, 0x12, 0x83); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, -+ 0x33, 0x81, 0x05, 0xF9, 0x0E, 0x0E, 0x20, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25, -+ 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02, 0x4F, 0x11, -+ 0x00, 0x00, 0x37); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, -+ 0x25, 0x22, 0x20, 0x03); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, -+ 0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00, -+ 0x00, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, -+ 0x73, 0x73, 0x50, 0x50, 0x00, 0xC0, 0x08, 0x70, -+ 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0xF0); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, -+ 0x00, 0x00, 0x0B, 0x0B, 0x10, 0x10, 0x00, 0x00, -+ 0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10); -+ dsi_dcs_write_seq(dsi, 0xC6, 0x01, 0x00, 0xFF, 0xFF, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, -+ 0x74, 0x00, 0x32, 0x32, 0x77, 0xF1, 0xFF, 0xFF, -+ 0xCC, 0xCC, 0x77, 0x77); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x07, 0x07); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x2C, 0x2C); -+ dsi_dcs_write_seq(dsi, 0xBF, 0x02, 0x11, 0x00); -+ -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, -+ 0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12, -+ 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38, -+ 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, -+ 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88, -+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64, -+ 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, -+ 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, -+ 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88, -+ 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13, -+ 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, -+ 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0A, -+ 0xA5, 0x00, 0x00, 0x00, 0x00); -+ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, -+ 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35, -+ 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12, -+ 0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, -+ 0x35, 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, -+ 0x12, 0x18); -+ msleep(20); -+ -+ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); -+ if (ret < 0) { -+ DRM_DEV_ERROR(dev, "Failed to exit sleep mode\n"); -+ return ret; -+ } -+ msleep(250); -+ -+ ret = mipi_dsi_dcs_set_display_on(dsi); -+ if (ret) -+ return ret; -+ msleep(50); -+ -+ DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n"); -+ return 0; -+} -+ -+static int xbd599_prepare(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ int ret; -+ -+ if (ctx->prepared) -+ return 0; -+ -+ ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); -+ if (ret) -+ return ret; -+ -+ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Resetting the panel\n"); -+ gpiod_set_value_cansleep(ctx->reset_gpio, 1); -+ usleep_range(20, 40); -+ gpiod_set_value_cansleep(ctx->reset_gpio, 0); -+ msleep(20); -+ -+ ctx->prepared = true; -+ -+ return 0; -+} -+ -+static int xbd599_enable(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ int ret; -+ -+ ret = xbd599_init_sequence(ctx); -+ if (ret < 0) { -+ DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", -+ ret); -+ return ret; -+ } -+ -+ return 0; -+} -+ -+static int xbd599_disable(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); -+ -+ return mipi_dsi_dcs_set_display_off(dsi); -+} -+ -+static int xbd599_unprepare(struct drm_panel *panel) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ -+ if (!ctx->prepared) -+ return 0; -+ -+ gpiod_set_value_cansleep(ctx->reset_gpio, 1); -+ regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); -+ ctx->prepared = false; -+ -+ return 0; -+} -+ -+static const struct drm_display_mode xbd599_default_mode = { -+ .hdisplay = 720, -+ .hsync_start = 720 + 40, -+ .hsync_end = 720 + 40 + 40, -+ .htotal = 720 + 40 + 40 + 40, -+ .vdisplay = 1440, -+ .vsync_start = 1440 + 18, -+ .vsync_end = 1440 + 18 + 10, -+ .vtotal = 1440 + 18 + 10 + 17, -+ .vrefresh = 60, -+ .clock = 69000, -+ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, -+ -+ .width_mm = 68, -+ .height_mm = 136, -+ .type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, -+}; -+ -+static int xbd599_get_modes(struct drm_panel *panel, -+ struct drm_connector *connector) -+{ -+ struct xbd599 *ctx = panel_to_xbd599(panel); -+ struct drm_display_mode *mode; -+ -+ mode = drm_mode_duplicate(connector->dev, &xbd599_default_mode); -+ if (!mode) { -+ DRM_DEV_ERROR(ctx->dev, "Failed to add mode\n"); -+ return -ENOMEM; -+ } -+ -+ drm_mode_set_name(mode); -+ -+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; -+ connector->display_info.width_mm = mode->width_mm; -+ connector->display_info.height_mm = mode->height_mm; -+ drm_mode_probed_add(connector, mode); -+ -+ return 1; -+} -+ -+static const struct drm_panel_funcs xbd599_drm_funcs = { -+ .prepare = xbd599_prepare, -+ .enable = xbd599_enable, -+ .disable = xbd599_disable, -+ .unprepare = xbd599_unprepare, -+ .get_modes = xbd599_get_modes, -+}; -+ -+static int xbd599_probe(struct mipi_dsi_device *dsi) -+{ -+ struct device *dev = &dsi->dev; -+ struct xbd599 *ctx; -+ int i, ret; -+ -+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); -+ if (!ctx) -+ return -ENOMEM; -+ -+ for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) -+ ctx->supplies[i].supply = regulator_names[i]; -+ -+ ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), -+ ctx->supplies); -+ if (ret < 0) { -+ DRM_DEV_ERROR(&dsi->dev, "cannot get regulators\n"); -+ return ret; -+ } -+ -+ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); -+ if (IS_ERR(ctx->reset_gpio)) { -+ DRM_DEV_ERROR(dev, "cannot get reset gpio\n"); -+ return PTR_ERR(ctx->reset_gpio); -+ } -+ -+ mipi_dsi_set_drvdata(dsi, ctx); -+ -+ ctx->dev = dev; -+ -+ dsi->lanes = 4; -+ dsi->format = MIPI_DSI_FMT_RGB888; -+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE; -+ -+ drm_panel_init(&ctx->panel, &dsi->dev, &xbd599_drm_funcs, -+ DRM_MODE_CONNECTOR_DSI); -+ -+ ret = drm_panel_of_backlight(&ctx->panel); -+ if (ret) -+ return ret; -+ -+ drm_panel_add(&ctx->panel); -+ -+ ret = mipi_dsi_attach(dsi); -+ if (ret < 0) { -+ DRM_DEV_ERROR(dev, "mipi_dsi_attach failed. Is host ready?\n"); -+ drm_panel_remove(&ctx->panel); -+ return ret; -+ } -+ -+ DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n", -+ xbd599_default_mode.hdisplay, -+ xbd599_default_mode.vdisplay, -+ xbd599_default_mode.vrefresh, -+ mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); -+ -+ return 0; -+} -+ -+static void xbd599_shutdown(struct mipi_dsi_device *dsi) -+{ -+ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi); -+ int ret; -+ -+ ret = drm_panel_unprepare(&ctx->panel); -+ if (ret < 0) -+ DRM_DEV_ERROR(&dsi->dev, "Failed to unprepare panel: %d\n", -+ ret); -+} -+ -+static int xbd599_remove(struct mipi_dsi_device *dsi) -+{ -+ struct xbd599 *ctx = mipi_dsi_get_drvdata(dsi); -+ int ret; -+ -+ xbd599_shutdown(dsi); -+ -+ ret = mipi_dsi_detach(dsi); -+ if (ret < 0) -+ DRM_DEV_ERROR(&dsi->dev, "Failed to detach from DSI host: %d\n", -+ ret); -+ -+ drm_panel_remove(&ctx->panel); -+ -+ return 0; -+} -+ -+static const struct of_device_id xbd599_of_match[] = { -+ { .compatible = "xingbangda,xbd599", }, -+ { /* sentinel */ } -+}; -+MODULE_DEVICE_TABLE(of, xbd599_of_match); -+ -+static struct mipi_dsi_driver xbd599_driver = { -+ .probe = xbd599_probe, -+ .remove = xbd599_remove, -+ .shutdown = xbd599_shutdown, -+ .driver = { -+ .name = "panel-xingbangda-xbd599", -+ .of_match_table = xbd599_of_match, -+ }, -+}; -+module_mipi_dsi_driver(xbd599_driver); -+ -+MODULE_AUTHOR("Icenowy Zheng <icenowy@aosc.io>"); -+MODULE_DESCRIPTION("DRM driver for Xingbangda XBD599 MIPI DSI panel"); -+MODULE_LICENSE("GPL v2"); --- -2.26.2 - diff --git a/0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch b/0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch deleted file mode 100644 index f61b5490f..000000000 --- a/0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng <icenowy@aosc.io> -Date: Mon, 16 Mar 2020 21:35:02 +0800 -Subject: [PATCH] drm/sun4i: sun6i_mipi_dsi: fix horizontal timing calculation - -The max() function call in horizontal timing calculation shouldn't pad a -length already subtracted with overhead to overhead, instead it should -only prevent the set timing to underflow. - -Signed-off-by: Icenowy Zheng <icenowy@aosc.io> ---- - drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c -index 3eb89f1eb0e1..4e415793d155 100644 ---- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c -+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c -@@ -555,7 +555,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HSA_PACKET_OVERHEAD 10 - hsa = max((unsigned int)HSA_PACKET_OVERHEAD, -- (mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD); -+ (mode->hsync_end - mode->hsync_start) * Bpp) - HSA_PACKET_OVERHEAD; - - /* - * The backporch is set using a blanking packet (4 -@@ -564,7 +564,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HBP_PACKET_OVERHEAD 6 - hbp = max((unsigned int)HBP_PACKET_OVERHEAD, -- (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD); -+ (mode->htotal - mode->hsync_end) * Bpp) - HBP_PACKET_OVERHEAD; - - /* - * The frontporch is set using a sync event (4 bytes) -@@ -574,7 +574,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HFP_PACKET_OVERHEAD 16 - hfp = max((unsigned int)HFP_PACKET_OVERHEAD, -- (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD); -+ (mode->hsync_start - mode->hdisplay) * Bpp) - HFP_PACKET_OVERHEAD; - - /* - * The blanking is set using a sync event (4 bytes) -@@ -583,8 +583,8 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, - */ - #define HBLK_PACKET_OVERHEAD 10 - hblk = max((unsigned int)HBLK_PACKET_OVERHEAD, -- (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp - -- HBLK_PACKET_OVERHEAD); -+ (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp) - -+ HBLK_PACKET_OVERHEAD; - - /* - * And I'm not entirely sure what vblk is about. The driver in --- -2.26.2 - diff --git a/0001-dt-bindings-Add-doc-for-Pine64-Pinebook-Pro.patch b/0001-dt-bindings-Add-doc-for-Pine64-Pinebook-Pro.patch deleted file mode 100644 index f212fb501..000000000 --- a/0001-dt-bindings-Add-doc-for-Pine64-Pinebook-Pro.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Emmanuel Vadot <manu@freebsd.org> -Date: Wed, 4 Mar 2020 22:30:22 +0100 -Subject: [PATCH] dt-bindings: Add doc for Pine64 Pinebook Pro - -Add a compatible for Pine64 Pinebook Pro - -Signed-off-by: Emmanuel Vadot <manu@freebsd.org> -Reviewed-by: Rob Herring <robh@kernel.org> ---- - Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml -index 715586dea9bb..fff0439c6b78 100644 ---- a/Documentation/devicetree/bindings/arm/rockchip.yaml -+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml -@@ -420,6 +420,11 @@ properties: - - const: pine64,rockpro64 - - const: rockchip,rk3399 - -+ - description: Pine64 PinebookPro -+ items: -+ - const: pine64,pinebook-pro -+ - const: rockchip,rk3399 -+ - - description: Radxa Rock - items: - - const: radxa,rock --- -2.26.2 - diff --git a/0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch b/0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch deleted file mode 100644 index 8e6808fdc..000000000 --- a/0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Icenowy Zheng <icenowy@aosc.io> -Date: Mon, 16 Mar 2020 21:35:00 +0800 -Subject: [PATCH] dt-bindings: panel: add binding for Xingbangda XBD599 panel - -Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel. - -Add its device tree binding. - -Signed-off-by: Icenowy Zheng <icenowy@aosc.io> ---- - .../display/panel/xingbangda,xbd599.yaml | 50 +++++++++++++++++++ - 1 file changed, 50 insertions(+) - create mode 100644 Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml - -diff --git a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml -new file mode 100644 -index 000000000000..b27bcf11198f ---- /dev/null -+++ b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml -@@ -0,0 +1,50 @@ -+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) -+%YAML 1.2 -+--- -+$id: http://devicetree.org/schemas/display/panel/xingbangda,xbd599.yaml# -+$schema: http://devicetree.org/meta-schemas/core.yaml# -+ -+title: Xingbangda XBD599 5.99in MIPI-DSI LCD panel -+ -+maintainers: -+ - Icenowy Zheng <icenowy@aosc.io> -+ -+allOf: -+ - $ref: panel-common.yaml# -+ -+properties: -+ compatible: -+ const: xingbangda,xbd599 -+ reg: true -+ backlight: true -+ reset-gpios: true -+ vcc-supply: -+ description: regulator that supplies the VCC voltage -+ iovcc-supply: -+ description: regulator that supplies the IOVCC voltage -+ -+required: -+ - compatible -+ - reg -+ - backlight -+ - vcc-supply -+ - iovcc-supply -+ -+additionalProperties: false -+ -+examples: -+ - | -+ dsi { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ panel@0 { -+ compatible = "xingbangda,xbd599"; -+ reg = <0>; -+ backlight = <&backlight>; -+ iovcc-supply = <®_dldo2>; -+ vcc-supply = <®_ldo_io0>; -+ }; -+ }; -+ -+... --- -2.26.2 - diff --git a/0001-dt-bindings-vendor-prefixes-Add-Xingbangda.patch b/0001-dt-bindings-vendor-prefixes-Add-Xingbangda.patch new file mode 100644 index 000000000..eef72a211 --- /dev/null +++ b/0001-dt-bindings-vendor-prefixes-Add-Xingbangda.patch @@ -0,0 +1,33 @@ +From 025eb2eb927d2c3020882ea0ed3af28d65321763 Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng <icenowy@aosc.io> +Date: Fri, 26 Jun 2020 02:55:49 +0200 +Subject: [PATCH 01/13] dt-bindings: vendor-prefixes: Add Xingbangda + +Shenzhen Xingbangda Display Technology Co., Ltd is a company which +produces LCD modules. It supplies the LCD panels for the PinePhone. + +Add the vendor prefix of it. + +Signed-off-by: Icenowy Zheng <icenowy@aosc.io> +Signed-off-by: Ondrej Jirman <megous@megous.com> +Acked-by: Rob Herring <robh@kernel.org> +--- + Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml +index d3891386d6710..a558ef87ee5b0 100644 +--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml ++++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml +@@ -1121,6 +1121,8 @@ patternProperties: + description: Xiaomi Technology Co., Ltd. + "^xillybus,.*": + description: Xillybus Ltd. ++ "^xingbangda,.*": ++ description: Shenzhen Xingbangda Display Technology Co., Ltd + "^xinpeng,.*": + description: Shenzhen Xinpeng Technology Co., Ltd + "^xlnx,.*": +-- +2.26.2 + diff --git a/0001-usb-fusb302-Convert-to-use-GPIO-descriptors.patch b/0001-usb-fusb302-Convert-to-use-GPIO-descriptors.patch new file mode 100644 index 000000000..40732340c --- /dev/null +++ b/0001-usb-fusb302-Convert-to-use-GPIO-descriptors.patch @@ -0,0 +1,162 @@ +From 2c36867719d93db8d7f365310587578ab980762c Mon Sep 17 00:00:00 2001 +From: Linus Walleij <linus.walleij@linaro.org> +Date: Wed, 15 Apr 2020 21:24:48 +0200 +Subject: [PATCH] usb: fusb302: Convert to use GPIO descriptors + +This converts the FUSB302 driver to use GPIO descriptors. +The conversion to descriptors per se is pretty straight-forward. + +In the process I discovered that: + +1. The driver uses a completely undocumented device tree binding + for the interrupt GPIO line, "fcs,int_n". Ooops. + +2. The undocumented binding, presumably since it has not seen + review, is just "fcs,int_n", lacking the compulsory "-gpios" + suffix and also something that is not a good name because + the "_n" implies the line is inverted which is something we + handle with flags in the device tree. Ooops. + +3. Possibly the driver should not be requesting the line as a + GPIO and request the corresponding interrupt line by open + coding, the GPIO chip is very likely doubleing as an IRQ + controller and can probably provide an interrupt directly + for this line with interrupts-extended = <&gpio0 ...>; + +4. Possibly the IRQ should just be tagged on the I2C client node + in the device tree like apparently ACPI does, as it overrides + this IRQ with client->irq if that exists. + +But now it is too late to do much about that and as I can see +this is used like this in the Pinebook which is a shipping product +so let'a just contain the mess and move on. + +The property currently appears in: +arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts + +Create a quirk in the GPIO OF library to allow this property +specifically to be specified without the "-gpios" suffix, we have +other such bindings already. + +Cc: Tobias Schramm <t.schramm@manjaro.org> +Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> +Cc: Yueyao Zhu <yueyao@google.com> +Cc: Guenter Roeck <linux@roeck-us.net> +Cc: devicetree@vger.kernel.org +Signed-off-by: Linus Walleij <linus.walleij@linaro.org> +Link: https://lore.kernel.org/r/20200415192448.305257-1-linus.walleij@linaro.org +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/gpio/gpiolib-of.c | 21 +++++++++++++++++++++ + drivers/usb/typec/tcpm/fusb302.c | 32 +++++++++----------------------- + 2 files changed, 30 insertions(+), 23 deletions(-) + +diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c +index ccc449df3792a..20c2c428168e4 100644 +--- a/drivers/gpio/gpiolib-of.c ++++ b/drivers/gpio/gpiolib-of.c +@@ -460,6 +460,24 @@ static struct gpio_desc *of_find_arizona_gpio(struct device *dev, + return of_get_named_gpiod_flags(dev->of_node, con_id, 0, of_flags); + } + ++static struct gpio_desc *of_find_usb_gpio(struct device *dev, ++ const char *con_id, ++ enum of_gpio_flags *of_flags) ++{ ++ /* ++ * Currently this USB quirk is only for the Fairchild FUSB302 host which is using ++ * an undocumented DT GPIO line named "fcs,int_n" without the compulsory "-gpios" ++ * suffix. ++ */ ++ if (!IS_ENABLED(CONFIG_TYPEC_FUSB302)) ++ return ERR_PTR(-ENOENT); ++ ++ if (!con_id || strcmp(con_id, "fcs,int_n")) ++ return ERR_PTR(-ENOENT); ++ ++ return of_get_named_gpiod_flags(dev->of_node, con_id, 0, of_flags); ++} ++ + struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, + unsigned int idx, unsigned long *flags) + { +@@ -504,6 +522,9 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id, + if (PTR_ERR(desc) == -ENOENT) + desc = of_find_arizona_gpio(dev, con_id, &of_flags); + ++ if (PTR_ERR(desc) == -ENOENT) ++ desc = of_find_usb_gpio(dev, con_id, &of_flags); ++ + if (IS_ERR(desc)) + return desc; + +diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c +index b498960ff72b5..b28facece43c4 100644 +--- a/drivers/usb/typec/tcpm/fusb302.c ++++ b/drivers/usb/typec/tcpm/fusb302.c +@@ -9,14 +9,13 @@ + #include <linux/delay.h> + #include <linux/errno.h> + #include <linux/extcon.h> +-#include <linux/gpio.h> ++#include <linux/gpio/consumer.h> + #include <linux/i2c.h> + #include <linux/interrupt.h> + #include <linux/kernel.h> + #include <linux/module.h> + #include <linux/mutex.h> + #include <linux/of_device.h> +-#include <linux/of_gpio.h> + #include <linux/pinctrl/consumer.h> + #include <linux/proc_fs.h> + #include <linux/regulator/consumer.h> +@@ -83,7 +82,7 @@ struct fusb302_chip { + struct work_struct irq_work; + bool irq_suspended; + bool irq_while_suspended; +- int gpio_int_n; ++ struct gpio_desc *gpio_int_n; + int gpio_int_n_irq; + struct extcon_dev *extcon; + +@@ -1618,30 +1617,17 @@ static void fusb302_irq_work(struct work_struct *work) + + static int init_gpio(struct fusb302_chip *chip) + { +- struct device_node *node; ++ struct device *dev = chip->dev; + int ret = 0; + +- node = chip->dev->of_node; +- chip->gpio_int_n = of_get_named_gpio(node, "fcs,int_n", 0); +- if (!gpio_is_valid(chip->gpio_int_n)) { +- ret = chip->gpio_int_n; +- dev_err(chip->dev, "cannot get named GPIO Int_N, ret=%d", ret); +- return ret; +- } +- ret = devm_gpio_request(chip->dev, chip->gpio_int_n, "fcs,int_n"); +- if (ret < 0) { +- dev_err(chip->dev, "cannot request GPIO Int_N, ret=%d", ret); +- return ret; +- } +- ret = gpio_direction_input(chip->gpio_int_n); +- if (ret < 0) { +- dev_err(chip->dev, +- "cannot set GPIO Int_N to input, ret=%d", ret); +- return ret; ++ chip->gpio_int_n = devm_gpiod_get(dev, "fcs,int_n", GPIOD_IN); ++ if (IS_ERR(chip->gpio_int_n)) { ++ dev_err(dev, "failed to request gpio_int_n\n"); ++ return PTR_ERR(chip->gpio_int_n); + } +- ret = gpio_to_irq(chip->gpio_int_n); ++ ret = gpiod_to_irq(chip->gpio_int_n); + if (ret < 0) { +- dev_err(chip->dev, ++ dev_err(dev, + "cannot request IRQ for GPIO Int_N, ret=%d", ret); + return ret; + } +-- +2.26.2 + diff --git a/0002-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch b/0002-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch new file mode 100644 index 000000000..0d05e02e0 --- /dev/null +++ b/0002-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch @@ -0,0 +1,120 @@ +From 789d3f52a1cf675ba68c3578fe2b259bc44caba2 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:50 +0200 +Subject: [PATCH 02/13] dt-bindings: panel: Convert rocktech, jh057n00900 to + yaml + +Convert Rocktech MIPI DSI panel driver from txt to yaml bindings. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + .../display/panel/rocktech,jh057n00900.txt | 23 ------- + .../display/panel/rocktech,jh057n00900.yaml | 66 +++++++++++++++++++ + 2 files changed, 66 insertions(+), 23 deletions(-) + delete mode 100644 Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt + create mode 100644 Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml + +diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt +deleted file mode 100644 +index a372c5d846956..0000000000000 +--- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.txt ++++ /dev/null +@@ -1,23 +0,0 @@ +-Rocktech jh057n00900 5.5" 720x1440 TFT LCD panel +- +-Required properties: +-- compatible: should be "rocktech,jh057n00900" +-- reg: DSI virtual channel of the peripheral +-- reset-gpios: panel reset gpio +-- backlight: phandle of the backlight device attached to the panel +-- vcc-supply: phandle of the regulator that provides the vcc supply voltage. +-- iovcc-supply: phandle of the regulator that provides the iovcc supply +- voltage. +- +-Example: +- +- &mipi_dsi { +- panel@0 { +- compatible = "rocktech,jh057n00900"; +- reg = <0>; +- backlight = <&backlight>; +- reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>; +- vcc-supply = <®_2v8_p>; +- iovcc-supply = <®_1v8_p>; +- }; +- }; +diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +new file mode 100644 +index 0000000000000..f97c48550741c +--- /dev/null ++++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +@@ -0,0 +1,66 @@ ++# SPDX-License-Identifier: (GPL-2.0-only or BSD-2-Clause) ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/display/panel/rocktech,jh057n00900.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel ++ ++maintainers: ++ - Ondrej Jirman <megi@xff.cz> ++ ++description: | ++ Rocktech JH057N00900 is a 720x1440 TFT LCD panel ++ connected using a MIPI-DSI video interface. ++ ++allOf: ++ - $ref: panel-common.yaml# ++ ++properties: ++ compatible: ++ const: rocktech,jh057n00900 ++ ++ reg: ++ maxItems: 1 ++ description: DSI virtual channel ++ ++ vcc-supply: ++ description: Panel power supply ++ ++ vccio-supply: ++ description: I/O voltage supply ++ ++ reset-gpios: ++ description: GPIO used for the reset pin ++ maxItems: 1 ++ ++ backlight: ++ description: Backlight used by the panel ++ $ref: "/schemas/types.yaml#/definitions/phandle" ++ ++required: ++ - compatible ++ - reg ++ - vcc-supply ++ - vccio-supply ++ - reset-gpios ++ ++additionalProperties: false ++ ++examples: ++ - | ++ #include <dt-bindings/gpio/gpio.h> ++ ++ dsi { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ panel@0 { ++ compatible = "rocktech,jh057n00900"; ++ reg = <0>; ++ vcc-supply = <®_2v8_p>; ++ iovcc-supply = <®_1v8_p>; ++ reset-gpios = <&gpio3 13 GPIO_ACTIVE_LOW>; ++ backlight = <&backlight>; ++ }; ++ }; ++... +-- +2.26.2 + diff --git a/0003-dt-bindings-panel-Add-compatible-for-Xingbangda-XBD5.patch b/0003-dt-bindings-panel-Add-compatible-for-Xingbangda-XBD5.patch new file mode 100644 index 000000000..a7099de05 --- /dev/null +++ b/0003-dt-bindings-panel-Add-compatible-for-Xingbangda-XBD5.patch @@ -0,0 +1,37 @@ +From 12146093602e0dedb7ee431224fc4a58d40697f8 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:51 +0200 +Subject: [PATCH 03/13] dt-bindings: panel: Add compatible for Xingbangda + XBD599 panel + +Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel. It is based on +Sitronix ST7703 LCD controller just like rocktech,jh057n00900. It is +used in PinePhone. + +Add a compatible for it. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + .../bindings/display/panel/rocktech,jh057n00900.yaml | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +index f97c48550741c..4d43a1b36d7c7 100644 +--- a/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml ++++ b/Documentation/devicetree/bindings/display/panel/rocktech,jh057n00900.yaml +@@ -18,7 +18,11 @@ allOf: + + properties: + compatible: +- const: rocktech,jh057n00900 ++ enum: ++ # Rocktech JH057N00900 5.5" 720x1440 TFT LCD panel ++ - rocktech,jh057n00900 ++ # Xingbangda XBD599 5.99" 720x1440 TFT LCD panel ++ - xingbangda,xbd599 + + reg: + maxItems: 1 +-- +2.26.2 + diff --git a/0004-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch b/0004-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch new file mode 100644 index 000000000..c4c947641 --- /dev/null +++ b/0004-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch @@ -0,0 +1,91 @@ +From e82044df3332199c63904d86b4b1ad0963a6f8e0 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:52 +0200 +Subject: [PATCH 04/13] drm/panel: rocktech-jh057n00900: Rename the driver to + st7703 + +This rename is done so that the driver matches the name of the +display controller and in preparation for adding support for more +panels to the driver. + +This is just a basic file rename, with no code changes. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/Kconfig | 26 +++++++++---------- + drivers/gpu/drm/panel/Makefile | 2 +- + ...-jh057n00900.c => panel-sitronix-st7703.c} | 0 + 3 files changed, 14 insertions(+), 14 deletions(-) + rename drivers/gpu/drm/panel/{panel-rocktech-jh057n00900.c => panel-sitronix-st7703.c} (100%) + +diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig +index a1723c1b5fbf8..7cf1f160fdd51 100644 +--- a/drivers/gpu/drm/panel/Kconfig ++++ b/drivers/gpu/drm/panel/Kconfig +@@ -262,19 +262,6 @@ config DRM_PANEL_RAYDIUM_RM68200 + Say Y here if you want to enable support for Raydium RM68200 + 720x1280 DSI video mode panel. + +-config DRM_PANEL_ROCKTECH_JH057N00900 +- tristate "Rocktech JH057N00900 MIPI touchscreen 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 Rocktech JH057N00900 +- MIPI DSI panel as e.g. used in the Librem 5 devkit. It has a +- resolution of 720x1440 pixels, a built in backlight and touch +- controller. +- Touch input support is provided by the goodix driver and needs to be +- selected separately. +- + config DRM_PANEL_RONBO_RB070D30 + tristate "Ronbo Electronics RB070D30 panel" + depends on OF +@@ -374,6 +361,19 @@ config DRM_PANEL_SITRONIX_ST7701 + ST7701 controller for 480X864 LCD panels with MIPI/RGB/SPI + system interfaces. + ++config DRM_PANEL_SITRONIX_ST7703 ++ tristate "Sitronix ST7703 based MIPI touchscreen panels" ++ depends on OF ++ depends on DRM_MIPI_DSI ++ depends on BACKLIGHT_CLASS_DEVICE ++ help ++ Say Y here if you want to enable support for Sitronix ST7703 based ++ panels, souch as Rocktech JH057N00900 MIPI DSI panel as e.g. used in ++ the Librem 5 devkit. It has a resolution of 720x1440 pixels, a built ++ in backlight and touch controller. ++ Touch input support is provided by the goodix driver and needs to be ++ selected separately. ++ + config DRM_PANEL_SITRONIX_ST7789V + tristate "Sitronix ST7789V panel" + depends on OF && SPI +diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile +index 96a883cd66305..0519fdf0710d5 100644 +--- a/drivers/gpu/drm/panel/Makefile ++++ b/drivers/gpu/drm/panel/Makefile +@@ -25,7 +25,6 @@ obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o + obj-$(CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN) += panel-raspberrypi-touchscreen.o + obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM67191) += panel-raydium-rm67191.o + obj-$(CONFIG_DRM_PANEL_RAYDIUM_RM68200) += panel-raydium-rm68200.o +-obj-$(CONFIG_DRM_PANEL_ROCKTECH_JH057N00900) += panel-rocktech-jh057n00900.o + obj-$(CONFIG_DRM_PANEL_RONBO_RB070D30) += panel-ronbo-rb070d30.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o + obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o +@@ -39,6 +38,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o + obj-$(CONFIG_DRM_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o + obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o + obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o ++obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o + obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o + obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o + obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o +diff --git a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +similarity index 100% +rename from drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c +rename to drivers/gpu/drm/panel/panel-sitronix-st7703.c +-- +2.26.2 + diff --git a/0005-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch b/0005-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch new file mode 100644 index 000000000..5432e1bba --- /dev/null +++ b/0005-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch @@ -0,0 +1,265 @@ +From 6fad8493b27ade51f37d88acc7ce6fd7dbc9da69 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:53 +0200 +Subject: [PATCH 05/13] drm/panel: st7703: Rename functions from jh057n prefix + to st7703 + +This is done so that code that's not specific to a particular +jh057n panel is named after the controller. Functions specific +to the panel are kept named after the panel. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 90 ++++++++++--------- + 1 file changed, 46 insertions(+), 44 deletions(-) + +diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +index 38ff742bc1209..511af659f273b 100644 +--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c ++++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +@@ -1,6 +1,8 @@ + // SPDX-License-Identifier: GPL-2.0 + /* +- * Rockteck jh057n00900 5.5" MIPI-DSI panel driver ++ * Driver for panels based on Sitronix ST7703 controller, souch as: ++ * ++ * - Rocktech jh057n00900 5.5" MIPI-DSI panel + * + * Copyright (C) Purism SPC 2019 + */ +@@ -21,7 +23,7 @@ + #include <drm/drm_panel.h> + #include <drm/drm_print.h> + +-#define DRV_NAME "panel-rocktech-jh057n00900" ++#define DRV_NAME "panel-sitronix-st7703" + + /* Manufacturer specific Commands send via DSI */ + #define ST7703_CMD_ALL_PIXEL_OFF 0x22 +@@ -45,7 +47,7 @@ + #define ST7703_CMD_SETGIP1 0xE9 + #define ST7703_CMD_SETGIP2 0xEA + +-struct jh057n { ++struct st7703 { + struct device *dev; + struct drm_panel panel; + struct gpio_desc *reset_gpio; +@@ -56,9 +58,9 @@ struct jh057n { + struct dentry *debugfs; + }; + +-static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel) ++static inline struct st7703 *panel_to_st7703(struct drm_panel *panel) + { +- return container_of(panel, struct jh057n, panel); ++ return container_of(panel, struct st7703, panel); + } + + #define dsi_generic_write_seq(dsi, seq...) do { \ +@@ -69,7 +71,7 @@ static inline struct jh057n *panel_to_jh057n(struct drm_panel *panel) + return ret; \ + } while (0) + +-static int jh057n_init_sequence(struct jh057n *ctx) ++static int jh057n_init_sequence(struct st7703 *ctx) + { + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); + struct device *dev = ctx->dev; +@@ -141,9 +143,9 @@ static int jh057n_init_sequence(struct jh057n *ctx) + return 0; + } + +-static int jh057n_enable(struct drm_panel *panel) ++static int st7703_enable(struct drm_panel *panel) + { +- struct jh057n *ctx = panel_to_jh057n(panel); ++ struct st7703 *ctx = panel_to_st7703(panel); + int ret; + + ret = jh057n_init_sequence(ctx); +@@ -156,17 +158,17 @@ static int jh057n_enable(struct drm_panel *panel) + return 0; + } + +-static int jh057n_disable(struct drm_panel *panel) ++static int st7703_disable(struct drm_panel *panel) + { +- struct jh057n *ctx = panel_to_jh057n(panel); ++ struct st7703 *ctx = panel_to_st7703(panel); + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); + + return mipi_dsi_dcs_set_display_off(dsi); + } + +-static int jh057n_unprepare(struct drm_panel *panel) ++static int st7703_unprepare(struct drm_panel *panel) + { +- struct jh057n *ctx = panel_to_jh057n(panel); ++ struct st7703 *ctx = panel_to_st7703(panel); + + if (!ctx->prepared) + return 0; +@@ -178,9 +180,9 @@ static int jh057n_unprepare(struct drm_panel *panel) + return 0; + } + +-static int jh057n_prepare(struct drm_panel *panel) ++static int st7703_prepare(struct drm_panel *panel) + { +- struct jh057n *ctx = panel_to_jh057n(panel); ++ struct st7703 *ctx = panel_to_st7703(panel); + int ret; + + if (ctx->prepared) +@@ -230,10 +232,10 @@ static const struct drm_display_mode default_mode = { + .height_mm = 130, + }; + +-static int jh057n_get_modes(struct drm_panel *panel, ++static int st7703_get_modes(struct drm_panel *panel, + struct drm_connector *connector) + { +- struct jh057n *ctx = panel_to_jh057n(panel); ++ struct st7703 *ctx = panel_to_st7703(panel); + struct drm_display_mode *mode; + + mode = drm_mode_duplicate(connector->dev, &default_mode); +@@ -254,17 +256,17 @@ static int jh057n_get_modes(struct drm_panel *panel, + return 1; + } + +-static const struct drm_panel_funcs jh057n_drm_funcs = { +- .disable = jh057n_disable, +- .unprepare = jh057n_unprepare, +- .prepare = jh057n_prepare, +- .enable = jh057n_enable, +- .get_modes = jh057n_get_modes, ++static const struct drm_panel_funcs st7703_drm_funcs = { ++ .disable = st7703_disable, ++ .unprepare = st7703_unprepare, ++ .prepare = st7703_prepare, ++ .enable = st7703_enable, ++ .get_modes = st7703_get_modes, + }; + + static int allpixelson_set(void *data, u64 val) + { +- struct jh057n *ctx = data; ++ struct st7703 *ctx = data; + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); + + DRM_DEV_DEBUG_DRIVER(ctx->dev, "Setting all pixels on\n"); +@@ -282,7 +284,7 @@ static int allpixelson_set(void *data, u64 val) + DEFINE_SIMPLE_ATTRIBUTE(allpixelson_fops, NULL, + allpixelson_set, "%llu\n"); + +-static void jh057n_debugfs_init(struct jh057n *ctx) ++static void st7703_debugfs_init(struct st7703 *ctx) + { + ctx->debugfs = debugfs_create_dir(DRV_NAME, NULL); + +@@ -290,16 +292,16 @@ static void jh057n_debugfs_init(struct jh057n *ctx) + &allpixelson_fops); + } + +-static void jh057n_debugfs_remove(struct jh057n *ctx) ++static void st7703_debugfs_remove(struct st7703 *ctx) + { + debugfs_remove_recursive(ctx->debugfs); + ctx->debugfs = NULL; + } + +-static int jh057n_probe(struct mipi_dsi_device *dsi) ++static int st7703_probe(struct mipi_dsi_device *dsi) + { + struct device *dev = &dsi->dev; +- struct jh057n *ctx; ++ struct st7703 *ctx; + int ret; + + ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); +@@ -340,7 +342,7 @@ static int jh057n_probe(struct mipi_dsi_device *dsi) + return ret; + } + +- drm_panel_init(&ctx->panel, dev, &jh057n_drm_funcs, ++ drm_panel_init(&ctx->panel, dev, &st7703_drm_funcs, + DRM_MODE_CONNECTOR_DSI); + + ret = drm_panel_of_backlight(&ctx->panel); +@@ -363,13 +365,13 @@ static int jh057n_probe(struct mipi_dsi_device *dsi) + default_mode.vrefresh, + mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); + +- jh057n_debugfs_init(ctx); ++ st7703_debugfs_init(ctx); + return 0; + } + +-static void jh057n_shutdown(struct mipi_dsi_device *dsi) ++static void st7703_shutdown(struct mipi_dsi_device *dsi) + { +- struct jh057n *ctx = mipi_dsi_get_drvdata(dsi); ++ struct st7703 *ctx = mipi_dsi_get_drvdata(dsi); + int ret; + + ret = drm_panel_unprepare(&ctx->panel); +@@ -383,12 +385,12 @@ static void jh057n_shutdown(struct mipi_dsi_device *dsi) + ret); + } + +-static int jh057n_remove(struct mipi_dsi_device *dsi) ++static int st7703_remove(struct mipi_dsi_device *dsi) + { +- struct jh057n *ctx = mipi_dsi_get_drvdata(dsi); ++ struct st7703 *ctx = mipi_dsi_get_drvdata(dsi); + int ret; + +- jh057n_shutdown(dsi); ++ st7703_shutdown(dsi); + + ret = mipi_dsi_detach(dsi); + if (ret < 0) +@@ -397,28 +399,28 @@ static int jh057n_remove(struct mipi_dsi_device *dsi) + + drm_panel_remove(&ctx->panel); + +- jh057n_debugfs_remove(ctx); ++ st7703_debugfs_remove(ctx); + + return 0; + } + +-static const struct of_device_id jh057n_of_match[] = { ++static const struct of_device_id st7703_of_match[] = { + { .compatible = "rocktech,jh057n00900" }, + { /* sentinel */ } + }; +-MODULE_DEVICE_TABLE(of, jh057n_of_match); ++MODULE_DEVICE_TABLE(of, st7703_of_match); + +-static struct mipi_dsi_driver jh057n_driver = { +- .probe = jh057n_probe, +- .remove = jh057n_remove, +- .shutdown = jh057n_shutdown, ++static struct mipi_dsi_driver st7703_driver = { ++ .probe = st7703_probe, ++ .remove = st7703_remove, ++ .shutdown = st7703_shutdown, + .driver = { + .name = DRV_NAME, +- .of_match_table = jh057n_of_match, ++ .of_match_table = st7703_of_match, + }, + }; +-module_mipi_dsi_driver(jh057n_driver); ++module_mipi_dsi_driver(st7703_driver); + + MODULE_AUTHOR("Guido Günther <agx@sigxcpu.org>"); +-MODULE_DESCRIPTION("DRM driver for Rocktech JH057N00900 MIPI DSI panel"); ++MODULE_DESCRIPTION("DRM driver for Sitronix ST7703 based MIPI DSI panels"); + MODULE_LICENSE("GPL v2"); +-- +2.26.2 + diff --git a/0006-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch b/0006-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch new file mode 100644 index 000000000..8436ea3cb --- /dev/null +++ b/0006-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch @@ -0,0 +1,129 @@ +From 19802e031428f7cf967259fdf8794a971164a44a Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:54 +0200 +Subject: [PATCH 06/13] drm/panel: st7703: Prepare for supporting multiple + panels + +Parametrize the driver so that it can support more panels based +on st7703 controller. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 43 +++++++++++++------ + 1 file changed, 31 insertions(+), 12 deletions(-) + +diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +index 511af659f273b..08cbc316266c1 100644 +--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c ++++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +@@ -13,6 +13,7 @@ + #include <linux/media-bus-format.h> + #include <linux/mod_devicetable.h> + #include <linux/module.h> ++#include <linux/of_device.h> + #include <linux/regulator/consumer.h> + + #include <video/display_timing.h> +@@ -56,6 +57,15 @@ struct st7703 { + bool prepared; + + struct dentry *debugfs; ++ const struct st7703_panel_desc *desc; ++}; ++ ++struct st7703_panel_desc { ++ const struct drm_display_mode *mode; ++ unsigned int lanes; ++ unsigned long mode_flags; ++ enum mipi_dsi_pixel_format format; ++ int (*init_sequence)(struct st7703 *ctx); + }; + + static inline struct st7703 *panel_to_st7703(struct drm_panel *panel) +@@ -148,7 +158,7 @@ static int st7703_enable(struct drm_panel *panel) + struct st7703 *ctx = panel_to_st7703(panel); + int ret; + +- ret = jh057n_init_sequence(ctx); ++ ret = ctx->desc->init_sequence(ctx); + if (ret < 0) { + DRM_DEV_ERROR(ctx->dev, "Panel init sequence failed: %d\n", + ret); +@@ -216,7 +226,7 @@ static int st7703_prepare(struct drm_panel *panel) + return ret; + } + +-static const struct drm_display_mode default_mode = { ++static const struct drm_display_mode jh057n00900_mode = { + .hdisplay = 720, + .hsync_start = 720 + 90, + .hsync_end = 720 + 90 + 20, +@@ -232,17 +242,26 @@ static const struct drm_display_mode default_mode = { + .height_mm = 130, + }; + ++struct st7703_panel_desc jh057n00900_panel_desc = { ++ .mode = &jh057n00900_mode, ++ .lanes = 4, ++ .mode_flags = MIPI_DSI_MODE_VIDEO | ++ MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, ++ .format = MIPI_DSI_FMT_RGB888, ++ .init_sequence = jh057n_init_sequence, ++}; ++ + static int st7703_get_modes(struct drm_panel *panel, + struct drm_connector *connector) + { + struct st7703 *ctx = panel_to_st7703(panel); + struct drm_display_mode *mode; + +- mode = drm_mode_duplicate(connector->dev, &default_mode); ++ mode = drm_mode_duplicate(connector->dev, ctx->desc->mode); + if (!mode) { + DRM_DEV_ERROR(ctx->dev, "Failed to add mode %ux%u@%u\n", +- default_mode.hdisplay, default_mode.vdisplay, +- default_mode.vrefresh); ++ ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, ++ ctx->desc->mode->vrefresh); + return -ENOMEM; + } + +@@ -317,11 +336,11 @@ static int st7703_probe(struct mipi_dsi_device *dsi) + mipi_dsi_set_drvdata(dsi, ctx); + + ctx->dev = dev; ++ ctx->desc = of_device_get_match_data(dev); + +- dsi->lanes = 4; +- dsi->format = MIPI_DSI_FMT_RGB888; +- dsi->mode_flags = MIPI_DSI_MODE_VIDEO | +- MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE; ++ dsi->mode_flags = ctx->desc->mode_flags; ++ dsi->format = ctx->desc->format; ++ dsi->lanes = ctx->desc->lanes; + + ctx->vcc = devm_regulator_get(dev, "vcc"); + if (IS_ERR(ctx->vcc)) { +@@ -361,8 +380,8 @@ static int st7703_probe(struct mipi_dsi_device *dsi) + } + + DRM_DEV_INFO(dev, "%ux%u@%u %ubpp dsi %udl - ready\n", +- default_mode.hdisplay, default_mode.vdisplay, +- default_mode.vrefresh, ++ ctx->desc->mode->hdisplay, ctx->desc->mode->vdisplay, ++ ctx->desc->mode->vrefresh, + mipi_dsi_pixel_format_to_bpp(dsi->format), dsi->lanes); + + st7703_debugfs_init(ctx); +@@ -405,7 +424,7 @@ static int st7703_remove(struct mipi_dsi_device *dsi) + } + + static const struct of_device_id st7703_of_match[] = { +- { .compatible = "rocktech,jh057n00900" }, ++ { .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc }, + { /* sentinel */ } + }; + MODULE_DEVICE_TABLE(of, st7703_of_match); +-- +2.26.2 + diff --git a/0007-drm-panel-st7703-Move-code-specific-to-jh057n-closer.patch b/0007-drm-panel-st7703-Move-code-specific-to-jh057n-closer.patch new file mode 100644 index 000000000..fcdf0482d --- /dev/null +++ b/0007-drm-panel-st7703-Move-code-specific-to-jh057n-closer.patch @@ -0,0 +1,84 @@ +From b93e129534a0556a03a343f95e622ae9c3893854 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:55 +0200 +Subject: [PATCH 07/13] drm/panel: st7703: Move code specific to jh057n closer + together + +It's better than having it spread around the driver. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 50 +++++++++---------- + 1 file changed, 25 insertions(+), 25 deletions(-) + +diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +index 08cbc316266c1..d03aab10cfef1 100644 +--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c ++++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +@@ -153,6 +153,31 @@ static int jh057n_init_sequence(struct st7703 *ctx) + return 0; + } + ++static const struct drm_display_mode jh057n00900_mode = { ++ .hdisplay = 720, ++ .hsync_start = 720 + 90, ++ .hsync_end = 720 + 90 + 20, ++ .htotal = 720 + 90 + 20 + 20, ++ .vdisplay = 1440, ++ .vsync_start = 1440 + 20, ++ .vsync_end = 1440 + 20 + 4, ++ .vtotal = 1440 + 20 + 4 + 12, ++ .vrefresh = 60, ++ .clock = 75276, ++ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, ++ .width_mm = 65, ++ .height_mm = 130, ++}; ++ ++struct st7703_panel_desc jh057n00900_panel_desc = { ++ .mode = &jh057n00900_mode, ++ .lanes = 4, ++ .mode_flags = MIPI_DSI_MODE_VIDEO | ++ MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, ++ .format = MIPI_DSI_FMT_RGB888, ++ .init_sequence = jh057n_init_sequence, ++}; ++ + static int st7703_enable(struct drm_panel *panel) + { + struct st7703 *ctx = panel_to_st7703(panel); +@@ -226,31 +251,6 @@ static int st7703_prepare(struct drm_panel *panel) + return ret; + } + +-static const struct drm_display_mode jh057n00900_mode = { +- .hdisplay = 720, +- .hsync_start = 720 + 90, +- .hsync_end = 720 + 90 + 20, +- .htotal = 720 + 90 + 20 + 20, +- .vdisplay = 1440, +- .vsync_start = 1440 + 20, +- .vsync_end = 1440 + 20 + 4, +- .vtotal = 1440 + 20 + 4 + 12, +- .vrefresh = 60, +- .clock = 75276, +- .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, +- .width_mm = 65, +- .height_mm = 130, +-}; +- +-struct st7703_panel_desc jh057n00900_panel_desc = { +- .mode = &jh057n00900_mode, +- .lanes = 4, +- .mode_flags = MIPI_DSI_MODE_VIDEO | +- MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, +- .format = MIPI_DSI_FMT_RGB888, +- .init_sequence = jh057n_init_sequence, +-}; +- + static int st7703_get_modes(struct drm_panel *panel, + struct drm_connector *connector) + { +-- +2.26.2 + diff --git a/0008-drm-panel-st7703-Move-generic-part-of-init-sequence-.patch b/0008-drm-panel-st7703-Move-generic-part-of-init-sequence-.patch new file mode 100644 index 000000000..bae442451 --- /dev/null +++ b/0008-drm-panel-st7703-Move-generic-part-of-init-sequence-.patch @@ -0,0 +1,84 @@ +From 5e9a6f49f8056963a4b8d2408f0c0f211cdab799 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:56 +0200 +Subject: [PATCH 08/13] drm/panel: st7703: Move generic part of init sequence + to enable callback + +Calling sleep out and display on is a controller specific part +of the initialization process. Move it out of the panel specific +initialization function to the enable callback. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 33 ++++++++++--------- + 1 file changed, 18 insertions(+), 15 deletions(-) + +diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +index d03aab10cfef1..cdbf7dfb4dd48 100644 +--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c ++++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +@@ -84,8 +84,6 @@ static inline struct st7703 *panel_to_st7703(struct drm_panel *panel) + static int jh057n_init_sequence(struct st7703 *ctx) + { + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); +- struct device *dev = ctx->dev; +- int ret; + + /* + * Init sequence was supplied by the panel vendor. Most of the commands +@@ -136,20 +134,7 @@ static int jh057n_init_sequence(struct st7703 *ctx) + 0x18, 0x00, 0x09, 0x0E, 0x29, 0x2D, 0x3C, 0x41, + 0x37, 0x07, 0x0B, 0x0D, 0x10, 0x11, 0x0F, 0x10, + 0x11, 0x18); +- msleep(20); +- +- ret = mipi_dsi_dcs_exit_sleep_mode(dsi); +- if (ret < 0) { +- DRM_DEV_ERROR(dev, "Failed to exit sleep mode: %d\n", ret); +- return ret; +- } +- /* Panel is operational 120 msec after reset */ +- msleep(60); +- ret = mipi_dsi_dcs_set_display_on(dsi); +- if (ret) +- return ret; + +- DRM_DEV_DEBUG_DRIVER(dev, "Panel init sequence done\n"); + return 0; + } + +@@ -181,6 +166,7 @@ struct st7703_panel_desc jh057n00900_panel_desc = { + static int st7703_enable(struct drm_panel *panel) + { + struct st7703 *ctx = panel_to_st7703(panel); ++ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); + int ret; + + ret = ctx->desc->init_sequence(ctx); +@@ -190,6 +176,23 @@ static int st7703_enable(struct drm_panel *panel) + return ret; + } + ++ msleep(20); ++ ++ ret = mipi_dsi_dcs_exit_sleep_mode(dsi); ++ if (ret < 0) { ++ DRM_DEV_ERROR(ctx->dev, "Failed to exit sleep mode: %d\n", ret); ++ return ret; ++ } ++ ++ /* Panel is operational 120 msec after reset */ ++ msleep(60); ++ ++ ret = mipi_dsi_dcs_set_display_on(dsi); ++ if (ret) ++ return ret; ++ ++ DRM_DEV_DEBUG_DRIVER(ctx->dev, "Panel init sequence done\n"); ++ + return 0; + } + +-- +2.26.2 + diff --git a/0009-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch b/0009-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch new file mode 100644 index 000000000..5ac4e6ee8 --- /dev/null +++ b/0009-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch @@ -0,0 +1,251 @@ +From d2fb5b980f071d542ca912dac5a0e27c49de7e2d Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:57 +0200 +Subject: [PATCH 09/13] drm/panel: st7703: Add support for Xingbangda XBD599 + +Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel used in +PinePhone. Add support for it. + +Signed-off-by: Icenowy Zheng <icenowy@aosc.io> +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 199 +++++++++++++++++- + 1 file changed, 197 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +index cdbf7dfb4dd48..33611419059a9 100644 +--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c ++++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +@@ -39,10 +39,11 @@ + #define ST7703_CMD_SETEXTC 0xB9 + #define ST7703_CMD_SETMIPI 0xBA + #define ST7703_CMD_SETVDC 0xBC +-#define ST7703_CMD_UNKNOWN0 0xBF ++#define ST7703_CMD_UNKNOWN_BF 0xBF + #define ST7703_CMD_SETSCR 0xC0 + #define ST7703_CMD_SETPOWER 0xC1 + #define ST7703_CMD_SETPANEL 0xCC ++#define ST7703_CMD_UNKNOWN_C6 0xC6 + #define ST7703_CMD_SETGAMMA 0xE0 + #define ST7703_CMD_SETEQ 0xE3 + #define ST7703_CMD_SETGIP1 0xE9 +@@ -109,7 +110,7 @@ static int jh057n_init_sequence(struct st7703 *ctx) + msleep(20); + + dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0x3F, 0x3F); +- dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN0, 0x02, 0x11, 0x00); ++ dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00); + dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1, + 0x82, 0x10, 0x06, 0x05, 0x9E, 0x0A, 0xA5, 0x12, + 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38, +@@ -163,6 +164,199 @@ struct st7703_panel_desc jh057n00900_panel_desc = { + .init_sequence = jh057n_init_sequence, + }; + ++#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \ ++ static const u8 d[] = { seq }; \ ++ int ret; \ ++ ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d)); \ ++ if (ret < 0) \ ++ return ret; \ ++ } while (0) ++ ++ ++static int xbd599_init_sequence(struct st7703 *ctx) ++{ ++ struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); ++ ++ /* ++ * Init sequence was supplied by the panel vendor. ++ */ ++ ++ /* Magic sequence to unlock user commands below. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC, 0xF1, 0x12, 0x83); ++ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, ++ 0x33, /* VC_main = 0, Lane_Number = 3 (4 lanes) */ ++ 0x81, /* DSI_LDO_SEL = 1.7V, RTERM = 90 Ohm */ ++ 0x05, /* IHSRX = x6 (Low High Speed driving ability) */ ++ 0xF9, /* TX_CLK_SEL = fDSICLK/16 */ ++ 0x0E, /* HFP_OSC (min. HFP number in DSI mode) */ ++ 0x0E, /* HBP_OSC (min. HBP number in DSI mode) */ ++ /* The rest is undocumented in ST7703 datasheet */ ++ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x44, 0x25, 0x00, 0x91, 0x0a, 0x00, 0x00, 0x02, ++ 0x4F, 0x11, 0x00, 0x00, 0x37); ++ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, ++ 0x25, /* PCCS = 2, ECP_DC_DIV = 1/4 HSYNC */ ++ 0x22, /* DT = 15ms XDK_ECP = x2 */ ++ 0x20, /* PFM_DC_DIV = /1 */ ++ 0x03 /* ECP_SYNC_EN = 1, VGX_SYNC_EN = 1 */); ++ ++ /* RGB I/F porch timing */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF, ++ 0x10, /* VBP_RGB_GEN */ ++ 0x10, /* VFP_RGB_GEN */ ++ 0x05, /* DE_BP_RGB_GEN */ ++ 0x05, /* DE_FP_RGB_GEN */ ++ /* The rest is undocumented in ST7703 datasheet */ ++ 0x03, 0xFF, ++ 0x00, 0x00, ++ 0x00, 0x00); ++ ++ /* Source driving settings. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR, ++ 0x73, /* N_POPON */ ++ 0x73, /* N_NOPON */ ++ 0x50, /* I_POPON */ ++ 0x50, /* I_NOPON */ ++ 0x00, /* SCR[31,24] */ ++ 0xC0, /* SCR[23,16] */ ++ 0x08, /* SCR[15,8] */ ++ 0x70, /* SCR[7,0] */ ++ 0x00 /* Undocumented */); ++ ++ /* NVDDD_SEL = -1.8V, VDDD_SEL = out of range (possibly 1.9V?) */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E); ++ ++ /* ++ * SS_PANEL = 1 (reverse scan), GS_PANEL = 0 (normal scan) ++ * REV_PANEL = 1 (normally black panel), BGR_PANEL = 1 (BGR) ++ */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B); ++ ++ /* Zig-Zag Type C column inversion. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80); ++ ++ /* Set display resolution. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, ++ 0xF0, /* NL = 240 */ ++ 0x12, /* RES_V_LSB = 0, BLK_CON = VSSD, ++ * RESO_SEL = 720RGB ++ */ ++ 0xF0 /* WHITE_GND_EN = 1 (GND), ++ * WHITE_FRAME_SEL = 7 frames, ++ * ISC = 0 frames ++ */); ++ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ, ++ 0x00, /* PNOEQ */ ++ 0x00, /* NNOEQ */ ++ 0x0B, /* PEQGND */ ++ 0x0B, /* NEQGND */ ++ 0x10, /* PEQVCI */ ++ 0x10, /* NEQVCI */ ++ 0x00, /* PEQVCI1 */ ++ 0x00, /* NEQVCI1 */ ++ 0x00, /* reserved */ ++ 0x00, /* reserved */ ++ 0xFF, /* reserved */ ++ 0x00, /* reserved */ ++ 0xC0, /* ESD_DET_DATA_WHITE = 1, ESD_WHITE_EN = 1 */ ++ 0x10 /* SLPIN_OPTION = 1 (no need vsync after sleep-in) ++ * VEDIO_NO_CHECK_EN = 0 ++ * ESD_WHITE_GND_EN = 0 ++ * ESD_DET_TIME_SEL = 0 frames ++ */); ++ ++ /* Undocumented command. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_C6, 0x01, 0x00, 0xFF, 0xFF, 0x00); ++ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER, ++ 0x74, /* VBTHS, VBTLS: VGH = 17V, VBL = -11V */ ++ 0x00, /* FBOFF_VGH = 0, FBOFF_VGL = 0 */ ++ 0x32, /* VRP */ ++ 0x32, /* VRN */ ++ 0x77, /* reserved */ ++ 0xF1, /* APS = 1 (small), ++ * VGL_DET_EN = 1, VGH_DET_EN = 1, ++ * VGL_TURBO = 1, VGH_TURBO = 1 ++ */ ++ 0xFF, /* VGH1_L_DIV, VGL1_L_DIV (1.5MHz) */ ++ 0xFF, /* VGH1_R_DIV, VGL1_R_DIV (1.5MHz) */ ++ 0xCC, /* VGH2_L_DIV, VGL2_L_DIV (2.6MHz) */ ++ 0xCC, /* VGH2_R_DIV, VGL2_R_DIV (2.6MHz) */ ++ 0x77, /* VGH3_L_DIV, VGL3_L_DIV (4.5MHz) */ ++ 0x77 /* VGH3_R_DIV, VGL3_R_DIV (4.5MHz) */); ++ ++ /* Reference voltage. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, ++ 0x07, /* VREF_SEL = 4.2V */ ++ 0x07 /* NVREF_SEL = 4.2V */); ++ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, ++ 0x2C, /* VCOMDC_F = -0.67V */ ++ 0x2C /* VCOMDC_B = -0.67V */); ++ ++ /* Undocumented command. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02, 0x11, 0x00); ++ ++ /* This command is to set forward GIP timing. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP1, ++ 0x82, 0x10, 0x06, 0x05, 0xA2, 0x0A, 0xA5, 0x12, ++ 0x31, 0x23, 0x37, 0x83, 0x04, 0xBC, 0x27, 0x38, ++ 0x0C, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, ++ 0x03, 0x00, 0x00, 0x00, 0x75, 0x75, 0x31, 0x88, ++ 0x88, 0x88, 0x88, 0x88, 0x88, 0x13, 0x88, 0x64, ++ 0x64, 0x20, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, ++ 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); ++ ++ /* This command is to set backward GIP timing. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGIP2, ++ 0x02, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x02, 0x46, 0x02, 0x88, ++ 0x88, 0x88, 0x88, 0x88, 0x88, 0x64, 0x88, 0x13, ++ 0x57, 0x13, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, ++ 0x75, 0x88, 0x23, 0x14, 0x00, 0x00, 0x02, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ++ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0A, ++ 0xA5, 0x00, 0x00, 0x00, 0x00); ++ ++ /* Adjust the gamma characteristics of the panel. */ ++ dsi_dcs_write_seq(dsi, ST7703_CMD_SETGAMMA, ++ 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, 0x35, ++ 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, 0x12, ++ 0x18, 0x00, 0x09, 0x0D, 0x23, 0x27, 0x3C, 0x41, ++ 0x35, 0x07, 0x0D, 0x0E, 0x12, 0x13, 0x10, 0x12, ++ 0x12, 0x18); ++ ++ return 0; ++} ++ ++static const struct drm_display_mode xbd599_mode = { ++ .hdisplay = 720, ++ .hsync_start = 720 + 40, ++ .hsync_end = 720 + 40 + 40, ++ .htotal = 720 + 40 + 40 + 40, ++ .vdisplay = 1440, ++ .vsync_start = 1440 + 18, ++ .vsync_end = 1440 + 18 + 10, ++ .vtotal = 1440 + 18 + 10 + 17, ++ .vrefresh = 60, ++ .clock = 69000, ++ .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC, ++ .width_mm = 68, ++ .height_mm = 136, ++}; ++ ++static const struct st7703_panel_desc xbd599_desc = { ++ .mode = &xbd599_mode, ++ .lanes = 4, ++ .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, ++ .format = MIPI_DSI_FMT_RGB888, ++ .init_sequence = xbd599_init_sequence, ++}; ++ + static int st7703_enable(struct drm_panel *panel) + { + struct st7703 *ctx = panel_to_st7703(panel); +@@ -428,6 +622,7 @@ static int st7703_remove(struct mipi_dsi_device *dsi) + + static const struct of_device_id st7703_of_match[] = { + { .compatible = "rocktech,jh057n00900", .data = &jh057n00900_panel_desc }, ++ { .compatible = "xingbangda,xbd599", .data = &xbd599_desc }, + { /* sentinel */ } + }; + MODULE_DEVICE_TABLE(of, st7703_of_match); +-- +2.26.2 + diff --git a/0010-drm-panel-st7703-Enter-sleep-after-display-off.patch b/0010-drm-panel-st7703-Enter-sleep-after-display-off.patch new file mode 100644 index 000000000..867962865 --- /dev/null +++ b/0010-drm-panel-st7703-Enter-sleep-after-display-off.patch @@ -0,0 +1,41 @@ +From 7c9c58114d277e570f667ac670ef28725e51814e Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:58 +0200 +Subject: [PATCH 10/13] drm/panel: st7703: Enter sleep after display off + +The datasheet suggests to issue sleep in after display off +as a part of the panel's shutdown sequence. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +index 33611419059a9..e771281eb5472 100644 +--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c ++++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +@@ -394,8 +394,19 @@ static int st7703_disable(struct drm_panel *panel) + { + struct st7703 *ctx = panel_to_st7703(panel); + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); ++ int ret; ++ ++ ret = mipi_dsi_dcs_set_display_off(dsi); ++ if (ret < 0) ++ DRM_DEV_ERROR(ctx->dev, ++ "Failed to turn off the display: %d\n", ret); + +- return mipi_dsi_dcs_set_display_off(dsi); ++ ret = mipi_dsi_dcs_enter_sleep_mode(dsi); ++ if (ret < 0) ++ DRM_DEV_ERROR(ctx->dev, ++ "Failed to enter sleep mode: %d\n", ret); ++ ++ return 0; + } + + static int st7703_unprepare(struct drm_panel *panel) +-- +2.26.2 + diff --git a/0011-drm-panel-st7703-Assert-reset-prior-to-powering-down.patch b/0011-drm-panel-st7703-Assert-reset-prior-to-powering-down.patch new file mode 100644 index 000000000..f5871906c --- /dev/null +++ b/0011-drm-panel-st7703-Assert-reset-prior-to-powering-down.patch @@ -0,0 +1,29 @@ +From f290f11b42df0d9d42679b93bb6a488f9e12e00d Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:55:59 +0200 +Subject: [PATCH 11/13] drm/panel: st7703: Assert reset prior to powering down + the regulators + +The reset pin is inverted, so if we don't assert reset, the actual gpio +will be high and may keep driving the IO port of the panel. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + drivers/gpu/drm/panel/panel-sitronix-st7703.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +index e771281eb5472..92930e1275592 100644 +--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c ++++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c +@@ -416,6 +416,7 @@ static int st7703_unprepare(struct drm_panel *panel) + if (!ctx->prepared) + return 0; + ++ gpiod_set_value_cansleep(ctx->reset_gpio, 1); + regulator_disable(ctx->iovcc); + regulator_disable(ctx->vcc); + ctx->prepared = false; +-- +2.26.2 + diff --git a/0012-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch b/0012-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch new file mode 100644 index 000000000..0c8ca994e --- /dev/null +++ b/0012-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch @@ -0,0 +1,112 @@ +From 3ac5eb0c8bc2da9e81e04fc6106a79b476ec9219 Mon Sep 17 00:00:00 2001 +From: Icenowy Zheng <icenowy@aosc.io> +Date: Fri, 26 Jun 2020 02:56:00 +0200 +Subject: [PATCH 12/13] arm64: dts: sun50i-a64-pinephone: Enable LCD support on + PinePhone + +PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for +display. + +Backlight levels curve was optimized by Martijn Braam using a +lux meter. + +Add its device nodes. + +Signed-off-by: Icenowy Zheng <icenowy@aosc.io> +Signed-off-by: Martijn Braam <martijn@brixit.nl> +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + .../allwinner/sun50i-a64-pinephone-1.1.dts | 19 ++++++++++ + .../dts/allwinner/sun50i-a64-pinephone.dtsi | 35 +++++++++++++++++++ + 2 files changed, 54 insertions(+) + +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts +index 06a775c41664b..3e99a87e9ce52 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts +@@ -9,3 +9,22 @@ / { + model = "Pine64 PinePhone Braveheart (1.1)"; + compatible = "pine64,pinephone-1.1", "allwinner,sun50i-a64"; + }; ++ ++&backlight { ++ power-supply = <®_ldo_io0>; ++ /* ++ * PWM backlight circuit on this PinePhone revision was changed since ++ * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight ++ * being off is around 20%. Duty cycle for the lowest brightness level ++ * also varries quite a bit between individual boards, so the lowest ++ * value here was chosen as a safe default. ++ */ ++ brightness-levels = < ++ 774 793 814 842 ++ 882 935 1003 1088 ++ 1192 1316 1462 1633 ++ 1830 2054 2309 2596 ++ 2916 3271 3664 4096>; ++ num-interpolated-steps = <50>; ++ default-brightness-level = <400>; ++}; +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +index cefda145c3c9d..85a7aa5efd326 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +@@ -16,6 +16,13 @@ aliases { + serial0 = &uart0; + }; + ++ backlight: backlight { ++ compatible = "pwm-backlight"; ++ pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; ++ enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ ++ /* Backlight configuration differs per PinePhone revision. */ ++ }; ++ + chosen { + stdout-path = "serial0:115200n8"; + }; +@@ -84,6 +91,30 @@ &dai { + status = "okay"; + }; + ++&de { ++ status = "okay"; ++}; ++ ++&dphy { ++ status = "okay"; ++}; ++ ++&dsi { ++ vcc-dsi-supply = <®_dldo1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "okay"; ++ ++ panel@0 { ++ compatible = "xingbangda,xbd599"; ++ reg = <0>; ++ reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */ ++ iovcc-supply = <®_dldo2>; ++ vcc-supply = <®_ldo_io0>; ++ backlight = <&backlight>; ++ }; ++}; ++ + &ehci0 { + status = "okay"; + }; +@@ -188,6 +219,10 @@ &r_pio { + */ + }; + ++&r_pwm { ++ status = "okay"; ++}; ++ + &r_rsb { + status = "okay"; + +-- +2.26.2 + diff --git a/0013-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch b/0013-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch new file mode 100644 index 000000000..211eb2797 --- /dev/null +++ b/0013-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch @@ -0,0 +1,47 @@ +From 786358ed986e4788b992d98e1d3b198a4e01a9d5 Mon Sep 17 00:00:00 2001 +From: Ondrej Jirman <megous@megous.com> +Date: Fri, 26 Jun 2020 02:56:01 +0200 +Subject: [PATCH 13/13] arm64: dts: sun50i-a64-pinephone: Add touchscreen + support + +Pinephone has a Goodix GT917S capacitive touchscreen controller on +I2C0 bus. Add support for it. + +Signed-off-by: Ondrej Jirman <megous@megous.com> +--- + .../dts/allwinner/sun50i-a64-pinephone.dtsi | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +index 85a7aa5efd326..2d5694446d176 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +@@ -123,6 +123,25 @@ &ehci1 { + status = "okay"; + }; + ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_pins>; ++ status = "okay"; ++ ++ touchscreen@5d { ++ compatible = "goodix,gt917s", "goodix,gt911"; ++ reg = <0x5d>; ++ interrupt-parent = <&pio>; ++ interrupts = <7 4 IRQ_TYPE_LEVEL_HIGH>; /* PH4 */ ++ irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */ ++ reset-gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ ++ AVDD28-supply = <®_ldo_io0>; ++ VDDIO-supply = <®_ldo_io0>; ++ touchscreen-size-x = <720>; ++ touchscreen-size-y = <1440>; ++ }; ++}; ++ + &i2c1 { + status = "okay"; + +-- +2.26.2 + diff --git a/configs/fedora/generic/CONFIG_DRM_PANEL_ROCKTECH_JH057N00900 b/configs/fedora/generic/CONFIG_DRM_PANEL_ROCKTECH_JH057N00900 deleted file mode 100644 index 070c7734f..000000000 --- a/configs/fedora/generic/CONFIG_DRM_PANEL_ROCKTECH_JH057N00900 +++ /dev/null @@ -1 +0,0 @@ -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m diff --git a/configs/fedora/generic/CONFIG_DRM_PANEL_SITRONIX_ST7703 b/configs/fedora/generic/CONFIG_DRM_PANEL_SITRONIX_ST7703 new file mode 100644 index 000000000..aa14cabc0 --- /dev/null +++ b/configs/fedora/generic/CONFIG_DRM_PANEL_SITRONIX_ST7703 @@ -0,0 +1 @@ +CONFIG_DRM_PANEL_SITRONIX_ST7703=m diff --git a/configs/fedora/generic/CONFIG_DRM_PANEL_XINGBANGDA_XBD599 b/configs/fedora/generic/CONFIG_DRM_PANEL_XINGBANGDA_XBD599 deleted file mode 100644 index b3e186e66..000000000 --- a/configs/fedora/generic/CONFIG_DRM_PANEL_XINGBANGDA_XBD599 +++ /dev/null @@ -1 +0,0 @@ -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set diff --git a/configs/fedora/generic/arm/aarch64/CONFIG_DRM_PANEL_XINGBANGDA_XBD599 b/configs/fedora/generic/arm/aarch64/CONFIG_DRM_PANEL_XINGBANGDA_XBD599 deleted file mode 100644 index aba5e985e..000000000 --- a/configs/fedora/generic/arm/aarch64/CONFIG_DRM_PANEL_XINGBANGDA_XBD599 +++ /dev/null @@ -1 +0,0 @@ -CONFIG_DRM_PANEL_XINGBANGDA_XBD599=m diff --git a/kernel-aarch64-debug-fedora.config b/kernel-aarch64-debug-fedora.config index 5cb7d5a23..9e5823e1f 100644 --- a/kernel-aarch64-debug-fedora.config +++ b/kernel-aarch64-debug-fedora.config @@ -1600,7 +1600,6 @@ CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set CONFIG_DRM_PANEL_RAYDIUM_RM68200=m -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m CONFIG_DRM_PANEL_SAMSUNG_LD9040=m # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1615,6 +1614,7 @@ CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_SITRONIX_ST7701=m +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1622,7 +1622,6 @@ CONFIG_DRM_PANEL_SITRONIX_ST7701=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set CONFIG_DRM_PANEL_TPO_TPG110=m CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m -CONFIG_DRM_PANEL_XINGBANGDA_XBD599=m # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y CONFIG_DRM_PANFROST=m diff --git a/kernel-aarch64-fedora.config b/kernel-aarch64-fedora.config index 4c227ecc2..d30da95dc 100644 --- a/kernel-aarch64-fedora.config +++ b/kernel-aarch64-fedora.config @@ -1592,7 +1592,6 @@ CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set CONFIG_DRM_PANEL_RAYDIUM_RM68200=m -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m CONFIG_DRM_PANEL_SAMSUNG_LD9040=m # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1607,6 +1606,7 @@ CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_SITRONIX_ST7701=m +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1614,7 +1614,6 @@ CONFIG_DRM_PANEL_SITRONIX_ST7701=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set CONFIG_DRM_PANEL_TPO_TPG110=m CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m -CONFIG_DRM_PANEL_XINGBANGDA_XBD599=m # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y CONFIG_DRM_PANFROST=m diff --git a/kernel-armv7hl-debug-fedora.config b/kernel-armv7hl-debug-fedora.config index 2fa1e0d08..f207ab4f2 100644 --- a/kernel-armv7hl-debug-fedora.config +++ b/kernel-armv7hl-debug-fedora.config @@ -1613,7 +1613,6 @@ CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set CONFIG_DRM_PANEL_RAYDIUM_RM68200=m -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m CONFIG_DRM_PANEL_SAMSUNG_LD9040=m # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1628,6 +1627,7 @@ CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_SITRONIX_ST7701=m +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1635,7 +1635,6 @@ CONFIG_DRM_PANEL_SITRONIX_ST7701=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set CONFIG_DRM_PANEL_TPO_TPG110=m # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y CONFIG_DRM_PANFROST=m diff --git a/kernel-armv7hl-fedora.config b/kernel-armv7hl-fedora.config index 5ecf9e1d3..7567d9e45 100644 --- a/kernel-armv7hl-fedora.config +++ b/kernel-armv7hl-fedora.config @@ -1606,7 +1606,6 @@ CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set CONFIG_DRM_PANEL_RAYDIUM_RM68200=m -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m CONFIG_DRM_PANEL_SAMSUNG_LD9040=m # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1621,6 +1620,7 @@ CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_SITRONIX_ST7701=m +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1628,7 +1628,6 @@ CONFIG_DRM_PANEL_SITRONIX_ST7701=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set CONFIG_DRM_PANEL_TPO_TPG110=m # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y CONFIG_DRM_PANFROST=m diff --git a/kernel-armv7hl-lpae-debug-fedora.config b/kernel-armv7hl-lpae-debug-fedora.config index 106287038..3e87b762a 100644 --- a/kernel-armv7hl-lpae-debug-fedora.config +++ b/kernel-armv7hl-lpae-debug-fedora.config @@ -1568,7 +1568,6 @@ CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set CONFIG_DRM_PANEL_RAYDIUM_RM68200=m -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m CONFIG_DRM_PANEL_SAMSUNG_LD9040=m # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1583,6 +1582,7 @@ CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_SITRONIX_ST7701=m +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1590,7 +1590,6 @@ CONFIG_DRM_PANEL_SITRONIX_ST7701=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set CONFIG_DRM_PANEL_TPO_TPG110=m # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y CONFIG_DRM_PANFROST=m diff --git a/kernel-armv7hl-lpae-fedora.config b/kernel-armv7hl-lpae-fedora.config index 971d2f455..56ea67f69 100644 --- a/kernel-armv7hl-lpae-fedora.config +++ b/kernel-armv7hl-lpae-fedora.config @@ -1561,7 +1561,6 @@ CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00=m CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set CONFIG_DRM_PANEL_RAYDIUM_RM68200=m -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m CONFIG_DRM_PANEL_SAMSUNG_LD9040=m # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1576,6 +1575,7 @@ CONFIG_DRM_PANEL_SHARP_LQ101R1SX01=m CONFIG_DRM_PANEL_SHARP_LS043T1LE01=m CONFIG_DRM_PANEL_SIMPLE=m CONFIG_DRM_PANEL_SITRONIX_ST7701=m +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1583,7 +1583,6 @@ CONFIG_DRM_PANEL_SITRONIX_ST7701=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set CONFIG_DRM_PANEL_TPO_TPG110=m # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y CONFIG_DRM_PANFROST=m diff --git a/kernel-i686-debug-fedora.config b/kernel-i686-debug-fedora.config index 4920d82a0..c9b98219f 100644 --- a/kernel-i686-debug-fedora.config +++ b/kernel-i686-debug-fedora.config @@ -1332,7 +1332,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1347,6 +1346,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1354,7 +1354,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel-i686-fedora.config b/kernel-i686-fedora.config index da40d37b6..3027b0df2 100644 --- a/kernel-i686-fedora.config +++ b/kernel-i686-fedora.config @@ -1323,7 +1323,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1338,6 +1337,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1345,7 +1345,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel-ppc64le-debug-fedora.config b/kernel-ppc64le-debug-fedora.config index 7a05d92fc..937b8fdc9 100644 --- a/kernel-ppc64le-debug-fedora.config +++ b/kernel-ppc64le-debug-fedora.config @@ -1223,7 +1223,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1238,6 +1237,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1245,7 +1245,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel-ppc64le-fedora.config b/kernel-ppc64le-fedora.config index a034bb8ff..8276891e4 100644 --- a/kernel-ppc64le-fedora.config +++ b/kernel-ppc64le-fedora.config @@ -1214,7 +1214,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1229,6 +1228,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1236,7 +1236,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel-s390x-debug-fedora.config b/kernel-s390x-debug-fedora.config index 0c25cef4b..c2cbdaf80 100644 --- a/kernel-s390x-debug-fedora.config +++ b/kernel-s390x-debug-fedora.config @@ -1229,7 +1229,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1244,6 +1243,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1251,7 +1251,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel-s390x-fedora.config b/kernel-s390x-fedora.config index d8f09b47d..0449fd184 100644 --- a/kernel-s390x-fedora.config +++ b/kernel-s390x-fedora.config @@ -1220,7 +1220,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1235,6 +1234,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1242,7 +1242,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel-x86_64-debug-fedora.config b/kernel-x86_64-debug-fedora.config index a18bea136..5612c8214 100644 --- a/kernel-x86_64-debug-fedora.config +++ b/kernel-x86_64-debug-fedora.config @@ -1370,7 +1370,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1385,6 +1384,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1392,7 +1392,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel-x86_64-fedora.config b/kernel-x86_64-fedora.config index 206f4f9de..fd0e1febe 100644 --- a/kernel-x86_64-fedora.config +++ b/kernel-x86_64-fedora.config @@ -1361,7 +1361,6 @@ CONFIG_DRM_PANEL_ORISETECH_OTM8009A=m # CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set # CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set # CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -CONFIG_DRM_PANEL_ROCKTECH_JH057N00900=m CONFIG_DRM_PANEL_RONBO_RB070D30=m # CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set # CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set @@ -1376,6 +1375,7 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set # CONFIG_DRM_PANEL_SIMPLE is not set # CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set +CONFIG_DRM_PANEL_SITRONIX_ST7703=m # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set @@ -1383,7 +1383,6 @@ CONFIG_DRM_PANEL_SEIKO_43WVF1G=m # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set # CONFIG_DRM_PANEL_TPO_TPG110 is not set # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -# CONFIG_DRM_PANEL_XINGBANGDA_XBD599 is not set # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set CONFIG_DRM_PANEL=y # CONFIG_DRM_PARADE_PS8622 is not set diff --git a/kernel.spec b/kernel.spec index 86406ba3b..e72131b76 100644 --- a/kernel.spec +++ b/kernel.spec @@ -813,7 +813,6 @@ Patch36: 0001-s390-Lock-down-the-kernel-when-the-IPL-secure-flag-i.patch Patch37: 0001-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch Patch58: 0001-arm-make-CONFIG_HIGHPTE-optional-without-CONFIG_EXPE.patch Patch59: 0001-ARM-tegra-usb-no-reset.patch -Patch61: 0001-dt-bindings-Add-doc-for-Pine64-Pinebook-Pro.patch Patch62: 0001-Input-rmi4-remove-the-need-for-artificial-IRQ-in-cas.patch Patch63: 0001-Drop-that-for-now.patch Patch64: 0001-KEYS-Make-use-of-platform-keyring-for-module-signatu.patch @@ -823,10 +822,6 @@ Patch67: 0001-soc-bcm2835-Sync-xHCI-reset-firmware-property-with-d.patch Patch68: 0001-firmware-raspberrypi-Introduce-vl805-init-routine.patch Patch69: 0001-PCI-brcmstb-Wait-for-Raspberry-Pi-s-firmware-when-pr.patch Patch70: 0001-USB-pci-quirks-Add-Raspberry-Pi-4-quirk.patch -Patch71: 0001-dt-bindings-panel-add-binding-for-Xingbangda-XBD599-.patch -Patch72: 0001-drm-panel-add-Xingbangda-XBD599-panel.patch -Patch73: 0001-drm-sun4i-sun6i_mipi_dsi-fix-horizontal-timing-calcu.patch -Patch74: 0001-arm64-allwinner-dts-a64-add-LCD-related-device-nodes.patch Patch75: 0001-e1000e-bump-up-timeout-to-wait-when-ME-un-configure-.patch Patch76: 0001-perf-cs-etm-Move-defined-of-traceid_list.patch Patch79: 0001-disp-gv100-expose-capabilities-class.patch @@ -859,6 +854,23 @@ Patch105: 0001-virt-vbox-Log-unknown-ioctl-requests-as-error.patch # Thinkpad dual fan control Patch107: 0001-platform-x86-thinkpad_acpi-Add-support-for-dual-fan-.patch +# Latest upstream screen driver - https://patchwork.kernel.org/patch/11627069/ +Patch110: 0001-dt-bindings-vendor-prefixes-Add-Xingbangda.patch +Patch111: 0002-dt-bindings-panel-Convert-rocktech-jh057n00900-to-ya.patch +Patch112: 0003-dt-bindings-panel-Add-compatible-for-Xingbangda-XBD5.patch +Patch113: 0004-drm-panel-rocktech-jh057n00900-Rename-the-driver-to-.patch +Patch114: 0005-drm-panel-st7703-Rename-functions-from-jh057n-prefix.patch +Patch115: 0006-drm-panel-st7703-Prepare-for-supporting-multiple-pan.patch +Patch116: 0007-drm-panel-st7703-Move-code-specific-to-jh057n-closer.patch +Patch117: 0008-drm-panel-st7703-Move-generic-part-of-init-sequence-.patch +Patch118: 0009-drm-panel-st7703-Add-support-for-Xingbangda-XBD599.patch +Patch119: 0010-drm-panel-st7703-Enter-sleep-after-display-off.patch +Patch120: 0011-drm-panel-st7703-Assert-reset-prior-to-powering-down.patch +Patch121: 0012-arm64-dts-sun50i-a64-pinephone-Enable-LCD-support-on.patch +Patch122: 0013-arm64-dts-sun50i-a64-pinephone-Add-touchscreen-suppo.patch +# Back port from 5.8 +Patch123: 0001-usb-fusb302-Convert-to-use-GPIO-descriptors.patch + # END OF PATCH DEFINITIONS %endif |