From patchwork Tue Sep 10 03:04:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacobe Zang X-Patchwork-Id: 827324 Received: from HK3PR03CU002.outbound.protection.outlook.com (mail-eastasiaazon11021139.outbound.protection.outlook.com [52.101.129.139]) (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 D836F4A0C; Tue, 10 Sep 2024 03:05:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.129.139 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725937541; cv=fail; b=D/dc027RG2NCtUapcLHDwdv/JisTHBcyllxCtSEy2mmEjsvkLoUNFq5I+MTCtHAEnrXjhBUUIjuz/JvZWj7CyF89k7CejMvZAh7HHBkqWbg8Tj0LA5b8KwpzSTi8ksQlyaBvQ7lqM4gGDgd9BP04q3RqE0Y7TcoumhgDas6EqTo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725937541; c=relaxed/simple; bh=zFJ/1N3BUjApkZv0VG4/INFVylk1b87X1EwDkztc46M=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=XGv1/KNi9RnZdyzw417zwZHl3vdANM+D1Z7mQzTkYbctOkxazQEBCWZnb+JhSo5woGvKJB53sWO4AKKOBuAtYYl/84BiMkHdc++/a9S0/9SXiyd2mrrNeQ1Ar5x86phZw/9LA3uYGm8kLHWXblXjt4lmyYS6zC4SpHytB6ElBIQ= 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=52.101.129.139 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=hMQ4Bt1y/AiK1UfAHXNGQ+bWFpfCDpMx9SzcqIDqae0smbPtPMdcYvR/tMpY8cJsDfYB+HkofCOdhP+0RZmZVm5D4ZPy4L+57R8PxLR/IujNrn5ik0rcjPaJ8U0Wcagy4D4B7tJxZ1uevL1VwcZ36ooKJ5Hi4bidItodfSCTM8EHCk2X/g6NLbVn1ClflBjyEiosSnv12H97O14ed7DGtprsCjK6v9ycBh8iVpusFXkp2xHrccGri0jAfbxXjs7GZGXB5tSyDvmwE/Yk5OFDHZJpsaguS58/jqE6Dcg3wRDnFMO+1jWsbs5ru3yMTdvysfmxlGiHJagtcwWbnvilqw== 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=uFJfVabuP7ppubT4MEJD895a4SqSK1B3JUBRXcgQ0e8=; b=xZghkhWcvFwtMVRv4hxil55k3w+5P8a/3+gYQiH1C9LKbnbD0EftmIg8aWEybEZQWwzxXy+IdSjoBNqKmr/cDI7UcewiBvYEnG62OTdhJTSpcoRHMZJFIGqTcupnhnIoBk1RTSKu/px3bXFsGoquYf85QGwI6j3+O4hj314I8WQsMCLHsqBkQmG+Nj20sgQCvlSyGBVvwdNrttWbrVemfpdHc+MGsDzAStGTVvUMZSgTU0gm7xarh6+x67vOT0HEfON5+plYUrjNLCfs2D7CRC66JFSeolr8xxl/TuEHsnj9GIASFWxpz+Kp7tnQWBLzYcVXNc/nweM7t1wXMXtrsw== 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 SI2PR03MB6783.apcprd03.prod.outlook.com (2603:1096:4:1ef::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.23; Tue, 10 Sep 2024 03:05: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%4]) with mapi id 15.20.7939.022; Tue, 10 Sep 2024 03:05:33 +0000 From: Jacobe Zang Subject: [PATCH v14 0/4] Add AP6276P wireless support Date: Tue, 10 Sep 2024 11:04:10 +0800 Message-Id: <20240910-wireless-mainline-v14-0-9d80fea5326d@wesion.com> X-B4-Tracking: v=1; b=H4sIACq332YC/4XOwQ6CMAwG4FchOzuzDQLMk+9hPGylkyYwyGZAQ 3h3N25e9Pj/ab92YxEDYWSXYmMBF4o0+RRkdSoY9MY/kFOXCqaEqkSrWr5SwAFj5KMhP5BHbgG s0V2t0VmW9uaAjl4Herun3FN8TuF93FikyvUvLo1wwbWoKwONASe764r5rzNMI8vgIsv/SJkRr VsrNThs8AvZ9/0DH40PHvsAAAA= To: Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , van Spriel , Arend van Spriel Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com, nick@khadas.com, Jacobe Zang , Krzysztof Kozlowski , Ondrej Jirman , Sai Krishna X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1725937530; l=4394; i=jacobe.zang@wesion.com; s=20240828; h=from:subject:message-id; bh=zFJ/1N3BUjApkZv0VG4/INFVylk1b87X1EwDkztc46M=; b=PFnR67GddZe+TxAOgqQ/uSOtDmQVrX0oUFuPdcjGd7HgYgQ/grq/IZhFUHKXoJn7wThWZtD4y wW2/7Z6/Y6HCEcofk/HPhRRfLEE+mnTEHIjE7bgYRHmB8fmA/i5WmPM X-Developer-Key: i=jacobe.zang@wesion.com; a=ed25519; pk=CkP5TjIqHSwHJwZXTGtadoXZucYvakXcO3HjbR6FoeU= X-ClientProxiedBy: SI1PR02CA0047.apcprd02.prod.outlook.com (2603:1096:4:1f5::15) 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_|SI2PR03MB6783:EE_ X-MS-Office365-Filtering-Correlation-Id: 34ea157d-8e02-434f-167a-08dcd1456f76 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|52116014|376014|7416014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?gGIbLG8MGVGrppwdIKhk6b5eBub4qSM?= =?utf-8?q?NZfDtCwMJgOs4/hFrVmoMkQH6jTRIk6qTZRc7CJI0q5IKxdwwA1+LhrO7WXTFcfL/?= =?utf-8?q?VzsomGed/1rAJu3Yt9Xb7TimOeFO5GUb4iB4W0fb+8MCAmWYLJrXVf7OiHsZkTaKF?= =?utf-8?q?uHuXPS/KkGFYhX/WtUiT6450D2asBx4mO9U3yrjWhxPi37A+QGFGVf40MQlofxO2l?= =?utf-8?q?WB4nr8f0H9izt/tkXMT/2Ow+DhA3b7Y1IN4P2jqVuTWBzFPtq4oyeaNNFKHO4tkKY?= =?utf-8?q?rtUOgkGcIfV5CZqHZ1ZnsCuauy/4OucwYv8EjXg06xoH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RbFx3wv/tR59wq?= =?utf-8?q?byQ9nYQZPtNpIBer+g35eJRWuMihl/5mvAs9NxGIICu7YFMBT7++6BMK1R8k6uxz3?= =?utf-8?q?Bz1jMA/mQx4zG6n6JuxsqAwHSR4Cb0g9OKTsPR6AvYPgERLSkDd/ZEmDNQ9d0jgnf?= =?utf-8?q?7Z65krQKfKUJQSFZqYAJVPiRTiqhfjN1AJojadiP8I5fisNLVe1G18Y=3D?= 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)(1800799024)(52116014)(376014)(7416014)(366016)(921020)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?28Pr6Qt7aCg7rGVh0vWaVejuQZnI?= =?utf-8?q?gBK6gLOsdapOuJfbqpHmRtEwZgwBvrwGNFsVsG/+9tefJaYUyLnhOdX37DUlESW45?= =?utf-8?q?ZXgJDm8J8PtAwWAkw9VqJiy4rANX+oWNLaZ2DBY4ixLP7uFDkKPhRNvRO0Wo6E+Uf?= =?utf-8?q?7hOr1F4PET5qPlISCZt2bzwstvswO+Npx8dnTttgpAlwMS5goRS7qSOOb901+3qR/?= =?utf-8?q?OdbsSfZxVJ8dvGuD9v+gHhPJJbnFaZ7/E8pAiP4zKrqHjLRJ13/ORtELIFya9FMOZ?= =?utf-8?q?jG5Zm2n7T0wgOYQ5BuEjmmr6ewecKnDu3xA6dlUhwuJXLKAraFDP+qneZqb9aHTEz?= =?utf-8?q?DUKNrGl/qrveQh7A2kEZO/wVenb2G65xBF7KcHTU+DnjXzkPG4qMULCLccfUgWWtD?= =?utf-8?q?SG9vngQv5zqYqdwjhGNv8WWU8QacrgwB37cHzIHEmfcCoi0N/0mrTr54HV/UBiIvb?= =?utf-8?q?VffCB0J6omWrW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E+BbLPT783fRuK0DvJsZ6AQALrYSW6iOWUatwkl7MLU0Rat?= =?utf-8?q?ZMIX9+7SmIlUs9VBIwFvh7RcU3wxuawWj9mWpCDYdbTFLDKXo5eVCqngPvbIDI4+T?= =?utf-8?q?ZDU70P6LObgb6u5wLZuK0aDrdcJa02yhWsFRmybj8tAoVLKPyvnZ79ZZr0j5E6izN?= =?utf-8?q?cfTM8RM71/jt?= X-OriginatorOrg: wesion.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34ea157d-8e02-434f-167a-08dcd1456f76 X-MS-Exchange-CrossTenant-AuthSource: TYZPR03MB7001.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2024 03:05:33.4509 (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: HcJY7c+b7KLSvkJ7lCPNT0G7qAcC0MUm8XUCA3r7hWC9A0w0S+6RHfR8YsBza5cNAlWVwiPypF8lRG5qpFOxgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR03MB6783 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. Signed-off-by: Jacobe Zang --- Changes in v14: - Fix up syntax error in sdio.c - Drop commit "dt-bindings: net: wireless: brcm4329-fmac: change properties enum structure" - Link to v13: https://lore.kernel.org/r/20240828-wireless-mainline-v13-0-9998b19cfe7e@wesion.com Changes in v13: - CC devicetree list that forget last version - Link to v12: https://lore.kernel.org/all/20240828034915.969383-1-jacobe.zang@wesion.com/ Changes in v12: - Add "brcm,bcm4329-fmac" as fallback compatible for PCI ID based devices. - Link to v11: https://lore.kernel.org/all/20240816020635.1273911-1-jacobe.zang@wesion.com/ Changes in v11: - Retain interrupt check in of.c - Split DTS and submit separately - Link to v10: https://lore.kernel.org/all/20240813082007.2625841-1-jacobe.zang@wesion.com/ Changes in v10: - Use ret instead unused probe_attach_result in sdio.c - Link to v9: https://lore.kernel.org/all/20240810035141.439024-1-jacobe.zang@wesion.com/ Changes in v9: - Add return -ENODEV error pointer from brcmf_sdio_probe as the default for the fail path - Add if statement for brcmf_of_probe in common.c - Retain modifications to of.c other than the return values - Link to v8: https://lore.kernel.org/all/20240805073425.3492078-1-jacobe.zang@wesion.com/ Changes in v8: - Add appropriate errno's for return values that will be send to bus when error occurred. - Link to v7: https://lore.kernel.org/all/20240802025715.2360456-1-jacobe.zang@wesion.com/ Changes in v7: - Change brcmf_of_probe prototypes from void to int, add appropriate errno's for return value, move clock check to the end of brcmf_of_probe - Add "brcm,bcm4329-fmac" compatible for wifi node - Link to v6: https://lore.kernel.org/all/20240731061132.703368-1-jacobe.zang@wesion.com/ 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 -Link to v5: https://lore.kernel.org/all/20240730033053.4092132-1-jacobe.zang@wesion.com/ 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 (4): dt-bindings: net: wireless: brcm4329-fmac: add pci14e4,449d dt-bindings: net: wireless: brcm4329-fmac: add clock description for AP6275P wifi: brcmfmac: Add optional lpo clock enable support wifi: brcmfmac: add flag for random seed during firmware download .../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 9 ++++ .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 4 +- .../wireless/broadcom/brcm80211/brcmfmac/common.c | 3 +- .../net/wireless/broadcom/brcm80211/brcmfmac/of.c | 25 +++++++--- .../net/wireless/broadcom/brcm80211/brcmfmac/of.h | 9 ++-- .../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 55 ++++++++++++++++++---- .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 22 +++++---- .../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 3 ++ .../broadcom/brcm80211/include/brcm_hw_ids.h | 2 + 9 files changed, 102 insertions(+), 30 deletions(-) --- base-commit: 97b766f989bcd06e5a7651b1080001d7327012f5 change-id: 20240828-wireless-mainline-bccba9d69efb Best regards,