From patchwork Tue Aug 13 08:20:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13761528 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2133.outbound.protection.outlook.com [40.107.215.133]) (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 93DDB13BC38; Tue, 13 Aug 2024 08:20:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.215.133 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537228; cv=fail; b=M59xCYClwlaw9WzmRjrt9cx5QHgx+Q5mjgrZWQbPyAW4QcqODeUQdrRCZGKG0tiMqae/QGK3WR4Z3P/gran9eSFRVZkpgu4MJDPnBN8f7SXKGCewELZ/q40JvAelyM9SzMKXgkpjQb7HM4s9EuuC2B7asYhNdP7f8F3PP1jdLOM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537228; c=relaxed/simple; bh=2VnM3Xke/V+FBPoCBZ6dXFpkeLfGCL5kEesF20cliAc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BXbJEOj9jseQqpTlrED6xVR0hoieKraS5vN4yf0DlWWTCmC6YZtD92N2NBM97aUh0I2hGAvNK5aBZo7YnOz25jf4Ms2MbL/ywcS5VzJUkpIdT9fYrGJK9/4mLSTe0/lttDsmQfyjDSsQkE3UNAHg/hpv+AD04MHg/KqN1U1PCwg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.215.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=X0QtBfz/XNR38dLpw1LsRbrRUbaGH/Cyvi7jJz5Lr5kODvBpG40HO4uWQpo/Wp+m4+Z4OAew9bAZqeNdEYQENYCERJMgLlU7DRCUgJB0HHYuROGJ4zOwxakB0FM8QC/KHEyTYBVi7V7P7Y3CScTJ+AjcWkXLzHfGVittPq8L4EXD6uGGbU2FehOFUA9j+toczzcItrYe8nzrEJ6SoI6cKI6cnWEfOkGlUzuaesoquMpPca8BmJqINqRyqNZoc3z7Qa5gqYS58beqbcBEHmrBNRcmKVMT26z5PIdpZ0osfzJx3sm8eFK8bPFC6Ur2vN5EK57XLTjzEG8nzmp6A5BP9Q== 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=n3ZCKui3FOaZbR8MmUilWzOmfwqy4Ji7tdvVIJh0aaI=; b=kw3m3ShCOQw7JmvYl5t2cubJmtbPW4Vjoq5+3v+aKDF6Ih+UGBIoh5++v9K1fIb5nulkcHv4zy62+AbPddhFnHDF2ozOtQD0mwAuJV7nLu1kpNTGkaft9n8mXOLSrS4LN9G89cd4umNdyDljcC02yiT53isamhF6mELyOUSWIenx11RBdXqZokHhncWq1wFRm3cP+0ECXoO5HZxwnAT/AO5woJPg1p5rBaw8DeCNPCVVgW2DPvOBYj6+78dwu/DBJNxlUZXmrNe7rEJMaAOrF49AWtLC00JmTC12fE3P2qU2hnBxI9+ecdbbYLDfQDgPEFjnfTceVr17sDdAOQowOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wesion.com; dmarc=pass action=none header.from=wesion.com; dkim=pass header.d=wesion.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wesion.com; Received: from TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) by OSQPR03MB8748.apcprd03.prod.outlook.com (2603:1096:604:275::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.20; Tue, 13 Aug 2024 08:20:22 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7849.019; Tue, 13 Aug 2024 08:20:22 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Arend van Spriel , Krzysztof Kozlowski Subject: [PATCH v10 1/5] dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d Date: Tue, 13 Aug 2024 16:20:03 +0800 Message-Id: <20240813082007.2625841-2-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813082007.2625841-1-jacobe.zang@wesion.com> References: <20240813082007.2625841-1-jacobe.zang@wesion.com> X-ClientProxiedBy: TYCP286CA0309.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38b::10) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|OSQPR03MB8748:EE_ X-MS-Office365-Filtering-Correlation-Id: 36688c96-0b44-4fe9-aaa8-08dcbb70c6ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|376014|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: +WqCOXpOLH6ctJEqt4hNWgvjtwP23ivIH0K0Xl/YwFWmBrERAPo+BgpJgRannxlKkvWtb61Bqkram/fBGd7/6C8jyyQuUnJ1DCiQYniylsxel6Oq6L4XUWBej+8lH2BJYhrHK6dZncuJXAoHOzTH6x6LGJUosJvCtVoX8Fb8omaetlZ13869+0RWNK+VNEdbB0Upjhl2nuRkBe8rvDoiYA8nR6Rm9FW2//r/CEAQ5glAp8QdqEo4qORqG9i4mdqc6EHzUzAPIZe958COdq9RD1sKZ249J2LoPSqLReqczRYS7872MW7CkiaSr+fVVJibdv4t6vU8NYMORG3LmeQ9Ub1xQKS393ioUDCR4MzrX8HLsn0PFsX+dNCtY+U9sGA6Am4DQGEFZWKSU4XLOgkNblULCRzX6fG3cN/jNRbmrZUK3cgxOMHZ+lgzCiu6Pt3eQRQSowDcR5VePz6pFhy5uT3G9kHq1AZ+X0b4nRNHB7AsVsTZtkpp50kPb+5z7vMPDG2Twu6j30EUK8aIUYi2DKjAXngT3Jg5nPqQrHZOxO5yRbcAgR4iTp8A+L7QLYzqNHDdtu51jPTo8JgvwgNTV6M4mQHLYwXEl/I51FdjOayieKjRkpuJhwLKztc/lGeFzv0rXE9TqOy7V9q3U0xo5zVOIpOLpsTvoJNgdUNUun/DyTaqkr+YjaEyaXLk5kVaUORKe6floMmCf4HSpGkelpbTTr0b6FgQxyqcn+IG+lJRwH7MeeJU6n2Ri24/ms7FZfgFUvI+IOppe0uzdcMHCOa6MA4O9ZsjxebRYJfj8KI6KL2WnHaT0tPOTq1PoB9NO4GLpBDHrfxIKc2g1K6y9g9IF6m4oxHwpKVRJijACaqor5b9qtg7C+bTB3RIIZK3XxWxpbPk4dZ7Jy+EWN2xL2BXhdc/B8dCg6WDxnDvuuA/KxSXLBuHtymWuhBE+7FsUh1oJiTlPWaeluqhbIduYNcnT2ShiJoTY7587gPdE+p13gQ8xSS4dX3uHYa+7M+izvS1EVDR2c+0QVqPO/PlS+AC3aPsS+1sj9MUTj1m9yH1H6Aif6Kf00MQG3hBYR8VTD7UmezTxdSReN+Lr+sXol14GhGcMbVA1JHvZH8uCZaesYKOS7sHNHL6SNLElVbt/Tyxim2kjeVCma3OpB72FbtZqR2G1/RA2bUjuVzv7HKR6Zzb/qct/TjjiUgqCI3S0rSzvy/92QkSdeJUKnHHdh3FDs7FIxqORKWzTkIgYKUR9n2a/FXEpWF4bS5t15KpUCnU+8wqKQN9wpaygOT9dIzqlc7xu5Mv4cgB3Sd85vsHGYs6dr/FzDNcGVAydS/mhPXtNa7Z3n1q3n/kS4quoCDORqS+qsyzlg9vjLvlWQY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(52116014)(1800799024)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ku7pPsEc3eOqQvew0AVYZDpy2+959pkqSvugwRAgJuhhfnSHjD0dAmJauT2ogX8ZsbyWRsWOXQRVMqgoZlWOCqcw/zTdCou9kjKZm1oI3u/lJ6wf4BxNiBzYGXCsoDEr+np1JLw/XpXeIOG/3RIhBFY+OOQARjh+kbbZt5GVY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PuA44flA8Bo1sYoXBJ7CqR/dP9pF6qHsEa//+wti6PcTF35KjCpV9tsj709mOAxPN8tMB8yLX/5ppPdRna9p4zksNa8keIvT8IRPe5CqkehfDS4N2H3FLOcXyPv+15G5tLZ0M2lYRp3/nQusIcfS9rbYN02hqNGsn5LnijWDxDcBUSINMLBJqQLx9tKBVSpX6Qdg/Cok62QU8H9UZ/tnCstdUN4RP2xd+/h5+QlvBMooNZIQoMkXxuUjQqqNa5287q/oxMlZ56l7CCDyQGlFmT+tfQIOfXyphqvmCeO0mwyWn3aJNpSItEAZD+KvuM5TGfazEm8DQtHgzeOOurcV5gL2ep0xdDsYSTImfSBoTFmWxeZ4IHhgO/lB+ZM/x7PT3yw== X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36688c96-0b44-4fe9-aaa8-08dcbb70c6ab X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2024 08:20:22.5438 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2dc3bd76-7ac2-4780-a5b7-6c6cc6b5af9b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TK7wNwFVW+lgUUo3xmWOn7rBvCkcfrOw4GnMOU/Yi9hukQyO6P22LE9hRsmhX5v65l7ltbUxlugbCYBiheIOQw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSQPR03MB8748 It's the device id used by AP6275P which is the Wi-Fi module used by Rockchip's RK3588 evaluation board and also used in some other RK3588 boards. Acked-by: Arend van Spriel Acked-by: Krzysztof Kozlowski Signed-off-by: Jacobe Zang --- .../devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml index e564f20d8f415..2c2093c77ec9a 100644 --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml @@ -53,6 +53,7 @@ properties: - pci14e4,4488 # BCM4377 - pci14e4,4425 # BCM4378 - pci14e4,4433 # BCM4387 + - pci14e4,449d # BCM43752 reg: description: SDIO function number for the device (for most cases From patchwork Tue Aug 13 08:20:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13761529 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2129.outbound.protection.outlook.com [40.107.255.129]) (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 877C513BC38; Tue, 13 Aug 2024 08:20:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.255.129 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537233; cv=fail; b=bupa5AbHYm6in1GxNFC3N8hqoffGlQDcCrnsO1FJlwR1GfBIvKFpojYddFQKiI0qbQ44QCU1zywDG+x4j0OJjK+rsrZ3OGCSefA+MS+OnZhoqOlV7BkAnwtF0xaU00ejdGS/ZNJQ4NXfsNWaDkTAuFaDly2jSm0+zrJ5EHYR3n4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537233; c=relaxed/simple; bh=uyVPq0vuS+FMU0odfnlfw0F2eZnLPgwjnpAdPSqAp68=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=uTz6/IR782lYhCF1MEcXJIisVJUIXmLorxNjua/6OvBJZnQhz+YGs4cGxP/HyU7l50fiwsrkJ8qCrpvjMW7E3PWGbgGNMMcMAgBIDBz4uWhudcX3wzViqcYowksl2eDli5MGuNO97u16cKf0h0VmdRs6wmCAdQVzgHM6LolbBN8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.255.129 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kWtKJqTm2qDakxWV1ZuYkbb0qvBtEQmRzMSTdpQkIaY8PiIlHdke66mA+DZ91x2bo/jqeeZIi05372NHcELxIt6dUlOUmm/pWdTPH5FDlcKSA2Y5nhM99yi4QckOwKZOvMb3x75qnZ+Rd2y9h+D1Dwcu09p/pWpNaQPsfBriRS54hM0MHY8k9ecIptKL85ifwSRZb/M0rk3Ok2fW9gxjZOMH+CChaFE2L5cnTHnBlrhMNh6enZrx0Mp1uyZX6pVKk68KDhwL+fZYLdLkFDyOhmSK0qyt2lRF8rKOOnfTUTI4UIbbk0Qug2w5COaYiSeMUQ6gTahBvYeQZ8dQzSe7jg== 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=1iPX8WFIoQ4QXgUD/qR3fD/Finzms7t/FKq4XAi292c=; b=vnynV3dd5JDSHw7N27rDJVN3gwow5QUgL3TCsbzkxztWiRkHDHXSUkFswzlVY+VC9xtlEw00BekgpTHtUlh2V9zIUkhOIY4goH9rV5fe3A0nQjwj6PjZcNafqY9x0j+u1xwe2XlBv6Q54S1mXnCA/oAs9M+uYkL0jmocfsNQHRPv5M+4xP+OPsMilEBaT7dAtO3eb+mOi5xekwSm37AbtyuvPYFGUiKDq91SlLz5UsXFVHKPPtbOroURTG+CsvdgNIXNDFLlEKTJBdarR6BWwAhNgoGyJtLCDLuz6Le9hca+YCv5FRNKwsAoKMhc+ZFjQh3fXWGECfDu1yovNMXX1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wesion.com; dmarc=pass action=none header.from=wesion.com; dkim=pass header.d=wesion.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wesion.com; Received: from TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) by TY0PR03MB8198.apcprd03.prod.outlook.com (2603:1096:405:1b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Tue, 13 Aug 2024 08:20:26 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7849.019; Tue, 13 Aug 2024 08:20:26 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Arend van Spriel , Krzysztof Kozlowski Subject: [PATCH v10 2/5] dt-bindings: net: wireless: brcm4329-fmac: add clock description for AP6275P Date: Tue, 13 Aug 2024 16:20:04 +0800 Message-Id: <20240813082007.2625841-3-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813082007.2625841-1-jacobe.zang@wesion.com> References: <20240813082007.2625841-1-jacobe.zang@wesion.com> X-ClientProxiedBy: TYCP286CA0309.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38b::10) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|TY0PR03MB8198:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b628465-0984-404e-78ec-08dcbb70c8c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: Y2h5FbGouLEupirRCbmtTUOnHScz1xqwW1/vsoiekdWO16LxpsBaZiY4b/ug49K83iHk4FkjLoJFPGnBb+2czS+4vx5wlzbUmpPTwzeeHKqGJ/GSSlIqevm5+LfWP7TbULKsl+3hxppwmKWDR4dVnnVb2AvBuB+xVgI/iRqWw23xAwFg+iDVLll945mKJR5gmlHdyRlz9RouSGfxKh8ZicwSCgRoaafMGa0lbveki2nhEOhscpbthmpCaPJrrxqg6H3QQYX5sDSIrBYGZAxx90pvpRQG864dpnm59+snGZbdRsOajGa8GqYQNXWw0WUOtWCpvvB5u6Ku+PtYK9m0G3wRUs+roKWyKCpvlIRTiZhyaOJdB5N+gbn700Y8OjOFZVs4h2Ge0zsgMP8WjPcz6xntb0NcGaHbFtREaS3ZJwKCGLCl3oP+38srAxZzonQRDv1EZZzaFEHDp3prKukaJByvkDaWgKcE0YnbdnIQg+FzLzaOCYbcHn5yI8tKRRGVGIJ7OMC2p+Sf6kdSp4pVW8ARuwcqMXv+F0Tx91OSKKG4IMh+mzRhi+c2YsYV1uWoURWnLN9EoKQaGLWlaRIKeoiVvSgGCa8+ESDAU9eqnuERtKeFSRPc6LdklxMoU1OPrA2LDAu/JzEV1MACM3zhI61R2E5ZlvbbRgcmsUf7vWIhm6QG2kmlKblxWhnRXGEI5QdRx4gFg4Ro8tfFm1nTOy9s0Llijon7t6gze78eO/FHOE9SV2hmvQ2LYn5+4CH7wA2L/uRXfbGmse0cW7pOZWSP5o15CEIMm82gr+ZX+tWLRi5mWwfTDJnaOfNRHE6hRU30pFI3bsi/idVrhABWnaYvXWUvzYSl8vJv9g6bKutXBmLHcwiABTfuSCqEiDlbnQWHwXrgxeaYOAz3FdO0cNbqchL3A4LYom0bucMIkM7u+T9N5g66oHT2zpjMrs02uMqyz/szhqAdFAJDE+Bte2MMAQgC8qFVm5iZb+eVVpShnWDiCJnsqSLazTvy6ZLzy8yNewiwQNdthsuhyqvhWD7P8+1z0MNy8pNLUw932LOOhFcd5BcufLEeVqvNCqXR8bai+VE2bsCn5zezSnd5xiLeVUgo9XFA0XLVKnTGAk874QtsT2wklKcD7RbBsddyaPPzuD5PJVBrE4Ze6zblZQHmg5HUxBGqgIQgf2hy7xHtQHzEXY1SeZzXYUBya9Nkxzu1NCw1nKtAPI87ZUjeBf7AIf3aB9J/boWFbwuXPwdyIIQZTfT6qI1YZblFJBtMik6GvdvMd2RwMHFzZrJFNq0vXnCd434FYI4sXdeSoYhOSjpuv8to+Jk05mE4Gb86yPOgz5cSRLPgyUGiO9ePaZSUewqeElAWtUVRncaW6eY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38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1VJ68MNqtIUBxMoemXLdQrwS3TfWuQs0mh6lB+QxoGQ+i5TruoyzZqqdnuRS2lkX1pHsDCThZFipMVEJSVgF1TkAYh8h1QhSvOTRIv5SfQCHnyHczuiJRn4LmLoPK/0nWJh0tULbLtBWMKoxKO8RwNUTpvrnvNSREwsxbBLyKu0ZR140hz29aCLvo1wgCckda0kA/0nWmot/a2ZuiR/enTEcaFoHeY4NAGVA89aFuI0Faht1EP6AbW1kw3FVF1/RFbGnDE0bd75l461UUbGkXjIpsoe4D6ruz/UQaQSxtbC6u53YN/UyRmjswzvSQRm7mq6TA8xK6th+sqiYa0lKV85I8+MIyMa0COokwnx83ct0smEdHIdp1/AqP+7FhkL28GlX7MGFRtSA2xeasbts+jnGkCuf9OZXGSf7yPm4oNTBKPdJaXc5hSdSBc2IvzWoBPv2JZBroj+dkLWmUNIY93zI8Tkn91hnvBdW4PMPzvl7gPCCJqgHB41ofVAUum0KLZfllsntqY6UyXhiusHkjaiehqxir3amySLkq/TyZ6nFsTjSih+cr3Ts0l8bisnrMBzTC/dTDX0jhoWes9kakzu1ujKCN4q2zFA X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b628465-0984-404e-78ec-08dcbb70c8c3 X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2024 08:20:26.0367 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2dc3bd76-7ac2-4780-a5b7-6c6cc6b5af9b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: K1Gxo1xNJfXZCcBeiM5y+IYi2Pz0UTShhv//OA41DrhK8sKYq4jIhOS5WCPoEMp7vHfWfdjMpN2paeFG6nS+sw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR03MB8198 Not only AP6275P Wi-Fi device but also all Broadcom wireless devices allow external low power clock input. In DTS the clock as an optional choice in the absence of an internal clock. Reviewed-by: Arend van Spriel Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jacobe Zang --- .../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml index 2c2093c77ec9a..a3607d55ef367 100644 --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml @@ -122,6 +122,14 @@ properties: NVRAM. This would normally be filled in by the bootloader from platform configuration data. + clocks: + items: + - description: External Low Power Clock input (32.768KHz) + + clock-names: + items: + - const: lpo + required: - compatible - reg From patchwork Tue Aug 13 08:20:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13761530 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2129.outbound.protection.outlook.com [40.107.255.129]) (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 4511317B433; Tue, 13 Aug 2024 08:20:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.255.129 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537234; cv=fail; b=hV0cJ1/ckejwQ5AE/ISHB0LXH9UHF6Wf9+noIE/r993gdEYHYftB+r9zlQHjP712APblaXJdXFR8ypjyoeMdoRUg/WEU1w+6IC23zSTTaqNeH3OHc0GTDUrB9XUdHOe2fYKkR1utb8hQ3nreCrcz8qjpje5tX+rFu0e8X8/SyPk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537234; c=relaxed/simple; bh=N/RtFVenj3Z7IEiCR7u1dVjyT5hCGTgxAcs3H2GIlSk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=G3qHGUGx7+NQlcKhdWAVAiR0ED86nXzGOj4G2plRYo/axxAEpTCLV0vzYvuNyqaZ2/30t1NyJEawf3/QmvqQ0Z6UIuQ3O6KIUzOjYEmvhvG7OL9i4sT+Vsdv+hOg7okpwfMlChiOSB9OXTdd70ujAjpOPG2+vvvZResWYj18NHc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.255.129 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b1G1X9CZDfG4BlquAT86QT84GRyB2i1Hwf/HIb2XteZhOH328pjBBOe+DP1by6gxrkpr+xmiHQOMPMi5wyTia5LCwsC8ehPelMbCZRmbi06ZBL5QEp92fpRjpoDlSBY7MAJCwaZMC/ein2yeCwgTqb0fwWg82Y4bvm52HnChhVNCpAfGIvET+pg0A3rllb3Eafu2J3ah5kuUDuv0ef6eTa11f2VCv/mat7FVbthcJeLsyVYlhX1lNXWLDrHNSboIzwA/fNDQNLlCCgXlF4bGxoZqWljWaguJLUYF0iACiN21So4CGgSzqXaR+XR1y67jPPWPADTjYRQJjEIinf3Q3A== 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=vnTJOa4JXmWzrBFSD6Yx6B5bbeWEUpHWGbPOD0Sh4do=; b=dcyu0n7RC70xpwSPwH1djke6hTE5T/K4IDobqd2AcotgI2HTYl7c+yGUrJIWVp6LLPtwf0+dyyjV77g5dgI/iCMHriRBSXL60a+qv709FAbL3tp3Sr9EDP0tuC3xntBiieObXTZK2JteoC++SM0YKMqho4WB0ZV0rToAFPTMTNGS8oQ8pd6VW/HkYjxtv8JwJimgwJb8RSncc9xvVlxhBioP86yzvNvqTQoZ80N0dx0v2XB7LtTxuk3V4OxC4/Jx2g+nKKzsi73wNB+jPpxNQAorL9kmZSQAPFKlfl7XgcWVtiQjMdQDASeqdTvm/rVpOu4ZfmHKEqjNX62Y/P/5bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wesion.com; dmarc=pass action=none header.from=wesion.com; dkim=pass header.d=wesion.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wesion.com; Received: from TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) by TY0PR03MB8198.apcprd03.prod.outlook.com (2603:1096:405:1b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Tue, 13 Aug 2024 08:20:30 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7849.019; Tue, 13 Aug 2024 08:20:30 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Arend van Spriel Subject: [PATCH v10 3/5] arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 Date: Tue, 13 Aug 2024 16:20:05 +0800 Message-Id: <20240813082007.2625841-4-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813082007.2625841-1-jacobe.zang@wesion.com> References: <20240813082007.2625841-1-jacobe.zang@wesion.com> X-ClientProxiedBy: TYCP286CA0309.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38b::10) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|TY0PR03MB8198:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d312b14-9a55-4ea6-1bf9-08dcbb70cb17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: PqvozcjSfvjHLwQstIdowLH4k9tsbQZs6GtBXmuFqHMTKHGfxXW/ZJXDE89uuNzS/KbiKy61S9owHZgRRB2MZII5FFlfdW3OrwNyQUEnZRhqDEbFdiYaKThJuLpSFmkM8Ltk+cvN14NicDR9CBVc7gBM8opuBX1NHZ5mwhAs/m5tBMhzwwCnmj1qs96qO+iw6CLQqE7TEaJsSKAtB2JCuoU8EsLSaRb+uu77g5JYr9xEUyRTid0Tmuvppb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ZiisOLkda63DIIjVfFlHdqvUfcNqElxPz3S10g7tPGXdYY44Ngd3MqPys1zT0P0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: //1Yi80VP10FLLNn0uqTKKxsYUzg6uivOa+gL9p6X1dgzrYo4CNREfcWAltwt3UxfA6ZH3rQoBenKwGX8YznNdxrNpjvjpqeL92fLRsNPmN/pc25wHdHjq/Ooyvw9TFC6u5s24lB35pnGdjuOGlGSlUs7My6Wdf+CSaRWu/wTNVveUNSUnH3w189cD9lAv/p/YoBzu3jpJKebmkTDZqJacjDN12Dns0yMlYRO0e3PLtDkB8upQEwd73FCPQzNhkVm9z0r7O+5ILc8ASQXJX7fl/e+0E/CcTwbBVud6fnTvbecZdpUtKOCVKn9lKICy1xuneqrtH2w1z6RQ/cxg8oC7V+8B+mTCGkVC6xtdqvGvidZyY6L1Pvo95OcvWWppee0P6M/ofGZhJUNML4zdFiOJRNEUGJdbV4I4alQRfJML7fq5eG9eYTj0sTaZhJZiHNtZs+Ali9J0773qbEvjDvs0lJ4dtSlt5TohmHJOgovtiQnWhWg/OZzD2I660gXBp1Z/XRDuiAwDh9+7yUFNMvfh8mBFVeMZyafqKRIO+BoRKyqQ2pz54IulXtYaVhGEW8bQcjH5mO73bZ+MX8m0vWsUsTIHdnLROqs122skVieYUr/+L+wsIuFLuv5clQevA2vz24m/pd8bBqU9Ay1NZDgeRWnUamGYs2h/dDsNaUr1HoWO0WrPM5tr3Ldzqu8cUgztUD9WfrSEMvHxGHdAVUMPL1PrXBDxfOZiGYx1CY6rp40Vg4kj5p18Yu0hXwofrXESiNt/V+k8CgGojDf4EojhjDtDDo/xxQYr3x0BTIPR2HMZf7omRvSbEKpukFQx1msQmsVD3t9nnzcLcM2NfHa56eoafjnrxSe5UXaADbh/9pEmqp8xgx19rx8QZvhmYQB6PKJ0Klw4HBvDE4B1vn/fs6SPJHa8KFVploB9MN6rK8qc0UW8GSvJl+TPuIuaN1DXq2t5pBxwfkW+PGAVDlNuhvBsjHe4vkFGEmZC+0IctQiR4o4vUv5/Bg083UHRiX3d1sHWai30F0cWgz25vIFXi2WnFddSxMqvbTbEIhrRm+eRCrxUEVNrP56Bxt5zdtGtd13dGbwUISFzjeNEU8BUulFDz9IB11scolBe2bms4BGFUpE2RfwSMSGScVsFgY9njFXfV7Np1kBk7k1gAyMhVmnP2IaHm1NZd8MKcb23jB7tKJMQjMKd+dWwpm4XDlPuF+RVUP1smddVlVgQVIlyzBUe3qyWF5ykAZLVdDU1zkX0wjJnskAkEt91R0w6MaW3xEK13gOLdhVFvCQKEW8apz3r6F03wD9Is5U8fgmPXZ32poyHozLyputGflqAO69nhvUQVFodcefoyeQm77ksfvXCN7Jo/1xidnQmyZmzTlyUPlt6LGQYi0aWGn5AGKPWX7Z8Jogizq8A7uhuouoa/2GEbi0UalltgQamvnTFebHJyZ5zxtUHWI0qMKLu44Xhm7jyGORn32O0WqApKeuM3LGixIE432g+c9Kyu17qDyFX//8JDDdX8Zb3GZo6txxwvGtUD7wysY8BLaY8ioPDUNfVlFakAp1zB0xQTqKaTR/vgzc7IGhnQRV1++2Uwx X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d312b14-9a55-4ea6-1bf9-08dcbb70cb17 X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2024 08:20:29.9402 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2dc3bd76-7ac2-4780-a5b7-6c6cc6b5af9b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oCXCxZH8pDMQtMT9TyaFiSF3+lX/UzckakARnUe712w4E/87BqBBrndyrtsLYmy6aEPnH9bPCORZrzyq/VdBZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR03MB8198 Khadas Edge2 uses the PCI-e Ampak AP6275P 2T2R Wi-Fi 6 module. The pcie@0 node can be used as Bridge1, so the wifi@0 node is used as a device under the Bridge1. Co-developed-by: Muhammed Efe Cetin Signed-off-by: Muhammed Efe Cetin Reviewed-by: Arend van Spriel Signed-off-by: Jacobe Zang --- .../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts index dbddfc3bb4641..a3361ca25867d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts @@ -283,6 +283,22 @@ &pcie2x1l2 { reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc3v3_pcie_wl>; status = "okay"; + + pcie@0,0 { + reg = <0x400000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + device_type = "pci"; + bus-range = <0x40 0x4f>; + + wifi: wifi@0,0 { + compatible = "brcm,bcm4329-fmac", "pci14e4,449d"; + reg = <0x410000 0 0 0 0>; + clocks = <&hym8563>; + clock-names = "lpo"; + }; + }; }; &pwm11 { From patchwork Tue Aug 13 08:20:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13761531 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2129.outbound.protection.outlook.com [40.107.255.129]) (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 0073717D8A6; Tue, 13 Aug 2024 08:20:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.255.129 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537236; cv=fail; b=fwsOAydJxJVJipsWidR49Dpa+4bQbIsnLLyegpV5FfP6Q8MRZDufgG3aV4E7p+Llm2mo4kM1V9sAx8+GBBaWPWx43gLfgwyXSGD2grmFPQZYgPJBsLZTRjocvfacX8nc982D7sNl/9xLdpZb3RGKZLSrzxBZzC1YB63Zffu7MqE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537236; c=relaxed/simple; bh=AyXwZpIbxBRf84MlIw8HPcqsU+uVrkk4+1qelC++a04=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=b/9MLa6L+uUNlrzg4T9gc10htoCW/vG5aY3rOT4O3R+RjhIw6vxEqx/DkknSqKzVvQwOdGJA1DBDGM6xp0kwuiDv/2eyhirwL9qbXliBb7iuwhtJdmRIz79Z6pAERhs8KBciwpiCwAesrdCXltYUyYXa+W4LWeuCfhFVoRQQIaU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.255.129 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vd7UQRCfdrkv6hjWBgP0771o/B1rqzoJz4Ai1iCyrRFB8jiU8EFes7LsrwZrTBz/Fv2GjK+yXFjVCr6d7Tk1PlS7A9W547rJ6GCFh9XUHrojrgMOb3rgjUBUkUVdwkSw4Nbv6a5G3YiY42Goi5xClfmse1C8Vw+RRcXZnEMh+vXpXXNjbBXYi03kX555iFB5Y8iZagxgg2Oquj6RW6ufO/UrATqZp1rZTYz8a8JBi+SQRPWzN4aHnxc2Pe99uS//pFl7zdXd26yOF4DJc9QISLqwy7nwxegWWuSG7RcTnCp2Ie6ODIhBnWkM64idNrgI9Av1YJqO+egpQl+9BwsBZw== 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=0QpzFC4HD49dy4gOxRxAJivncpeQIUALprUAIvm2Oc4=; b=FimB1DGBRn/RTunVI6MmwWfJQiV4KoxFq9AAxj90x5nnfcoYJvAgKUta2H0UB/jULQr8ig23NwkFcSpOM6yNJIC2bSvJeHQKkqyn6OEg5CXOtpFatXQ2GxN/wvN0sdHLCVZ8rZYtsN71bKAuDp7aqdKHkVRV5kn44LcM6EJB0LPSvuyf8UZIxgxw3irBpsqmZmBUOjIximGrmC+J+fnSy+XDqPjzMfd6Zc3RjViB7rgOXW/QgdR1vNY/s74yYhka+VAeDmd8CAZ6vZDrkEMs5fnJqyOaTKgZdxzywK4IPSeOJDkzKjZ7AOpu8iHMPgXixbqe0/GN/daSKHO/GOw3sg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wesion.com; dmarc=pass action=none header.from=wesion.com; dkim=pass header.d=wesion.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wesion.com; Received: from TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) by TY0PR03MB8198.apcprd03.prod.outlook.com (2603:1096:405:1b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Tue, 13 Aug 2024 08:20:33 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7849.019; Tue, 13 Aug 2024 08:20:33 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Arend van Spriel , Sai Krishna Subject: [PATCH v10 4/5] wifi: brcmfmac: Add optional lpo clock enable support Date: Tue, 13 Aug 2024 16:20:06 +0800 Message-Id: <20240813082007.2625841-5-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813082007.2625841-1-jacobe.zang@wesion.com> References: <20240813082007.2625841-1-jacobe.zang@wesion.com> X-ClientProxiedBy: TYCP286CA0309.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38b::10) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|TY0PR03MB8198:EE_ X-MS-Office365-Filtering-Correlation-Id: 02a133dc-f2e6-41ec-bb11-08dcbb70cd2b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: 6TvM9X/dHdXO3h80Pzi8vIY6ybDOVmXWF/Zv6KV2SLbhQ6FyHMx3JQS9py+n36a+p3kKW8Dr2uKz681NRuaLa7JaYKrt1mMuziZJMCyNp8DO9sTc3+B2Db/TiS51Ps6El+zERw0jvExQFyNCmW8xpkVZWvLp0jkwTB/qYGoTahNLaUJ0xIgP42WjWRUHrco4U2H/+cGWSChQig/bfd9/8P/5GFTIbwvQUVbqL+sWpuRDTzRSDkXFTEUG1s5xnQ9+1KtI65EhWoUxPrdZ7nKKJMiw/OORgk91Q6ygbumgxowVSNLXrNTUfLpHSLOr0Lnqa1fNo80LRPArAX+avxHyttopUKLlazwUZWNR5oxjeWSPkZeBzxxspnKxRlttVV1gXw2PJTFvfzeFtXP4W9ljXJtBn47hrRogDeSU8tBqFzhBsf8B3C4qoSG0J5jJjVjArH9bcEushOn9AUwN2hJ11JcAjOXst081XxmWlehB4jNyfc1SEfqQZeAnrjST3OylR0Q4T+np3cI15mhYBwHgm855FoJ6s/helAzilRvshWY7AhsYyg7XUptB3sosU5n9FRsh89XczzgQWeENtIV8ojXpIAFKo7662yYIPqFEH/WIAY/6tGA6jHVrDF88x/GREjJUOg/tSqde+9EjfWEdm9poLeAQp/fORlKlpTExYgZWzXml1NJIwtaYWclBrYN9qeLm5hW/M9exG2uaQKWzkiJgp/aFh7/WZ9cbaweb//oP+yZ3/YllfEHiZgoZbFJJNnbQHf698e3K2n73ehhZ2XAaaW2LxhMcP++cKwX98AUAdAc4+csU5aS+8KcKjZo7aKiMerVoKTt/REPwmUhXtJ9v4diJzs5Z7ideAAKPZ13c+u+2UgWSec4kRab3Jqhtz+rU1TYbYTrjoHQfy5tLc6BEo2HTIB2od/zfT13dvZDQiHdp5EB74PZU5w0kc16zLlszUPlkH/nVVcyA1hFQJu7iwQreT7IsvMbBmWA+HE1BmJmyaUuGCxK/eiAymU1xJyxgnGg+ykYS5MtFcNtZNBNXEjQD16KHVklQ7qVNTzdkEZqTs2ejz+2gdPPVmnvp8JOTPLnTtOKYeRHQnlP33T/u437LKocGysVGFY1yLijQfvkR6kbk5zZp9kLypeFxADc5Y6QgQt47HzY+OwJKZ3d3RL6qlabcpZzlD4KdYSLMmS4ZkDO8OjqmD6+90tJSmApKufHvmW3viFkZQJsHvscnpqF2aJtCNiB11QcA9Yb421OTbO4HH9hzSiJb4BoMhTOFRF7FIUFay2q39LVbilwElnnazMOYE+89gXLpTcnEZTP0fu1uJVMD3p4P46cnpMfu9SNVDKUEEyyww1wgP08+je0KZYMo78l3OTCT3sQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 59sqRKLyfsnpbVEZAwrWrXioNNbmW89PIRr8nnNFfp7ypyHQJzQJ4YJmOVfOApvn+0DEHOg2D8aB5A77rBFkiiUKlggYQeGihL/rvA6T7D7ymvSMYpg03JxSyuACVSX53+r/BCXz31ufHX2iu016JhN6Bi0xvgUiEfuCc1twsUrJDS2ZYRfnYZ99dg3XY8o1f9EbCWmW9OZSwzhLrqTbFzycgKVJ1IFODwtroHHXkYktZwWrlm6Q2050ygXLtNI+sDWKB5amkcVW66EJJnauKnb8cJz7fuJGCiAjKCqC+nuSBVz1/d4/qp0xg/ZVi7Oo38VuhMPOLZ7Vat3uz4Y76m9hMQ/oy5N2KuZsv9JDnyUHQrB7YKkW1BGIfHCxa7f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u+q3LeB+fBkOjgx3JBw77qrnQxmGMbh06oEHPxRiLGqSf9jZcHdQSqZpeirc6meBTVSOlzby3hPpF1Ko8VkGpXnT94f5cVk/54JwEYE0ifoOpco5jMR29+qJV8F39bm15 X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: 02a133dc-f2e6-41ec-bb11-08dcbb70cd2b X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2024 08:20:33.4325 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2dc3bd76-7ac2-4780-a5b7-6c6cc6b5af9b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DCO42TpiT/sOCvw8boo0tzUzozv4alzGaCIsPGoynFZda70zKoOTfTYR1f5sVSWflPpujKPqMUSTfiq5oNCqbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR03MB8198 WiFi modules often require 32kHz clock to function. Add support to enable the clock to PCIe driver and move "brcm,bcm4329-fmac" check to the top of brcmf_of_probe. Change function prototypes from void to int and add appropriate errno's for return values that will be send to bus when error occurred. Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Co-developed-by: Arend van Spriel Signed-off-by: Arend van Spriel Reviewed-by: Sai Krishna Signed-off-by: Jacobe Zang --- .../broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 +- .../broadcom/brcm80211/brcmfmac/common.c | 3 +- .../wireless/broadcom/brcm80211/brcmfmac/of.c | 53 +++++++++++-------- .../wireless/broadcom/brcm80211/brcmfmac/of.h | 9 ++-- .../broadcom/brcm80211/brcmfmac/pcie.c | 3 ++ .../broadcom/brcm80211/brcmfmac/sdio.c | 22 +++++--- .../broadcom/brcm80211/brcmfmac/usb.c | 3 ++ 7 files changed, 61 insertions(+), 36 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c index 13391c2d82aae..b2ede4e579c5c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -947,8 +947,8 @@ int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev) /* try to attach to the target device */ sdiodev->bus = brcmf_sdio_probe(sdiodev); - if (!sdiodev->bus) { - ret = -ENODEV; + if (IS_ERR(sdiodev->bus)) { + ret = PTR_ERR(sdiodev->bus); goto out; } brcmf_sdiod_host_fixup(sdiodev->func2->card->host); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c index b24faae35873d..58d50918dd177 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c @@ -561,7 +561,8 @@ struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, if (!found) { /* No platform data for this device, try OF and DMI data */ brcmf_dmi_probe(settings, chip, chiprev); - brcmf_of_probe(dev, bus_type, settings); + if (brcmf_of_probe(dev, bus_type, settings) == -EPROBE_DEFER) + return ERR_PTR(-EPROBE_DEFER); brcmf_acpi_probe(dev, bus_type, settings); } return settings; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c index e406e11481a62..f19dc7355e0e8 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "debug.h" @@ -65,17 +66,21 @@ static int brcmf_of_get_country_codes(struct device *dev, return 0; } -void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, - struct brcmf_mp_device *settings) +int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings) { struct brcmfmac_sdio_pd *sdio = &settings->bus.sdio; struct device_node *root, *np = dev->of_node; + struct clk *clk; const char *prop; int irq; int err; u32 irqf; u32 val; + if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac")) + return 0; + /* Apple ARM64 platforms have their own idea of board type, passed in * via the device tree. They also have an antenna SKU parameter */ @@ -105,7 +110,7 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, board_type = devm_kstrdup(dev, tmp, GFP_KERNEL); if (!board_type) { of_node_put(root); - return; + return 0; } strreplace(board_type, '/', '-'); settings->board_type = board_type; @@ -113,33 +118,39 @@ void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, of_node_put(root); } - if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac")) - return; - err = brcmf_of_get_country_codes(dev, settings); if (err) brcmf_err("failed to get OF country code map (err=%d)\n", err); of_get_mac_address(np, settings->mac); - if (bus_type != BRCMF_BUSTYPE_SDIO) - return; + if (bus_type == BRCMF_BUSTYPE_SDIO) { + if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) + sdio->drive_strength = val; - if (of_property_read_u32(np, "brcm,drive-strength", &val) == 0) - sdio->drive_strength = val; + /* make sure there are interrupts defined in the node */ + if (!of_property_present(np, "interrupts")) + return 0; - /* make sure there are interrupts defined in the node */ - if (!of_property_present(np, "interrupts")) - return; + irq = irq_of_parse_and_map(np, 0); + if (!irq) { + brcmf_err("interrupt could not be mapped\n"); + return 0; + } + irqf = irqd_get_trigger_type(irq_get_irq_data(irq)); + + sdio->oob_irq_supported = true; + sdio->oob_irq_nr = irq; + sdio->oob_irq_flags = irqf; + } - irq = irq_of_parse_and_map(np, 0); - if (!irq) { - brcmf_err("interrupt could not be mapped\n"); - return; + clk = devm_clk_get_optional_enabled(dev, "lpo"); + if (!IS_ERR_OR_NULL(clk)) { + brcmf_dbg(INFO, "enabling 32kHz clock\n"); + return clk_set_rate(clk, 32768); + } else { + return PTR_ERR_OR_ZERO(clk); } - irqf = irqd_get_trigger_type(irq_get_irq_data(irq)); - sdio->oob_irq_supported = true; - sdio->oob_irq_nr = irq; - sdio->oob_irq_flags = irqf; + return 0; } diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h index 10bf52253337e..ae124c73fc3b7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.h @@ -3,11 +3,12 @@ * Copyright (c) 2014 Broadcom Corporation */ #ifdef CONFIG_OF -void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, - struct brcmf_mp_device *settings); +int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings); #else -static void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, - struct brcmf_mp_device *settings) +static int brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings) { + return 0; } #endif /* CONFIG_OF */ diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index 06698a714b523..c34405a6d38b8 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -2457,6 +2457,9 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) ret = -ENOMEM; goto fail; } + ret = PTR_ERR_OR_ZERO(devinfo->settings); + if (ret < 0) + goto fail; bus = kzalloc(sizeof(*bus), GFP_KERNEL); if (!bus) { diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 6b38d9de71af6..462fc669b959c 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -3943,7 +3943,7 @@ static const struct brcmf_buscore_ops brcmf_sdio_buscore_ops = { .write32 = brcmf_sdio_buscore_write32, }; -static bool +static int brcmf_sdio_probe_attach(struct brcmf_sdio *bus) { struct brcmf_sdio_dev *sdiodev; @@ -3953,6 +3953,7 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) u32 reg_val; u32 drivestrength; u32 enum_base; + int ret = -EBADE; sdiodev = bus->sdiodev; sdio_claim_host(sdiodev->func1); @@ -4001,8 +4002,9 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) BRCMF_BUSTYPE_SDIO, bus->ci->chip, bus->ci->chiprev); - if (!sdiodev->settings) { + if (IS_ERR_OR_NULL(sdiodev->settings)) { brcmf_err("Failed to get device parameters\n"); + ret = PTR_ERR_OR_ZERO(sdiodev->settings); goto fail; } /* platform specific configuration: @@ -4071,7 +4073,7 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) /* allocate header buffer */ bus->hdrbuf = kzalloc(MAX_HDR_READ + bus->head_align, GFP_KERNEL); if (!bus->hdrbuf) - return false; + return -ENOMEM; /* Locate an appropriately-aligned portion of hdrbuf */ bus->rxhdr = (u8 *) roundup((unsigned long)&bus->hdrbuf[0], bus->head_align); @@ -4082,11 +4084,11 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus) if (bus->poll) bus->pollrate = 1; - return true; + return 0; fail: sdio_release_host(sdiodev->func1); - return false; + return ret; } static int @@ -4451,8 +4453,10 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) /* Allocate private bus interface state */ bus = kzalloc(sizeof(struct brcmf_sdio), GFP_ATOMIC); - if (!bus) + if (!bus) { + ret = -ENOMEM; goto fail; + } bus->sdiodev = sdiodev; sdiodev->bus = bus; @@ -4467,6 +4471,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) dev_name(&sdiodev->func1->dev)); if (!wq) { brcmf_err("insufficient memory to create txworkqueue\n"); + ret = -ENOMEM; goto fail; } brcmf_sdiod_freezer_count(sdiodev); @@ -4474,7 +4479,8 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) bus->brcmf_wq = wq; /* attempt to attach to the dongle */ - if (!(brcmf_sdio_probe_attach(bus))) { + ret = brcmf_sdio_probe_attach(bus); + if (ret < 0) { brcmf_err("brcmf_sdio_probe_attach failed\n"); goto fail; } @@ -4546,7 +4552,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) fail: brcmf_sdio_remove(bus); - return NULL; + return ERR_PTR(ret); } /* Detach and free everything */ diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c index 9a105e6debe1f..f7db46ae44906 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c @@ -1272,6 +1272,9 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo, ret = -ENOMEM; goto fail; } + ret = PTR_ERR_OR_ZERO(devinfo->settings); + if (ret < 0) + goto fail; if (!brcmf_usb_dlneeded(devinfo)) { ret = brcmf_alloc(devinfo->dev, devinfo->settings); From patchwork Tue Aug 13 08:20:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13761532 X-Patchwork-Delegate: kvalo@adurom.com Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2124.outbound.protection.outlook.com [40.107.117.124]) (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 B2698189BB7; Tue, 13 Aug 2024 08:20:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.117.124 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537242; cv=fail; b=u05qr6hSLuzXmqN0K5CPFkqETS3fFPkv2hMoTTY5ZfwH/n39Fa/YHNWuHn/Ale2R47N1Z/EoVoA6mY+OCN8QbH9bNaGRa2iu537uIdlKhBAR7Ef6CqyLb92J2w/qKkcPXWMrQcFjWEa5wyDwSpS5pCUR9fFp+BZeXTkyZFKISUE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723537242; c=relaxed/simple; bh=z/JMI1ioorJsC5rpgzgpHUYttwWsJh+gThzg/mM6S6Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=BKAUgZ3UQDbo1zMikeHeIPx0cI0GGAT+8ktg7DDsZPCq/iMYZsHLAeGFobDFl6urSNnsUwLF2Iw3DfBULpHk0J98dCNnLa8CVvXLTSfNB72d3NkNDKGii3NsxLkGVhZJb1Z8SmNp+IDfv9IGvzT8C5azSM8Dkgu5QT0d+EL2Ojo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com; spf=pass smtp.mailfrom=wesion.com; arc=fail smtp.client-ip=40.107.117.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wesion.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wesion.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tEfanvXXwafeOfAWxv3I3SonX5KgMZTfYDZiUEh7H5ttTUKlNGKxS+0VhuB2L52LF2JEdAfjeH+/JgpMjZOFUiH2fHcN/nqkIHeA/tV70EQrMahlyZuFO47xwkHAU3ZGU5vrKDdvtNhDFmOUo3OrakteS3dXHb6c7TMSrQuECrJWY0ythKlXaTPa8nNp60oQ6XD0JevbbRTCi7GsFWkLev0MPQ/vZh0/ki5keO0fcI5319RKGE3KFcUYXg3NluecYmm/KPLx/Ztii1KekNoJA2M9vIYyR9J25Ngs7L9kf84scXW1wyGi37l8i+vt4T9VKgUcPnAkHgebQfG606ZAjQ== 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=ZWqN2d2WV5H3rjNNY/SuBA/Is/G4XlfllfCP+MEOJRA=; b=MRyxElc6Z7kfLutIJk9revrFg3wXcasGZd0RDKGDluVMT8LJV4UVYWb5KpyzKJNZ6qK8MsUDsx2z7R7XUp2IR01aFohFoLOUylW03rhqn2i9mR3hKsETfCojark3oTn5LCm+kCTznZV0eO/pBEE/2nR45ja8uDuTYqQ6+U+y8Bxd7NWcuJf9qC3H5YRncWP30ZQwsFPW1wy2LajrzRCIyds9GYFjNuslSS4pEs57n7P3vr6eiSD+1RfK2oLqYKRYrAwnhyoJPV8FfcbzuAMVkqET91L0JqSwSFizNyoBZ/9ELztiR/jBjOQRHvUZyviY22PZxyJ20N1XenWaKuqbkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wesion.com; dmarc=pass action=none header.from=wesion.com; dkim=pass header.d=wesion.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wesion.com; Received: from TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) by TY0PR03MB8198.apcprd03.prod.outlook.com (2603:1096:405:1b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Tue, 13 Aug 2024 08:20:36 +0000 Received: from TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0]) by TYZPR03MB7001.apcprd03.prod.outlook.com ([fe80::78dd:5e68:1a9c:36c0%6]) with mapi id 15.20.7849.019; Tue, 13 Aug 2024 08:20:36 +0000 From: Jacobe Zang To: robh@kernel.org, krzk+dt@kernel.org, heiko@sntech.de, kvalo@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, conor+dt@kernel.org Cc: efectn@protonmail.com, dsimic@manjaro.org, jagan@edgeble.ai, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, arend@broadcom.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, megi@xff.cz, duoming@zju.edu.cn, bhelgaas@google.com, minipli@grsecurity.net, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Arend van Spriel Subject: [PATCH v10 5/5] wifi: brcmfmac: add flag for random seed during firmware download Date: Tue, 13 Aug 2024 16:20:07 +0800 Message-Id: <20240813082007.2625841-6-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813082007.2625841-1-jacobe.zang@wesion.com> References: <20240813082007.2625841-1-jacobe.zang@wesion.com> X-ClientProxiedBy: TYCP286CA0309.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38b::10) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|TY0PR03MB8198:EE_ X-MS-Office365-Filtering-Correlation-Id: aa3fca04-3fa3-466e-0fc6-08dcbb70cf30 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116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it4l3n4hkASbXF+1hIXV0q01EB0VuXYQ7mXzWyg0Qh6qw1chKmFGBq7zP24UhUDk0HsWKYeVQtOZCgALjTLrsgdE4QiPRXsTNetBQKedK/ScSB3ZfAmqcvyUk7PEOB7Y9jncwXA74YvdoJQjlDxW8ZUoa6X5L3ClXC3OdKZ+Su5zVEGVBMSlO07OPNGA61u5QdpyYHYCCCY42z17yN6SipTZltQwkoclsFkw9j/f2uUooiAO7nB1d8Iq0suRUqkfn6YraIh0KiaKK5httkG6F1U6Zm4RvRloTwgrLFDh+y+gDo6cw/Kvoa1yogmeI6GyVnrqGIeeEGAM8LGHsqXS50w= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR03MB7001.apcprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pAaIpsX8MDBxfJd1w4k05ZwROQiiFkz6OBajOfqYl1/DyHR8UeUBlUdMLTRzS/sWUzjIOtajK+MkRhZ1Nv2Hb9jl+FyHseCBgfiLu2WvwbwqgrsCD7HmqNxWpm0jgCBj3TO9ef9Zl57eunh4/PpTJc5TKbQMYjJISbFUJ/EcFOWoXbTeOx1+4rZ6fhAJRec8680rkP37pKhLnyxoXbx20uSrLiuml8u8n040bX6ihs56n5bNNyYhCZHblNCtnXl14eD2hViFWK4WJFyEJNiCY1PYjmQnfvqtqrZxwwPdJtetOAzyXfc2rTFlZCAq3A9+otYi8jDPYSqQ6MpLBGUqeVAjzIHDK8W/U4FSn18z4+Wq8fofiH02hoxaJo60F1rdBEdGyJvWGNe70YHL4Fu+aLOhFnILq511sRrRX9lxB0mBHvejfG1y3dhRKE1xPm45gKqxNxxDWveEMSmE93WgYOH7vD0gg9gvFAeKrVMhp2pg07aHtf7Ak6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q40BxWQnCXDLFYdDHUjPCP6sy9ClUtzn X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa3fca04-3fa3-466e-0fc6-08dcbb70cf30 X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2024 08:20:36.8388 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2dc3bd76-7ac2-4780-a5b7-6c6cc6b5af9b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: C9J5kkelgHudKCKdSb2ne4yebNd4Dy3LSJtDYWOtuppjEON7hJkry7KcqBNeZeJFyz+6BJhZDuAO0s6Tky6vwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR03MB8198 Providing the random seed to firmware was tied to the fact that the device has a valid OTP, which worked for some Apple chips. However, it turns out the BCM43752 device also needs the random seed in order to get firmware running. Suspect it is simply tied to the firmware branch used for the device. Introducing a mechanism to allow setting it for a device through the device table. Co-developed-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Co-developed-by: Arend van Spriel Signed-off-by: Arend van Spriel Signed-off-by: Jacobe Zang --- .../broadcom/brcm80211/brcmfmac/pcie.c | 52 ++++++++++++++++--- .../broadcom/brcm80211/include/brcm_hw_ids.h | 2 + 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c index c34405a6d38b8..e88fa4cd62a1d 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c @@ -66,6 +66,7 @@ BRCMF_FW_DEF(4365C, "brcmfmac4365c-pcie"); BRCMF_FW_DEF(4366B, "brcmfmac4366b-pcie"); BRCMF_FW_DEF(4366C, "brcmfmac4366c-pcie"); BRCMF_FW_DEF(4371, "brcmfmac4371-pcie"); +BRCMF_FW_CLM_DEF(43752, "brcmfmac43752-pcie"); BRCMF_FW_CLM_DEF(4377B3, "brcmfmac4377b3-pcie"); BRCMF_FW_CLM_DEF(4378B1, "brcmfmac4378b1-pcie"); BRCMF_FW_CLM_DEF(4378B3, "brcmfmac4378b3-pcie"); @@ -104,6 +105,7 @@ static const struct brcmf_firmware_mapping brcmf_pcie_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_43664_CHIP_ID, 0xFFFFFFF0, 4366C), BRCMF_FW_ENTRY(BRCM_CC_43666_CHIP_ID, 0xFFFFFFF0, 4366C), BRCMF_FW_ENTRY(BRCM_CC_4371_CHIP_ID, 0xFFFFFFFF, 4371), + BRCMF_FW_ENTRY(BRCM_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752), BRCMF_FW_ENTRY(BRCM_CC_4377_CHIP_ID, 0xFFFFFFFF, 4377B3), /* revision ID 4 */ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0x0000000F, 4378B1), /* revision ID 3 */ BRCMF_FW_ENTRY(BRCM_CC_4378_CHIP_ID, 0xFFFFFFE0, 4378B3), /* revision ID 5 */ @@ -358,6 +360,7 @@ struct brcmf_pciedev_info { u16 value); struct brcmf_mp_device *settings; struct brcmf_otp_params otp; + bool fwseed; #ifdef DEBUG u32 console_interval; bool console_active; @@ -1720,14 +1723,14 @@ static int brcmf_pcie_download_fw_nvram(struct brcmf_pciedev_info *devinfo, memcpy_toio(devinfo->tcm + address, nvram, nvram_len); brcmf_fw_nvram_free(nvram); - if (devinfo->otp.valid) { + if (devinfo->fwseed) { size_t rand_len = BRCMF_RANDOM_SEED_LENGTH; struct brcmf_random_seed_footer footer = { .length = cpu_to_le32(rand_len), .magic = cpu_to_le32(BRCMF_RANDOM_SEED_MAGIC), }; - /* Some Apple chips/firmwares expect a buffer of random + /* Some chips/firmwares expect a buffer of random * data to be present before NVRAM */ brcmf_dbg(PCIE, "Download random seed\n"); @@ -2399,6 +2402,37 @@ static void brcmf_pcie_debugfs_create(struct device *dev) } #endif +struct brcmf_pcie_drvdata { + enum brcmf_fwvendor vendor; + bool fw_seed; +}; + +enum { + BRCMF_DRVDATA_CYW, + BRCMF_DRVDATA_BCA, + BRCMF_DRVDATA_WCC, + BRCMF_DRVDATA_WCC_SEED, +}; + +static const struct brcmf_pcie_drvdata drvdata[] = { + [BRCMF_DRVDATA_CYW] = { + .vendor = BRCMF_FWVENDOR_CYW, + .fw_seed = false, + }, + [BRCMF_DRVDATA_BCA] = { + .vendor = BRCMF_FWVENDOR_BCA, + .fw_seed = false, + }, + [BRCMF_DRVDATA_WCC] = { + .vendor = BRCMF_FWVENDOR_WCC, + .fw_seed = false, + }, + [BRCMF_DRVDATA_WCC_SEED] = { + .vendor = BRCMF_FWVENDOR_WCC, + .fw_seed = true, + }, +}; + /* Forward declaration for pci_match_id() call */ static const struct pci_device_id brcmf_pcie_devid_table[]; @@ -2480,9 +2514,10 @@ brcmf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) bus->bus_priv.pcie = pcie_bus_dev; bus->ops = &brcmf_pcie_bus_ops; bus->proto_type = BRCMF_PROTO_MSGBUF; - bus->fwvid = id->driver_data; bus->chip = devinfo->coreid; bus->wowl_supported = pci_pme_capable(pdev, PCI_D3hot); + bus->fwvid = drvdata[id->driver_data].vendor; + devinfo->fwseed = drvdata[id->driver_data].fw_seed; dev_set_drvdata(&pdev->dev, bus); ret = brcmf_alloc(&devinfo->pdev->dev, devinfo->settings); @@ -2668,14 +2703,14 @@ static const struct dev_pm_ops brcmf_pciedrvr_pm = { BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \ PCI_ANY_ID, PCI_ANY_ID, \ PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \ - BRCMF_FWVENDOR_ ## fw_vend \ + BRCMF_DRVDATA_ ## fw_vend \ } #define BRCMF_PCIE_DEVICE_SUB(dev_id, subvend, subdev, fw_vend) \ { \ BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \ (subvend), (subdev), \ PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \ - BRCMF_FWVENDOR_ ## fw_vend \ + BRCMF_DRVDATA_ ## fw_vend \ } static const struct pci_device_id brcmf_pcie_devid_table[] = { @@ -2703,9 +2738,10 @@ static const struct pci_device_id brcmf_pcie_devid_table[] = { BRCMF_PCIE_DEVICE(BRCM_PCIE_4366_5G_DEVICE_ID, BCA), BRCMF_PCIE_DEVICE(BRCM_PCIE_4371_DEVICE_ID, WCC), BRCMF_PCIE_DEVICE(BRCM_PCIE_43596_DEVICE_ID, CYW), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC), - BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID, WCC), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4377_DEVICE_ID, WCC_SEED), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4378_DEVICE_ID, WCC_SEED), + BRCMF_PCIE_DEVICE(BRCM_PCIE_4387_DEVICE_ID, WCC_SEED), + BRCMF_PCIE_DEVICE(BRCM_PCIE_43752_DEVICE_ID, WCC_SEED), { /* end: all zeroes */ } }; diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h index 44684bf1b9acc..c1e22c589d85e 100644 --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h @@ -52,6 +52,7 @@ #define BRCM_CC_43664_CHIP_ID 43664 #define BRCM_CC_43666_CHIP_ID 43666 #define BRCM_CC_4371_CHIP_ID 0x4371 +#define BRCM_CC_43752_CHIP_ID 43752 #define BRCM_CC_4377_CHIP_ID 0x4377 #define BRCM_CC_4378_CHIP_ID 0x4378 #define BRCM_CC_4387_CHIP_ID 0x4387 @@ -94,6 +95,7 @@ #define BRCM_PCIE_4366_5G_DEVICE_ID 0x43c5 #define BRCM_PCIE_4371_DEVICE_ID 0x440d #define BRCM_PCIE_43596_DEVICE_ID 0x4415 +#define BRCM_PCIE_43752_DEVICE_ID 0x449d #define BRCM_PCIE_4377_DEVICE_ID 0x4488 #define BRCM_PCIE_4378_DEVICE_ID 0x4425 #define BRCM_PCIE_4387_DEVICE_ID 0x4433