Hung-Te Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
* WIP. DO NOT SUBMIT. *
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=None TEST=emerge-jacuzzi coreboot
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M 3rdparty/blobs M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c A src/mainboard/google/kukui/panel_jacuzzi.c 4 files changed, 70 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/1
diff --git a/3rdparty/blobs b/3rdparty/blobs index ca6cfcd..d7600dd 160000 --- a/3rdparty/blobs +++ b/3rdparty/blobs @@ -1 +1 @@ -Subproject commit ca6cfcdbe1cdeb38c2622ee2e5236cc4657e3377 +Subproject commit d7600dd8718a076f0f9a89e53968b484254624dc diff --git a/src/mainboard/google/kukui/Makefile.inc b/src/mainboard/google/kukui/Makefile.inc index 727f889..2c35569 100644 --- a/src/mainboard/google/kukui/Makefile.inc +++ b/src/mainboard/google/kukui/Makefile.inc @@ -26,4 +26,5 @@ ramstage-y += memlayout.ld ramstage-$(CONFIG_BOARD_GOOGLE_KRANE) += panel_krane.c ramstage-$(CONFIG_BOARD_GOOGLE_KUKUI) += panel_kukui.c +ramstage-$(CONFIG_BOARD_GOOGLE_JACUZZI) += panel_jacuzzi.c ramstage-y += reset.c diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index b4b9dbd..84a584a 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -75,8 +75,20 @@ gpio_output(GPIO(DISP_PWM), 0); }
+#define GPIO_PP3300_LCM_EN GPIO(SIM2_SIO) /* 35 */ +#define GPIO_PP1200_MIPIBRDG_EN GPIO(BPI_OLAT1) /* 54 */ +#define GPIO_VDDIO_MIPIBRDG_EN GPIO(SIM2_SCLK) /* 37 */ +#define GPIO_LCM_RST_L_1V8 GPIO(LCM_RST) /* 45 */ +#define GPIO_MIPIBRDG_RST_L_1V8 GPIO(BPI_BUS3) /* 73 */ + static void configure_panel_power(void) { + static int done = 0; + + if (done) + return; + done = 1; + if (CONFIG(BOARD_GOOGLE_KUKUI) && board_id() < 2) { gpio_output(GPIO(LCM_RST), 0); udelay(100); @@ -85,6 +97,21 @@ return; }
+ if (CONFIG(BOARD_GOOGLE_JACUZZI)) { + gpio_output(GPIO_PP3300_LCM_EN, 1); + gpio_output(GPIO_VDDIO_MIPIBRDG_EN, 1); + gpio_output(GPIO_MIPIBRDG_RST_L_1V8, 0); + + gpio_output(GPIO_PP1200_MIPIBRDG_EN, 1); + /* Delay for PP1200_MIPIBRDG_EN to stablize */ + mdelay(2); + gpio_output(GPIO_LCM_RST_L_1V8, 1); + gpio_output(GPIO_MIPIBRDG_RST_L_1V8, 1); + /* for level shift(1.8V to 3.3V) on */ + udelay(100); + return; + } + gpio_output(GPIO(LCM_RST), 0); gpio_output(GPIO(BPI_BUS3), 0); gpio_output(GPIO(MISC_BSI_CK_3), 1); @@ -109,6 +136,9 @@ if (CONFIG(BOARD_GOOGLE_KUKUI)) panel_id = board_id() < 2 ? 1 : 0;
+ if (CONFIG(BOARD_GOOGLE_JACUZZI)) + configure_panel_power(); + struct panel_description *panel = get_panel_description(panel_id); if (!panel) { printk(BIOS_ERR, "%s: Panel %d is not supported.\n", diff --git a/src/mainboard/google/kukui/panel_jacuzzi.c b/src/mainboard/google/kukui/panel_jacuzzi.c new file mode 100644 index 0000000..1a8c8eb --- /dev/null +++ b/src/mainboard/google/kukui/panel_jacuzzi.c @@ -0,0 +1,38 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Google Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <drivers/parade/ps8640/ps8640.h> +#include <edid.h> +#include <soc/i2c.h> + +#include "panel.h" + +static struct panel_description jacuzzi_panel = { + .name = "EDP via PS8640", +}; + +struct panel_description *get_panel_description(int panel_id) +{ + /* Jacuzzi uses PS8640 MIPI bridge to find real panel info. */ + u8 i2c_bus = 4, i2c_addr = 8; + mtk_i2c_bus_init(i2c_bus); + + ps8640_init(i2c_bus, i2c_addr); + if (ps8640_get_edid(i2c_bus, i2c_addr, &jacuzzi_panel.edid)) { + printk(BIOS_ERR, "Can't get panel's edid\n"); + return NULL; + } + return &jacuzzi_panel; +}
Hello You-Cheng Syu, Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#2).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
* WIP. DO NOT SUBMIT. *
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=None TEST=emerge-jacuzzi coreboot
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc M src/mainboard/google/kukui/mainboard.c A src/mainboard/google/kukui/panel_jacuzzi.c 3 files changed, 69 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/2
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#6).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
* WIP. DO NOT SUBMIT. *
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=None TEST=emerge-jacuzzi coreboot
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 3 files changed, 70 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/6
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#9).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 2 files changed, 71 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/9
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 9:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34516/9/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_jacuzzi.c:
https://review.coreboot.org/c/coreboot/+/34516/9/src/mainboard/google/kukui/... PS9, Line 53: .init = {{END_OF_TABLE, }}, space required after that close brace '}'
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#10).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 2 files changed, 71 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/10
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34516/10/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_jacuzzi.c:
https://review.coreboot.org/c/coreboot/+/34516/10/src/mainboard/google/kukui... PS10, Line 53: .init = {{END_OF_TABLE, }}, space required after that close brace '}'
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#11).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 2 files changed, 71 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/11
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 11:
missing signed-off line
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 11: Code-Review+1
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 12:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34516/12/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_jacuzzi.c:
https://review.coreboot.org/c/coreboot/+/34516/12/src/mainboard/google/kukui... PS12, Line 75: jacuzzi_panel edid?
panel_description doesn't have 'mode' field.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 12:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34516/12/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_jacuzzi.c:
https://review.coreboot.org/c/coreboot/+/34516/12/src/mainboard/google/kukui... PS12, Line 75: jacuzzi_panel
edid? […]
Done
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#13).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 2 files changed, 78 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/13
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 16: Code-Review+1
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
Patch Set 16:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34516/16/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_jacuzzi.c:
https://review.coreboot.org/c/coreboot/+/34516/16/src/mainboard/google/kukui... PS16, Line 67: struct *edid = &jacuzzi_panel.edid; need consistent spacing around '*' (ctx:WxV)
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#17).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 2 files changed, 78 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/17
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#18).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 2 files changed, 78 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/18
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#19).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 2 files changed, 78 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/19
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#20).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/20
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#21).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/21
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#22).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/22
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#23).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/23
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#24).
Change subject: mb/google/kukui: Add PS8640 based panel for Jacuzzi ......................................................................
mb/google/kukui: Add PS8640 based panel for Jacuzzi
The Jacuzzi has a PS8640 MIPI bridge and will retrieve EDID via EDP dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_jacuzzi.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/24
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#26).
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/26
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#30).
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/30
Hello Yu-Ping Wu, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#33).
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 80 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/33
Hello Yu-Ping Wu, Nicolas Boichat, Jitao Shi, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#39).
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 81 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/39
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
Patch Set 40:
(3 comments)
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... File src/mainboard/google/kukui/Kconfig:
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 49: select DRIVER_PARADE_PS8640 if KUKUI_HAS_PS8640 nit: at that point might as well just do
select DRIVER_PARADE_PS8640 if BOARD_GOOGLE_JACUZZI
here and skip the extra option?
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_ps8640.c:
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 60: 8 nit: I'd write I2C addresses as 0x08 since that's how you usually see them on schematics
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 72: ps8640_panel.edid.mode.name = mode_name; Why does ps8640_get_edid() not do that? Shouldn't we rather add it to that function?
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
Patch Set 42:
(2 comments)
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... File src/mainboard/google/kukui/Kconfig:
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 49: select DRIVER_PARADE_PS8640 if KUKUI_HAS_PS8640
nit: at that point might as well just do […]
We're going to have lots of followers that all need this so I think a HAS is better than explicit board?
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_ps8640.c:
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 60: 8
nit: I'd write I2C addresses as 0x08 since that's how you usually see them on schematics
Done
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
Patch Set 45: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... File src/mainboard/google/kukui/Kconfig:
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 49: select DRIVER_PARADE_PS8640 if KUKUI_HAS_PS8640
We're going to have lots of followers that all need this so I think a HAS is better than explicit bo […]
Well, you need the long 'if BOARD_... || BOARD... || BOARD...' list somewhere anyway, whether you have it right here or above doesn't make a big difference I think. But whatever you think works better is fine. (Might also make sense to add a BASEBOARD_JACUZZI after all if we notice that all those followers look exactly the same).
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
Patch Set 45:
(2 comments)
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... File src/mainboard/google/kukui/Kconfig:
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 49: select DRIVER_PARADE_PS8640 if KUKUI_HAS_PS8640
Well, you need the long 'if BOARD_... || BOARD... || BOARD... […]
Ack
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_ps8640.c:
https://review.coreboot.org/c/coreboot/+/34516/40/src/mainboard/google/kukui... PS40, Line 72: ps8640_panel.edid.mode.name = mode_name;
Why does ps8640_get_edid() not do that? Shouldn't we rather add it to that function?
let's do that in a follow up commit
Hello Yu-Ping Wu, Nicolas Boichat, Jitao Shi, Julius Werner, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#46).
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/46
Hello Yu-Ping Wu, Nicolas Boichat, Jitao Shi, Julius Werner, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#47).
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/47
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
Patch Set 48: Code-Review+2
Hello Yu-Ping Wu, Nicolas Boichat, Jitao Shi, Julius Werner, yongqiang niu, You-Cheng Syu, jitao shi, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34516
to look at the new patch set (#50).
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 75 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/34516/50
Julius Werner has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34516 )
Change subject: mb/google/kukui: Support eDP panels via PS8640 ......................................................................
mb/google/kukui: Support eDP panels via PS8640
Some Kukui variants may have eDP panels connected via a PS8640 MIPI bridge which we may retrieve EDID dynamically.
BUG=b:b:137517228 TEST=emerge-jacuzzi coreboot chromeos-bootimage; boots and see display.
Change-Id: I85aac5255e6a3e6019299670486214ecffbf9801 Signed-off-by: Hung-Te Lin hungte@chromium.org Reviewed-on: https://review.coreboot.org/c/coreboot/+/34516 Reviewed-by: Julius Werner jwerner@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/kukui/Kconfig M src/mainboard/google/kukui/Makefile.inc A src/mainboard/google/kukui/panel_ps8640.c 3 files changed, 75 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/mainboard/google/kukui/Kconfig b/src/mainboard/google/kukui/Kconfig index 863f49e..b4d0fda 100644 --- a/src/mainboard/google/kukui/Kconfig +++ b/src/mainboard/google/kukui/Kconfig @@ -41,6 +41,7 @@ select MAINBOARD_HAS_NATIVE_VGA_INIT select MAINBOARD_FORCE_NATIVE_VGA_INIT select HAVE_LINEAR_FRAMEBUFFER + select DRIVER_PARADE_PS8640 if BOARD_GOOGLE_JACUZZI
config MAINBOARD_DIR string diff --git a/src/mainboard/google/kukui/Makefile.inc b/src/mainboard/google/kukui/Makefile.inc index 3f3d931..e34bff1 100644 --- a/src/mainboard/google/kukui/Makefile.inc +++ b/src/mainboard/google/kukui/Makefile.inc @@ -27,4 +27,5 @@ ramstage-$(CONFIG_BOARD_GOOGLE_KODAMA) += panel_kodama.c ramstage-$(CONFIG_BOARD_GOOGLE_KRANE) += panel_krane.c ramstage-$(CONFIG_BOARD_GOOGLE_KUKUI) += panel_kukui.c +ramstage-$(CONFIG_DRIVER_PARADE_PS8640) += panel_ps8640.c ramstage-y += reset.c diff --git a/src/mainboard/google/kukui/panel_ps8640.c b/src/mainboard/google/kukui/panel_ps8640.c new file mode 100644 index 0000000..d2f65a8 --- /dev/null +++ b/src/mainboard/google/kukui/panel_ps8640.c @@ -0,0 +1,73 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2019 Google Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <console/console.h> +#include <delay.h> +#include <drivers/parade/ps8640/ps8640.h> +#include <edid.h> +#include <gpio.h> +#include <soc/i2c.h> +#include <string.h> + +#include "panel.h" + + +static void power_on_ps8640(void) +{ + gpio_output(GPIO_MIPIBRDG_RST_L_1V8, 0); + gpio_output(GPIO_PP1200_MIPIBRDG_EN, 1); + gpio_output(GPIO_VDDIO_MIPIBRDG_EN, 1); + mdelay(2); + gpio_output(GPIO_MIPIBRDG_PWRDN_L_1V8, 1); + mdelay(2); + gpio_output(GPIO_MIPIBRDG_RST_L_1V8, 1); + gpio_output(GPIO_PP3300_LCM_EN, 1); +} + +static void dummy_power_on(void) +{ + /* The panel has been already powered on when getting panel information + * so we should do nothing here. + */ +} + +static struct panel_description ps8640_panel = { + .power_on = dummy_power_on, + .orientation = LB_FB_ORIENTATION_NORMAL, + .init = { INIT_END_CMD }, +}; + +struct panel_description *get_panel_description(int panel_id) +{ + static char mode_name[64]; + + /* To read panel EDID, we have to first power on PS8640. */ + power_on_ps8640(); + + u8 i2c_bus = 4, i2c_addr = 0x08; + mtk_i2c_bus_init(i2c_bus); + + ps8640_init(i2c_bus, i2c_addr); + struct edid *edid = &ps8640_panel.edid; + if (ps8640_get_edid(i2c_bus, i2c_addr, edid)) { + printk(BIOS_ERR, "Can't get panel's edid\n"); + return NULL; + } + /* TODO(hungte) Move this to ps8640_get_edid */ + snprintf(mode_name, sizeof(mode_name), "%dx%d@%dHz", edid->x_resolution, + edid->y_resolution, edid->mode.refresh); + ps8640_panel.edid.mode.name = mode_name; + return &ps8640_panel; +}