jitao shi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
drivers/analogix: add MIPI rx flow
For some special platform, MIPI tx signal may stably output after ANX7625 linux driver enable MIPI rx module. Thus, driver needs wait some time till MIPI tx signal became stable. Based on the test result, this patch delay maximum 800ms before release MIPI rx module.
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I6123a030dafb74b9da4e4a56adce3b5a0360d315 --- M src/drivers/analogix/anx7625/anx7625.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/47381/1
diff --git a/src/drivers/analogix/anx7625/anx7625.c b/src/drivers/analogix/anx7625/anx7625.c index 9f0b2e1..da72a2a 100644 --- a/src/drivers/analogix/anx7625/anx7625.c +++ b/src/drivers/analogix/anx7625/anx7625.c @@ -812,6 +812,23 @@ dt->vactive, dt->vsync_len, dt->vfront_porch, dt->vback_porch); }
+static void anx7625_mipi_rx_init(uint8_t bus) +{ + ANXINFO("***** mipi rx, dp tx initial start.\n"); + + mdelay(200); + + /* reset MIPI-DSI RX digital block */ + anx7625_reg_write(bus, RX_P1_ADDR, 0x0f, 0x00); + + mdelay(600); + + /* release MIPI-DSI RX digital block */ + anx7625_reg_write(bus, RX_P1_ADDR, 0x0f, 0x80); + + ANXINFO("***** mipi rx, dp tx initial finish.\n"); +} + int anx7625_dp_start(uint8_t bus, const struct edid *edid) { int ret; @@ -825,6 +842,8 @@ else ANXINFO("MIPI phy setup OK.\n");
+ anx7625_mipi_rx_init(bus); + return ret; }
Chen-Tsung Hsieh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Patch Set 2:
(1 comment)
BUG=b:168728787
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@13 PS2, Line 13: BUG=b:168728787
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Patch Set 2:
(5 comments)
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@9 PS2, Line 9: special platform platforms
BTW, is this related to panel? If yes then you should replace 'platform' by 'panel'.
And if this is specific to some platform (board), we should refactor so the driver can take an extra parameter for delay/wait.
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@10 PS2, Line 10: linux driver why is this related to linux driver?
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@10 PS2, Line 10: needs wait needs to wait
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@11 PS2, Line 11: till until
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@11 PS2, Line 11: Based on the test well... a random 800ms sounds unreasonable. I think we need more data, either from data sheet or some where else, to explain why 800ms is the right choice.
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Patch Set 2:
(7 comments)
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@10 PS2, Line 10: enable enables
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@12 PS2, Line 12: delay delays
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@12 PS2, Line 12: release releasing
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... File src/drivers/analogix/anx7625/anx7625.c:
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 817: ***** I don't see similar patterns in this file. Would you mind removing it? Or even remove the entire message.
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 822: anx7625_reg_write Please handle the return value.
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 827: anx7625_reg_write Please handle the return value.
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 829: ANXINFO("***** mipi rx, dp tx initial finish.\n"); Same.
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47381
to look at the new patch set (#3).
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
drivers/analogix: add MIPI rx flow
For some special platform, MIPI tx signal may stably output after ANX7625 enable MIPI rx module. Thus, driver needs to wait some time untill MIPI tx signal became stable. Based on the test result, this patch delays maximum 800ms before releasing MIPI rx module.
BUG=b:168728787 Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I6123a030dafb74b9da4e4a56adce3b5a0360d315 --- M src/drivers/analogix/anx7625/anx7625.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/47381/3
Jitao Shi has uploaded a new patch set (#5) to the change originally created by jitao shi. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
drivers/analogix: add MIPI rx flow
For some special platforms, MIPI tx signal may stably output after ANX7625 enables MIPI rx module. Thus, driver needs to wait some time untill MIPI tx signal became stable. Based on the test result, this patch delays maximum 800ms before releasing MIPI rx module.
BUG=b:168728787 Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I6123a030dafb74b9da4e4a56adce3b5a0360d315 --- M src/drivers/analogix/anx7625/anx7625.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/47381/5
Jitao Shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Patch Set 5:
(7 comments)
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@10 PS2, Line 10: needs wait
needs to wait
Done
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@10 PS2, Line 10: linux driver
why is this related to linux driver?
Done
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@10 PS2, Line 10: enable
enables
Done
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@11 PS2, Line 11: till
until
Done
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@12 PS2, Line 12: release
releasing
Done
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@12 PS2, Line 12: delay
delays
Done
https://review.coreboot.org/c/coreboot/+/47381/2//COMMIT_MSG@13 PS2, Line 13:
BUG=b:168728787
Done
Jitao Shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Patch Set 5:
(4 comments)
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... File src/drivers/analogix/anx7625/anx7625.c:
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 817: *****
I don't see similar patterns in this file. […]
Done
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 822: anx7625_reg_write
Please handle the return value.
Done
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 827: anx7625_reg_write
Please handle the return value.
Done
https://review.coreboot.org/c/coreboot/+/47381/2/src/drivers/analogix/anx762... PS2, Line 829: ANXINFO("***** mipi rx, dp tx initial finish.\n");
Same.
Done
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47381/5/src/drivers/analogix/anx762... File src/drivers/analogix/anx7625/anx7625.c:
https://review.coreboot.org/c/coreboot/+/47381/5/src/drivers/analogix/anx762... PS5, Line 819: mdelay(200); 200/600ms "from test results" does not sound reasonable - will this be different when we have other SOCs, or other panels? Can you check with Analogic to figure out how the numbers should be decided, and document/comment that here?
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Patch Set 5:
(4 comments)
https://review.coreboot.org/c/coreboot/+/47381/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47381/5//COMMIT_MSG@9 PS5, Line 9: special Remove this.
https://review.coreboot.org/c/coreboot/+/47381/5//COMMIT_MSG@11 PS5, Line 11: became becomes
https://review.coreboot.org/c/coreboot/+/47381/5//COMMIT_MSG@11 PS5, Line 11: untill until
https://review.coreboot.org/c/coreboot/+/47381/5/src/drivers/analogix/anx762... File src/drivers/analogix/anx7625/anx7625.c:
https://review.coreboot.org/c/coreboot/+/47381/5/src/drivers/analogix/anx762... PS5, Line 821: ret = anx7625_reg_write(bus, RX_P1_ADDR, 0x0f, 0x00); : if (ret < 0) Simply
if (anx7625_reg_write(...) < 0)
Then local variable 'ret' can be removed, unless you want to print the return value like this:
ANXERROR("...%d\n", ret);
jitao shi has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/47381 )
Change subject: drivers/analogix: add MIPI rx flow ......................................................................
Abandoned