lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240913110125.753142-1-andreas@kemnade.info>
Date: Fri, 13 Sep 2024 13:01:25 +0200
From: Andreas Kemnade <andreas@...nade.info>
To: tony@...mide.com,
	robh@...nel.org,
	krzk+dt@...nel.org,
	conor+dt@...nel.org,
	linux-omap@...r.kernel.org,
	devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	hns@...delico.com
Cc: Andreas Kemnade <andreas@...nade.info>,
	linux-gpio@...r.kernel.org,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>
Subject: [RFC PATCH] 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.

Signed-off-by: Andreas Kemnade <andreas@...nade.info>
CC: linux-gpio@...r.kernel.org
CC: Linus Walleij <linus.walleij@...aro.org>
CC: Bartosz Golaszewski <brgl@...ev.pl>
---
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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ