* [PATCH next v3 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset
@ 2025-04-09 8:39 Catalin Popescu
2025-04-09 8:39 ` [PATCH next v3 2/2] Bluetooth: btnxpuart: implement powerup sequence Catalin Popescu
2025-04-09 9:06 ` [next,v3,1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset bluez.test.bot
0 siblings, 2 replies; 3+ messages in thread
From: Catalin Popescu @ 2025-04-09 8:39 UTC (permalink / raw)
To: amitkumar.karwar, neeraj.sanjaykale, marcel, luiz.dentz, robh,
krzk+dt, conor+dt, p.zabel
Cc: linux-bluetooth, devicetree, linux-kernel, loic.poulain, 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>
---
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 d02e9dd847ef..7b72b2aa6e8d 100644
--- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
+++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml
@@ -53,6 +53,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
@@ -69,6 +77,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];
};
};
base-commit: 46086739de22d72319e37c37a134d32db52e1c5c
prerequisite-patch-id: 0000000000000000000000000000000000000000
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH next v3 2/2] Bluetooth: btnxpuart: implement powerup sequence
2025-04-09 8:39 [PATCH next v3 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Catalin Popescu
@ 2025-04-09 8:39 ` Catalin Popescu
2025-04-09 9:06 ` [next,v3,1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: Catalin Popescu @ 2025-04-09 8:39 UTC (permalink / raw)
To: amitkumar.karwar, neeraj.sanjaykale, marcel, luiz.dentz, robh,
krzk+dt, conor+dt, p.zabel
Cc: linux-bluetooth, devicetree, linux-kernel, loic.poulain, 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>
---
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 604ab2bba231..e1f7d1956020 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -17,6 +17,8 @@
#include <linux/crc32.h>
#include <linux/string_helpers.h>
#include <linux/gpio/consumer.h>
+#include <linux/regulator/consumer.h>
+#include <linux/reset.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
@@ -204,6 +206,7 @@ struct btnxpuart_dev {
struct ps_data psdata;
struct btnxpuart_data *nxp_data;
+ struct reset_control *pdn;
};
#define NXP_V1_FW_REQ_PKT 0xa5
@@ -1712,6 +1715,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)
@@ -1739,6 +1743,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) {
@@ -1746,6 +1760,8 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
return -ENOMEM;
}
+ reset_control_deassert(nxpdev->pdn);
+
nxpdev->hdev = hdev;
hdev->bus = HCI_UART;
@@ -1784,6 +1800,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;
}
@@ -1811,6 +1828,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 related [flat|nested] 3+ messages in thread
* RE: [next,v3,1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset
2025-04-09 8:39 [PATCH next v3 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Catalin Popescu
2025-04-09 8:39 ` [PATCH next v3 2/2] Bluetooth: btnxpuart: implement powerup sequence Catalin Popescu
@ 2025-04-09 9:06 ` bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-04-09 9:06 UTC (permalink / raw)
To: linux-bluetooth, catalin.popescu
[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=951453
---Test result---
Test Summary:
CheckPatch PENDING 0.34 seconds
GitLint PENDING 0.18 seconds
SubjectPrefix FAIL 0.48 seconds
BuildKernel PASS 26.33 seconds
CheckAllWarning PASS 27.07 seconds
CheckSparse PASS 30.42 seconds
BuildKernel32 PASS 24.15 seconds
TestRunnerSetup PASS 480.91 seconds
TestRunner_l2cap-tester PASS 21.70 seconds
TestRunner_iso-tester PASS 35.19 seconds
TestRunner_bnep-tester PASS 4.77 seconds
TestRunner_mgmt-tester FAIL 122.22 seconds
TestRunner_rfcomm-tester PASS 7.98 seconds
TestRunner_sco-tester PASS 13.21 seconds
TestRunner_ioctl-tester PASS 8.97 seconds
TestRunner_mesh-tester PASS 6.13 seconds
TestRunner_smp-tester PASS 7.28 seconds
TestRunner_userchan-tester PASS 4.96 seconds
IncrementalBuild PENDING 0.56 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 490, Passed: 485 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
LL Privacy - Set Flags 3 (2 Devices to RL) Failed 0.190 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-09 9:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 8:39 [PATCH next v3 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Catalin Popescu
2025-04-09 8:39 ` [PATCH next v3 2/2] Bluetooth: btnxpuart: implement powerup sequence Catalin Popescu
2025-04-09 9:06 ` [next,v3,1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox