* [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset
@ 2025-07-02 11:41 Catalin Popescu
2025-07-02 11:41 ` [PATCH next v4 2/2] Bluetooth: btnxpuart: implement powerup sequence Catalin Popescu
2025-07-10 13:40 ` [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Catalin Popescu @ 2025-07-02 11:41 UTC (permalink / raw)
To: amitkumar.karwar, neeraj.sanjaykale, marcel, luiz.dentz, robh,
krzk+dt, conor+dt, p.zabel
Cc: linux-bluetooth, devicetree, linux-kernel, m.felsch,
Catalin Popescu, Conor Dooley
Add support for chip power supply and chip reset/powerdown.
Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
---
v4:
- rebase on linux-next tag next-20250701
v3:
- rebase on linux-next tag next-20250409
v2:
- rebase on linux-next tag next-20250227
- add acked-by
---
.../bindings/net/bluetooth/nxp,88w8987-bt.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
index bb9ab5dd3b4a..857c6234ba9b 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
@@ -72,6 +72,14 @@ properties:
description:
The GPIO number of the NXP chipset used for BT_WAKE_OUT.
+ vcc-supply:
+ description:
+ phandle of the regulator that provides the supply voltage.
+
+ reset-gpios:
+ description:
+ Chip powerdown/reset signal (PDn).
+
required:
- compatible
@@ -90,6 +98,8 @@ examples:
device-wakeup-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
nxp,wakein-pin = /bits/ 8 <18>;
nxp,wakeout-pin = /bits/ 8 <19>;
+ vcc-supply = <&nxp_iw612_supply>;
+ reset-gpios = <&gpioctrl 2 GPIO_ACTIVE_LOW>;
local-bd-address = [66 55 44 33 22 11];
interrupt-parent = <&gpio>;
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
base-commit: 3f804361f3b9af33e00b90ec9cb5afcc96831e60
prerequisite-patch-id: 0000000000000000000000000000000000000000
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH next v4 2/2] Bluetooth: btnxpuart: implement powerup sequence
2025-07-02 11:41 [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Catalin Popescu
@ 2025-07-02 11:41 ` Catalin Popescu
2025-07-10 13:40 ` [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Popescu @ 2025-07-02 11:41 UTC (permalink / raw)
To: amitkumar.karwar, neeraj.sanjaykale, marcel, luiz.dentz, robh,
krzk+dt, conor+dt, p.zabel
Cc: linux-bluetooth, devicetree, linux-kernel, m.felsch, Catalin Popescu
NXP bluetooth chip shares power supply and reset gpio with a WLAN
chip. Add support for power supply and reset and enforce powerup
sequence:
- apply power supply
- deassert reset/powerdown
Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
Reviewed-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
---
v4:
- rebase on linux-next tag next-20250701
v3:
- rebase on linux-next tag next-20250409
- fix issue reported by CI regarding the subject
v2:
- rebase on linux-next tag next-20250227
- add reviewed-by
---
drivers/bluetooth/btnxpuart.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 25857919359e..b25096b8980b 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -18,6 +18,8 @@
#include <linux/string_helpers.h>
#include <linux/gpio/consumer.h>
#include <linux/of_irq.h>
+#include <linux/regulator/consumer.h>
+#include <linux/reset.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
@@ -209,6 +211,7 @@ struct btnxpuart_dev {
struct ps_data psdata;
struct btnxpuart_data *nxp_data;
+ struct reset_control *pdn;
};
#define NXP_V1_FW_REQ_PKT 0xa5
@@ -1757,6 +1760,7 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
struct hci_dev *hdev;
struct btnxpuart_dev *nxpdev;
bdaddr_t ba = {0};
+ int err;
nxpdev = devm_kzalloc(&serdev->dev, sizeof(*nxpdev), GFP_KERNEL);
if (!nxpdev)
@@ -1795,6 +1799,16 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
crc8_populate_msb(crc8_table, POLYNOMIAL8);
+ nxpdev->pdn = devm_reset_control_get_optional_shared(&serdev->dev, NULL);
+ if (IS_ERR(nxpdev->pdn))
+ return PTR_ERR(nxpdev->pdn);
+
+ err = devm_regulator_get_enable(&serdev->dev, "vcc");
+ if (err) {
+ dev_err(&serdev->dev, "Failed to enable vcc regulator\n");
+ return err;
+ }
+
/* Initialize and register HCI device */
hdev = hci_alloc_dev();
if (!hdev) {
@@ -1802,6 +1816,8 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
return -ENOMEM;
}
+ reset_control_deassert(nxpdev->pdn);
+
nxpdev->hdev = hdev;
hdev->bus = HCI_UART;
@@ -1840,6 +1856,7 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
return 0;
probe_fail:
+ reset_control_assert(nxpdev->pdn);
hci_free_dev(hdev);
return -ENODEV;
}
@@ -1867,6 +1884,7 @@ static void nxp_serdev_remove(struct serdev_device *serdev)
ps_cleanup(nxpdev);
hci_unregister_dev(hdev);
+ reset_control_assert(nxpdev->pdn);
hci_free_dev(hdev);
}
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset
2025-07-02 11:41 [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Catalin Popescu
2025-07-02 11:41 ` [PATCH next v4 2/2] Bluetooth: btnxpuart: implement powerup sequence Catalin Popescu
@ 2025-07-10 13:40 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2025-07-10 13:40 UTC (permalink / raw)
To: POPESCU Catalin
Cc: amitkumar.karwar, neeraj.sanjaykale, marcel, luiz.dentz, robh,
krzk+dt, conor+dt, p.zabel, linux-bluetooth, devicetree,
linux-kernel, m.felsch, conor.dooley
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Wed, 2 Jul 2025 13:41:04 +0200 you wrote:
> Add support for chip power supply and chip reset/powerdown.
>
> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> ---
> v4:
> - rebase on linux-next tag next-20250701
> v3:
> - rebase on linux-next tag next-20250409
> v2:
> - rebase on linux-next tag next-20250227
> - add acked-by
>
> [...]
Here is the summary with links:
- [next,v4,1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset
https://git.kernel.org/bluetooth/bluetooth-next/c/92b12500ef1c
- [next,v4,2/2] Bluetooth: btnxpuart: implement powerup sequence
https://git.kernel.org/bluetooth/bluetooth-next/c/366116cab739
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-10 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-02 11:41 [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Catalin Popescu
2025-07-02 11:41 ` [PATCH next v4 2/2] Bluetooth: btnxpuart: implement powerup sequence Catalin Popescu
2025-07-10 13:40 ` [PATCH next v4 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®