netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] dt-bindings: net: rfkill-gpio: document reset-gpios
@ 2024-05-28 14:30 Chukun Pan
  2024-05-28 14:35 ` [PATCH v2 0/1] " Chukun Pan
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Chukun Pan @ 2024-05-28 14:30 UTC (permalink / raw)
  To: Philipp Zabel, Johannes Berg
  Cc: Krzysztof Kozlowski, Conor Dooley, Rob Herring, devicetree,
	netdev, Chukun Pan

Some 5G WWAN modems have multiple gpio controls. When using rfkill command
to manage it, we need to at least change the status of reset and shutdown
gpios at the same time. Also, it might be incorrect to put the reset gpio
at usb when the module is connected via USB M2 slot, there may be other
devices connected under some USB node, but the reset gpio is only used for
the WWAN module. So document the reset-gpios to rfkill-gpio as an optional
property and add it to a new example.

For example:
  - reset: modem Reset#
  - shutdown: modem WWAN_DISABLE# or FULL_CARD_POWER_OFF#

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
 .../devicetree/bindings/net/rfkill-gpio.yaml       | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
index 9630c8466fac..7f297efdc976 100644
--- a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
+++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml
@@ -29,6 +29,9 @@ properties:
       - wlan
       - wwan
 
+  reset-gpios:
+    maxItems: 1
+
   shutdown-gpios:
     maxItems: 1
 
@@ -49,3 +52,14 @@ examples:
         radio-type = "wlan";
         shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>;
     };
+
+  - | # 5G WWAN modem
+    #include <dt-bindings/gpio/gpio.h>
+
+    rfkill {
+        compatible = "rfkill-gpio";
+        label = "rfkill-modem";
+        radio-type = "wwan";
+        reset-gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
+        shutdown-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-07-15 11:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 14:30 [PATCH v2 1/1] dt-bindings: net: rfkill-gpio: document reset-gpios Chukun Pan
2024-05-28 14:35 ` [PATCH v2 0/1] " Chukun Pan
2024-05-28 14:36   ` Krzysztof Kozlowski
2024-05-28 14:36 ` [PATCH v2 1/1] " Krzysztof Kozlowski
2024-05-28 14:52   ` Chukun Pan
2024-05-28 15:08     ` Krzysztof Kozlowski
2025-07-11  4:37 ` Shengyu Qu
2025-07-11  7:14   ` Johannes Berg
2025-07-14  5:07     ` Shengyu Qu
2025-07-14  5:43     ` Krzysztof Kozlowski
2025-07-14  4:00   ` Chukun Pan
2025-07-15 11:29 ` Shengyu Qu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).