jitao shi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31590
Change subject: google/kukui: Add panel config data for display ......................................................................
google/kukui: Add panel config data for display
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui
Change-Id: Ife4a724ff1ddc36b29f37690a22c1b344e0629f7 Signed-off-by: Jitao Shi jitao.shi@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 58 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/31590/1
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index 950dca4..bf9bd02 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -15,9 +15,12 @@
#include <bootmode.h> #include <console/console.h> +#include <delay.h> #include <device/device.h> #include <edid.h> +#include <gpio.h> #include <soc/ddp.h> +#include <soc/dsi.h> #include <soc/gpio.h> #include <soc/mmu_operations.h> #include <soc/mtcmos.h> @@ -42,13 +45,66 @@ setup_usb_host(); }
+/* Setup backlight control pins as output pin and power-off by default */ +static void configure_backlight(void) +{ + /* Configure PANEL_LCD_POWER_EN */ + gpio_output(GPIO(PERIPHERAL_EN13), 1); + gpio_output(GPIO(DISP_PWM), 1); /* DISP_PWM0 */ +} + +static void configure_display(void) +{ + /* board from p0 */ + gpio_output(GPIO(LCM_RST), 0); + udelay(100); + gpio_output(GPIO(LCM_RST), 1); + mdelay(20); +} + +static const struct edid kukui_innolux_edid = { + .panel_bits_per_color = 8, + .panel_bits_per_pixel = 24, + .mode = { + .name = "768x1024@60Hz", + .pixel_clock = 56900, + .lvds_dual_channel = 0, + .refresh = 60, + .ha = 768, .hbl = 120, .hso = 40, .hspw = 40, .hborder = 0, + .va = 1024, .vbl = 44, .vso = 20, .vspw = 4, .vborder = 0, + .phsync = '-', .pvsync = '-', + .x_mm = 120, .y_mm = 160, + }, +}; + +struct lcm_init_table lcm_init_cmd[] = { + {INIT_CMD, 1, {MIPI_DCS_EXIT_SLEEP_MODE}}, + {DELAY_CMD, 120, {}}, + {INIT_CMD, 1, {MIPI_DCS_SET_DISPLAY_ON}}, + {DELAY_CMD, 120, {}}, +}; + + static void display_startup(void) { + int ret = 0; + u32 mipi_dsi_flags; struct edid edid;
+ edid = kukui_innolux_edid; + mipi_dsi_flags = MIPI_DSI_MODE_VIDEO | + MIPI_DSI_MODE_VIDEO_SYNC_PULSE | + MIPI_DSI_MODE_LPM; + edid_set_framebuffer_bits_per_pixel(&edid, 32, 0);
mtk_ddp_init(); + ret = mtk_dsi_init(mipi_dsi_flags, MIPI_DSI_FMT_RGB888, 4, + false, &edid, lcm_init_cmd, sizeof(lcm_init_cmd) / sizeof(struct lcm_init_table)); + if (ret < 0) { + printk(BIOS_ERR, "dsi init fail\n"); + return; + }
mtk_ddp_mode_set(&edid);
@@ -62,6 +118,8 @@ mtcmos_display_power_on(); mtcmos_protect_display_bus();
+ configure_backlight(); + configure_display(); display_startup(); } else { printk(BIOS_INFO, "Skipping display init.\n");
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 1:
(5 comments)
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 81: {INIT_CMD, 1, {MIPI_DCS_EXIT_SLEEP_MODE}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 82: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 83: {INIT_CMD, 1, {MIPI_DCS_SET_DISPLAY_ON}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 84: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 103: false, &edid, lcm_init_cmd, sizeof(lcm_init_cmd) / sizeof(struct lcm_init_table)); line over 80 characters
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 1:
(4 comments)
https://review.coreboot.org/#/c/31590/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31590/1//COMMIT_MSG@8 PS1, Line 8: Where did you get the panel data from? Maybe add the panel name to the commit message.
Additionally, is it correct that a 240 ms delay is added (or is it microseconds)s
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 48: Setup Set up
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 69: 768x1024 Is it not landscape mode?
https://review.coreboot.org/#/c/31590/1/src/mainboard/google/kukui/mainboard... PS1, Line 105: dsi init fail Error messages should be user understandable, and well written. At least
DSI inti failed, display might not work, continuing anyway.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 2:
(5 comments)
https://review.coreboot.org/#/c/31590/2/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/2/src/mainboard/google/kukui/mainboard... PS2, Line 81: {INIT_CMD, 1, {MIPI_DCS_EXIT_SLEEP_MODE}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/2/src/mainboard/google/kukui/mainboard... PS2, Line 82: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/2/src/mainboard/google/kukui/mainboard... PS2, Line 83: {INIT_CMD, 1, {MIPI_DCS_SET_DISPLAY_ON}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/2/src/mainboard/google/kukui/mainboard... PS2, Line 84: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/2/src/mainboard/google/kukui/mainboard... PS2, Line 103: false, &edid, lcm_init_cmd, sizeof(lcm_init_cmd) / sizeof(struct lcm_init_table)); line over 80 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 3:
(5 comments)
https://review.coreboot.org/#/c/31590/3/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/3/src/mainboard/google/kukui/mainboard... PS3, Line 81: {INIT_CMD, 1, {MIPI_DCS_EXIT_SLEEP_MODE}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/3/src/mainboard/google/kukui/mainboard... PS3, Line 82: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/3/src/mainboard/google/kukui/mainboard... PS3, Line 83: {INIT_CMD, 1, {MIPI_DCS_SET_DISPLAY_ON}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/3/src/mainboard/google/kukui/mainboard... PS3, Line 84: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/3/src/mainboard/google/kukui/mainboard... PS3, Line 103: false, &edid, lcm_init_cmd, sizeof(lcm_init_cmd) / sizeof(struct lcm_init_table)); line over 80 characters
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 4:
(5 comments)
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 81: {INIT_CMD, 1, {MIPI_DCS_EXIT_SLEEP_MODE}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 82: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 83: {INIT_CMD, 1, {MIPI_DCS_SET_DISPLAY_ON}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 84: {DELAY_CMD, 120, {}}, space required after that close brace '}'
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 103: false, &edid, lcm_init_cmd, sizeof(lcm_init_cmd) / sizeof(struct lcm_init_table)); line over 80 characters
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 4:
(3 comments)
https://review.coreboot.org/#/c/31590/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31590/4//COMMIT_MSG@8 PS4, Line 8: You also add more code. Please elaborate in the commit message.
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 48: Setup Set up
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 62: mdelay(20); 20 ms delay is huge. Please comment, why this is needed, and in what spec it is required.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 81: {INIT_CMD, 1, {MIPI_DCS_EXIT_SLEEP_MODE}},
space required after that close brace '}'
please fix here (instead of fixing in follow up CLs)
https://review.coreboot.org/#/c/31590/4/src/mainboard/google/kukui/mainboard... PS4, Line 103: false, &edid, lcm_init_cmd, sizeof(lcm_init_cmd) / sizeof(struct lcm_init_table)); please fix this here.
yongqiang niu has uploaded a new patch set (#5) to the change originally created by jitao shi. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
google/kukui: Add panel config data for display
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui
Change-Id: Ife4a724ff1ddc36b29f37690a22c1b344e0629f7 Signed-off-by: Jitao Shi jitao.shi@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 62 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/31590/5
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/#/c/31590/6/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/6/src/mainboard/google/kukui/mainboard... PS6, Line 101: trailing whitespace
Hello yongqiang niu, You-Cheng Syu, Hung-Te Lin, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31590
to look at the new patch set (#7).
Change subject: google/kukui: Add panel config data for display ......................................................................
google/kukui: Add panel config data for display
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui
Change-Id: Ife4a724ff1ddc36b29f37690a22c1b344e0629f7 Signed-off-by: Jitao Shi jitao.shi@mediatek.com --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/mainboard.c 2 files changed, 65 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/31590/7
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Patch Set 7:
(1 comment)
https://review.coreboot.org/#/c/31590/7/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31590/7/src/mainboard/google/kukui/mainboard... PS7, Line 101: trailing whitespace
jitao shi has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31590 )
Change subject: google/kukui: Add panel config data for display ......................................................................
Abandoned