[RFC PATCH] ARM: dts: omap3-gta04: add line names for modem-related GPIOs
From: Andreas Kemnade
Date: Fri Sep 13 2024 - 07:44:56 EST
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.
Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
CC: linux-gpio@xxxxxxxxxxxxxxx
CC: Linus Walleij <linus.walleij@xxxxxxxxxx>
CC: Bartosz Golaszewski <brgl@xxxxxxxx>
---
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(+)
diff --git a/arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi b/arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi
index 5001c4ea35658..b00d0d092eabc 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi
@@ -469,6 +469,13 @@ OMAP3630_CORE2_IOPAD(0x25e4, PIN_INPUT | MUX_MODE4) /* rx */
};
};
+&gpio6 {
+ gpio-line-names = "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "MODEM_EN";
+};
+
&i2c1 {
clock-frequency = <2600000>;
diff --git a/arch/arm/boot/dts/ti/omap/omap3-gta04a5.dts b/arch/arm/boot/dts/ti/omap/omap3-gta04a5.dts
index 230f6f4fc6bf8..be7f71d720680 100644
--- a/arch/arm/boot/dts/ti/omap/omap3-gta04a5.dts
+++ b/arch/arm/boot/dts/ti/omap/omap3-gta04a5.dts
@@ -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 = <
--
2.39.2