diff mbox series

[v2,1/2] dt-bindings: net: bluetooth: nxp: Add support for power save feature using GPIO

Message ID 20241003154507.537363-2-neeraj.sanjaykale@nxp.com
State Superseded
Headers show
Series Bluetooth: btnxpuart: Add GPIO mechanism to | expand

Commit Message

Neeraj Sanjay Kale Oct. 3, 2024, 3:45 p.m. UTC
This adds a new optional device tree property h2c-ps-gpios, which specifies
the GPIO connected to BT_WAKE_IN pin of the NXP chipset.

If this property is defined, the driver will use this GPIO for driving chip
into sleep/wakeup state, else use the UART break signal by default.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
---
v2: Rephrase description and use "-gpios". (Krzysztof, Rob)
---
 .../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Krzysztof Kozlowski Oct. 4, 2024, 6:37 a.m. UTC | #1
On Thu, Oct 03, 2024 at 09:15:06PM +0530, Neeraj Sanjay Kale wrote:
> This adds a new optional device tree property h2c-ps-gpios, which specifies
> the GPIO connected to BT_WAKE_IN pin of the NXP chipset.
> 
> If this property is defined, the driver will use this GPIO for driving chip
> into sleep/wakeup state, else use the UART break signal by default.
> 
> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> ---
> v2: Rephrase description and use "-gpios". (Krzysztof, Rob)
> ---
>  .../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> index 37a65badb448..cd8236eb31de 100644
> --- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> +++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> @@ -34,6 +34,12 @@ properties:
>    firmware-name:
>      maxItems: 1
>  
> +  h2c-ps-gpios:
> +    maxItems: 1
> +    description:
> +      Host-To-Chip power save mechanism is driven by this GPIO
> +      connected to BT_WAKE_IN pin of the NXP chipset.

So this should be wakeup-gpios or device-wakeup-gpios?

Best regards,
Krzysztof
Neeraj Sanjay Kale Oct. 4, 2024, 7:36 a.m. UTC | #2
Hi Krzysztof,

Thank you for the review.

> 
> On Thu, Oct 03, 2024 at 09:15:06PM +0530, Neeraj Sanjay Kale wrote:
> > This adds a new optional device tree property h2c-ps-gpios, which
> > specifies the GPIO connected to BT_WAKE_IN pin of the NXP chipset.
> >
> > If this property is defined, the driver will use this GPIO for driving
> > chip into sleep/wakeup state, else use the UART break signal by default.
> >
> > Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> > ---
> > v2: Rephrase description and use "-gpios". (Krzysztof, Rob)
> > ---
> >  .../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | 8
> > ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> > b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> > index 37a65badb448..cd8236eb31de 100644
> > ---
> > a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> > +++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.y
> > +++ aml
> > @@ -34,6 +34,12 @@ properties:
> >    firmware-name:
> >      maxItems: 1
> >
> > +  h2c-ps-gpios:
> > +    maxItems: 1
> > +    description:
> > +      Host-To-Chip power save mechanism is driven by this GPIO
> > +      connected to BT_WAKE_IN pin of the NXP chipset.
> 
> So this should be wakeup-gpios or device-wakeup-gpios?
> 
Yes, if that's the preferred name, let me quickly change it to device-wakeup-gpios.
There may be a different feature implementation in near future for host wake-up. So wakeup-gpios may seem confusing then.

Thanks,
Neeraj
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
index 37a65badb448..cd8236eb31de 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
@@ -34,6 +34,12 @@  properties:
   firmware-name:
     maxItems: 1
 
+  h2c-ps-gpios:
+    maxItems: 1
+    description:
+      Host-To-Chip power save mechanism is driven by this GPIO
+      connected to BT_WAKE_IN pin of the NXP chipset.
+
 required:
   - compatible
 
@@ -41,10 +47,12 @@  additionalProperties: false
 
 examples:
   - |
+    #include <dt-bindings/gpio/gpio.h>
     serial {
         bluetooth {
             compatible = "nxp,88w8987-bt";
             fw-init-baudrate = <3000000>;
             firmware-name = "uartuart8987_bt_v0.bin";
+            h2c-ps-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
         };
     };