From patchwork Wed Jul 31 06:11:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 13748109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DA41C3DA7F for ; Wed, 31 Jul 2024 06:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=pbOn+5Jztqji1KYkvERHMkPDDcacjowK1k7DqyMA0LY=; b=2kWdN+2+8uDKiqQyl2DBmGvezx nY7T35DEPS89WFaSVAUxd7hFTIn40Yy1xjUvEgPIaF++vwP0gaIabJDt/qIWIMgH8RVVYCm/7JoGc +0wX2HoSBXvAI12jQHbDw4mE+FR+KN4MGyf5pn4I83aoPkfxAydcYhQuDXNJBkKbLRmJPkOI2vbXR HcjnQMJ6gTo1KT7vpEAWN0NjofgjjcFWZU5Zyw9lv1V97YiFEpZw1cbv8nv1TjX53enzKOQY+OzZz GcuYORGlRANayEt2Kd16cbIf+XjjWJnb4q5JCEhMP2YZHUiYxtDycyriqhjV6+Ww18J/94qUDP+t1 W6OFa3ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ2aL-0000000HTdA-1qN7; Wed, 31 Jul 2024 06:13:17 +0000 Received: from mail-tyzapc01on20700.outbound.protection.outlook.com ([2a01:111:f403:2011::700] helo=APC01-TYZ-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZ2Z3-0000000HTBU-3Zwx; Wed, 31 Jul 2024 06:11:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=wLz8cEY7wKMCYn7Fm58RQoQUo8qVE+/HMN6bM8EkpHPr6jSfhpWNpPweyWRDPfItHjipGSwA4Svm46qP/babFcQYYbA1c3rMX1B6/CIJfsx+6TQDwn/U7gO9FaiAZG7yLV08lhc9c7xRWmJ6z3Yt2EegIMFIQUKgnJfAARVboeyrD2XORQ94Zg/pLk4jLK+xBB2hu/zi7cj6URvixxkUsZT/NccSL7curY/c0A7QYxSXE/2R1msDYDK99tUuGHTbuleMwxJituXqSy6x4iejh4a9tR07DoBopl/DjjZrnFmNp/3EHIF9jKjtBRxZbf3TFpiWTv3yVSPbDjQeFWSLVw== 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=pbOn+5Jztqji1KYkvERHMkPDDcacjowK1k7DqyMA0LY=; b=MZGqdZllwhclWl6ZdkoyTJm+PTb9pyF8JIlJh6gRb53HMEXE13wsGUWXKC+nAZYfNdY+FoJW3jpPkUeOkXV9YrNTV+/1XmXDCkR0MhDprrHbaGMYdivapx8QOA2NvQIGPVHKfBmCqIzcKB4It9g7T0iLQ2NUAU6/yYQlRoaauhAv6orIc262hlkEPDXzwNo7SSDK8fi4YTOPA4/lf54qQiMlRwd5/KzvbrJZH04dL/MjPiiWy5TtyQhcV0RNwBL35jyrRvp2d9923gdzsEBfUqKunyWI1e5LuRbNs0E0pEbYz3qC/tMj5Ruq9Utz8wEGU9SyR2+WSSKaov2IgfvNcg== 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 SEYPR03MB6580.apcprd03.prod.outlook.com (2603:1096:101:85::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Wed, 31 Jul 2024 06:11:46 +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.7828.016; Wed, 31 Jul 2024 06:11:44 +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, arend.vanspriel@broadcom.com 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 Subject: [PATCH v6 0/5] Add AP6275P wireless support Date: Wed, 31 Jul 2024 14:11:27 +0800 Message-Id: <20240731061132.703368-1-jacobe.zang@wesion.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: TYCP286CA0178.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c6::9) To TYZPR03MB7001.apcprd03.prod.outlook.com (2603:1096:400:26a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR03MB7001:EE_|SEYPR03MB6580:EE_ X-MS-Office365-Filtering-Correlation-Id: e86a9612-36ab-4a47-d9d1-08dcb127a6dc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|7416014|1800799024|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: EYqPjl+cgCFppLHKcCfFBR/bBBWoWUsbC58tXyTdbKQ65yVi9MvsmuIy2zaP0aFy/dk2CuWLiS6xn44kdWznU5NaqC45wFjqKjy8/FW15rtjqXfvFkWdjamxF5ih6eMTMbJt7uFJ+1G96yn7hZ0oSob/fRXkdvxNsjpl0WUGoJMMoVnSzyXG5hF1Tu5hzqxSpLd1d6l62rLteJIaXZX9gYt10TeWebMmH4SScYaltYTGPC3sZFJxZ6Otuopz/vlcsGjIM2Qx6AuiDamwcxh+Yu+J5r92pA3dqTLaV+vgbMa5azamAx+LeIXbY8GaFPPnZEhi0GhYq7X3yRZWbs4vmkusRanGVx21KSTbYuTHVSPfJ7wVsIyI8wJMRRp5cZNZJFqoHzHvl1OUzuT05G9taThXmulO9+9ZCcQsXIWL9p1+jQs2wtmP8ZlcW+Q6ObiCvuL3n4MAC+dpsrDnOWSQxwrjLWkvnI0B2LQF08rdMH6qCj0bEZOyAr+hCSyNtsOfPcxWTsqA0obvakiDnR3bUEDdb62XY2VtV6M2aEhJr5jYS52t46tZ3S+WxfGoo+aF1dPh3CLlY4ctR/PmacTg1WjoTXLVbEzIaGiXaZoIzCKXhPEvZTtyRMYSww/QUaxjXUzvSQnbYEUMlqW2i4BogGMnE2HHWH1jm3qiLtRgYwRAg3mXxKyDoK6GE8b+dS/CHWVz8Xa0EflKr0BdfvGqkWIHEH+YRwxCixQypLwMjKAVI4clFyLy7gFTi2GrGfEL032DXT/7yAU1W3wxLi+/06eT9E3x4O0KWpYK4TSezPgjtKofPJNohU/x+MQcDaCqnj4ru0sE8614yrBRTDoZ8hM6+B5IjrgBPdg9DUVa5Eq71w4WcW5LHIrF397rGO07hBl4qZZ1NMIVSepYLF3w00SWg2xmY2cl4x+AxBiQH6Wu3kQPO1CpF/yujTm7Cuc8RbD3vX8nwvD0r1z2MF0c0/JFvk9frxKcT96IEuRPKnCtmz7MYCnIUKkgFyvquQfXAabAkmmNv2NMDjRu0S7Qx+rkV+lobImKh62uGFqXmNbdOanCnFQq/kmHKIfDMHbxOA8qap5IBuuDwoW9hpf+kL/cBU37G3Fb/SY2HWAsjNB9ZSPj9x09P6GqJwt+eH/11+yXKkgRGjmlck8d+81hGZ6AcNWaerj8CmNvtRVxoT5x9lcgvv5UsUJwo7DV/7BJh+8a7yjjeufvAXNUp44cerPgvI+N805lnVE0aD5SPwhiIciA1LcoJMKz76gkGVtliH7MeyTszb3bqTl7S+7ZngIxxJ4G/vrAokgtvAhQtrheHKTsPhrWWwyp5wAUGQLEuaqNuqUUpMGJSJVx3DKk0l0KCnDncDqhi173ivdZDI0= 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)(376014)(52116014)(7416014)(1800799024)(366016)(38350700014)(921020);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AgyOYG77rMuyb0PnrroWh2n5ghyT/n/F92BooX+yteQDJttD61GbpWjf6Qjc2A/Iv5C42P2D2cC5OOF9wh6WohENs3lmNYS0N0sATvCrDXxC+grJpPnfdZpX6voQWgLk9Km8LOZUuDNdnx5qA2VaXEXGiuRWUcuBEJWva5LwvGsgobB01XqmCx9+9wgRQ5Uz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7uLiH8t4V3k0XsRC/II/KG2MqJFyH2wek6+Pe3UEbDmoy3cnhoZZGbOr/HNRGs8e+Jf7eDsrD7PnSa8HKR/PEWkB1XtVnzmKiT7gO5Ml6JjIPhcfmvASZK+WLDv/yHFTygqoEmw7fhsNgHq3kXpQvpm8USYO1fpp5flYAKywAHA+ugiOyZqrXINLdv+97puB8vlvjTF/cRTb55xwXc5+bo5JxCGhdnIxB5wdkBq1rFkBSPRvSUnu9k1ANCXm+teEw80K0ySANS5CIAOjHOhAoDV1Lmw+9lC8YM0EWzzMiweKeKVZPbKG2KVjmt4FLW6+1 X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: e86a9612-36ab-4a47-d9d1-08dcb127a6dc X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2024 06:11:44.3474 (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: gX/uf3TdPF+kBOWp/3/BMQcDdMmUW4S+JxPl4BfW8POLoLOTK1kpLp6xyiVHKClqd6tD22CHWvbH6DA7YVMa3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR03MB6580 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240730_231157_927543_489AF906 X-CRM114-Status: GOOD ( 11.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These add AP6275P wireless support on Khadas Edge2. Enable 32k clock for Wi-Fi module and extend the hardware IDs table in the brcmfmac driver for it to attach. Changes in v6: - Move "brcm,bcm4329-fmac" check to the top of brcmf_of_probe in of.c - Add return if clk didn't set in DTS Changes in v5: - Add more commit message to the clock in bindings - Use IS_ERR_OR_NULL as a judgment condition of clk - Link to v4: https://lore.kernel.org/all/20240729070102.3770318-1-jacobe.zang@wesion.com/ Changes in v4: - Change clock description in dt-bindings - Move enable clk from pcie.c to of.c - Add compatible for wifi node in DTS - Add random seed flag for firmware download - Link to v3: https://lore.kernel.org/all/20240630073605.2164346-1-jacobe.zang@wesion.com/ Changes in v3: - Dropped redundant parts in dt-bindings. - Change driver patch title prefix as 'wifi: brcmfmac:'. - Change DTS Wi-Fi node clock-name as 'lpo'. - Link to v2: https://lore.kernel.org/all/20240624081906.1399447-1-jacobe.zang@wesion.com/ Changes in v2: - Add SoB tags for original developer. - Add dt-bindings for pci14e4,449d and clocks. - Replace dev_info to brcmf_dbg in pcie.c - Link to v1: https://lore.kernel.org/all/20240620020015.4021696-1-jacobe.zang@wesion.com/ Jacobe Zang (5): dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d dt-bindings: net: wireless: brcm4329-fmac: add clock description for AP6275P arm64: dts: rockchip: Add AP6275P wireless support to Khadas Edge 2 wifi: brcmfmac: Add optional lpo clock enable support wifi: brcmfmac: add flag for random seed during firmware download .../net/wireless/brcm,bcm4329-fmac.yaml | 9 ++++ .../dts/rockchip/rk3588s-khadas-edge2.dts | 16 ++++++ .../wireless/broadcom/brcm80211/brcmfmac/of.c | 12 ++++- .../broadcom/brcm80211/brcmfmac/pcie.c | 52 ++++++++++++++++--- .../broadcom/brcm80211/include/brcm_hw_ids.h | 2 + 5 files changed, 82 insertions(+), 9 deletions(-)