Skip to contentSkip to conversation

ARM: dts: omap3-gta04: add line names for modem-related GPIOs

RFC PATCH New Andreas Kemnade 1 participant 1 message Sep 13, 2024

Subsystems (3)
lore
Share & tools
lore

Andreas Kemnade

author maintainer
#0 lore raw

RFC PATCH 1/1 ARM: dts: omap3-gta04: add line names for modem-related GPIOs

There is one GPIO which needs a high pulse to toggle power of the modem. Since GPIO numbering (and even chip numbering) is not stable anymore, make it detectable via gpiofind, so userspace can take care.

There is another reset-out gpio on the A5 which indicates the power state of the modem, make it also available.

Note: there is a full kernel space implementation of this issue:
https://git.goldelico.com/?p=letux-kernel.git;a=blob;f=drivers/misc/wwan-on-off.c;h=768b6f9fa745d7f4d820685748a1b801e731962d;hb=letux-6.11-rc7
which never hit mainline.

CC Linus Walleij <[email protected]>
CC Bartosz Golaszewski <[email protected]>

---
This looks quite ugly and does not even fully solve the problem, since gpioset does not keep that gpio state on exit, so scripts using sysfs-export cannot use it as a drop-in replacement. So probably some daemon sitting on that gpio is needed, if things should be done in userspace.
At least this patch improves the description of the hardware what is what the devicetree is for.

 arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi  | 7 +++++++
 arch/arm/boot/dts/ti/omap/omap3-gta04a5.dts | 4 ++++
 2 files changed, 11 insertions(+)
arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi +7 -0
index 5001c4ea35658..b00d0d092eabc 100644
@@ -469,6 +469,13 @@ OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT | MUX_MODE4) /* rx */
 	};
 };
 
+&gpio6 {
+	gpio-line-names = "", "", "", "", "", "", "", "",
+			  "", "", "", "", "", "", "", "",
+			  "", "", "", "", "", "", "", "",
+			  "", "", "MODEM_EN";
+};
+
 &i2c1 {
 	clock-frequency = <2600000>;
 
arch/arm/boot/dts/ti/omap/omap3-gta04a5.dts +4 -0
index 230f6f4fc6bf8..be7f71d720680 100644
@@ -44,6 +44,10 @@ irda-en-hog {
 	};
 };
 
+&twl_gpio {
+	gpio-line-names = "", "", "", "", "", "", "MODEM_RESET_OUT";
+};
+
 &omap3_pmx_core {
 	bt_pins: bt-pins {
 		pinctrl-single,pins = <
Signature · 1 line
2.39.2