Hello Lin Huang, David Schneider, Philip Chen,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/21727
to look at the new patch set (#2).
Change subject: google/gru: Fix pmu1833_volsel handling
......................................................................
google/gru: Fix pmu1833_volsel handling
RK3399 has a pin that can decide whether GPIO port 1 is driven with 1.8V
or 3.0V. We thought this mechanism was disabled by default, but it turns
out it wasn't. We want to use that pin as an output GPIO on Scarlet so
we need to reconfigure the respective SoC controls before we do that. It
seems that we also need to explicitly pinmux the pin away from that
special function (to normal GPIO) or weird things happen on some boards.
BUG=b:66534913
TEST=Sprinkled several long udelays, poked test points with a
multi-meter on Scarlet.
Change-Id: Ia02cbb4f3b2f14b0d958b84adcddb0c5f4259efa
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/mainboard/google/gru/bootblock.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/21727/2
--
To view, visit https://review.coreboot.org/21727
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia02cbb4f3b2f14b0d958b84adcddb0c5f4259efa
Gerrit-Change-Number: 21727
Gerrit-PatchSet: 2
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: David Schneider <dnschneid(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Lin Huang <hl(a)rock-chips.com>
Gerrit-Reviewer: Philip Chen <philipchen(a)chromium.org>
Julius Werner has posted comments on this change. ( https://review.coreboot.org/21727 )
Change subject: google/gru: Fix pmu1833_volsel handling
......................................................................
Patch Set 1: Code-Review+2
+2ing myself since I'm the only one who knows this code and has commit rights. If anyone has objections please speak up, otherwise I'll merge in a few days.
--
To view, visit https://review.coreboot.org/21727
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia02cbb4f3b2f14b0d958b84adcddb0c5f4259efa
Gerrit-Change-Number: 21727
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: David Schneider <dnschneid(a)chromium.org>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Lin Huang <hl(a)rock-chips.com>
Gerrit-Reviewer: Philip Chen <philipchen(a)chromium.org>
Gerrit-Comment-Date: Wed, 27 Sep 2017 23:42:07 +0000
Gerrit-HasComments: No
Hello Lin Huang, David Schneider, Philip Chen,
I'd like you to do a code review. Please visit
https://review.coreboot.org/21727
to review the following change.
Change subject: google/gru: Fix pmu1833_volsel handling
......................................................................
google/gru: Fix pmu1833_volsel handling
RK3399 has a pin that can decide whether GPIO port 1 is driven with 1.8V
or 3.0V. We thought this mechanism was disabled by default, but it turns
out it wasn't. We want to use that pin as an output GPIO on Scarlet so
we need to reconfigure the respective SoC controls before we do that. It
seems that we also need to explicitly pinmux the pin away from that
special function (to normal GPIO) or weird things happen on some boards.
Change-Id: Ia02cbb4f3b2f14b0d958b84adcddb0c5f4259efa
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
M src/mainboard/google/gru/bootblock.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/21727/1
diff --git a/src/mainboard/google/gru/bootblock.c b/src/mainboard/google/gru/bootblock.c
index a3d3121..162a7e5 100644
--- a/src/mainboard/google/gru/bootblock.c
+++ b/src/mainboard/google/gru/bootblock.c
@@ -48,6 +48,12 @@
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))
write32(&rk3399_grf->io_vsel, RK_SETBITS(1 << 3));
+ /* Reconfigure GPIO1 from dynamic voltage selection through GPIO0_B1 to
+ hardcoded 1.8V, and change that pin to a normal GPIO. The TRM says
+ this is already the power-on reset, but we all know that TRMs lie. */
+ write32(&rk3399_pmugrf->soc_con0, RK_SETBITS(1 << 9 | 1 << 8));
+ write32(&rk3399_pmugrf->gpio0b_iomux, RK_CLRBITS(3 << 2));
+
/* Enable rails powering GPIO blocks, among other things. */
gpio_output(GPIO_P30V_EN, 1);
if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))
--
To view, visit https://review.coreboot.org/21727
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia02cbb4f3b2f14b0d958b84adcddb0c5f4259efa
Gerrit-Change-Number: 21727
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: David Schneider <dnschneid(a)chromium.org>
Gerrit-Reviewer: Lin Huang <hl(a)rock-chips.com>
Gerrit-Reviewer: Philip Chen <philipchen(a)chromium.org>