From patchwork Tue Feb 14 08:00:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 5380 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2830206wrn; Tue, 14 Feb 2023 00:04:08 -0800 (PST) X-Google-Smtp-Source: AK7set8zKDLs/Pt2sd8E7vk40n3ArB0IakAj0fALKG2que6R2ih7Tw1STHknOSlL78/b68Rt8OpJ X-Received: by 2002:a17:90b:4a88:b0:234:409:9752 with SMTP id lp8-20020a17090b4a8800b0023404099752mr1408674pjb.25.1676361847961; Tue, 14 Feb 2023 00:04:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676361847; cv=none; d=google.com; s=arc-20160816; b=Pq8RWzQ7yj/pMVdtU99wtbJTGDi37wJOv/VKrH/HjB81B/1DQePa8vDvpDdAEoc/qm s+fQtGjAkrXa7pmsXDQPrGMRNfSHZfHEBN+9LhBpgpGCoakhKFdVNtLxofJFRmabIVX5 8Y7HHfNq7pmjTdwnSP/rcxKM4Vei42kI3ShfJnrvCv2VApOpcRfrGG8iKXZgNULJQT5S UKzPIlkLVaUqIHiYoSpmKAz4fAswoeSteeiBW7hjZtORLa7qFN+cMRF/P8S6boRJPMNE nLte02fj0Nwah+CrM9KFZThvVyJuPbCyCjdcZ6/VjOONv1Y6UUGH1bcgfBxrAmowi4hn WmZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zFHx2WF36YPc4claIb5IXNrIA3yYk5BbWI99JLlbn4E=; b=bj1cSwm5sOX/6UA5B39ayjOOfSpIeXWSpimWfyWSwoW/ZlEN+vhNFn4RP6txl05cXf 0N6qv3oif+In+EkmgogbP+Bad2FEQ2zivMlmDuWyON3HunGqVxjNGbBujZsd3B6AVUHp aI7/wYnwOWl755vA0RbS4rwHzu0cFVSx+vKelZRZLiyb7H1PCGhYNsK9MjeuGoCbf5/D FYA9OtMh/VTr2fafvt9LzKfHR0rp/Nkaqa44FVRIoDgoG0h+FhPCm9BywASfn/xoqlYP dD9xUT5FcEDIR70lgPzt08L5VFnFqZxFGrVC4ZcLf9yjy7SmtP8ulSKAiZBaFXnoN8aM cuLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=AWRsTTF3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f19-20020a17090aa79300b00230d70ab759si17506237pjq.93.2023.02.14.00.03.42; Tue, 14 Feb 2023 00:04:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=AWRsTTF3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbjBNICR (ORCPT + 99 others); Tue, 14 Feb 2023 03:02:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbjBNIBl (ORCPT ); Tue, 14 Feb 2023 03:01:41 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B9C73C33; Tue, 14 Feb 2023 00:01:39 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 6A1EC4262F; Tue, 14 Feb 2023 08:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1676361697; bh=LulywthSgoMY00ciMXgI8pcvl/7Qitv9bYFn/FgF6PQ=; h=From:To:Cc:Subject:Date; b=AWRsTTF3+iGzsWXu17baKH3m5EzkQMdg/dFeHRKwed3zbqu/SqjC9QyPuo2D4aRyK O12+cLq/8xgBc25us+dltD9mtkUPIEhNyM/qCgM4yFMSS/pIpvesaEeI7az/wLgCPl kHFJf+0wI4eLTdUwS/QigUUbRTgVRtjrlo9gLCjf3cGv6Tb2Igli500PMROPkukrAH vn+ret+pep8fCWogjKUabyp51SaKdpc8tkAH4l8hVEpHujYYO4SqVkkg50agOn99dC RqD7W6XuBoTUlYSLOtejM5qrkGme47AyHcpEcR9YfxzY2UjNhTkQD26JOwhI6j6FsY ZADQXS7v5ERNw== From: Hector Martin To: Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Sven Peter , Alyssa Rosenzweig , Linus Walleij , asahi@lists.linux.dev, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Hector Martin Subject: [PATCH 0/2] Apple T2 platform support Date: Tue, 14 Feb 2023 17:00:32 +0900 Message-Id: <20230214080034.3828-1-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757792801213086591?= X-GMAIL-MSGID: =?utf-8?q?1757792801213086591?= Hi all, This short series adds the missing bits to support Apple T2 platforms. There are two quirks: these devices have firmware that requires the host to provide a blob of randomness as a seed (presumably because the chipsets lack a proper RNG), and the module/antenna information that is used for Apple firmware selection and comes from the Device Tree on ARM64 systems (already upstream) needs to come from ACPI on these instead. Changes since the megaseries from a ~year ago: made the ACPI code bail if there is no module-instance, so we don't try to get the antenna info at all in that case (as suggested by Arend). Made the randomness conditional on an Apple OTP being present, since it's not known to be needed on non-Apple firmware. Hector Martin (2): brcmfmac: acpi: Add support for fetching Apple ACPI properties brcmfmac: pcie: Provide a buffer of random bytes to the device .../broadcom/brcm80211/brcmfmac/Makefile | 2 + .../broadcom/brcm80211/brcmfmac/acpi.c | 51 +++++++++++++++++++ .../broadcom/brcm80211/brcmfmac/common.c | 1 + .../broadcom/brcm80211/brcmfmac/common.h | 9 ++++ .../broadcom/brcm80211/brcmfmac/pcie.c | 32 ++++++++++++ 5 files changed, 95 insertions(+) create mode 100644 drivers/net/wireless/broadcom/brcm80211/brcmfmac/acpi.c