diff mbox series

[v2,1/2] dt-bindings: net: bluetooth: nxp: Add support to set BD address

Message ID 20250114133548.2362038-1-neeraj.sanjaykale@nxp.com
State New
Headers show
Series [v2,1/2] dt-bindings: net: bluetooth: nxp: Add support to set BD address | expand

Commit Message

Neeraj Sanjay Kale Jan. 14, 2025, 1:35 p.m. UTC
This adds a new optional device tree property local-bd-address to allow
user to set custom BD address for NXP chipsets.

Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
---
v2: Add allOf and unevaluatedProperties: false (Krzysztof)
--- 
 .../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Johan Korsnes Jan. 14, 2025, 1:53 p.m. UTC | #1
On 1/14/25 2:35 PM, Neeraj Sanjay Kale wrote:
> This adds support for setting BD address during hci registration. NXP
> FW does not allow vendor commands unless it receives a reset command
> after FW download and initialization done.
> As a workaround, the .set_bdaddr callback function will first send the
> HCI reset command, followed by the actual vendor command to set BD
> address.
>

Hi Neeraj,

If NXP firmware does not allow vendor commands prior to this reset, would
it not be better to perform this reset during probe/init?

Kind regards,
Johan
Neeraj Sanjay Kale Jan. 14, 2025, 2:21 p.m. UTC | #2
Hi Krzysztof,

Thank you for the review.

If I understood it correctly, local-bd-address property would be picked from bluetooth-controller.yaml ref. Updated commit msg accordingly.

Please let me know if any further comments.

Thanks,
Neeraj.

> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Tuesday, January 14, 2025 7:09 PM
> To: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>; marcel@holtmann.org;
> luiz.dentz@gmail.com; robh@kernel.org; krzk+dt@kernel.org;
> conor+dt@kernel.org
> Cc: linux-bluetooth@vger.kernel.org; linux-kernel@vger.kernel.org;
> devicetree@vger.kernel.org; Amitkumar Karwar
> <amitkumar.karwar@nxp.com>; Sherry Sun <sherry.sun@nxp.com>; Luke
> Wang <ziniu.wang_1@nxp.com>; johan.korsnes@remarkable.no;
> kristian.krohn@remarkable.no; Manjeet Gupta <manjeet.gupta@nxp.com>
> Subject: [EXT] Re: [PATCH v2 1/2] dt-bindings: net: bluetooth: nxp: Add
> support to set BD address
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report
> this email' button
>
>
> On 14/01/2025 14:35, Neeraj Sanjay Kale wrote:
> > This adds a new optional device tree property local-bd-address to
> > allow
>
> Please do not use "This commit/patch/change", but imperative mood. See
> longer explanation here:
> https://elixir.b/
> ootlin.com%2Flinux%2Fv5.17.1%2Fsource%2FDocumentation%2Fprocess%2F
> submitting-
> patches.rst%23L95&data=05%7C02%7Cneeraj.sanjaykale%40nxp.com%7C84b
> bc484675244ce050308dd34a0d9ac%7C686ea1d3bc2b4c6fa92cd99c5c301635
> %7C0%7C0%7C638724587636722337%7CUnknown%7CTWFpbGZsb3d8eyJFb
> XB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWF
> pbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=EH9V57j1ClNq7VMsUt%2
> BzcZ3sisbeSIrOCogGt02Ca1M%3D&reserved=0
>
> > user to set custom BD address for NXP chipsets.
>
>
> >
> > Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> > ---
> > v2: Add allOf and unevaluatedProperties: false (Krzysztof)
> > ---
> >  .../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | 8
> > +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git
> > a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> > b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> > index 0a2d7baf5db3..5d75a45cac14 100644
> > ---
> > a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
> > +++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.y
> > +++ aml
> > @@ -17,6 +17,9 @@ description:
> >  maintainers:
> >    - Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> >
> > +allOf:
> > +  - $ref: bluetooth-controller.yaml#
> > +
> >  properties:
> >    compatible:
> >      enum:
> > @@ -40,10 +43,12 @@ properties:
> >        Host-To-Chip power save mechanism is driven by this GPIO
> >        connected to BT_WAKE_IN pin of the NXP chipset.
> >
> > +  local-bd-address: true
>
> In case I was not clear: drop. And rephrase the commit msg to reflect this.
>
> Best regards,
> Krzysztof
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 0a2d7baf5db3..5d75a45cac14 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
@@ -17,6 +17,9 @@  description:
 maintainers:
   - Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
 
+allOf:
+  - $ref: bluetooth-controller.yaml#
+
 properties:
   compatible:
     enum:
@@ -40,10 +43,12 @@  properties:
       Host-To-Chip power save mechanism is driven by this GPIO
       connected to BT_WAKE_IN pin of the NXP chipset.
 
+  local-bd-address: true
+
 required:
   - compatible
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -54,5 +59,6 @@  examples:
             fw-init-baudrate = <3000000>;
             firmware-name = "uartuart8987_bt_v0.bin";
             device-wakeup-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+            local-bd-address = [11 22 33 44 55 66];
         };
     };