The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Johan Korsnes <johan.korsnes@remarkable.no>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>,
	"marcel@holtmann.org" <marcel@holtmann.org>,
	"luiz.dentz@gmail.com" <luiz.dentz@gmail.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@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>,
	"kristian.krohn@remarkable.no" <kristian.krohn@remarkable.no>,
	Manjeet Gupta <manjeet.gupta@nxp.com>
Subject: Re: [PATCH v2 2/2] Bluetooth: btnxpuart: Add support for set BD address
Date: Tue, 14 Jan 2025 15:09:32 +0100	[thread overview]
Message-ID: <30b09e71-6790-4ab2-8945-e011996ee85f@remarkable.no> (raw)
In-Reply-To: <PA4PR04MB9687E566EEC90DEF5FB44A2CE7182@PA4PR04MB9687.eurprd04.prod.outlook.com>

On 1/14/25 3:07 PM, Neeraj Sanjay Kale wrote:
> 
> Hi Johan,
> 
>>
>> 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?
>>
> HCI reset is already part of kernel init sequence hci_init0_sync().
> However, .set_bdaddr() is called immediately after FW download is complete, but before this init sequence.
> 
> Also, if local-bd-address property is not defined in the DTB, sending HCI reset command in probe does not add any value.
> 
> With current implementation, if local-bd-address is defined, driver sends HCI reset, followed by set BD address vendor command, and kernel continues with the HCI init sequence.
>

Thanks for clarifying, that makes sense :-)

Kind regards,
Johan

> Thanks,
> Neeraj


  reply	other threads:[~2025-01-14 14:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-14 13:35 [PATCH v2 1/2] dt-bindings: net: bluetooth: nxp: Add support to set BD address Neeraj Sanjay Kale
2025-01-14 13:35 ` [PATCH v2 2/2] Bluetooth: btnxpuart: Add support for " Neeraj Sanjay Kale
2025-01-14 13:53   ` Johan Korsnes
2025-01-14 14:07     ` Neeraj Sanjay Kale
2025-01-14 14:09       ` Johan Korsnes [this message]
2025-01-14 13:39 ` [PATCH v2 1/2] dt-bindings: net: bluetooth: nxp: Add support to " Krzysztof Kozlowski
2025-01-14 14:21   ` Neeraj Sanjay Kale

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30b09e71-6790-4ab2-8945-e011996ee85f@remarkable.no \
    --to=johan.korsnes@remarkable.no \
    --cc=amitkumar.karwar@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kristian.krohn@remarkable.no \
    --cc=krzk+dt@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=manjeet.gupta@nxp.com \
    --cc=marcel@holtmann.org \
    --cc=neeraj.sanjaykale@nxp.com \
    --cc=robh@kernel.org \
    --cc=sherry.sun@nxp.com \
    --cc=ziniu.wang_1@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox