From patchwork Fri Oct 4 11:35:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: POPESCU Catalin X-Patchwork-Id: 833095 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2049.outbound.protection.outlook.com [40.107.20.49]) (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 26DDB13D503; Fri, 4 Oct 2024 11:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728041765; cv=fail; b=NoZo2QcrcxkmGkfi866wXhJRcPcVpfUkKq02y2T2KQBJicwGj8lU6lyvFkkIwrVq1msOMhT780ZB1n2Ndi/ivDSnpS0Am2OtyUb0CTNxR9itmCaaUR9yuXvs2N46C+8RafGnt2gNh4MDC+t8ms/V8D5Vy9EsQ4JS6cdxxSMWWF8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728041765; c=relaxed/simple; bh=xBC422yePdqh/2gKGeebeN5Ld4RERi0JD25NUAGi94w=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=CSxeI4CYhaIIsF39s5BKHLOiScj+w9NagIjxq6/jWYus3/tSiGsfXR06UWHmKaQI5RtruOlTjcZEMWxKIIO4cYFlU9GBrJu6h/lCsfVxJqZSiouQVlWNVVq7OLEVDAa4XHYgET2GXlK5AOnwLwY5K9+CIJQ9bhmkeE9qkJFYvow= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=leica-geosystems.com; spf=fail smtp.mailfrom=leica-geosystems.com; dkim=pass (1024-bit key) header.d=leica-geosystems.com header.i=@leica-geosystems.com header.b=ZZPHYGuK; arc=fail smtp.client-ip=40.107.20.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=leica-geosystems.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=leica-geosystems.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=leica-geosystems.com header.i=@leica-geosystems.com header.b="ZZPHYGuK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=j80An5ZEh6gIr3U92+0vGmhYQCZfDj26mYMIeranJg5LS2EBxrkNtXZ7AdZH0tEBriiL0ZsethKr7dAKVfsrYtJr/N3hdHHThdrp+LRabHH4mVtTo5TSG0iinDFw6G4ugFDktDNSwkpBRSN2o7MglfAaRidjK8T8KhO8J922QbzyGiyJa5jK/YWBZCz2EvPlzhbh5aeY+ZvbYw6TqAw5tDFEw590fS1k6coRycVCox3ft7Zw+c8jyxzo5cLfEmudlp3P77aZVvWR4172oqLFuyo4JwIitbNzXLyw6YP+RhxstfDbmKCDkqUV7K6P+GuE8K3066gYigu6LdpFpMon0w== 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=y/WM9O3fE9v5C4sy3Iqn7JqK48wsK6eCxlNZK8U2oUk=; b=mFFeXOvCFv7Q0ZX2cEmVNERiwVfat27ZMCrz+SehjSYtk0f4yfE9hleCYSOmXXGFl0+qjesdZ8qsZmw6MqHYVi6zh9Y1eR5P76M1+LmaNf0Xa5hUYZu+LAe+iuklvMsY8bSYx/BdmiRmz73wamqJVY1fcYTS+rteBmjuW7OVXdwa/3uHNx9qtPclLYeoAjQfe4K4clbFKehU9UtRuMt/ckqmeuap4siVZnDx79tDZ3iBede4CAaocqtn7dhf7gvIxQO/Eh3k86jcTrg7XcngCoWgmrJtBxivtzexMOPhC8HSla0ZJmbCzoGuRfSwRQU/B1jY0b/2TlzUeuqnsSOU6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 193.8.40.94) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=leica-geosystems.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=leica-geosystems.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y/WM9O3fE9v5C4sy3Iqn7JqK48wsK6eCxlNZK8U2oUk=; b=ZZPHYGuKHmNI71ccCsUZSVOcwD8b53uJWxG/li1/e0uNEjA2mOZ0GkBc7Zfum81Fgap/Vg5XHUsYf9pGMx8Dudt5il8h7QOiDuHbO8fwpgHjVOG16p1iFaBiW5kSEQIFKZ0UwG3Je40t1soiC5ak2AfNOJBWXs+RKIcU+DeC9s0= Received: from DU2PR04CA0080.eurprd04.prod.outlook.com (2603:10a6:10:232::25) by VI1PR06MB6639.eurprd06.prod.outlook.com (2603:10a6:800:18e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18; Fri, 4 Oct 2024 11:36:00 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:232:cafe::88) by DU2PR04CA0080.outlook.office365.com (2603:10a6:10:232::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18 via Frontend Transport; Fri, 4 Oct 2024 11:36:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 193.8.40.94) smtp.mailfrom=leica-geosystems.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=leica-geosystems.com; Received-SPF: Pass (protection.outlook.com: domain of leica-geosystems.com designates 193.8.40.94 as permitted sender) receiver=protection.outlook.com; client-ip=193.8.40.94; helo=hexagon.com; pr=C Received: from hexagon.com (193.8.40.94) by DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.11 via Frontend Transport; Fri, 4 Oct 2024 11:35:59 +0000 Received: from aherlnxbspsrv01.lgs-net.com ([10.60.34.116]) by hexagon.com with Microsoft SMTPSVC(10.0.17763.1697); Fri, 4 Oct 2024 13:35:59 +0200 From: Catalin Popescu To: amitkumar.karwar@nxp.com, neeraj.sanjaykale@nxp.com, marcel@holtmann.org, luiz.dentz@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de Cc: linux-bluetooth@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, m.felsch@pengutronix.de, bsp-development.geo@leica-geosystems.com, Catalin Popescu Subject: [PATCH 1/2] dt-bindings: net: bluetooth: nxp: add support for supply and reset Date: Fri, 4 Oct 2024 13:35:56 +0200 Message-Id: <20241004113557.2851060-1-catalin.popescu@leica-geosystems.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginalArrivalTime: 04 Oct 2024 11:35:59.0559 (UTC) FILETIME=[95998570:01DB1651] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|VI1PR06MB6639:EE_ X-MS-Office365-Filtering-Correlation-Id: a70b8e06-75cb-4f00-398f-08dce468b851 X-SET-LOWER-SCL-SCANNER: YES X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: lKA9K3+ZZ7sVvJfhNKbL+LDdSG+Zr8g7cJwVQOPNYst+BboAKTtYm84yF7SOCQ/M87jr2qpgxj2VkyeybUyQLjb53ja/l0cZgv5cX62KaBDJgsrHB2amWsrJgBwmLNpEoG24Ym7ngotLN9th9gZUx5Zm2nEPmINKB15w73O9NkQpgMz7BMQS71dW2LX20J/OAtnqteBMFeS2IvZ8/8YEzuHROQkX/ZZEsZCiBns5pwk6VuH9mq6RbZUf6GKU9YVtZBuhjxAfpIx1Vqb0lUevoTE8XHbnYVlYPfOnq8Z+X3r06P+T/5Q8oxdtdM5cBQl420uDQijZ/5YSQwzHRYFqWtOIA8pHVyCg6J3CHI48/E0VgjfBKeoKBi1Gl65WNPEAIRfOiMmFvN0+NRy/UlshDjbByjFrCuxlqlOPlwGJHLkkMfKx5D0z9VAeK02ABq4ch3OQnAe5mvvgRLtnOnJr8Vh0MSz0FCbGG84FoV02eyNc5Stfwh0WB8/9KfbdF1fQG4h1OaewklbdEYVZErvUxa+IiAynMB9UOuz3zNuJAiYTjCbwwK8iEQzUqtLfycwSyZZ5+TU1PxgEC8CdJATVjD05DvMGY8Mhu9JHCk5Z6FVOmKkY6GalMh8MGc8djh1X2DlufeWeJCEwu7ZxQBRmFswgrfK1MpqlBXeFAcOKfED8EknYwDyMrtPNw84SQaSPaEDDAUDq6+mRIABdKV+tOYrcU+7G+6NTMPfAF76yHlI54KxSWcpZwyYuMzjaGyR+5CYY20EMd4/vc4EsuSThRIem+BYBo3w6rECbezUHHZ4gPNjUqqgWTLg1yu5BfoR8LtykRnNeNg5isd/khQUv5lOL/Jf2hMSLZlDtvTUYfFYiZUQ+GFpk3LhYb106Hfg1QblfY3h1BtrAejFC1frh6eZ2/CyCK2hmFK2/2Zqx0OeKCsAZJYAo651Q7FEYYybAlZhwmAMY8qycWBozjbGjrvZbRI2xA+iA9sBf9Ansg5/6o+HPHKi8C0+OeAfyGfZKmNA9ZY6anKDz6XK8hHssO81EGq6/omBS7qu7eq/AE5RHhrtxfDQObeGMqwMkr4TGNkRqIm4YRONpvBeihClNApJSfu0y1nRBqAYmF7bulgllaHWGRq/Xe5ZVx8hIzF5v96UTWAa2rYSfhj0n7UdxlIfZH3GhZn1my4Bf7rFabvHUJeB5nSMDV3tvgH2rrHZzeWsATMxmbHSyjNwQqK4RbPH5i5pviaHt+KXUVAgm8jFrrL3zBtetGxPjsb8sx2kxITM8TkCS/KlhG90n5OYsfQ8g4zmiWIZQ/DCz4cd8CqYxxyoPYfIN2jLH1dpcXC15RU57BfoFqaqlCPAiTMsHSNyeomzcdRdOSa9o4PE5Ty2bmwhkfLLbaGSS9JGoURB+ X-Forefront-Antispam-Report: CIP:193.8.40.94; CTRY:CH; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:hexagon.com; PTR:ahersrvdom50.leica-geosystems.com; CAT:NONE; SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: leica-geosystems.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2024 11:35:59.8580 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a70b8e06-75cb-4f00-398f-08dce468b851 X-MS-Exchange-CrossTenant-Id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a; Ip=[193.8.40.94]; Helo=[hexagon.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR06MB6639 Add support for chip power supply and chip reset/powerdown. Signed-off-by: Catalin Popescu --- .../bindings/net/bluetooth/nxp,88w8987-bt.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml index 37a65badb448..8520b3812bd2 100644 --- a/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml +++ b/Documentation/devicetree/bindings/net/bluetooth/nxp,88w8987-bt.yaml @@ -34,6 +34,14 @@ properties: firmware-name: maxItems: 1 + vcc-supply: + description: + phandle of the regulator that provides the supply voltage. + + reset-gpios: + description: + Chip powerdown/reset signal (PDn). + required: - compatible @@ -41,10 +49,13 @@ additionalProperties: false examples: - | + #include serial { bluetooth { compatible = "nxp,88w8987-bt"; fw-init-baudrate = <3000000>; firmware-name = "uartuart8987_bt_v0.bin"; + vcc-supply = <&nxp_iw612_supply>; + reset-gpios = <&gpioctrl 2 GPIO_ACTIVE_LOW>; }; }; From patchwork Fri Oct 4 11:35:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: POPESCU Catalin X-Patchwork-Id: 832815 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2068.outbound.protection.outlook.com [40.107.104.68]) (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 311DE155733; Fri, 4 Oct 2024 11:36:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728041765; cv=fail; b=EPhEIVfjLXbjfPzsJ18kAO1CUkky/tjfYktsEzcfAkGtzTmroLXHXnemkDtguGiZrHnsAdwsyBkKPpqWP8OO0EKTIEPjO+CVtR7H5ze7Havhr+s8fJnThhQ/Gbb0hhtB3Qw/Q9aYPbStjoujhGwyWwNyFjfywCi5d7UvWPRIg2o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728041765; c=relaxed/simple; bh=k8vrUUACOULgNoi5Hw/3DBApYJZJo1+eDdAs+sp0mx4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=eQrHxopbgy2vZ0SGoLjhDOFHCqgljClkrJMY02W2EIfMyfGTo5A0vqvPUbJ6ExsEeA0d0BoH1dmemCmqA4E0iY6dFBX7vYCFrpxEH7Bj412mXECuIPbVHTIVBJsab+My3CSfJveZxJEeWx7pTEwqq+hY0wWbdQ04yxQ+IFbYGF0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=leica-geosystems.com; spf=fail smtp.mailfrom=leica-geosystems.com; dkim=pass (1024-bit key) header.d=leica-geosystems.com header.i=@leica-geosystems.com header.b=GTJ71AX5; arc=fail smtp.client-ip=40.107.104.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=leica-geosystems.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=leica-geosystems.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=leica-geosystems.com header.i=@leica-geosystems.com header.b="GTJ71AX5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=li9plVXPytIAVyxj5OdUrsQQXUHHwM/dZ2AV4MpYJJGdesB58qT6Sp+OG5O5ENHw6JAiNfZUo98m5vbwlmpHSsj86ShYq2Fz9GcR12sFnF7HlQspRRJeQ+HBhaRj7Ar2p8iZigsYHAItgM8+eBxGSUm+74h7teFfRiAGkCpGSxrtB3nqlpV9PvrfWvEqikNNqgdSp8YR7JyqOM/cJGgRW63bg1g6aF1CJhlOEb5+rhM8bwwSEqzNCLz1CDjb/q8Vzkj+WPnEq0ZFwzda8usx5EdZBa1qji2zgh7oC0/gdWfGLxRJusaiOaA9EFCRaaCPjaiYawXh8sJilsKRbG4BzA== 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=1UC7DbBaom0AncncKCw/yT16yG8BeyQOm9N6vzlRhz8=; b=nd7qRIXUM5KemTWTJiYbWtghIr9lpboIsZ7XeQZO3Y3l7Ptbw9rG9dOZzE7kNsquXzADzTexfXUx9/3jzQb+rfjPKh9QTCIv17H20OcarIeP59Jy6YTFpNSPuqzFHP19Oyza1uJqrb2Fe8JRpeFKMwMs3tjhwSgZTcPTxaWUm3WKYWv2OTNEZOAtRIsNbW6YuUTUlzn1Zdktd/A9kZv+RH1V8bsLuftPLSo7Cd8RhnN37/OKS5IusBFjbM9zOvhPTB0IoQ2o5ntPlm0ooeTU5POljoZFL1A7tjWNL8xygfuQqn5iED1p+/G67jW0pxU2/s4ZKE/YcDLoRqJqse4kJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 193.8.40.94) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=leica-geosystems.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=leica-geosystems.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leica-geosystems.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1UC7DbBaom0AncncKCw/yT16yG8BeyQOm9N6vzlRhz8=; b=GTJ71AX5r7/+JsCJH2u58oYnCNYQOA9mD2zwJ/bfmYrNp8uEIgVGTy6q2WJPejG9W78CvIBmBgOkGb8klVWYcxn2RMa/BhZ8ovvy6O0rYR0ZIiUzoxjRFD62zxVH52uUkEq6y4VokAq79NLz6vpfTuUfexEFVNOns0xtV3eKLiw= Received: from DU2PR04CA0064.eurprd04.prod.outlook.com (2603:10a6:10:232::9) by PA4PR06MB8449.eurprd06.prod.outlook.com (2603:10a6:102:2a1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18; Fri, 4 Oct 2024 11:36:01 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:232:cafe::b3) by DU2PR04CA0064.outlook.office365.com (2603:10a6:10:232::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.18 via Frontend Transport; Fri, 4 Oct 2024 11:36:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 193.8.40.94) smtp.mailfrom=leica-geosystems.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=leica-geosystems.com; Received-SPF: Pass (protection.outlook.com: domain of leica-geosystems.com designates 193.8.40.94 as permitted sender) receiver=protection.outlook.com; client-ip=193.8.40.94; helo=hexagon.com; pr=C Received: from hexagon.com (193.8.40.94) by DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.11 via Frontend Transport; Fri, 4 Oct 2024 11:36:00 +0000 Received: from aherlnxbspsrv01.lgs-net.com ([10.60.34.116]) by hexagon.com with Microsoft SMTPSVC(10.0.17763.1697); Fri, 4 Oct 2024 13:36:00 +0200 From: Catalin Popescu To: amitkumar.karwar@nxp.com, neeraj.sanjaykale@nxp.com, marcel@holtmann.org, luiz.dentz@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de Cc: linux-bluetooth@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, m.felsch@pengutronix.de, bsp-development.geo@leica-geosystems.com, Catalin Popescu Subject: [PATCH 2/2] Bluetooth: btnxpuart: implement powerup sequence. Date: Fri, 4 Oct 2024 13:35:57 +0200 Message-Id: <20241004113557.2851060-2-catalin.popescu@leica-geosystems.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241004113557.2851060-1-catalin.popescu@leica-geosystems.com> References: <20241004113557.2851060-1-catalin.popescu@leica-geosystems.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginalArrivalTime: 04 Oct 2024 11:36:00.0355 (UTC) FILETIME=[9612FB30:01DB1651] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|PA4PR06MB8449:EE_ X-MS-Office365-Filtering-Correlation-Id: 9184b558-592f-4092-4574-08dce468b8ff X-SET-LOWER-SCL-SCANNER: YES X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: PTmMTSN+IB2rYLJAXq6WjpCr+54pe4o1dpSAnRlev9AFFvNCAH5BkO3TAKbPDSjB2/WGeAKNqozUNbB2Cs1/CJRqVhDRfRrWYpT2kxcPHkMw1BRfZ0ygKWZ51zIc1rb32yxQ/0Updi8/5KgDAHykALY9J8dFrHEzQF8jtCjvHri/V6Qw1rxjQ1tkGqgEFk7+OyTlWe0KCwPrJ72LTgHkBdGHH0mFk3fAp5uzKY3l2f2RrkRabJSvqy7VBXa1eC/NTvCHnF41L4CGpApyBOVE04vRTIL/De4kt0hd+BtDRTJQmtZ5xlA/+FYZchySzOcy2Qv90ET+PqCmCKw07AqbESDlv6/5Igem6e15kuS4+4JCLa0wpK7rgfThk6QkaSU2o5s5Hl2qOepYra3+vJrGd3hfMKFfLfAXX/aeJVcWQdYVJ6e/+cC0mJLAG9UbiHTEkK20VSoyCAr8nND5E4QjTafuWx65j4h1AVbdF4wNyRqaEgBmPKmbAZhnYuxDW9trw1btxk+4if379GxlRBpAb3nRE9MyffN2FmDgFGO814KAiIJXGA4fwcRm5dkBpJ3JS5KFZT1KJA6y+lURILS3aSReXAZJhcugx8eTjKmOeSRwPAbzebexi43tBas+HoQRv1TuWzpi4mN+jR668M9xmsUEDI6kaZPL78sQQStb+xLRTRgmlIXiKQiVfgNMmjzi43QLa91CkSjYxMbPmdK2LdJzw4WtaBafpA1oy2M3hEnTWdgudpX/WlAR39LnyhFTsyUhkXp2pOOcUY5rOjQLI7OGGjJOixCeCcBRRjL7JI3lv8P3XNYFbaY1gflJNIL91pb6ZH4tQN1/zuwsBRbbeCjKGGGe3MMvKViB4DjF98zLg2ORZLuDIwtOco63PTxVjRK4UXwPxbbaKmJUerNhyMdeCY9iJYX1EoJj2TDygnTOSl+wtW2DI7Nyx698j8wW2Y4boL6jT/BecdrbIk2ERON+5vM/nU7IFaPNHXa7pSOveVpGa7J1QrRM2EGQOUTLOXUDQ5Meg1QbDMXL+AoHtSAPakHCrQq/OM8lNfdPlguftP1JhOZ8ZJPrFZzFwL0b/L4jeU0q8dmYfmtSk9evhGQoE/hKJbN/9xS5eJP6VVelyFURW17h0+GYxhDZcqXDNNVuYBx/LwcoCo2pYzExQHhcdTOzP7Rth4lzQZ3q7UjP+6dpNuMbcQJ7VH+V/HSffGQ9k33J0v+9IL9dToEn0OVktnHnU2RihQtsORoWpqqFFSa1voXv7BR6EQuw8boAwz7Ska2dJVkMujny8sJEDUR1pmFFJHO0sh70VwUiLi4RdFlsQlLuDu5s6ucR5Bazg3vR3CN9gsaam+ctgwL75lnvdYyX0qCSx3VFrOnpBZ/XCqhTmOR7T5w1ZqNq9J5g X-Forefront-Antispam-Report: CIP:193.8.40.94; CTRY:CH; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:hexagon.com; PTR:ahersrvdom50.leica-geosystems.com; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: leica-geosystems.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2024 11:36:00.9986 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9184b558-592f-4092-4574-08dce468b8ff X-MS-Exchange-CrossTenant-Id: 1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1b16ab3e-b8f6-4fe3-9f3e-2db7fe549f6a; Ip=[193.8.40.94]; Helo=[hexagon.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR06MB8449 NXP bluetooth chip shares power supply and reset gpio with a WLAN chip. Add support for power supply and reset and enforce powerup sequence: 1. apply power supply 2. deassert reset/powerdown Signed-off-by: Catalin Popescu --- drivers/bluetooth/btnxpuart.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index 4f493be763b8..e58e7ac7999f 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include #include @@ -188,6 +190,7 @@ struct btnxpuart_dev { struct ps_data psdata; struct btnxpuart_data *nxp_data; + struct reset_control *pdn; }; #define NXP_V1_FW_REQ_PKT 0xa5 @@ -1458,6 +1461,7 @@ static int nxp_serdev_probe(struct serdev_device *serdev) { struct hci_dev *hdev; struct btnxpuart_dev *nxpdev; + int err; nxpdev = devm_kzalloc(&serdev->dev, sizeof(*nxpdev), GFP_KERNEL); if (!nxpdev) @@ -1485,6 +1489,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) { @@ -1492,6 +1506,8 @@ static int nxp_serdev_probe(struct serdev_device *serdev) return -ENOMEM; } + reset_control_deassert(nxpdev->pdn); + nxpdev->hdev = hdev; hdev->bus = HCI_UART; @@ -1509,6 +1525,7 @@ static int nxp_serdev_probe(struct serdev_device *serdev) if (hci_register_dev(hdev) < 0) { dev_err(&serdev->dev, "Can't register HCI device\n"); + reset_control_assert(nxpdev->pdn); hci_free_dev(hdev); return -ENODEV; } @@ -1540,6 +1557,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); }