From: Greg KH <gregkh@linuxfoundation.org>
To: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, marcel@holtmann.org,
johan.hedberg@gmail.com, luiz.dentz@gmail.com,
jirislaby@kernel.org, alok.a.tiwari@oracle.com, hdanton@sina.com,
ilpo.jarvinen@linux.intel.com, leon@kernel.org,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org,
linux-serial@vger.kernel.org, amitkumar.karwar@nxp.com,
rohit.fule@nxp.com, sherry.sun@nxp.com
Subject: Re: [PATCH v3 3/3] Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets
Date: Mon, 13 Feb 2023 16:15:56 +0100 [thread overview]
Message-ID: <Y+pULHm2Qys738Zg@kroah.com> (raw)
In-Reply-To: <20230213145432.1192911-4-neeraj.sanjaykale@nxp.com>
On Mon, Feb 13, 2023 at 08:24:32PM +0530, Neeraj Sanjay Kale wrote:
> This adds a driver based on serdev driver for the NXP BT serial
> protocol based on running H:4, which can enable the built-in
> Bluetooth device inside a generic NXP BT chip.
>
> This driver has Power Save feature that will put the chip into
> sleep state whenever there is no activity for 2000ms, and will
> be woken up when any activity is to be initiated over UART.
>
> This driver enables the power save feature by default by sending
> the vendor specific commands to the chip during setup.
>
> During setup, the driver checks if a FW is already running on the
> chip based on the CTS line, and downloads device specific FW file
> into the chip over UART.
>
> The driver contains certain device specific default parameters
> related to FW filename, baudrate and timeouts which can be
> overwritten by an optional user space config file. These parameters
> may vary from one module vendor to another.
>
> Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
> ---
> v2: Removed conf file support and added static data for each chip
> based on compatibility devices mentioned in DT bindings. Handled
> potential memory leaks and null pointer dereference issues,
> simplified FW download feature, handled byte-order and few cosmetic
> changes. (Ilpo Järvinen, Alok Tiwari, Hillf Danton)
> v3: Added conf file support necessary to support different vendor
> modules, moved .h file contents to .c, cosmetic changes. (Luiz
> Augusto von Dentz, Rob Herring, Leon Romanovsky)
> ---
> drivers/bluetooth/Kconfig | 11 +
> drivers/bluetooth/Makefile | 1 +
> drivers/bluetooth/btnxpuart.c | 1370 +++++++++++++++++++++++++++++++++
> 3 files changed, 1382 insertions(+)
> create mode 100644 drivers/bluetooth/btnxpuart.c
>
> diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
> index 5a1a7bec3c42..773b40d34b7b 100644
> --- a/drivers/bluetooth/Kconfig
> +++ b/drivers/bluetooth/Kconfig
> @@ -465,4 +465,15 @@ config BT_VIRTIO
> Say Y here to compile support for HCI over Virtio into the
> kernel or say M to compile as a module.
>
> +config BT_NXPUART
> + tristate "NXP protocol support"
> + depends on SERIAL_DEV_BUS
> + help
> + NXP is serial driver required for NXP Bluetooth
> + devices with UART interface.
> +
> + Say Y here to compile support for NXP Bluetooth UART device into
> + the kernel, or say M here to compile as a module.
What is the module name?
> +#define MAX_TAG_STR_LEN 20
> +#define BT_FW_CONF_FILE "nxp/bt_mod_para.conf"
You can not load "configuration files" as firmware, as that is not what
firmware is for.
Firmware is to be sent straight to the device, the kernel is not
supposed to do any parsing like you are doing:
> +#define USER_CONFIG_TAG "user_config"
> +#define FW_NAME_TAG "fw_name"
> +#define OPER_SPEED_TAG "oper_speed"
> +#define FW_DL_PRI_BAUDRATE_TAG "fw_dl_pri_speed"
> +#define FW_DL_SEC_BAUDRATE_TAG "fw_dl_sec_speed"
> +#define FW_INIT_BAUDRATE "fw_init_speed"
> +#define PS_INTERVAL_MS "ps_interval_ms"
With these values.
Please use the normal kernel interfaces for configuring your device.
that is NOT the firmware interface, sorry.
thanks,
greg k-h
next prev parent reply other threads:[~2023-02-13 17:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 14:54 [PATCH v3 0/3] Add support for NXP bluetooth chipsets Neeraj Sanjay Kale
2023-02-13 14:54 ` [PATCH v3 1/3] serdev: Add method to assert break signal over tty UART port Neeraj Sanjay Kale
2023-02-13 14:54 ` [PATCH v3 2/3] dt-bindings: net: bluetooth: Add NXP bluetooth support Neeraj Sanjay Kale
2023-02-14 8:33 ` Krzysztof Kozlowski
2023-02-21 16:40 ` Neeraj sanjay kale
2023-02-21 16:56 ` Krzysztof Kozlowski
2023-02-14 16:12 ` Rob Herring
2023-02-16 10:45 ` Sherry Sun
2023-02-13 14:54 ` [PATCH v3 3/3] Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets Neeraj Sanjay Kale
2023-02-13 15:06 ` Ilpo Järvinen
2023-02-13 15:15 ` Greg KH [this message]
2023-02-16 10:52 ` Sherry Sun
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=Y+pULHm2Qys738Zg@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alok.a.tiwari@oracle.com \
--cc=amitkumar.karwar@nxp.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hdanton@sina.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan.hedberg@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=neeraj.sanjaykale@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=rohit.fule@nxp.com \
--cc=sherry.sun@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