* [PATCH] arm64: dts: qcom: sc7280-herobrine: Fix PCIe regulator glitch at bootup
@ 2022-03-10 21:04 Douglas Anderson
2022-03-10 22:34 ` Matthias Kaehlcke
2022-03-10 22:49 ` Stephen Boyd
0 siblings, 2 replies; 3+ messages in thread
From: Douglas Anderson @ 2022-03-10 21:04 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Stephen Boyd, Matthias Kaehlcke, Douglas Anderson, Andy Gross,
Rob Herring, devicetree, linux-arm-msm, linux-kernel
While scoping signals, we found that the PCIe signals weren't
compliant at bootup. Specifically, the bootloader was setting up PCIe
and leaving it configured, then jumping to the kernel. The kernel was
turning off the regulator while leaving the PCIe clock running, which
was a violation.
In the regulator bindings (and the Linux kernel driver that uses
them), there's currently no way to specify that a GPIO-controlled
regulator should keep its state at bootup. You've got to pick either
"on" or "off". Let's switch it so that the PCIe regulator defaults to
"on" instead of "off". This should be a much safer way to go and
avoids the timing violation. The regulator will still be turned off
later if there are no users.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi
index dc17f2079695..042a4a59e3dc 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi
@@ -178,6 +178,13 @@ pp3300_ssd: pp3300-ssd-regulator {
pinctrl-names = "default";
pinctrl-0 = <&ssd_en>;
+ /*
+ * The bootloaer may have left PCIe configured. Powering this
+ * off while the PCIe clocks are still running isn't great,
+ * so it's better to default to this regulator being on.
+ */
+ regulator-boot-on;
+
vin-supply = <&pp3300_z1>;
};
--
2.35.1.723.g4982287a31-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: qcom: sc7280-herobrine: Fix PCIe regulator glitch at bootup
2022-03-10 21:04 [PATCH] arm64: dts: qcom: sc7280-herobrine: Fix PCIe regulator glitch at bootup Douglas Anderson
@ 2022-03-10 22:34 ` Matthias Kaehlcke
2022-03-10 22:49 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Matthias Kaehlcke @ 2022-03-10 22:34 UTC (permalink / raw)
To: Douglas Anderson
Cc: Bjorn Andersson, Stephen Boyd, Andy Gross, Rob Herring,
devicetree, linux-arm-msm, linux-kernel
On Thu, Mar 10, 2022 at 01:04:34PM -0800, Douglas Anderson wrote:
> While scoping signals, we found that the PCIe signals weren't
> compliant at bootup. Specifically, the bootloader was setting up PCIe
> and leaving it configured, then jumping to the kernel. The kernel was
> turning off the regulator while leaving the PCIe clock running, which
> was a violation.
>
> In the regulator bindings (and the Linux kernel driver that uses
> them), there's currently no way to specify that a GPIO-controlled
> regulator should keep its state at bootup. You've got to pick either
> "on" or "off". Let's switch it so that the PCIe regulator defaults to
> "on" instead of "off". This should be a much safer way to go and
> avoids the timing violation. The regulator will still be turned off
> later if there are no users.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: qcom: sc7280-herobrine: Fix PCIe regulator glitch at bootup
2022-03-10 21:04 [PATCH] arm64: dts: qcom: sc7280-herobrine: Fix PCIe regulator glitch at bootup Douglas Anderson
2022-03-10 22:34 ` Matthias Kaehlcke
@ 2022-03-10 22:49 ` Stephen Boyd
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2022-03-10 22:49 UTC (permalink / raw)
To: Bjorn Andersson, Douglas Anderson
Cc: Matthias Kaehlcke, Andy Gross, Rob Herring, devicetree,
linux-arm-msm, linux-kernel
Quoting Douglas Anderson (2022-03-10 13:04:34)
> While scoping signals, we found that the PCIe signals weren't
> compliant at bootup. Specifically, the bootloader was setting up PCIe
> and leaving it configured, then jumping to the kernel. The kernel was
> turning off the regulator while leaving the PCIe clock running, which
> was a violation.
>
> In the regulator bindings (and the Linux kernel driver that uses
> them), there's currently no way to specify that a GPIO-controlled
> regulator should keep its state at bootup. You've got to pick either
> "on" or "off". Let's switch it so that the PCIe regulator defaults to
> "on" instead of "off". This should be a much safer way to go and
> avoids the timing violation. The regulator will still be turned off
> later if there are no users.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-10 22:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-10 21:04 [PATCH] arm64: dts: qcom: sc7280-herobrine: Fix PCIe regulator glitch at bootup Douglas Anderson
2022-03-10 22:34 ` Matthias Kaehlcke
2022-03-10 22:49 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox