From patchwork Tue Jan 14 14:19:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neeraj Sanjay Kale X-Patchwork-Id: 13938826 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2041.outbound.protection.outlook.com [40.107.21.41]) (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 19EE5232454; Tue, 14 Jan 2025 14:18:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736864284; cv=fail; b=Y1QPvINLKA44Ypyq55xKEGU7L4N4oLUQLcNYw3l5MSgJ6LSDtOPYIMWfx5g3phGpvGfktzX1NLx5adi4npOi5j6tufzf9vhu1p/cXv4m2h05wfHNbrH0V8z+ots6fVHpd0hO7mw3nwdxiEBahObt/DVy8cLnsQrnfGDDxt6cP3s= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736864284; c=relaxed/simple; bh=1dYxVfjEUIc8VhF8aGr6qt0qmx+WvQTgDg5c/X4SBt8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=S73JDIiDTSr4cyRaJOE6q1vhsyuh6RXZ/SeqM6CbFxD6UtiRdHyQBAykmnoZNO8GdqwM+HZY3cz0ll6Ra0mw8xGT/SiKJB0udgGmT3rU/XpkZJUTclPzxiOYCS6SCg+VLepz6DaeX1WYUHYXgZEldVpVv8HFmyAJZF3bD7jctI8= 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=Wft++RcK; arc=fail smtp.client-ip=40.107.21.41 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="Wft++RcK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pZ6Qhd8Oqc4X24JFUI6U9cq3COTcTKcB7RBsxUaXuvzfTb7bKWdYecwH+NZpHS6eYpLiN4Sd3lvftvcYcMsyhLbnncltccWCLAaRBBnSXivr94DtwZ4F8KF2uitpA36QEbA4C5YO36a/RqPojiYJZeo1prR01+FaA1v7D+s+4C0KVA17DLwKEDfow71PMgbmPLxtOB/jTe2ksJvsfMkr28bzrD6y37WOJZN3gYbRK7fQBWMUr87erf7Z9/0gjBoD8lURsM/ksxoU/zH0Wq7hX522KrvIjL4wvv/+dTtjHY+xD3cLAQX0t1af7hnTiKuNxK4AMty+yH9K+6qiHsOhBg== 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=gX6/rdb99FL5ntpQHR0dOfvcCe1/97B/d5Nw+rpI5Ys=; b=oeJQnU2NPPSadrNxnDlBmWVkAA38ep+Qzxts7g+z0nqZl52iE20a2veZEMMc7UUGhZ0aBjw2z09vZs1Kdu3ZwSV+ubzFWkCkli4PCGjTWOepShlsr5vMN2d/ifKJFTmEa7rIM+wBllGgn9FuUdegCxmJpQbZWKXOEE7BC24jDlZgm3+7hoEEsvzpD+04ANJuobQnYON9mS4vwZJf9If6ufk7WuLlPtIiB5TZ5b3PZ1kW7zHv5RzK1TEdLV8zLY1Tc30ObpB/18JoMpH6V2/XDcZST1YO7D4G9cOuHygY5ED4HIXHySQF9PZRR/lx4MzIIFMnftaxahNiM5t+V3CTcg== 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=gX6/rdb99FL5ntpQHR0dOfvcCe1/97B/d5Nw+rpI5Ys=; b=Wft++RcKh10ZwTbb9nBH9WqgHjwsGqS9Y0kAAZvPILd+jfdk2GAdzSp6gCyoetlqU2qV5BLW3KTXZK9/4jLsEURqSeusbGHrjLyEsQBMO2S/BGvWweFAGxbFtK3LK00vyJvjehb/JyzZXL4n4CIducTgMleRXpdBA6x+OhqqqRTLGikwuLzdd4bIx3fjxiw441MYufvrgq8dnwE1Fn2wvaqvKySA5BFm2Zs6sRToZ+S4jMXES6auSoP0hhplxwy9OTF5wqBIN3nGdHc0SCY6ZcVR60bKIQphQiv57ASLhQ1rnKXr+dDgnvX7erf2WNnVwsESJEkAKYRz0JmJB/JkYg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PA4PR04MB9687.eurprd04.prod.outlook.com (2603:10a6:102:270::15) by DB8PR04MB6812.eurprd04.prod.outlook.com (2603:10a6:10:f8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Tue, 14 Jan 2025 14:17:58 +0000 Received: from PA4PR04MB9687.eurprd04.prod.outlook.com ([fe80::742e:a5ac:15f4:116a]) by PA4PR04MB9687.eurprd04.prod.outlook.com ([fe80::742e:a5ac:15f4:116a%5]) with mapi id 15.20.8335.015; Tue, 14 Jan 2025 14:17:58 +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, neeraj.sanjaykale@nxp.com, sherry.sun@nxp.com, ziniu.wang_1@nxp.com, johan.korsnes@remarkable.no, kristian.krohn@remarkable.no, manjeet.gupta@nxp.com Subject: [PATCH v3 1/2] dt-bindings: net: bluetooth: nxp: Add support to set BD address Date: Tue, 14 Jan 2025 19:49:11 +0530 Message-Id: <20250114141912.2363131-1-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG2PR02CA0109.apcprd02.prod.outlook.com (2603:1096:4:92::25) To PA4PR04MB9687.eurprd04.prod.outlook.com (2603:10a6:102:270::15) 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: PA4PR04MB9687:EE_|DB8PR04MB6812:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ac4054b-1250-4f9a-5adb-08dd34a63f27 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: qoIE7Y9pJBxewAI2eaVWEG9YmM4mth82Z7dfnfBo2jbhfH4BD3yIdiFGD3A/KLDhSCcwa5T60MiOTMFSbK5fQH8UM87hjhh8iFUdrMKv72pLNpE9VEDgHR4K70heUIdJqlka++Xqbtsc+ss1pGqrMLLvdAE8Yqt8kYQP6gwH3X2t02B1ve56l8sOjXJDo3MB+gjqcbSou8ndvDmPHlQ9YWJeP7VlPpa1a4LYZm643CedfPHd51yj7Eqf6Ai9P37v/mYeL51YNnQ1au6EtouROMft2u5GrZuXihJ/KFeHfZtO24r/byTdTFEVGjOd+yZ7y4rg3Bqxam4dOeZTL6vXMHcXhaFCuu+GNlh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ESKW+ItvlMVGcB0UYIK/l1jGv+VViPjbk7A5NlGAx7pfd6lgsVWtCP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR04MB9687.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YEEr8QO9DgWZUtYKP37R7nYOWMa6EANYfhYwHYcc/txZBkoV9QPYUe/lNXx3OOEGVfz05+u3/yOok49HlmE+t+DuLPTjzNi3KWEIAwDAiYcwZnGaPS8MCH9zj/653o3BUqzoihblVh2LyS9XUgIM3VHM81jrhdJb7M05B+wHuy+b2ErznwBvAGg00N2/cWHe/LXuYRP/yQfXOuy3rBrVhD7LGJiWB4UML5UEWCOMSCWrXoQITtsxbeC+u2qc95R9KhH9rtQwpWD7LR5a295ju1x8DN/3LO56maPq2w/ukVEOxi6vLiEncDTs7hzm4KhAoPbcvEVnZWXSqJpjbyFPXO/kOAuL7HkctO6knBwl4l+KFeyZK3cd/+CL7MZfwX7UErUacqklDAF+RRbwfb9D117gP/CX/OtTQ6J4gIAro8i1vhthKP4DSq41SG4W1kOYmuF4XLCxoDYyMgZzcRp4OW7kqyOYipWFp2n16Qhen0QiaoonXlYR+OTVKdk+zUsNsuBTfIcDyoRIirdZ9wVzFOGbxgshiZ6+6sR9miIrnCANoeTri5jjCIqy3/HsBdL8uaOrlIwiJf9/rr+h3sdQ0BOoXRVPbqZXZW1Ig1g3apQvbX6DBmYQVsovCegaPlp/E68kJvQB1KGAMNVwwIrLm7YuXm26iAz73zddlpLI/FVyZ2R6axvpoPntnoDDt6oKvMGACNaZYlycXvpVG4Vnj9kLbneNaWqOa5BodhlLynLiAqufS0B2YXxb/IsnVYzCbHgDRZn0baH5APIm32DKI22Fp+yo5sO3W8vfi9NGgbBhSlOV62QITe4HmSHi8P0K/wCyV4tB5nIUSLAnclz9KtQETFbW4Pcg6tXLwqIpwfdZEHIpLXEOpPp9KPYp/yCdAdBK1+0498TJVs0uE/DME/iCNJMa3VeFI0s/7lJ1eLMeLq07e2vlBR4het02JMuCqWnooGL5SE5ipHbUB08JIa20hJaD0zdDXLeUk4JehZQXSJpm4AYjUslMcfnDnclwyVcNJ1QN/5/BMWWkWAR7zUTo3HLGC6uhXTfKE2pkGgBdMcOTwz2tnEBQyg5MM4vUtZCg3qI3r2KMsMHvJKJEeOKJGOjnUfi4oC0Scq/nbe0qJxx3xl/WyFFJHxaAkj5R+h6C6W3fcGEfYhlTb1TMM9gnvX6VfDgI7PNgXHMeqAhvrhnLPkHfpp8JshfWQ82GDhgSkmEDEcUIYb4YewKNG61zamxSJYqehcsTyY50ybQVP0XkahwhSxnDGD9X7L6JyvyvYCFBA6jFSQXTeLaribuwRGnexmXz/zJUIBOsUMIMe/fN822zeif2g7x9+5QtWc1qM9p4bj1/X5Rf6hI5kQSh0cB0+YgqJiLEvQtTlMy8n7Y9JHAZahAhKNYHD5/0QM8MijUMb03PhvZsIrdjDBXYQ5yxqMwecIDja74C/MdLVoHJLMvJFzRd0vAbPqD68T7BgFc28zEjZDbcNUhJXkf4jq168Rb+lLjwSY7pXmw7PU83KUxYWhbQy425plqThsIM489sqNJ5hN1yzBJHzvhVzWqtDa1jYn/VHZzMw6P3Z3vwTGjsFuIUR0zZ6P8uCLb6UmEnXYLVtBDZQVQRyw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ac4054b-1250-4f9a-5adb-08dd34a63f27 X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9687.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2025 14:17:58.8185 (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: HuMbL2pR2R7tmHQyiRJct3UwJ85rq9O5olJq9fOZW+Ku0bMJE4IXO4sc3Lfn7mjBTEI1Ev56MZMafxKykM1Ox+d0nGdDzUy1ZzSnbCX42bc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6812 Allow user to set custom BD address for NXP chipsets. Signed-off-by: Neeraj Sanjay Kale Reviewed-by: Krzysztof Kozlowski --- v2: Add allOf and unevaluatedProperties: false (Krzysztof) v3: Drop local-bd-address: true (Krzysztof) --- .../devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml index 0a2d7baf5db3..499c816071ec 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml +++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml @@ -17,6 +17,9 @@ description: maintainers: - Neeraj Sanjay Kale +allOf: + - $ref: bluetooth-controller.yaml# + properties: compatible: enum: @@ -43,7 +46,7 @@ properties: required: - compatible -additionalProperties: false +unevaluatedProperties: false examples: - | @@ -54,5 +57,6 @@ examples: fw-init-baudrate = <3000000>; firmware-name = "uartuart8987_bt_v0.bin"; device-wakeup-gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + local-bd-address = [11 22 33 44 55 66]; }; }; From patchwork Tue Jan 14 14:19:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Neeraj Sanjay Kale X-Patchwork-Id: 13938827 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2041.outbound.protection.outlook.com [40.107.21.41]) (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 656D413B7A3; Tue, 14 Jan 2025 14:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736864286; cv=fail; b=lmmQwhzfTcjLbFDdU4c/MkX8rqzbfaCTmMFp3Woqj8kgybevNuRWh0JE723t+2hzgZHUx+tandXfzf9JHSKjvCWtdMSgvbmbCR5rdrrr3/sJLgy9nFTkBG/db3hsDlq7Ap16BjPEFHnh84Cq+2sUjgRIOlpDBBGyh7DgM2RlSaA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736864286; c=relaxed/simple; bh=qEwOgUuNtM3MeGJu+fGRwOdHtEdlmeqDutKE/H3W7xM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=RyZBlfvDns6L7X8mHR28DPLCcd20fvii8xTugDO1zBwiG0pTuP2qn192NIbo6lLslK8dcmgLFdnDNDk6XpfeUQxLm4Q428YmJnGZNuVQdwQrDcBStbhwI5iQfH5SKaqkh1sXFFAQUZpgT3FxsZMzIUn+2/XyqMvBsWw5wwLSXzk= 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=iVEaU5Ac; arc=fail smtp.client-ip=40.107.21.41 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="iVEaU5Ac" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IGFxjJ89DhJunm3B6GmI8xVHXYAjm/w+BOrbwjXzg/HSAu7oU9hdELKG/zWpi5uzstbyp3h1i0IzN1CVS4MgB/cMJbQuOU6oYSbwuN9DJDTZknYO3lCLga8+wQnT8H7gz935G5+bsnu5Tc9alONU0gH83gmSX4CmuZXMN/VvTPz/NWWssSDjvaIPvubjHvzwmXEhq3JpEA2Zqa2TlsZuleMuQDmrDPafKFSyAIOlQXcsv1/gb9aTzE5J3VhL6A7Tdd/na86L6hGOFfFvJyDMDcxkIty8ryUkQVwFC5KTtJLJD+EwN4Vg71y9Sud3b7/4FwlSRqoHSv2gocIkCbs36w== 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=J3GfMA54z6RQBfAsc5L3IwjxdztoEiO/a87y148hXfw=; b=WbjB4OEISWJ3W+Yv4N0KU/HueoeutzLpU9vA6Fk88FROs5LjF8lfjS/4/Tc3yRKym3LqGfT3ed7oDDkoDIMGW83mkyVj64I97nfS7ZuQT60uzu8ZqzVbayhNg/x9SBm62mkz4L9+cGwCHbufQjEPBQLROlFF62wes9GhqeDtNctzi2t1i/A0kVe4nBAHEpRtci3WoJM8b+Br0mzwCd7F7GTR7/kxnRzmKWGN9x8K1voNmA9Te0ss4bGtuBAEIxjFQOmaMd3A+MjZAPybv6c7I9bpZIxXfW52QpDjrFiaCn+76tJRfcJO1PoGgmGZhnbHHGx3sJUP/nB101RiBO1aSQ== 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=J3GfMA54z6RQBfAsc5L3IwjxdztoEiO/a87y148hXfw=; b=iVEaU5AcxSuCRSt7FLE4hJPbVJoSr1qH/lBKqIbe7289WYZHY2Wy94CKtgXHYwIUQT+sE+miQGH1fXG9GPrJ9K+xfzv5YromEg0S1rTZwlZFdOleH51d+LfNj/HUIt/1mQdeXERutlbpAsA4wzvdpSJyhTaY4dNtsSAzjG0nePeyAuUiAJ6e5tONHjkDaaSDn/bn8s7HHhyELB1OKTd39aRAVVpw/sClJahITGl3oo6j6Ws5KIhJL7OwEPyPD1qK+w9l3woj7L7GZMCJwsYcuWfZ3tH4j2U0w0p7RFLRT+geU1WIBcBYjDshNdSvU6O4ytODxsE7Ad0+JU8VeCnmGA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PA4PR04MB9687.eurprd04.prod.outlook.com (2603:10a6:102:270::15) by DB8PR04MB6812.eurprd04.prod.outlook.com (2603:10a6:10:f8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.18; Tue, 14 Jan 2025 14:18:03 +0000 Received: from PA4PR04MB9687.eurprd04.prod.outlook.com ([fe80::742e:a5ac:15f4:116a]) by PA4PR04MB9687.eurprd04.prod.outlook.com ([fe80::742e:a5ac:15f4:116a%5]) with mapi id 15.20.8335.015; Tue, 14 Jan 2025 14:18:03 +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, neeraj.sanjaykale@nxp.com, sherry.sun@nxp.com, ziniu.wang_1@nxp.com, johan.korsnes@remarkable.no, kristian.krohn@remarkable.no, manjeet.gupta@nxp.com Subject: [PATCH v3 2/2] Bluetooth: btnxpuart: Add support for set BD address Date: Tue, 14 Jan 2025 19:49:12 +0530 Message-Id: <20250114141912.2363131-2-neeraj.sanjaykale@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250114141912.2363131-1-neeraj.sanjaykale@nxp.com> References: <20250114141912.2363131-1-neeraj.sanjaykale@nxp.com> X-ClientProxiedBy: SG2PR02CA0109.apcprd02.prod.outlook.com (2603:1096:4:92::25) To PA4PR04MB9687.eurprd04.prod.outlook.com (2603:10a6:102:270::15) 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: PA4PR04MB9687:EE_|DB8PR04MB6812:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a1fae63-1319-42dd-e27c-08dd34a641af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|52116014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?oKm1YJrZbhcM7guh1b07TJVvQVdR0nM?= =?utf-8?q?dwyKaCWTbaKF7s7QIlHyMitLgo+8NoAYa89BT+s00ELr+ij+KqrdZAgkwNrXiQoOP?= =?utf-8?q?6Q6JJY3d4baazpmE6IzhkTtkAMqlXxgz+h831yZUs3F7TIobtaaW60dFt4It4I13E?= =?utf-8?q?jTYeGBBTAFz2z3URB1jdHP7UcmUfEfAR64V94wOm0Cdv/Xqe0pdb63DJFBG1G8tgA?= =?utf-8?q?ET/TnyoksUIVzcE/WOsPfNFXAwxmxuWm0jIjmUqKh/sKAa8bHYZt518jnYbxc2a9h?= =?utf-8?q?JhbBjS1k4CUuSeu61sk5Wxr1Q0CO1UsoFGbAyFGQD0tRtmdqn4M1AIEZtJem2sWQ5?= =?utf-8?q?Zs6fPLd2yUB7PjES+MVO3JhM8n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wJl8LMtTk+i/LoZ378VVeEgu+?= =?utf-8?q?SmdlavKRDrHzVZ/UmeNJgksogK2Qpb+CmQ3S8Ez7+SEOauXq6r3XidNNJxP28dFzL?= =?utf-8?q?/fvQpLL9qw2Smv98w6/cX0iSHbld7amlRXG413qHtgEcvmG0er7axCmcXc4C7D2p2?= =?utf-8?q?TnnwNYD8Q0N?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR04MB9687.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?x3yqUASOOafAQWX3pUCj6cqu/S+q?= =?utf-8?q?LUmiIJIVR27wf3ePqgVwJvonysnwvwc7v6N25TdYv98IL/rHtW+JYqHGBZ5wRd828?= =?utf-8?q?IpWktBZn33H9tzbyUprqkVz46aCBWrAhoZ0J/G+5V8sRZJkj8I4rreo/ph+BoyDCq?= =?utf-8?q?z7k5vjnF5QFMFeVmzpfrj7IycnMmeCSfX/cJHGMl2dF/tPulQhqXnynWCS5fxAzZM?= =?utf-8?q?bRP2RI1qW2TLAl/lGIVmvykHYJusZwgfkWIJRHu//L7DbTb4C7KQ514hpRHfZsSm2?= =?utf-8?q?lApiTrQrwAcoyCVbfavUX6/wEJFxbvrKQUffaa6q1mztQ7ZuVMaIeYOkh27mSnLWS?= =?utf-8?q?aNf/79XsCmogGc/2dHTA5ZBf62S7+R7yj6M8mijgr1HT39wBCRI9JkQbGSBGz7w2h?= =?utf-8?q?TPoKzWKIU41y0MD8LFIPqFcpT9Vv9CqoD3M8GFdCRHk5BA/XYycvF53EsdVyYRCm9?= =?utf-8?q?JPYVYEzNyNm/PWf8SQ2pJfocX0ulENTr64D8rsycc0H55dvJBSLUyagdh4+Usi0xQ?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mSosJR5nc6n1GvTZrUhq5nY/W2saZJa6CraMKZ5eETabUR89yqbRyOFfMx?= =?utf-8?q?E9i9BZn/J1WAySFgOTyBD8EFlznddaVD9s7xL3IkZ7asqz78lca/2GMn4cI+r6ugh?= =?utf-8?q?0O+Px+7ukhNV/Oh2uKD+rxNjOscveV1wFw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a1fae63-1319-42dd-e27c-08dd34a641af X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9687.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jan 2025 14:18:02.9500 (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: fY/nNWHD7er+Ay9+oxiisBUH9CRSxJMxFNv4a5bsf2+fB8n4oKRWvolyRzO19yLYa8wp2vvsXAycWLNUGuCwwgsBCJqUWzNPHS1Rjv+wPzE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6812 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. Signed-off-by: Loic Poulain Signed-off-by: Johan Korsnes Signed-off-by: Kristian Husevåg Krohn Tested-by: Neeraj Sanjay Kale Signed-off-by: Neeraj Sanjay Kale --- drivers/bluetooth/btnxpuart.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index 1230045d78a5..deb546a4e664 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -1197,6 +1197,34 @@ static int nxp_set_ind_reset(struct hci_dev *hdev, void *data) return hci_recv_frame(hdev, skb); } +static int nxp_set_bdaddr(struct hci_dev *hdev, const bdaddr_t *bdaddr) +{ + u8 data[8] = { 0xfe, 0x06, 0, 0, 0, 0, 0, 0 }; + struct sk_buff *skb; + int err; + + memcpy(data + 2, bdaddr, 6); + + skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT); + if (IS_ERR(skb)) { + err = PTR_ERR(skb); + bt_dev_err(hdev, "Reset before setting local-bd-addr failed (%ld)", + PTR_ERR(skb)); + return err; + } + kfree_skb(skb); + + skb = __hci_cmd_sync(hdev, 0xfc22, sizeof(data), data, HCI_CMD_TIMEOUT); + if (IS_ERR(skb)) { + err = PTR_ERR(skb); + bt_dev_err(hdev, "Changing device address failed (%d)", err); + return err; + } + kfree_skb(skb); + + return 0; +} + /* NXP protocol */ static int nxp_setup(struct hci_dev *hdev) { @@ -1547,8 +1575,12 @@ static int nxp_serdev_probe(struct serdev_device *serdev) hdev->send = nxp_enqueue; hdev->hw_error = nxp_hw_err; hdev->shutdown = nxp_shutdown; + hdev->set_bdaddr = nxp_set_bdaddr; + SET_HCIDEV_DEV(hdev, &serdev->dev); + set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); + if (hci_register_dev(hdev) < 0) { dev_err(&serdev->dev, "Can't register HCI device\n"); goto probe_fail;