diff mbox series

[v2,1/1] dt-bindings: net: rfkill-gpio: document reset-gpios

Message ID 20240528143009.1033247-1-amadeus@jmu.edu.cn (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series [v2,1/1] dt-bindings: net: rfkill-gpio: document reset-gpios | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Chukun Pan May 28, 2024, 2:30 p.m. UTC
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(+)

Comments

Krzysztof Kozlowski May 28, 2024, 2:36 p.m. UTC | #1
On 28/05/2024 16:30, Chukun Pan wrote:
> Some 5G WWAN modems have multiple gpio controls. When using rfkill command

Which ones? Can we see the dastasheet or schematics? People claim
various things (like device reset-gpios being part of controller...).

> 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#


Best regards,
Krzysztof
Chukun Pan May 28, 2024, 2:52 p.m. UTC | #2
> Which ones? Can we see the dastasheet or schematics? People claim
> various things (like device reset-gpios being part of controller...).

Unfortunately I didn't find a public datasheet. This is a screenshot of
the GosunCn GM800 datasheet: https://imgur.com/a/4ecCGiy

Thanks,
Chukun
Krzysztof Kozlowski May 28, 2024, 3:08 p.m. UTC | #3
On 28/05/2024 16:52, Chukun Pan wrote:
>> Which ones? Can we see the dastasheet or schematics? People claim
>> various things (like device reset-gpios being part of controller...).
> 
> Unfortunately I didn't find a public datasheet. This is a screenshot of
> the GosunCn GM800 datasheet: https://imgur.com/a/4ecCGiy
> 

Thanks. I am asking because you might be hiding behind rfkill something
which is a PCI or USB property... anyway:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
diff mbox series

Patch

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>;
+    };