Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3686626rwb; Fri, 30 Sep 2022 07:05:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Th2nF/K0PQqdicZtLZLh1HPCCsHoD0MC8vu+6OBpwBGB+5NOPVaL9ZLcPMH+/4XtifpPa X-Received: by 2002:a17:907:b04:b0:780:32ea:4fe with SMTP id h4-20020a1709070b0400b0078032ea04femr6554217ejl.452.1664546701583; Fri, 30 Sep 2022 07:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664546701; cv=none; d=google.com; s=arc-20160816; b=L9RaT2/1GfBALHbggcVcVk+ENXU+OViMnD3HzsXG9kJBAw8ry01Jdhr38h+BbqOgHM fgwcpxRc7XisNznI5+nFie3B1p7uWZC7fJ6Z7iDuYGDC8v9fyubWRyiAYg4EDnkwJAV0 PCLlhQNSvAIlsVF5IrHDV5Hi8eqkmk0OSrygo8yZi/Uft+NU2HmrzD7+gwuRv3nbbfss GHArX/NOSK9oNOgRQnq98F2Z/ka2j8NzDA3IF8ii4aiCNa1azjfTfuCoed0rPAHYqjQG 1FYHKhT8Jbrh2lhmWuMR6AaSN26xWalNPZeEzIlw/ja4geLEmj4CEoHTMpJjZUw9IaeA vAAQ== 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:authenticated-by; bh=GHcu82IIfI8u/JLPrGHTntxJRPs89fZgWE0f4kuPrPA=; b=gHnuxoj/khKw8Uqtr3JbVTwoQPdBXapHbac5bd2+IwjBcue26yr3UnbTatKrcHx/Ne md8ha5EyPeky3akb188xCG/ssp8S6/0IbTjKB48ZK5K68pn9BbYMNylahHKaI+iFJ/r8 T2l9SQ+eiFE+cbDqjEfAW6IJQ5k3WAXfcDAicuJx3ayysutqUj7ktRH6I5/PHodPycoX hppUI5mGe4HZvBJN+N0ekecqsxfPbd7kQOiEwtyRuZck4vkVcmjjZEpaoTN4SmbO00q8 CbcbJMh4Ci+D/7vO0nxXsvuwPB9a84Vymt4YMBesePKrMKtU2W7VugbfEow8J4z97qdM gz6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r24-20020a170906549800b00741757d62adsi1556620ejo.993.2022.09.30.07.04.44; Fri, 30 Sep 2022 07:05:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbiI3Nph (ORCPT + 59 others); Fri, 30 Sep 2022 09:45:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231491AbiI3Npc (ORCPT ); Fri, 30 Sep 2022 09:45:32 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AE59540E2B for ; Fri, 30 Sep 2022 06:45:24 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 28UDiVqoD006173, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 28UDiVqoD006173 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Fri, 30 Sep 2022 21:44:31 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 30 Sep 2022 21:44:57 +0800 Received: from localhost (172.16.20.103) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Fri, 30 Sep 2022 21:44:57 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH 1/2] wifi: rtw89: 8852c: set pin MUX to enable BT firmware log Date: Fri, 30 Sep 2022 21:44:16 +0800 Message-ID: <20220930134417.10282-1-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [172.16.20.103] X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: trusted connection X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 09/30/2022 13:31:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: =?big5?B?Q2xlYW4sIGJhc2VzOiAyMDIyLzkvMzAgpFekyCAxMToxNDowMA==?= X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_SPF_HELO_TEMPERROR 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-wireless@vger.kernel.org 8852CE is a combo chip, and WiFi driver controls pin MUX. To output BT firmware log to specific hardware pin, set pin MUX to achieve. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/reg.h | 4 ++++ drivers/net/wireless/realtek/rtw89/rtw8852c.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/reg.h b/drivers/net/wireless/realtek/rtw89/reg.h index ca20bb024b407..356389425d5dc 100644 --- a/drivers/net/wireless/realtek/rtw89/reg.h +++ b/drivers/net/wireless/realtek/rtw89/reg.h @@ -229,6 +229,10 @@ #define R_AX_GPIO0_7_FUNC_SEL 0x02D0 +#define R_AX_LED1_FUNC_SEL 0x02DC +#define B_AX_PINMUX_EESK_FUNC_SEL_V1_MASK GENMASK(27, 24) +#define PINMUX_EESK_FUNC_SEL_BT_LOG 0x1 + #define R_AX_GPIO0_15_EECS_EESK_LED1_PULL_LOW_EN 0x02E4 #define B_AX_LED1_PULL_LOW_EN BIT(18) #define B_AX_EESK_PULL_LOW_EN BIT(17) diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c.c b/drivers/net/wireless/realtek/rtw89/rtw8852c.c index 67653b3e1a356..5792b75e19ce8 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852c.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852c.c @@ -273,6 +273,9 @@ static int rtw8852c_pwr_on_func(struct rtw89_dev *rtwdev) B_AX_CMAC_DMA_EN | B_AX_PTCLTOP_EN | B_AX_SCHEDULER_EN | B_AX_TMAC_EN | B_AX_RMAC_EN); + rtw89_write32_mask(rtwdev, R_AX_LED1_FUNC_SEL, B_AX_PINMUX_EESK_FUNC_SEL_V1_MASK, + PINMUX_EESK_FUNC_SEL_BT_LOG); + return 0; } -- 2.25.1