Skip to contentSkip to conversation

arm: dts: verdin-am62: use gpio-hog for sleep moci

PATCH In review Stefan Eichenberger 2 participants 2 messages Apr 17, 2024 – Apr 29, 2024 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: verdin-am62: use gpio-hog for sleep moci

From: Stefan Eichenberger <[email protected]>

In Linux, we allow sleep moci to be turned off when the carrier board supports it and the system is in suspend. In U-Boot, however, we want the sleep moci to be always on. So we use a gpio hog and disable the regulator. This change is necessary because we switched to upstream device tree files with commit c07bba7a2c7e ("verdin-am62: move verdin am62 to OF_UPSTREAM"). A recent upstream patch removes the gpio hog from the Linux device tree, so we need to add it to the u-boot dtsi. The following patch will remove the gpio hog from the Linux device tree:
https://lore.kernel.org/linux-devicetree/[email protected]/
The U-Boot patch can be applied without it and will not break the build.

---
 arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
arch/arm/dts/k3-am625-verdin-wifi-dev-u-boot.dtsi +8 -4
index 7fe7ae4154..9ecb305274 100644
@@ -91,6 +91,14 @@
 
 &main_gpio0 {
 	bootph-all;
+
+	ctrl-sleep-moci-hog {
+		bootph-all;
+		gpio-hog;
+		gpios = <31 GPIO_ACTIVE_HIGH>;
+		line-name = "CTRL_SLEEP_MOCI#";
+		output-high;
+	};
 };
 
 /* On-module I2C - PMIC_I2C */
@@ -165,10 +173,6 @@
 	status = "disabled";
 };
 
-&verdin_ctrl_sleep_moci {
-	bootph-all;
-};
-
 /* Verdin UART_2 */
 &wkup_uart0 {
 	bootph-all;
Signature · 1 line
2.40.1
#1 lore raw
Quoted 11 lines · Stefan Eichenberger

In Linux, we allow sleep moci to be turned off when the carrier board supports it and the system is in suspend. In U-Boot, however, we want the sleep moci to be always on. So we use a gpio hog and disable the regulator. This change is necessary because we switched to upstream device tree files with commit c07bba7a2c7e ("verdin-am62: move verdin am62 to OF_UPSTREAM"). A recent upstream patch removes the gpio hog from the Linux device tree, so we need to add it to the u-boot dtsi. The following patch will remove the gpio hog from the Linux device tree:
https://lore.kernel.org/linux-devicetree/[email protected]/
The U-Boot patch can be applied without it and will not break the build.

Quoted 1 line

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom