From patchwork Tue Oct 8 09:11:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neeraj Sanjay Kale X-Patchwork-Id: 833681 Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011054.outbound.protection.outlook.com [52.101.65.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFA92178CC5; Tue, 8 Oct 2024 09:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.54 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728378658; cv=fail; b=Q/1H7PGSRz5Myitov6511f83ektMIH97MeYJh9dpxFLuqSbKkxwgCq6R//nDFkawlzN0NUg5/4gX7teR+3gdrTjDHCydqeG/7JBL7ffhuqrHRpwCrVdmAFGzVDmJC7avS0o1VYDNXFJTlGhQYoedcjJ18Jhf7WL6VieCugynApA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728378658; c=relaxed/simple; bh=AbADff0WuzI8qiEOAjSlKjIgfjoBiz8i5whiFpKxFCQ=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=hm7VY+QWhezf0viUeKTI0w8ePVQVQT9EicMhycvixpxV+IXVp3802or3OVXyhFrz6+cUeiZkrYw1eIK50sdMRCn3ticcF8S3IIiWnXkTK9QKOx4X8+L2dfaurr6r5zRxMwEN1N70G6WsWwm6egu497jSzL4CNhev+/BW0VJC5Rc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=A6p0qLtJ; arc=fail smtp.client-ip=52.101.65.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="A6p0qLtJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eQyYw2vdn+u9HlNOIo7WJNhh9jRVlQ7z5tWY3XJXrPgMnLZCp9S4k0spxQx30+Lg9lr3aqKQVrXtBjO1MnwtRyq4A48AFFE8pIFh5zqNGk04PVJPzr4PHHmiFcaE5Zop/Mx9E2YZfduUyFhz2FNIPlKMJ460XgshPmOLEnQTqTEqXGOSzz7vc33fJ5VY9nGszX4dRMkgJBy9Ouwda7PxQ35tTjEmQZySwAjpl5+zJ/3y56g+K05JS4SYBRMOW2sUAjR3nrUxpyCE82OstOtKqz+Ks4R3+tepm139w6oO3QEFJzqHU9Ym7QEZ/g2XPxyhmPQuFtPqKggXUyC2Vito0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fscn+LlJB3G9Ni/ragW15/byPX5JPkpf8d/ugCTFEUI=; b=aZjwrJJ44gNJw3+/qRM/b8NYfXDixmPhds+7sBUEroBP/XmxJngjXkxYjPZ1DXaH5wTv83HKbPb+n1TI+nOHCOTy3JxNzTB34rHpqEzMlGD1kpJ33bX+H3YMh7R95VKTYen3aUx3o0N4+U0JE95MJ9uBgifGEzM+XuK2iBS12CPtM+y373zUXqrkAQnSUKh1f6YnXiRl0Bzqkh2AWIbXEhe5CGmWpDZU35XV6AqdUpntbgo1ga642m/O8a8ZP80TGlyUOkccND40GeBa++Qthy5GbgFzI4gbTbBmZ8DsuSQnyA95rpkF6fwZDxqDGSgglit+N/ZN1UQKYD5PTraGUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fscn+LlJB3G9Ni/ragW15/byPX5JPkpf8d/ugCTFEUI=; b=A6p0qLtJrnj9krLA0sksfCKbpDR6JKvbWdPdQkO+6G2MTsNkA3Ai9HkukLOkF/Qn7kJPu1RH4RvKXWQlXO2yJDg/Aq646/T/Mj88KxyDzTtJjnf5W53h07U3I9QMFAm5+ed9ZKC99dp5Q8CBMG6L1WygzM5+W2x+0rlUo3w1zZaL22fH0QYUDf2H2r55MXPNRd2S2mHyZZlMLNjpmE7bQ+mCP1980mHDvXtsguho5o+PhTYz9GBcy3vLvusWPAAyV1Z1L3CXuPX8jKjh6fVekHGDbf74ZljelqyDPqPlUDNxv1DZsHXr1bnkacPJzZU3dly65Lk8QZlYuaco+ge3gg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS4PR04MB9692.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::20) by AS8PR04MB7544.eurprd04.prod.outlook.com (2603:10a6:20b:23f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16; Tue, 8 Oct 2024 09:10:50 +0000 Received: from AS4PR04MB9692.eurprd04.prod.outlook.com ([fe80::a2bf:4199:6415:f299]) by AS4PR04MB9692.eurprd04.prod.outlook.com ([fe80::a2bf:4199:6415:f299%5]) with mapi id 15.20.8026.020; Tue, 8 Oct 2024 09:10:50 +0000 From: Neeraj Sanjay Kale To: 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@nxp.com, rohit.fule@nxp.com, neeraj.sanjaykale@nxp.com, sherry.sun@nxp.com, ziniu.wang_1@nxp.com, haibo.chen@nxp.com, LnxRevLi@nxp.com Subject: [PATCH v5 0/2] Bluetooth: btnxpuart: Add GPIO mechanism to Date: Tue, 8 Oct 2024 14:41:57 +0530 Message-Id: <20241008091159.650531-1-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: AS4P190CA0047.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:656::11) To AS4PR04MB9692.eurprd04.prod.outlook.com (2603:10a6:20b:4fe::20) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR04MB9692:EE_|AS8PR04MB7544:EE_ X-MS-Office365-Filtering-Correlation-Id: 824de24c-b1cc-4efe-6088-08dce7791ac8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: s8268m0/+RKmYFVZw5coQ5Sbqb7EhA2XvbR1MnfzO2szteISNMtoPr+ilTq7VTP4G8hOZM42txfA9cK+rDdsYPL7cUpkiHrWv0idRfFVhK9azYTPQ6Dpp1Q9qTmIps5TrXzTIVw+suXhiczY0HnkQWoz4uRpCH1zloOwl+9cnyBkivdFKAfNk7pMGzYkZNk7+ZU0It95aqlzP8U4m63605ByInm5SPEsYZmodZswBaVlItAKp7UEe4XPYDE0QuZINNntZjBkbTo7q9eEmJfpHyNMUzTI/0Hkg+n+eJsJyZysFFrI2yHP4/dvVj8wO7iMGArg4w8u1FwGe69Fad2f3KsKPP4pE1eQvuxJEapNB7n6mzSoUBabhncSM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MB9692.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eims2BMJh3QxrPYbluIJsBYIsVIfn26IC9rNXhwh+Tt8A7uOCZEQtWDi1XjG/oDCMI9EMLjuM2kZkRzfekdPVcNlN5ArBRo6NI0uQPXr3iszrYqDKaIao1NTL16iXglbez9sZsbCsTHPOXXuQHqavwO/GqU6JgjR1JzKXO0LMOOM/GBzkt2p0qbPS+PBn5H6Pf4cAZoXTnxTcdNCVk66uFGNOGg+tYAEpYHNiksYPApSHbf9GJBySJmrAlgt7OIDuJFCCGoSV9T4hHf4ic72wm8HdpE8T8jEtLK/gk9DBAYMfVgp/KMmec+TKjShnQ7qCKtGtMhYpl/BJGG6QT81b6U8h90cU83oSriMf9Sj1FvGzF1o/0R70+NXOXO+NapndTbVHFL/hORgjQOapYXMHYPIsqKVfeiJeoPXWtvqTXLplwhSbB+1F6xumfgK7B6M3lNQouXcC8tAV6yqUE3vTDIcGls+rCLVMXB2fFocwhFR7ehajg6Tiy/Jfxzcs3ZDXK5MrXWD3LgUh5zFQC51WSClkamQC2ehpI61uUPv8j0pYmB12ENfEx0FtY1zelT236a0QkQ1JKM4u7Ad9LpjQgPu6sBOVJBKPSjCdN7Fc04KWKPBtoq+2j9G9HDkwZmKVDfXDBC8hm28aGc2tgSec5bERjVaS+8GQS0YqRGl5bF/hVlQDlUt0S+sm50nZd3oVho2Ikl2YN9l6ePEcPpXvFd7OdNPzbVwP8ypneSNEFqyWAGJj3v8DykQ+XIgJ5cHVURulaMGlqnZsptmsiJbhQnhl+5RiSFIxIUSNQVpLzgxF/0FRtkMejSLX298KPnUEuHfpFiPLWImjcvk4MAVN0tSBkeC7dMlMeY5CRG/YF5IUGH0C2FQZuF1d6WCC3fskAtw3dzjumTY+EwFD71udR+6q73vMFLZC7L3IViwTaYmHHKErh7Qsamb/gmXiFIJM4S0JtCp4LeAj1bV7zdd+I1C+yJZtz3W0VqlisXC5luP+ffahXcYKpOpej/n2F2Zl36x6/yEQRley+GlxuGkjbNyApjAX8aKyuDT1y7LLGQlm671DaEuHSEje82P4vyZnCet20kwThBIf2RGxhCtmG7mEio2MuUifSsjCjBzQT/s4GHBPQNXf9+k87dN5YzTY3HC7kQaqb6JJOqhntl2ETTXh0BNVflQOe/z0cesK6/JqUi2NN7l1QEthEKQUGUG4UcsoiUZN32XpJD5QsmuyQ1LLF/I/C3HMgLFOgwgCIRzooTYeScc/TCb8UHtErwiuYOgQqwsFOxdWdOjDDvAZGfRe6XOOzilD4QiGqEHs+S0R5NaVKPYPyhNkfv8+NvbhAy/81Qt44swchJgdaeX9F5R1A7adJ4lNdY3qJgzFfLUxlpfXgKLyQBZPWQZY5e/Y3H6grr6qBd5G2hReiOTTjLcKKe9HDJ80jME7rSl7bxToOkwIuyQRHc+iuidq8HB4VYHqjtMl9EsG9E15rG0oMtZFfMofsOebwnlalMBqFR36VzLtOYQIzlhoDSwBPz1idTjqPTLV7TgvnagAbJBcN+1UwizRenAyD0Zf0hx4TUDebMC/pbPJRXELXeWnF7Efxuj6eTnAcFZGpecKaYuGA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 824de24c-b1cc-4efe-6088-08dce7791ac8 X-MS-Exchange-CrossTenant-AuthSource: AS4PR04MB9692.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2024 09:10:50.8680 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ITKUegy53ZdmZte3eKcAu2z2iLtTpmZYh8S3R18NsnBOCdAOHfRYtA3Mw1WwZdhUWmB2EAAQscNDwANE11HPLWbH6eklgJVbDbJDHcUO8Fc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7544 This patch series introduces a new optional device tree property device-wakeup-gpios, which specifies the GPIO connected to BT_WAKE_IN pin of the NXP chipset. If this property is defined, the BTNXPUART driver uses this GPIO to put the BT controller into sleep or wake it up, instead of the default UART break mechanism. The vendor command parameters HCI_NXP_WAKEUP_METHOD are configured to use GPIO method instead of UART-break signal, to inform the chip about this new mechanism. Once power save feature is enabled, the driver puts the chip into power save state by driving the GPIO high, and wakes it up by driving the GPIO low. Signed-off-by: Neeraj Sanjay Kale Neeraj Sanjay Kale (2): dt-bindings: net: bluetooth: nxp: Add support for power save feature using GPIO Bluetooth: btnxpuart: Add GPIO support to power save feature .../net/bluetooth/nxp,88w8987-bt.yaml | 8 +++ drivers/bluetooth/btnxpuart.c | 57 +++++++++++++++++-- 2 files changed, 59 insertions(+), 6 deletions(-)