删除目录「MPI_DSI」
This commit is contained in:
@@ -1,195 +0,0 @@
|
||||
From 9f2a9e624b59f50ad0f4a47a63c659d3af31f30a Mon Sep 17 00:00:00 2001
|
||||
From: BPI-M2C <bpi-m2c@local>
|
||||
Date: Sun, 20 Sep 2026 12:00:00 +0800
|
||||
Subject: [PATCH] uboot: sprd: fix MIPI panel probe failure reboot
|
||||
|
||||
When multiple panel nodes are probed, release IOVDD together with the
|
||||
other panel GPIOs. Otherwise the next candidate fails with -EBUSY.
|
||||
|
||||
Handle power-on errors without attempting an ID read, and never continue
|
||||
initializing the last candidate after all panel ID probes have failed.
|
||||
Continuing after panel_slave_if_uinit() caused an access to the powered-off
|
||||
DSI1 register block at 0x31400000 and a synchronous abort.
|
||||
|
||||
Also unwind GPIOs acquired by a partially failed power-on sequence and
|
||||
check the selected init callback before invoking it.
|
||||
---
|
||||
drivers/video/sprd/panel-if/panel_ops_mipi.c | 31 ++++++++++++++++++++++++----
|
||||
drivers/video/sprd/sprd_panel.c | 38 +++++++++++++++++---------
|
||||
2 files changed, 52 insertions(+), 17 deletions(-)
|
||||
|
||||
--- a/drivers/video/sprd/panel-if/panel_ops_mipi.c
|
||||
+++ b/drivers/video/sprd/panel-if/panel_ops_mipi.c
|
||||
@@ -378,6 +378,10 @@
|
||||
struct panel_info *info = &panel_device;
|
||||
struct power_gpio *io = &info->power_pin;
|
||||
int ret;
|
||||
+ bool iovdd_requested = false;
|
||||
+ bool avdd_requested = false;
|
||||
+ bool avee_requested = false;
|
||||
+ bool reset_requested = false;
|
||||
|
||||
if (!io->gpio_reset) {
|
||||
pr_err("gpio_reset is NULL\n");
|
||||
@@ -390,8 +394,9 @@
|
||||
&power_iovdd, GPIOD_IS_OUT);
|
||||
if (ret) {
|
||||
pr_err("request sprd,lcd-iovdd-gpio fail:%d\n", ret);
|
||||
- return ret;
|
||||
+ goto power_on_failed;
|
||||
}
|
||||
+ iovdd_requested = true;
|
||||
dm_gpio_set_value(&power_iovdd, 1);
|
||||
mdelay(10);
|
||||
}
|
||||
@@ -401,8 +406,9 @@
|
||||
&power_avdd, GPIOD_IS_OUT);
|
||||
if (ret) {
|
||||
pr_err("request sprd,lcd-avdd-gpio fail:%d\n", ret);
|
||||
- return ret;
|
||||
+ goto power_on_failed;
|
||||
}
|
||||
+ avdd_requested = true;
|
||||
dm_gpio_set_value(&power_avdd, 1);
|
||||
mdelay(info->power_gpio_delay);
|
||||
}
|
||||
@@ -412,8 +418,9 @@
|
||||
&power_avee, GPIOD_IS_OUT);
|
||||
if (ret) {
|
||||
pr_err("request sprd,lcd-avee-gpio fail:%d\n", ret);
|
||||
- return ret;
|
||||
+ goto power_on_failed;
|
||||
}
|
||||
+ avee_requested = true;
|
||||
dm_gpio_set_value(&power_avee, 1);
|
||||
mdelay(20);
|
||||
}
|
||||
@@ -435,8 +442,9 @@
|
||||
&power_reset, GPIOD_IS_OUT);
|
||||
if (ret) {
|
||||
pr_err("request sprd,lcd-reset-gpio fail:%d\n", ret);
|
||||
- return ret;
|
||||
+ goto power_on_failed;
|
||||
}
|
||||
+ reset_requested = true;
|
||||
|
||||
timing = info->power_on_seq.timing;
|
||||
for (i = 0; i < info->power_on_seq.items; i++) {
|
||||
@@ -463,10 +471,25 @@
|
||||
|
||||
dm_gpio_free(dev, &power_avdd);
|
||||
dm_gpio_free(dev, &power_avee);
|
||||
+ dm_gpio_free(dev, &power_iovdd);
|
||||
dm_gpio_free(dev, &power_off);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
+
|
||||
+#ifndef CONFIG_FPGA
|
||||
+power_on_failed:
|
||||
+ if (reset_requested)
|
||||
+ dm_gpio_free(dev, &power_reset);
|
||||
+ if (avee_requested)
|
||||
+ dm_gpio_free(dev, &power_avee);
|
||||
+ if (avdd_requested)
|
||||
+ dm_gpio_free(dev, &power_avdd);
|
||||
+ if (iovdd_requested)
|
||||
+ dm_gpio_free(dev, &power_iovdd);
|
||||
+
|
||||
+ return ret;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static int panel_set_brightness(int level)
|
||||
--- a/drivers/video/sprd/sprd_panel.c
|
||||
+++ b/drivers/video/sprd/sprd_panel.c
|
||||
@@ -821,12 +821,13 @@
|
||||
static int sprd_panel_probe(struct udevice *dev)
|
||||
{
|
||||
struct panel_info *info;
|
||||
- struct sprd_panel_ops *ops;
|
||||
+ struct sprd_panel_ops *ops = NULL;
|
||||
u8 *info_addr;
|
||||
int lcd_offset, offset;
|
||||
int ret = -1;
|
||||
int lcd_panel_offset = 0;
|
||||
int info_size;
|
||||
+ bool panel_powered;
|
||||
struct udevice *panel_dev = NULL;
|
||||
const void *fdt = gd->fdt_blob;
|
||||
|
||||
@@ -877,6 +878,7 @@
|
||||
|
||||
for (offset = fdt_first_subnode(fdt, lcd_offset);
|
||||
offset >= 0; offset = fdt_next_subnode(fdt, offset)) {
|
||||
+ panel_powered = false;
|
||||
if (info) {
|
||||
memset((uint8_t *)info_addr, 0, info_size);
|
||||
of_parse_panel(fdt, offset, info);
|
||||
@@ -890,7 +892,13 @@
|
||||
ops = panel_drv->ops;
|
||||
if (ops && ops->power) {
|
||||
printf("enter power panel\n");
|
||||
- ops->power(dev, true);
|
||||
+ ret = ops->power(dev, true);
|
||||
+ if (ret) {
|
||||
+ pr_err("power on panel 0x%x failed: %d\n",
|
||||
+ info->lcd_id, ret);
|
||||
+ goto panel_probe_failed;
|
||||
+ }
|
||||
+ panel_powered = true;
|
||||
}
|
||||
|
||||
if (ops && ops->read_id) {
|
||||
@@ -903,7 +911,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (ops && ops->power) {
|
||||
+panel_probe_failed:
|
||||
+ if (panel_powered && ops && ops->power) {
|
||||
ops->power(dev, false);
|
||||
}
|
||||
|
||||
@@ -919,7 +928,7 @@
|
||||
|
||||
if (ret) {
|
||||
pr_err("No Panel Attached!\n");
|
||||
- //return -1;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
if (info->dual_dsi_en){
|
||||
@@ -929,18 +938,21 @@
|
||||
panel_if_init();
|
||||
}
|
||||
|
||||
- if (ops && ops->init){
|
||||
- if(info->mipi_port == 0){
|
||||
+ if (info->mipi_port == 0) {
|
||||
+ if (ops && ops->init)
|
||||
ops->init();
|
||||
- }
|
||||
- else
|
||||
+ } else {
|
||||
+ if (ops && ops->slave_init)
|
||||
ops->slave_init();
|
||||
}
|
||||
- if (info->dual_dsi_en){
|
||||
- if(info->mipi_port == 0)
|
||||
- ops->slave_init();
|
||||
- else
|
||||
- ops->init();
|
||||
+ if (info->dual_dsi_en) {
|
||||
+ if (info->mipi_port == 0) {
|
||||
+ if (ops && ops->slave_init)
|
||||
+ ops->slave_init();
|
||||
+ } else {
|
||||
+ if (ops && ops->init)
|
||||
+ ops->init();
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.34.1
|
||||
@@ -1,197 +0,0 @@
|
||||
From: Codex <codex@openai.com>
|
||||
Subject: [PATCH 2/2] video: sprd: select HDMI by sink EDID
|
||||
|
||||
The LT8912B is a DSI-to-HDMI bridge and does not answer a MIPI DCS panel
|
||||
ID transaction. Its HPD status register also reads low before the bridge
|
||||
has been fully configured, which caused a connected HDMI sink to be missed.
|
||||
|
||||
The 2h10 board routes HDMI DDC to AP I2C3. Enable HDMI power, read the
|
||||
standard EDID header at address 0x50 using 100 kHz DDC, and select DSI0 only
|
||||
when a real HDMI sink responds. Otherwise power the bridge down and continue
|
||||
probing the ILI9881 panel on DSI1. HDMI has priority if both are connected.
|
||||
---
|
||||
arch/arm/dts/lcd/lcd_lt8912b_mipi_hdmi_1080p.dtsi | 9 +-
|
||||
arch/arm/dts/uis7885_2h10.dts | 4 +
|
||||
drivers/video/sprd/sprd_panel.c | 104 +++++++++++++++++++++-
|
||||
3 files changed, 112 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/dts/lcd/lcd_lt8912b_mipi_hdmi_1080p.dtsi b/arch/arm/dts/lcd/lcd_lt8912b_mipi_hdmi_1080p.dtsi
|
||||
--- a/arch/arm/dts/lcd/lcd_lt8912b_mipi_hdmi_1080p.dtsi
|
||||
+++ b/arch/arm/dts/lcd/lcd_lt8912b_mipi_hdmi_1080p.dtsi
|
||||
@@ -17,13 +17,14 @@
|
||||
|
||||
/* panel interface type: 2:MIPI; 3:SPI */
|
||||
sprd,panel-if-type = <2>;
|
||||
+ sprd,mipi-port = <0>;
|
||||
sprd,video-lp-cmd-enable = <0>;
|
||||
sprd,hporch-lp-disable = <1>;
|
||||
|
||||
- /*----Id register ----*/
|
||||
- sprd,lcd-id-register = [F4];
|
||||
- sprd,lcd-id-value-len = <1>;
|
||||
- sprd,lcd-id-value = [96];
|
||||
+ /* LT8912B has no MIPI DCS panel ID; detect the sink by EDID. */
|
||||
+ sprd,detect-lt8912b-hdmi;
|
||||
+ sprd,hdmi-ddc-i2c-bus = <3>;
|
||||
+ sprd,hdmi-ddc-i2c-addr = <0x50>;
|
||||
sprd,lcd-id-tokernel = <0x96>;
|
||||
|
||||
sprd,reset-on-sequence = <1 5>, <0 5>, <1 5>, <0 5>, <1 20>;
|
||||
diff --git a/arch/arm/dts/uis7885_2h10.dts b/arch/arm/dts/uis7885_2h10.dts
|
||||
--- a/arch/arm/dts/uis7885_2h10.dts
|
||||
+++ b/arch/arm/dts/uis7885_2h10.dts
|
||||
@@ -190,6 +190,10 @@
|
||||
sprd,lcd-avdd-gpio = <&ap_gpio 153 GPIO_ACTIVE_HIGH>;
|
||||
sprd,lcd-avee-gpio = <&ap_gpio 178 GPIO_ACTIVE_HIGH>;
|
||||
sprd,lcd-reset-gpio = <&ap_gpio 152 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ /* LT8912B HDMI bridge power and reset */
|
||||
+ sprd,hdmi-power-gpio = <&ap_gpio 99 GPIO_ACTIVE_HIGH>;
|
||||
+ sprd,hdmi-reset-gpio = <&ap_gpio 11 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lcd-video {
|
||||
diff --git a/drivers/video/sprd/sprd_panel.c b/drivers/video/sprd/sprd_panel.c
|
||||
--- a/drivers/video/sprd/sprd_panel.c
|
||||
+++ b/drivers/video/sprd/sprd_panel.c
|
||||
@@ -21,7 +21,10 @@
|
||||
#include <fdtdec.h>
|
||||
#include <asm/global_data.h>
|
||||
#include <dm.h>
|
||||
+#include <i2c.h>
|
||||
#include <panel.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <asm-generic/gpio.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
@@ -30,6 +33,93 @@
|
||||
static struct panel_driver lcd_drv;
|
||||
struct panel_info panel_device;
|
||||
|
||||
+static int lt8912b_hdmi_detect(struct udevice *dev, const void *fdt,
|
||||
+ int panel_offset)
|
||||
+{
|
||||
+ static const u8 edid_header[] = {
|
||||
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00
|
||||
+ };
|
||||
+ struct gpio_desc power_gpio;
|
||||
+ struct gpio_desc reset_gpio;
|
||||
+ struct udevice *chip;
|
||||
+ u32 bus = 3, addr = 0x50;
|
||||
+ u8 header[sizeof(edid_header)];
|
||||
+ int retry;
|
||||
+ int ret;
|
||||
+
|
||||
+ fdt_getprop_u32(fdt, panel_offset, "sprd,hdmi-ddc-i2c-bus", &bus);
|
||||
+ fdt_getprop_u32(fdt, panel_offset, "sprd,hdmi-ddc-i2c-addr", &addr);
|
||||
+
|
||||
+ ret = gpio_request_by_name(dev, "sprd,hdmi-power-gpio", 0,
|
||||
+ &power_gpio, GPIOD_IS_OUT);
|
||||
+ if (ret) {
|
||||
+ pr_err("LT8912B: request power gpio failed: %d\n", ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ ret = gpio_request_by_name(dev, "sprd,hdmi-reset-gpio", 0,
|
||||
+ &reset_gpio, GPIOD_IS_OUT);
|
||||
+ if (ret) {
|
||||
+ pr_err("LT8912B: request reset gpio failed: %d\n", ret);
|
||||
+ dm_gpio_free(dev, &power_gpio);
|
||||
+ return ret;
|
||||
+ }
|
||||
+
|
||||
+ dm_gpio_set_value(&power_gpio, 1);
|
||||
+ mdelay(5);
|
||||
+ dm_gpio_set_value(&reset_gpio, 1);
|
||||
+ mdelay(5);
|
||||
+ dm_gpio_set_value(&reset_gpio, 0);
|
||||
+ mdelay(5);
|
||||
+ dm_gpio_set_value(&reset_gpio, 1);
|
||||
+ mdelay(100);
|
||||
+
|
||||
+ ret = i2c_get_chip_for_busnum(bus, addr, 1, &chip);
|
||||
+ if (ret) {
|
||||
+ pr_err("LT8912B: cannot access HDMI DDC i2c%u addr 0x%x: %d\n",
|
||||
+ bus, addr, ret);
|
||||
+ goto not_connected;
|
||||
+ }
|
||||
+
|
||||
+ /* EDID/DDC is standard-mode I2C. Some sinks reject a 400 kHz read. */
|
||||
+ ret = dm_i2c_set_bus_speed(dev_get_parent(chip), 100000);
|
||||
+ if (ret) {
|
||||
+ pr_err("LT8912B: cannot set HDMI DDC speed: %d\n", ret);
|
||||
+ goto not_connected;
|
||||
+ }
|
||||
+
|
||||
+ for (retry = 0; retry < 3; retry++) {
|
||||
+ memset(header, 0, sizeof(header));
|
||||
+ ret = dm_i2c_read(chip, 0, header, sizeof(header));
|
||||
+ /* The sprd I2C driver returns the transferred message count. */
|
||||
+ if (ret >= 0 &&
|
||||
+ !memcmp(header, edid_header, sizeof(edid_header)))
|
||||
+ break;
|
||||
+ mdelay(20);
|
||||
+ }
|
||||
+
|
||||
+ if (retry == 3) {
|
||||
+ pr_info("LT8912B: HDMI sink not detected by EDID "
|
||||
+ "(ret=%d, header=%02x %02x %02x %02x %02x %02x %02x %02x)\n",
|
||||
+ ret, header[0], header[1], header[2], header[3],
|
||||
+ header[4], header[5], header[6], header[7]);
|
||||
+ ret = -ENODEV;
|
||||
+ goto not_connected;
|
||||
+ }
|
||||
+
|
||||
+ pr_info("LT8912B: HDMI sink detected by EDID\n");
|
||||
+ dm_gpio_free(dev, &reset_gpio);
|
||||
+ dm_gpio_free(dev, &power_gpio);
|
||||
+ return 0;
|
||||
+
|
||||
+not_connected:
|
||||
+ dm_gpio_set_value(&reset_gpio, 0);
|
||||
+ dm_gpio_set_value(&power_gpio, 0);
|
||||
+ dm_gpio_free(dev, &reset_gpio);
|
||||
+ dm_gpio_free(dev, &power_gpio);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
#ifdef CONFIG_BACKLIGHT_I2C
|
||||
void set_backlight(int brightness)
|
||||
{
|
||||
@@ -828,6 +914,7 @@ static int sprd_panel_probe(struct udevice *dev)
|
||||
int lcd_panel_offset = 0;
|
||||
int info_size;
|
||||
bool panel_powered;
|
||||
+ bool detect_lt8912b;
|
||||
struct udevice *panel_dev = NULL;
|
||||
const void *fdt = gd->fdt_blob;
|
||||
|
||||
@@ -884,13 +971,24 @@ static int sprd_panel_probe(struct udevice *dev)
|
||||
of_parse_panel(fdt, offset, info);
|
||||
of_parse_timing(fdt, offset, info);
|
||||
}
|
||||
+ detect_lt8912b = fdt_getprop(fdt, offset,
|
||||
+ "sprd,detect-lt8912b-hdmi", NULL) != NULL;
|
||||
//get ops
|
||||
if(info->mipi_port == 0)
|
||||
panel_if_init();
|
||||
else
|
||||
panel_slave_if_init();
|
||||
ops = panel_drv->ops;
|
||||
- if (ops && ops->power) {
|
||||
+ if (detect_lt8912b) {
|
||||
+ ret = lt8912b_hdmi_detect(dev, fdt, offset);
|
||||
+ if (ret)
|
||||
+ goto panel_probe_failed;
|
||||
+
|
||||
+ of_parse_initdata(fdt, offset, info);
|
||||
+ printf("attach HDMI bridge 0x%x success\n",
|
||||
+ info->lcd_id);
|
||||
+ break;
|
||||
+ } else if (ops && ops->power) {
|
||||
printf("enter power panel\n");
|
||||
ret = ops->power(dev, true);
|
||||
if (ret) {
|
||||
--
|
||||
2.34.1
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,29 +0,0 @@
|
||||
From 9956636e29506b65cbc3281e09fa1ff9128e1087 Mon Sep 17 00:00:00 2001
|
||||
From: rui.zhang1 <rui.zhang1@unisoc.com>
|
||||
Date: Fri, 11 Sep 2026 16:17:24 +0800
|
||||
Subject: [PATCH] Bug #3548825 - bananapi(2c10) lcd ili9881c porting
|
||||
|
||||
[root cause ]: none
|
||||
[changes ]:display
|
||||
[side effects]:na
|
||||
[self test ]:yes
|
||||
[download normally]:yes
|
||||
[power on/off normally]:yes
|
||||
[do common repository/branch inspection]:na
|
||||
[is there dependence]:na
|
||||
[confirm dependent commit]:na
|
||||
[board]:uis7885
|
||||
[test case]:na
|
||||
[reviewers]:jen.li,sunwen.he,junxiao.feng,haibing.liao,yang.li3,bo.zhou
|
||||
|
||||
commit_template_version:v1
|
||||
|
||||
Change-Id: I414daef8a61e46cb854ce06caecca7d9142fbdab
|
||||
---
|
||||
|
||||
diff --git a/uis7885/unisoc_FHD_800_1280_24bit.bmp b/uis7885/unisoc_FHD_800_1280_24bit.bmp
|
||||
new file mode 100755
|
||||
index 0000000..ff4bb5a
|
||||
--- /dev/null
|
||||
+++ b/uis7885/unisoc_FHD_800_1280_24bit.bmp
|
||||
Binary files differ
|
||||
@@ -1,717 +0,0 @@
|
||||
From a1990df8e3268324c787614d40ef2812190d21e7 Mon Sep 17 00:00:00 2001
|
||||
From: sunwen.he <sunwen.he@unisoc.com>
|
||||
Date: Fri, 10 Jul 2026 13:14:06 +0800
|
||||
Subject: [PATCH] Bug #3548825 - bananapi(2c10) lcd ili9881c porting
|
||||
|
||||
[root cause ]: none
|
||||
[changes ]: display
|
||||
[side effects]: none
|
||||
[self test ]: none
|
||||
[download normally]: ok
|
||||
[power on/off normally]: ok
|
||||
[do common repository/branch inspection]: none
|
||||
[is there dependence]: none
|
||||
[confirm dependent commit]: none
|
||||
[board]: uis7885
|
||||
[test case]: selftest
|
||||
[reviewers]: rui.zhang1 yang.li3 jen.li guangqiao.she bo.zhou
|
||||
|
||||
commit_template_version:v1
|
||||
|
||||
Change-Id: Idfcb0b7c166ab60178273af04a3bee90c0972437
|
||||
Signed-off-by: sunwen.he <sunwen.he@unisoc.com>
|
||||
---
|
||||
|
||||
diff --git a/arch/arm/dts/lcd/lcd_ili9881c_truly_mipi_wxga.dtsi b/arch/arm/dts/lcd/lcd_ili9881c_truly_mipi_wxga.dtsi
|
||||
new file mode 100755
|
||||
index 0000000..2c946c4
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/lcd/lcd_ili9881c_truly_mipi_wxga.dtsi
|
||||
@@ -0,0 +1,265 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
|
||||
+/*
|
||||
+ * ILI9881C Truly LCD config dtsi file
|
||||
+ *
|
||||
+ * Copyright (C) 2026, Unisoc Inc.
|
||||
+ */
|
||||
+
|
||||
+/ { lcds {
|
||||
+ lcd_ili9881c_truly_mipi_wxga: lcd_ili9881c_truly_mipi_wxga {
|
||||
+
|
||||
+ sprd,dsi-work-mode = <1>;
|
||||
+ sprd,dsi-lane-number = <4>;
|
||||
+ /*sprd,dual-dsi-en <1>;*/
|
||||
+ sprd,dsi-color-format = "rgb888";
|
||||
+
|
||||
+ sprd,phy-bit-clock = <460800>;
|
||||
+ sprd,phy-escape-clock = <20000>;/* kHz */
|
||||
+ /* panel interface type: 2:MIPI; 3:SPI */
|
||||
+ sprd,panel-if-type = <2>;
|
||||
+ sprd,power-gpio-delay = <20>;
|
||||
+ sprd,mipi-port = <1>;
|
||||
+ /*sprd,dpi-clk-div = <8>;*/
|
||||
+
|
||||
+ /*sprd,dsi-switch = <1>;*/
|
||||
+ /*----Id register ----*/
|
||||
+ sprd,lcd-id-register = [00 01];
|
||||
+ sprd,lcd-id-value-len = <1 1>;
|
||||
+ sprd,lcd-id-value = [98 81];
|
||||
+ sprd,lcd-id-command = [FF 98 81 01];
|
||||
+ sprd,lcd-id-tokernel = <0x9881>;
|
||||
+
|
||||
+ /*---Bias Power---*/
|
||||
+ /*sprd,power-i2c-bus = <5>;*/
|
||||
+ /*sprd,power-i2c-addr = <0x3E>;*/
|
||||
+ /*sprd,power-i2c-speed = <400000>;*/
|
||||
+ /*sprd,power-i2c-reg = [00 01 03 FF];*/
|
||||
+ /*sprd,power-i2c-val = [12 12 03 80];*/
|
||||
+
|
||||
+ sprd,reset-on-sequence = <1 5>, <0 5>, <1 20>;
|
||||
+ sprd,reset-off-sequence = <0 20>;
|
||||
+
|
||||
+ sprd,use-dcs-write;
|
||||
+ sprd,initial-command = [
|
||||
+ 39 00 00 04 FF 98 81 03
|
||||
+ 39 00 00 04 FF 98 81 03
|
||||
+ 23 00 00 02 01 00
|
||||
+ 23 00 00 02 02 00
|
||||
+ 23 00 00 02 03 73
|
||||
+ 23 00 00 02 04 13
|
||||
+ 23 00 00 02 05 00
|
||||
+ 23 00 00 02 06 0A
|
||||
+ 23 00 00 02 07 05
|
||||
+ 23 00 00 02 08 00
|
||||
+ 23 00 00 02 09 28
|
||||
+ 23 00 00 02 0a 00
|
||||
+ 23 00 00 02 0b 00
|
||||
+ 23 00 00 02 0c 00
|
||||
+ 23 00 00 02 0d 28
|
||||
+ 23 00 00 02 0e 00
|
||||
+ 23 00 00 02 0f 28
|
||||
+ 23 00 00 02 10 28
|
||||
+ 23 00 00 02 11 00
|
||||
+ 23 00 00 02 12 00
|
||||
+ 23 00 00 02 13 00
|
||||
+ 23 00 00 02 14 00
|
||||
+ 23 00 00 02 15 00
|
||||
+ 23 00 00 02 16 00
|
||||
+ 23 00 00 02 17 00
|
||||
+ 23 00 00 02 18 00
|
||||
+ 23 00 00 02 19 00
|
||||
+ 23 00 00 02 1a 00
|
||||
+ 23 00 00 02 1b 00
|
||||
+ 23 00 00 02 1c 00
|
||||
+ 23 00 00 02 1d 00
|
||||
+ 23 00 00 02 1e 40
|
||||
+ 23 00 00 02 1f 80
|
||||
+ 23 00 00 02 20 06
|
||||
+ 23 00 00 02 21 01
|
||||
+ 23 00 00 02 22 00
|
||||
+ 23 00 00 02 23 00
|
||||
+ 23 00 00 02 24 00
|
||||
+ 23 00 00 02 25 00
|
||||
+ 23 00 00 02 26 00
|
||||
+ 23 00 00 02 27 00
|
||||
+ 23 00 00 02 28 33
|
||||
+ 23 00 00 02 29 33
|
||||
+ 23 00 00 02 2a 00
|
||||
+ 23 00 00 02 2b 00
|
||||
+ 23 00 00 02 2c 04
|
||||
+ 23 00 00 02 2d 04
|
||||
+ 23 00 00 02 2e 05
|
||||
+ 23 00 00 02 2f 05
|
||||
+ 23 00 00 02 30 00
|
||||
+ 23 00 00 02 31 00
|
||||
+ 23 00 00 02 32 31
|
||||
+ 23 00 00 02 33 00
|
||||
+ 23 00 00 02 34 00
|
||||
+ 23 00 00 02 35 0A
|
||||
+ 23 00 00 02 36 00
|
||||
+ 23 00 00 02 37 08
|
||||
+ 23 00 00 02 38 00
|
||||
+ 23 00 00 02 39 00
|
||||
+ 23 00 00 02 3a 00
|
||||
+ 23 00 00 02 3b 00
|
||||
+ 23 00 00 02 3c 00
|
||||
+ 23 00 00 02 3d 00
|
||||
+ 23 00 00 02 3e 00
|
||||
+ 23 00 00 02 3f 00
|
||||
+ 23 00 00 02 40 00
|
||||
+ 23 00 00 02 41 00
|
||||
+ 23 00 00 02 42 00
|
||||
+ 23 00 00 02 43 08
|
||||
+ 23 00 00 02 44 00
|
||||
+ 23 00 00 02 50 01
|
||||
+ 23 00 00 02 51 23
|
||||
+ 23 00 00 02 52 44
|
||||
+ 23 00 00 02 53 67
|
||||
+ 23 00 00 02 54 89
|
||||
+ 23 00 00 02 55 ab
|
||||
+ 23 00 00 02 56 01
|
||||
+ 23 00 00 02 57 23
|
||||
+ 23 00 00 02 58 45
|
||||
+ 23 00 00 02 59 67
|
||||
+ 23 00 00 02 5a 89
|
||||
+ 23 00 00 02 5b ab
|
||||
+ 23 00 00 02 5c cd
|
||||
+ 23 00 00 02 5d ef
|
||||
+ 23 00 00 02 5e 11
|
||||
+ 23 00 00 02 5f 02
|
||||
+ 23 00 00 02 60 08
|
||||
+ 23 00 00 02 61 0E
|
||||
+ 23 00 00 02 62 0F
|
||||
+ 23 00 00 02 63 0C
|
||||
+ 23 00 00 02 64 0D
|
||||
+ 23 00 00 02 65 17
|
||||
+ 23 00 00 02 66 01
|
||||
+ 23 00 00 02 67 01
|
||||
+ 23 00 00 02 68 02
|
||||
+ 23 00 00 02 69 02
|
||||
+ 23 00 00 02 6a 00
|
||||
+ 23 00 00 02 6b 00
|
||||
+ 23 00 00 02 6c 02
|
||||
+ 23 00 00 02 6d 02
|
||||
+ 23 00 00 02 6e 16
|
||||
+ 23 00 00 02 6f 16
|
||||
+ 23 00 00 02 70 06
|
||||
+ 23 00 00 02 71 06
|
||||
+ 23 00 00 02 72 07
|
||||
+ 23 00 00 02 73 07
|
||||
+ 23 00 00 02 74 02
|
||||
+ 23 00 00 02 75 02
|
||||
+ 23 00 00 02 76 08
|
||||
+ 23 00 00 02 77 0E
|
||||
+ 23 00 00 02 78 0F
|
||||
+ 23 00 00 02 79 0C
|
||||
+ 23 00 00 02 7a 0D
|
||||
+ 23 00 00 02 7b 17
|
||||
+ 23 00 00 02 7c 01
|
||||
+ 23 00 00 02 7d 01
|
||||
+ 23 00 00 02 7e 02
|
||||
+ 23 00 00 02 7f 02
|
||||
+ 23 00 00 02 80 00
|
||||
+ 23 00 00 02 81 00
|
||||
+ 23 00 00 02 82 02
|
||||
+ 23 00 00 02 83 02
|
||||
+ 23 00 00 02 84 16
|
||||
+ 23 00 00 02 85 16
|
||||
+ 23 00 00 02 86 06
|
||||
+ 23 00 00 02 87 06
|
||||
+ 23 00 00 02 88 07
|
||||
+ 23 00 00 02 89 07
|
||||
+ 23 00 00 02 8A 02
|
||||
+ 39 00 00 04 FF 98 81 04
|
||||
+ 23 00 00 02 6E 1A
|
||||
+ 23 00 00 02 6F 37
|
||||
+ 23 00 00 02 3B C0
|
||||
+ 23 00 00 02 8D 1F
|
||||
+ 23 00 00 02 87 BA
|
||||
+ 23 00 00 02 B2 D1
|
||||
+ 23 00 00 02 88 0B
|
||||
+ 23 00 00 02 38 01
|
||||
+ 23 00 00 02 39 00
|
||||
+ 23 00 00 02 B5 02
|
||||
+ 23 00 00 02 31 25
|
||||
+ 23 00 00 02 3B 98
|
||||
+ 39 00 00 04 FF 98 81 01
|
||||
+ 23 00 00 02 22 0A
|
||||
+ 23 00 00 02 31 00
|
||||
+ 23 00 00 02 53 62
|
||||
+ 23 00 00 02 55 7B
|
||||
+ 23 00 00 02 50 9E
|
||||
+ 23 00 00 02 51 99
|
||||
+ 23 00 00 02 60 06
|
||||
+ 23 00 00 02 62 20
|
||||
+ 23 00 00 02 B7 00
|
||||
+ 23 00 00 02 A0 00
|
||||
+ 23 00 00 02 A1 17
|
||||
+ 23 00 00 02 A2 26
|
||||
+ 23 00 00 02 A3 13
|
||||
+ 23 00 00 02 A4 16
|
||||
+ 23 00 00 02 A5 29
|
||||
+ 23 00 00 02 A6 1E
|
||||
+ 23 00 00 02 A7 1F
|
||||
+ 23 00 00 02 A8 8B
|
||||
+ 23 00 00 02 A9 1D
|
||||
+ 23 00 00 02 AA 2A
|
||||
+ 23 00 00 02 AB 7B
|
||||
+ 23 00 00 02 AC 1A
|
||||
+ 23 00 00 02 AD 19
|
||||
+ 23 00 00 02 AE 4E
|
||||
+ 23 00 00 02 AF 24
|
||||
+ 23 00 00 02 B0 29
|
||||
+ 23 00 00 02 B1 4F
|
||||
+ 23 00 00 02 B2 5C
|
||||
+ 23 00 00 02 B3 23
|
||||
+ 23 00 00 02 C0 00
|
||||
+ 23 00 00 02 C1 17
|
||||
+ 23 00 00 02 C2 26
|
||||
+ 23 00 00 02 C3 13
|
||||
+ 23 00 00 02 C4 16
|
||||
+ 23 00 00 02 C5 29
|
||||
+ 23 00 00 02 C6 1E
|
||||
+ 23 00 00 02 C7 1F
|
||||
+ 23 00 00 02 C8 8B
|
||||
+ 23 00 00 02 C9 1D
|
||||
+ 23 00 00 02 CA 2A
|
||||
+ 23 00 00 02 CB 7B
|
||||
+ 23 00 00 02 CC 1A
|
||||
+ 23 00 00 02 CD 19
|
||||
+ 23 00 00 02 CE 4E
|
||||
+ 23 00 00 02 CF 24
|
||||
+ 23 00 00 02 D0 29
|
||||
+ 23 00 00 02 D1 4F
|
||||
+ 23 00 00 02 D2 5C
|
||||
+ 23 00 00 02 D3 23
|
||||
+ 39 00 00 04 FF 98 81 00
|
||||
+ 23 78 00 02 11 00
|
||||
+ 23 32 00 02 29 00
|
||||
+ ];
|
||||
+
|
||||
+ sprd,sleep-in-command = [
|
||||
+ 13 0A 00 01 28
|
||||
+ 13 78 00 01 10
|
||||
+ ];
|
||||
+ sprd,sleep-out-command = [
|
||||
+ 13 78 00 01 11
|
||||
+ 13 64 00 01 29
|
||||
+ ];
|
||||
+
|
||||
+ display-timings {
|
||||
+ timing0 {
|
||||
+ clock-frequency = <64000000>;
|
||||
+ hactive = <800>;
|
||||
+ vactive = <1280>;
|
||||
+ hback-porch = <8>;
|
||||
+ hfront-porch = <24>;
|
||||
+ vback-porch = <8>;
|
||||
+ vfront-porch = <24>;
|
||||
+ hsync-len = <18>;
|
||||
+ vsync-len = <4>;
|
||||
+
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};};
|
||||
diff --git a/arch/arm/dts/uis7885_2c10.dts b/arch/arm/dts/uis7885_2c10.dts
|
||||
index cd16e99..5fad283 100644
|
||||
--- a/arch/arm/dts/uis7885_2c10.dts
|
||||
+++ b/arch/arm/dts/uis7885_2c10.dts
|
||||
@@ -7,8 +7,9 @@
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include "ums9620.dtsi"
|
||||
//#include "lcd/lcd_hx8279_revo_mipi.dtsi"
|
||||
+//#include "lcd/lcd_dummy_mipi.dtsi"
|
||||
+#include "lcd/lcd_ili9881c_truly_mipi_wxga.dtsi"
|
||||
#include "lcd/lcd_lt8912b_bridge_mipi_fhd.dtsi"
|
||||
-#include "lcd/lcd_dummy_mipi.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
diff --git a/arch/arm/dts/uis7885_2h10.dts b/arch/arm/dts/uis7885_2h10.dts
|
||||
index 38a049e..259e999 100644
|
||||
--- a/arch/arm/dts/uis7885_2h10.dts
|
||||
+++ b/arch/arm/dts/uis7885_2h10.dts
|
||||
@@ -6,10 +6,11 @@
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include "ums9620.dtsi"
|
||||
-#include "lcd/lcd_g40396_truly_mipi_fhd.dtsi"
|
||||
-#include "lcd/lcd_nt36672e_truly_mipi_fhd_nodsc.dtsi"
|
||||
-#include "lcd/lcd_ili7806s_truly_mipi_hdplus.dtsi"
|
||||
-#include "lcd/lcd_dummy_mipi.dtsi"
|
||||
+//#include "lcd/lcd_g40396_truly_mipi_fhd.dtsi"
|
||||
+//#include "lcd/lcd_nt36672e_truly_mipi_fhd_nodsc.dtsi"
|
||||
+//#include "lcd/lcd_ili7806s_truly_mipi_hdplus.dtsi"
|
||||
+#include "lcd/lcd_ili9881c_truly_mipi_wxga.dtsi"
|
||||
+//#include "lcd/lcd_dummy_mipi.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
@@ -185,9 +186,10 @@
|
||||
lcd-panel {
|
||||
compatible = "sprd,generic-mipi-panel";
|
||||
|
||||
- sprd,lcd-avdd-gpio = <&ap_gpio 192 GPIO_ACTIVE_HIGH>;
|
||||
- sprd,lcd-avee-gpio = <&ap_gpio 191 GPIO_ACTIVE_HIGH>;
|
||||
- sprd,lcd-reset-gpio = <&ap_gpio 11 GPIO_ACTIVE_HIGH>;
|
||||
+ sprd,lcd-iovdd-gpio = <&ap_gpio 187 GPIO_ACTIVE_HIGH>;
|
||||
+ sprd,lcd-avdd-gpio = <&ap_gpio 153 GPIO_ACTIVE_HIGH>;
|
||||
+ sprd,lcd-avee-gpio = <&ap_gpio 178 GPIO_ACTIVE_HIGH>;
|
||||
+ sprd,lcd-reset-gpio = <&ap_gpio 152 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
lcd-video {
|
||||
@@ -205,7 +207,3 @@
|
||||
pcbversion_gpio = <133>;
|
||||
};
|
||||
};
|
||||
-
|
||||
-&lcd_g40396_truly_mipi_fhd {
|
||||
- sprd,power-i2c-bus = <6>;
|
||||
-};
|
||||
diff --git a/arch/arm/mach-sprd/include/sprd_panel.h b/arch/arm/mach-sprd/include/sprd_panel.h
|
||||
index 23f75f7..3fb26e5 100644
|
||||
--- a/arch/arm/mach-sprd/include/sprd_panel.h
|
||||
+++ b/arch/arm/mach-sprd/include/sprd_panel.h
|
||||
@@ -179,6 +179,7 @@
|
||||
/* common parameters */
|
||||
const char *lcd_name;
|
||||
u8 type;
|
||||
+ u8 mipi_port;
|
||||
// uint8_t fps;
|
||||
u16 width;
|
||||
u16 height;
|
||||
diff --git a/configs/uis7885_2h10_defconfig b/configs/uis7885_2h10_defconfig
|
||||
index a5effb5..8f32d73 100644
|
||||
--- a/configs/uis7885_2h10_defconfig
|
||||
+++ b/configs/uis7885_2h10_defconfig
|
||||
@@ -162,7 +162,7 @@
|
||||
CONFIG_LOG_2_FLASH=y
|
||||
|
||||
CONFIG_LOG=y
|
||||
-CONFIG_LOGLEVEL=4
|
||||
+CONFIG_LOGLEVEL=7
|
||||
|
||||
CONFIG_WDT=y
|
||||
# CONFIG_HW_WATCHDOG is not set
|
||||
diff --git a/drivers/video/sprd/dispc/dpu_r6p0.c b/drivers/video/sprd/dispc/dpu_r6p0.c
|
||||
index 0ef99ee..41ebc7a 100644
|
||||
--- a/drivers/video/sprd/dispc/dpu_r6p0.c
|
||||
+++ b/drivers/video/sprd/dispc/dpu_r6p0.c
|
||||
@@ -1022,6 +1022,11 @@
|
||||
/* disalbe halt enable for SPRD DSI */
|
||||
reg_val |= BIT(16);
|
||||
|
||||
+ /* swap mipi0 & mipi1 output*/
|
||||
+ if(panel->mipi_port == 1){
|
||||
+ reg_val |= BIT(1);
|
||||
+ }
|
||||
+
|
||||
if (panel->work_mode == SPRD_MIPI_MODE_CMD && panel->dsc_en)
|
||||
reg_val |= BIT(0);
|
||||
|
||||
diff --git a/drivers/video/sprd/panel-if/panel_ops_mipi.c b/drivers/video/sprd/panel-if/panel_ops_mipi.c
|
||||
index 77e1759..860b132 100644
|
||||
--- a/drivers/video/sprd/panel-if/panel_ops_mipi.c
|
||||
+++ b/drivers/video/sprd/panel-if/panel_ops_mipi.c
|
||||
@@ -136,7 +136,6 @@
|
||||
struct dsi_cmd_desc *cmds = (struct dsi_cmd_desc *)data;
|
||||
int (*mipi_write)(struct sprd_dsi *dsi, u8 *param, u16 len) =
|
||||
mipi_dsi_gen_write;
|
||||
-
|
||||
if (!cmds || !dsi)
|
||||
return -1;
|
||||
|
||||
@@ -239,7 +238,6 @@
|
||||
int ret;
|
||||
#endif
|
||||
struct panel_info *info = &panel_device;
|
||||
-
|
||||
dump_panel_info(info);
|
||||
|
||||
#ifdef CONFIG_LCDC_MIPI
|
||||
@@ -249,7 +247,6 @@
|
||||
printf("%s, mipi lcdc download init code success!\n", __func__);
|
||||
#else
|
||||
mipi_dsi_lp_cmd_enable(dsi, true);
|
||||
-
|
||||
mipi_dsi_send_cmds(dsi, info->cmds[CMD_CODE_INIT], info->cmds_len[CMD_CODE_INIT]);
|
||||
|
||||
if (info->work_mode == SPRD_MIPI_MODE_CMD) {
|
||||
@@ -276,17 +273,24 @@
|
||||
struct panel_info *info = &panel_device;
|
||||
|
||||
dump_panel_info(info);
|
||||
-
|
||||
+#ifdef CONFIG_LCDC_MIPI
|
||||
+ //before send init code, may be lcdc_reset and dsi config and panel reset
|
||||
+ ret = mipi_lcdc_send_cmds(info->cmds[CMD_CODE_INIT], info->cmds_len[CMD_CODE_INIT]);
|
||||
+ if (!ret)
|
||||
+ printf("%s, mipi lcdc download init code success!\n", __func__);
|
||||
+#else
|
||||
mipi_dsi_lp_cmd_enable(dsi, true);
|
||||
-
|
||||
+ mipi_dsi_send_cmds(dsi, info->cmds[CMD_CODE_INIT], info->cmds_len[CMD_CODE_INIT]);
|
||||
if (info->work_mode == SPRD_MIPI_MODE_CMD)
|
||||
mipi_dsi_set_work_mode(dsi, SPRD_MIPI_MODE_CMD);
|
||||
- else
|
||||
+ else{
|
||||
mipi_dsi_set_work_mode(dsi, SPRD_MIPI_MODE_VIDEO);
|
||||
-
|
||||
+ if (info->video_lp_cmd_enable)
|
||||
+ mipi_dsi_lp_cmd_enable(dsi, true);
|
||||
+ }
|
||||
mipi_dsi_state_reset(dsi);
|
||||
mipi_dphy_hs_clk_en(dphy, true);
|
||||
-
|
||||
+#endif
|
||||
pr_info("Set Slave Status Success!\n");
|
||||
|
||||
return 0;
|
||||
@@ -307,7 +311,8 @@
|
||||
int read_len = 0;
|
||||
struct udevice *panel_dev = NULL;
|
||||
int ret;
|
||||
-
|
||||
+ if(info->mipi_port == 1)
|
||||
+ dsi = &dsi_slave_device;
|
||||
ret = uclass_get_device(UCLASS_PANEL, 0, &panel_dev);
|
||||
if (ret) {
|
||||
pr_info("can't get panel parse dts\n");
|
||||
@@ -363,8 +368,8 @@
|
||||
info->cmds_len[CMD_CODE_READ_ID]);
|
||||
}
|
||||
|
||||
- mipi_dsi_set_max_return_size(dsi, id->val_items);
|
||||
-
|
||||
+ //mipi_dsi_set_max_return_size(dsi, id->val_items);
|
||||
+ mipi_dsi_set_max_return_size(dsi, 1);
|
||||
//Read LCM Register ID
|
||||
for (i = 0; i < id->reg_items; i++) {
|
||||
int t = 0;
|
||||
diff --git a/drivers/video/sprd/qogirn6pro/global_dphy.c b/drivers/video/sprd/qogirn6pro/global_dphy.c
|
||||
index 5921f49..3d8e41a 100644
|
||||
--- a/drivers/video/sprd/qogirn6pro/global_dphy.c
|
||||
+++ b/drivers/video/sprd/qogirn6pro/global_dphy.c
|
||||
@@ -39,9 +39,13 @@
|
||||
static void dphy_s_glb_enable(struct dphy_context *ctx)
|
||||
{
|
||||
/* dual-dphy use the same pll*/
|
||||
- sci_glb_set(SPRD_AON_ANLG_PHY_G3_PHYS + 0x64, BIT(29) | BIT(30) | BIT(31));
|
||||
- sci_glb_clr(SPRD_AON_ANLG_PHY_G3_PHYS, BIT(1));
|
||||
- sci_glb_set(SPRD_AON_ANLG_PHY_G3_PHYS, BIT(0) | BIT(2));
|
||||
+ if(ctx->mipi_port == 1)
|
||||
+ sci_glb_set(SPRD_AON_ANLG_PHY_G3_PHYS, BIT(1));
|
||||
+ else{
|
||||
+ sci_glb_set(SPRD_AON_ANLG_PHY_G3_PHYS + 0x64, BIT(29) | BIT(30) | BIT(31));
|
||||
+ sci_glb_clr(SPRD_AON_ANLG_PHY_G3_PHYS, BIT(1));
|
||||
+ sci_glb_set(SPRD_AON_ANLG_PHY_G3_PHYS, BIT(0) | BIT(2));
|
||||
+ }
|
||||
sci_glb_set(SPRD_DPU_VSP_APB_REG_PHYS + 0x1c, BIT(2) | BIT(3));
|
||||
}
|
||||
|
||||
diff --git a/drivers/video/sprd/qogirn6pro/global_dsi.c b/drivers/video/sprd/qogirn6pro/global_dsi.c
|
||||
index ad71123..aaa3274 100644
|
||||
--- a/drivers/video/sprd/qogirn6pro/global_dsi.c
|
||||
+++ b/drivers/video/sprd/qogirn6pro/global_dsi.c
|
||||
@@ -83,7 +83,7 @@
|
||||
.reset = dsi_s_reset,
|
||||
.enable = dsi_s_glb_enable,
|
||||
.disable = dsi_s_glb_disable,
|
||||
- .power = NULL,
|
||||
+ .power = dsi_power_domain,
|
||||
};
|
||||
|
||||
struct dsi_glb_ops *dsi_glb_ops_attach(void)
|
||||
diff --git a/drivers/video/sprd/sprd_dphy.c b/drivers/video/sprd/sprd_dphy.c
|
||||
index 9107d60..172025d 100644
|
||||
--- a/drivers/video/sprd/sprd_dphy.c
|
||||
+++ b/drivers/video/sprd/sprd_dphy.c
|
||||
@@ -120,6 +120,7 @@
|
||||
dphy->ctx.freq = dphy->panel->phy_freq;
|
||||
dphy->ctx.lanes = dphy->panel->lane_num;
|
||||
dphy->ctx.is_dsi_switch = dphy->panel->is_dsi_switch;
|
||||
+ dphy->ctx.mipi_port = dphy->panel->mipi_port;
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/video/sprd/sprd_dphy.h b/drivers/video/sprd/sprd_dphy.h
|
||||
index 32c502a..830e1edc 100644
|
||||
--- a/drivers/video/sprd/sprd_dphy.h
|
||||
+++ b/drivers/video/sprd/sprd_dphy.h
|
||||
@@ -25,6 +25,7 @@
|
||||
u8 lanes;
|
||||
u8 id;
|
||||
bool is_dsi_switch;
|
||||
+ u32 mipi_port;
|
||||
};
|
||||
|
||||
struct dphy_pll_ops {
|
||||
diff --git a/drivers/video/sprd/sprd_main.c b/drivers/video/sprd/sprd_main.c
|
||||
index f6d6972..4d0358f 100644
|
||||
--- a/drivers/video/sprd/sprd_main.c
|
||||
+++ b/drivers/video/sprd/sprd_main.c
|
||||
@@ -285,7 +285,6 @@
|
||||
#else
|
||||
int ret;
|
||||
struct udevice *pwm = NULL;
|
||||
-
|
||||
if (brightness > 250) {
|
||||
brightness = 250;
|
||||
pr_info("brightness exceed limit value set maxvalue\n");
|
||||
@@ -294,8 +293,7 @@
|
||||
|
||||
ret = uclass_get_device(UCLASS_PWM, 0, &pwm);
|
||||
if (ret)
|
||||
- pr_err("Can't get pwm: %d\n", ret);
|
||||
-
|
||||
+ pr_err("Can't get pwm: %d\n", ret);
|
||||
pwm_set_config(pwm, 0, 10000, value);
|
||||
#endif
|
||||
}
|
||||
@@ -423,6 +421,7 @@
|
||||
sci_glb_clr(REG_AON_APB_APB_EB1, BIT_AON_APB_AON_CAM_EB);
|
||||
#endif
|
||||
}
|
||||
+
|
||||
set_backlight(backlight_value);
|
||||
#endif
|
||||
backlight_on_time = sprd_get_tick_count();
|
||||
@@ -430,6 +429,8 @@
|
||||
uboot_consume_time = backlight_on_time - uboot_start_time;
|
||||
printf("uboot consume time:%dms, lcd init consume:%dms, backlight on time:%dms\n",
|
||||
uboot_consume_time, lcd_init_time, backlight_on_time);
|
||||
+
|
||||
+ //while(1){}
|
||||
}
|
||||
|
||||
int get_logo_bin_info(u8 *bmp, char *logo_part_name)
|
||||
diff --git a/drivers/video/sprd/sprd_panel.c b/drivers/video/sprd/sprd_panel.c
|
||||
index a73c239..b6c9b88 100644
|
||||
--- a/drivers/video/sprd/sprd_panel.c
|
||||
+++ b/drivers/video/sprd/sprd_panel.c
|
||||
@@ -116,6 +116,7 @@
|
||||
case SPRD_PANEL_TYPE_MIPI:
|
||||
sprd_dsi_slave_probe();
|
||||
sprd_dphy_slave_probe();
|
||||
+ panel_drv->ops = mipi_ops_attach();
|
||||
return 0;
|
||||
|
||||
case SPRD_PANEL_TYPE_SPI:
|
||||
@@ -155,6 +156,31 @@
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
+static int panel_slave_if_uinit(struct udevice *dev)
|
||||
+{
|
||||
+ int type = panel_drv->info->type;
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case SPRD_PANEL_TYPE_MIPI:
|
||||
+ sprd_dphy_suspend(&dphy_slave_device);
|
||||
+ sprd_dsi_suspend(&dsi_slave_device);
|
||||
+ panel_drv->ops = NULL;
|
||||
+ return 0;
|
||||
+
|
||||
+ case SPRD_PANEL_TYPE_SPI:
|
||||
+ panel_drv->ops = NULL;
|
||||
+#ifdef CONFIG_LCDC_R1P0
|
||||
+ dm_gpio_free(dev, &panel_device.spi_cd_pin);
|
||||
+#endif
|
||||
+ return 0;
|
||||
+ case SPRD_PANEL_TYPE_RGB:
|
||||
+ return 0;
|
||||
+
|
||||
+ default:
|
||||
+ pr_err("doesn't support current interface type %d\n", type);
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
|
||||
int fdt_getprop_u32(const void *fdt, int off, const char *prop, u32 *dflt)
|
||||
{
|
||||
@@ -252,6 +278,7 @@
|
||||
const void *str = NULL;
|
||||
|
||||
#ifdef CONFIG_LCDC_R1P0
|
||||
+
|
||||
str = fdt_getprop(fdt, offset, "init-data", &len);
|
||||
if (!str) {
|
||||
pr_err("can't get init-data\n");
|
||||
@@ -276,6 +303,7 @@
|
||||
info->cmds[CMD_CODE_SLEEP_OUT] = str;
|
||||
info->cmds_len[CMD_CODE_SLEEP_OUT] = len;
|
||||
#else
|
||||
+
|
||||
str = fdt_getprop(fdt, offset, "sprd,initial-command", &len);
|
||||
if (!str) {
|
||||
pr_err("Can't get sprd,initial-command\n");
|
||||
@@ -656,7 +684,12 @@
|
||||
if (!ret)
|
||||
info->bias_volt.i2c_speed = val;
|
||||
}
|
||||
-
|
||||
+ ret = fdt_getprop_u32(fdt, offset, "sprd,mipi-port", &val);
|
||||
+ if (!ret)
|
||||
+ info->mipi_port = val;
|
||||
+ else
|
||||
+ info->mipi_port = 0;
|
||||
+ pr_info("lcd info->mipi_port=%d\n",info->mipi_port);
|
||||
/*------If Use Panel internal backlight-------*/
|
||||
ret = fdt_getprop_u32(fdt, offset, "sprd,bl-i2c-bus", &val);
|
||||
if (!ret) {
|
||||
@@ -850,7 +883,10 @@
|
||||
of_parse_timing(fdt, offset, info);
|
||||
}
|
||||
//get ops
|
||||
- panel_if_init();
|
||||
+ if(info->mipi_port == 0)
|
||||
+ panel_if_init();
|
||||
+ else
|
||||
+ panel_slave_if_init();
|
||||
ops = panel_drv->ops;
|
||||
if (ops && ops->power) {
|
||||
printf("enter power panel\n");
|
||||
@@ -859,7 +895,8 @@
|
||||
|
||||
if (ops && ops->read_id) {
|
||||
ret = ops->read_id();
|
||||
- if (!ret) {
|
||||
+ if (!ret)
|
||||
+ {
|
||||
of_parse_initdata(fdt, offset, info);
|
||||
printf("attach panel 0x%x success\n",
|
||||
info->lcd_id);
|
||||
@@ -869,8 +906,10 @@
|
||||
|
||||
if (ops && ops->power)
|
||||
ops->power(dev, false);
|
||||
-
|
||||
- panel_if_uinit(panel_dev);
|
||||
+ if(info->mipi_port == 0)
|
||||
+ panel_if_uinit(panel_dev);
|
||||
+ else
|
||||
+ panel_slave_if_uinit(panel_dev);
|
||||
|
||||
pr_err("Try to attach panel 0x%x failed, try next...\n",
|
||||
info->lcd_id);
|
||||
@@ -878,17 +917,31 @@
|
||||
|
||||
if (ret) {
|
||||
pr_err("No Panel Attached!\n");
|
||||
- return -1;
|
||||
+ //return -1;
|
||||
}
|
||||
|
||||
- if (info->dual_dsi_en)
|
||||
- panel_slave_if_init();
|
||||
+ if (info->dual_dsi_en){
|
||||
+ if(info->mipi_port == 0)
|
||||
+ panel_slave_if_init();
|
||||
+ else
|
||||
+ panel_if_init();
|
||||
+ }
|
||||
|
||||
- if (ops && ops->init)
|
||||
- ops->init();
|
||||
+ if (ops && ops->init){
|
||||
+ if(info->mipi_port == 0){
|
||||
+ ops->init();
|
||||
+ }
|
||||
+ else
|
||||
+ ops->slave_init();
|
||||
+ }
|
||||
+ if (info->dual_dsi_en){
|
||||
+ if(info->mipi_port == 0)
|
||||
+ ops->slave_init();
|
||||
|
||||
- if (info->dual_dsi_en)
|
||||
- ops->slave_init();
|
||||
+ else
|
||||
+ ops->init();
|
||||
+ }
|
||||
+
|
||||
|
||||
panel_info.vl_row = info->height;
|
||||
panel_info.vl_col = info->width;
|
||||
@@ -1,49 +0,0 @@
|
||||
From ca1b8a9dbb9deb50b82a4716afe2101039efd05b Mon Sep 17 00:00:00 2001
|
||||
From: rui.zhang1 <rui.zhang1@unisoc.com>
|
||||
Date: Fri, 11 Sep 2026 16:23:15 +0800
|
||||
Subject: [PATCH] Bug #3548825 - bananapi(2c10) lcd ili9881c porting
|
||||
|
||||
[root cause ]: na
|
||||
[changes ]:display
|
||||
[side effects]:na
|
||||
[self test ]:yes
|
||||
[download normally]:yes
|
||||
[power on/off normally]:yes
|
||||
[do common repository/branch inspection]:na
|
||||
[is there dependence]:na
|
||||
[confirm dependent commit]:na
|
||||
[board]:uis7885
|
||||
[test case]:na
|
||||
[reviewers]:bo.zou,jen.li,sunsen.he,haibing.liao,yang.li3
|
||||
|
||||
commit_template_version:v1
|
||||
|
||||
Change-Id: I9924e302b503a985bd64a8f329b5077fe3370c9b
|
||||
---
|
||||
|
||||
diff --git a/uis7885-2c10-uboot22.ini b/uis7885-2c10-uboot22.ini
|
||||
index 254d138..2cb8efe 100755
|
||||
--- a/uis7885-2c10-uboot22.ini
|
||||
+++ b/uis7885-2c10-uboot22.ini
|
||||
@@ -54,8 +54,8 @@
|
||||
Recovery=1@./out/target/product/uis7885-2c10/recovery-sign.img
|
||||
System=1@./out/target/product/uis7885-2c10/rootfs.ext4
|
||||
UserData=1@./out/target/product/uis7885-2c10/userdata.img
|
||||
-BootLogo=1@./out/target/product/uis7885-2c10/unisoc_FHD_1200_1920_24bit.bmp
|
||||
-Fastboot_Logo=1@./out/target/product/uis7885-2c10/unisoc_FHD_1200_1920_24bit.bmp
|
||||
+BootLogo=1@./out/target/product/uis7885-2c10/unisoc_FHD_800_1280_24bit.bmp
|
||||
+Fastboot_Logo=1@./out/target/product/uis7885-2c10/unisoc_FHD_800_1280_24bit.bmp
|
||||
EreaseRunTimeNV_WLTE=1@
|
||||
EraseMisc=1@
|
||||
SML=1@./out/target/product/uis7885-2c10/sml-sign.bin
|
||||
@@ -97,8 +97,8 @@
|
||||
RecoverySystem=1@./out/target/product/uis7885-2c10/recovery-rootfs.ext4
|
||||
System=1@./out/target/product/uis7885-2c10/rootfs.ext4
|
||||
UserData=1@./out/target/product/uis7885-2c10/userdata.img
|
||||
-BootLogo=1@./out/target/product/uis7885-2c10/unisoc_FHD_1200_1920_24bit.bmp
|
||||
-Fastboot_Logo=1@./out/target/product/uis7885-2c10/unisoc_FHD_1200_1920_24bit.bmp
|
||||
+BootLogo=1@./out/target/product/uis7885-2c10/unisoc_FHD_800_1280_24bit.bmp
|
||||
+Fastboot_Logo=1@./out/target/product/uis7885-2c10/unisoc_FHD_800_1280_24bit.bmp
|
||||
EreaseRunTimeNV_WLTE=1@
|
||||
EraseMisc=1@
|
||||
SML=1@./out/target/product/uis7885-2c10/sml-sign.bin
|
||||
@@ -1,61 +0,0 @@
|
||||
From f8213bde56abdecf571069955ba35f882412a20a Mon Sep 17 00:00:00 2001
|
||||
From: rui.zhang1 <rui.zhang1@unisoc.com>
|
||||
Date: Fri, 11 Sep 2026 16:27:13 +0800
|
||||
Subject: [PATCH] Bug #3548825 - bananapi(2c10) lcd ili9881c porting
|
||||
|
||||
[root cause ]: na
|
||||
[changes ]:display
|
||||
[side effects]:na
|
||||
[self test ]:yes
|
||||
[download normally]:yes
|
||||
[power on/off normally]:yes
|
||||
[do common repository/branch inspection]:na
|
||||
[is there dependence]:na
|
||||
[confirm dependent commit]:na
|
||||
[board]:uis7885
|
||||
[test case]:na
|
||||
[reviewers]:bo.zhou,jen.li,sunwen.he,haibing.liao,yang.li3
|
||||
|
||||
commit_template_version:v1
|
||||
|
||||
Change-Id: Idb9270b1cbf3d95fe746b0d8a2bfdbfc358f1b9b
|
||||
---
|
||||
|
||||
diff --git a/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2c10-overlay.dts b/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2c10-overlay.dts
|
||||
index 19e9b39..2e3048a 100755
|
||||
--- a/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2c10-overlay.dts
|
||||
+++ b/recipes-kernel/linux/linux-unisoc-5.4/uis7885/uis7885-2c10-overlay.dts
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "lcd/lcd_nt36672e_truly_mipi_fhd_nodsc.dtsi"
|
||||
#include "lcd/lcd_lt8912b_bridge_mipi_fhd.dtsi"
|
||||
#include "lcd/lcd_dummy_mipi.dtsi"
|
||||
+#include "lcd/lcd_ili9881c_truly_mipi_wxga.dtsi"
|
||||
//#include "tp/ums9620-tp.dtsi"
|
||||
#include "tp/uis7885-gt9xx-tp.dtsi"
|
||||
#include <dt-bindings/mfd/sprd,ump9620-regs.h>
|
||||
@@ -572,14 +573,22 @@
|
||||
reset-gpio = <&ap_gpio 11 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
+&panel1 {
|
||||
+ sprd,backlight = <&pwm_backlight>;
|
||||
+ avdd-gpio = <&ap_gpio 153 GPIO_ACTIVE_HIGH>;
|
||||
+ avee-gpio = <&ap_gpio 178 GPIO_ACTIVE_HIGH>;
|
||||
+ iovdd-gpio = <&ap_gpio 187 GPIO_ACTIVE_HIGH>;
|
||||
+ reset-gpio = <&ap_gpio 152 GPIO_ACTIVE_HIGH>;
|
||||
+};
|
||||
+
|
||||
&dpu {
|
||||
sprd,logo-memory = <&logo_reserved>;
|
||||
sprd,backlight = <&pwm_backlight>;
|
||||
};
|
||||
|
||||
-&lcd_g40396_truly_mipi_fhd {
|
||||
- sprd,sr-width = <720>;
|
||||
- sprd,sr-height = <1600>;
|
||||
+&lcd_ili9881c_truly_mipi_wxga {
|
||||
+ sprd,sr-width = <800>;
|
||||
+ sprd,sr-height = <1280>;
|
||||
};
|
||||
|
||||
&vddwpa {
|
||||
Reference in New Issue
Block a user