<p>Julius Werner <strong>merged</strong> this change.</p><p><a href="https://review.coreboot.org/21727">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Julius Werner: Looks good to me, approved
  build bot (Jenkins): Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">google/gru: Fix pmu1833_volsel handling<br><br>RK3399 has a pin that can decide whether GPIO port 1 is driven with 1.8V<br>or 3.0V. We thought this mechanism was disabled by default, but it turns<br>out it wasn't. We want to use that pin as an output GPIO on Scarlet so<br>we need to reconfigure the respective SoC controls before we do that. It<br>seems that we also need to explicitly pinmux the pin away from that<br>special function (to normal GPIO) or weird things happen on some boards.<br><br>BUG=b:66534913<br>TEST=Sprinkled several long udelays, poked test points with a<br>multi-meter on Scarlet.<br><br>Change-Id: Ia02cbb4f3b2f14b0d958b84adcddb0c5f4259efa<br>Signed-off-by: Julius Werner <jwerner@chromium.org><br>Reviewed-on: https://review.coreboot.org/21727<br>Tested-by: build bot (Jenkins) <no-reply@coreboot.org><br>---<br>M src/mainboard/google/gru/bootblock.c<br>1 file changed, 6 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/google/gru/bootblock.c b/src/mainboard/google/gru/bootblock.c<br>index a3d3121..162a7e5 100644<br>--- a/src/mainboard/google/gru/bootblock.c<br>+++ b/src/mainboard/google/gru/bootblock.c<br>@@ -48,6 +48,12 @@<br>        if (IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))<br>          write32(&rk3399_grf->io_vsel, RK_SETBITS(1 << 3));<br> <br>+   /* Reconfigure GPIO1 from dynamic voltage selection through GPIO0_B1 to<br>+         hardcoded 1.8V, and change that pin to a normal GPIO. The TRM says<br>+           this is already the power-on reset, but we all know that TRMs lie. */<br>+     write32(&rk3399_pmugrf->soc_con0, RK_SETBITS(1 << 9 | 1 << 8));<br>+   write32(&rk3399_pmugrf->gpio0b_iomux, RK_CLRBITS(3 << 2));<br>+<br>    /* Enable rails powering GPIO blocks, among other things. */<br>  gpio_output(GPIO_P30V_EN, 1);<br>         if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))<br></pre><p>To view, visit <a href="https://review.coreboot.org/21727">change 21727</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/21727"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia02cbb4f3b2f14b0d958b84adcddb0c5f4259efa </div>
<div style="display:none"> Gerrit-Change-Number: 21727 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Julius Werner <jwerner@chromium.org> </div>
<div style="display:none"> Gerrit-Reviewer: David Schneider <dnschneid@chromium.org> </div>
<div style="display:none"> Gerrit-Reviewer: Julius Werner <jwerner@chromium.org> </div>
<div style="display:none"> Gerrit-Reviewer: Lin Huang <hl@rock-chips.com> </div>
<div style="display:none"> Gerrit-Reviewer: Philip Chen <philipchen@chromium.org> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>