Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp411373rwe; Thu, 1 Sep 2022 01:20:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5BCq9Gv6AlEWmBza9GnmPr6qJbQIkXPBLYpAbKqpzKomFQ7cPlEIjF3h6t4vMFGHmZhJIM X-Received: by 2002:a62:a512:0:b0:536:e2bd:e15e with SMTP id v18-20020a62a512000000b00536e2bde15emr30753378pfm.1.1662020406694; Thu, 01 Sep 2022 01:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662020406; cv=none; d=google.com; s=arc-20160816; b=MvEiKKahhiUse6D1D3OoPjssohH2jEUmm3BqCMVyXPYinyHfilsKTqvFDHKuSJ8bet vmN/vw5EvxuMTYfHKiMDb7D/j8Zsb1tdgEC6ouFItjGAD0WCZrekRgkODZNwdaDiirTB MoL9aWUQGubQcHjyMRxEjjtBrWGNnQdSOGgrBCcRV3Hc+L8Emk1YdZsFacthwKGe6lf9 uYRSXufH3Epr0AB/fzGVsghVK1KwE9cak9gOef8JZMLe+KnxDShhFRHuvca7zTEl7d1J 5TLj9XiqJdiHKBD/k1rs6oGQPpk4vhyTZqmn6M/1QsXt4ELI0liZpdiv6fW5WpUvsbOJ ukBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:content-language:references:cc:to:user-agent:mime-version:date :message-id:dkim-signature; bh=gCMA0D9QJ9+gznYf6HXIABOQYxv6ToNZjCmsfbOOWD8=; b=lnvJ8zUDuRs61Qp9qSGo/Rct17G6DEVsabB9AjYFMlUHBLulSv43JaLGugDawQtWPR FDuPNOsI5G+ZQPfvzmxCKRwzATTgTrGVwW58U0x1gs8eDcZqTxHt1vV+uRoA7OkEgqyB NIXgV1sOohPQntz4IgatPFOHlDRJqeuuNFMvdTorAwQa7aneBbL9jUANd0LY0vxRjK22 gn/8Cy182kfhAwTeN6Q3LHlUBi44B9LhTw2DAzGZv4eXLgLaO9x0a7izrn8+8pDVhDe/ 5/kFQL3EnUiL8KcEgR4VhH+S11h3EKZ+5RVWljGC0Zskt+Fa2ETcfmdqM3mxd882/Vhy tuHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=F6OllOWZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h193-20020a636cca000000b00421905343afsi6869451pgc.619.2022.09.01.01.19.53; Thu, 01 Sep 2022 01:20:06 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=F6OllOWZ; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234030AbiIAIOY (ORCPT + 99 others); Thu, 1 Sep 2022 04:14:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234278AbiIAINv (ORCPT ); Thu, 1 Sep 2022 04:13:51 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A06212AE03; Thu, 1 Sep 2022 01:13:22 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id c7so14590026wrp.11; Thu, 01 Sep 2022 01:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:cc:to:user-agent:mime-version:date:message-id:from:to:cc :subject:date; bh=gCMA0D9QJ9+gznYf6HXIABOQYxv6ToNZjCmsfbOOWD8=; b=F6OllOWZFEwGs7Le2foMXv++xH5Snpp4D2PnVkrcaHssMMk72qQBDLqWIkWNVAEHB1 D3EvEWzoMXDJg8qdw6PK7J//gbrL4A3mO5CksK7d43kRI13ktQfy/e4ik50vP0cGLh0w Q4FVy0L57H2c8M0QOO8IVUyYD78XfvLYMiVc5KUk9gT6xhEefISnudJ3+1VkC/gmgJCX FGpfDwQ9jCIX1bklq3aMkjaTRXmHeJlWO1NHzzf1JHBhd5FKQmsLoA/YQWtv0mrUrU9m wNZNk683dAZoRRB7LXHn+5MYzwXbJOZPUk8fhjCo2rwkz9di/0J4rNpvXH2M8ol1yy/F l++Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:subject:from:content-language :references:cc:to:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=gCMA0D9QJ9+gznYf6HXIABOQYxv6ToNZjCmsfbOOWD8=; b=qEeYQJP6kelubtXfna1gapyJLiaB5f2siW1IIqwCnZEIa7nilhO1uWtmDzumGYeHeX K2EheBFlAsFsYRtEzemEQ458VkG0HWnBuLHpb2U29sQ0aRLHhLVxZ02ZadzZ6Nid/SYc 12W2n6FrVYqAAj8PIubIiKj2wJy6uI8e8VDCqUnqTkvBDBGUz6EI+FhfvZbjsOgkGFQn MMPI4JhUPnN+IxTZ5xt5ectS91Xyajsq1GTuf4U+ybcZF655UCvKU62VqAuwUaYmMVRZ yKnEf3zZiaNQfUpovZ1rPIcxkqeguWbtR5ogMPhEgsZYYuSdBBa3vmmqKEI5xSKBYXVY 6JHw== X-Gm-Message-State: ACgBeo0UxhUQk10eXK0a1ORtsW+hxV7iJSnmLanU8xjlvJRlIbdwmYjI SwdxhfUUZX3UxNepiZZZpGk= X-Received: by 2002:a5d:6d4f:0:b0:225:63aa:27b2 with SMTP id k15-20020a5d6d4f000000b0022563aa27b2mr14471366wri.599.1662020000843; Thu, 01 Sep 2022 01:13:20 -0700 (PDT) Received: from [192.168.0.30] ([47.62.125.55]) by smtp.gmail.com with ESMTPSA id e18-20020adff352000000b002252d897876sm13668290wrp.32.2022.09.01.01.13.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 01:13:19 -0700 (PDT) Message-ID: <079c023c-fa2d-1a5a-41ec-6d364067eb7d@gmail.com> Date: Thu, 1 Sep 2022 10:13:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 To: Peter Chiu , Rob Herring , Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, Ryder Lee , Evelyn Tsai , Sam Shih , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220630094909.8014-1-chui-hao.chiu@mediatek.com> Content-Language: en-US From: Matthias Brugger Subject: Re: [PATCH v4] arm64: dts: mt7986: add built-in Wi-Fi device nodes In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 01/09/2022 05:47, Peter Chiu wrote: > On Tue, 2022-08-30 at 10:43 +0200, Matthias Brugger wrote: >> >> On 30/06/2022 11:49, Peter Chiu wrote: >>> This enables built-in 802.11ax Wi-Fi support. >>> >>> Reviewed-by: Sam Shih >>> Reviewed-by: Ryder Lee >>> Signed-off-by: Peter Chiu >>> --- >>> v2: add clocks and clock-names. >>> v3: rename wmac to wifi and change underscores to dash in node >>> names. >>> v4: rebase to the latest codebase. >>> --- >>> arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 41 >>> +++++++++++++++++++ >>> arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 23 +++++++++++ >>> arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 43 >>> ++++++++++++++++++++ >>> 3 files changed, 107 insertions(+) >>> >>> diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts >>> b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts >>> index 882277a..28cd168 100644 >>> --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts >>> +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts >>> @@ -115,6 +115,13 @@ &uart2 { >>> status = "okay"; >>> }; >>> >>> +&wifi { >>> + status = "okay"; >>> + pinctrl-names = "default", "dbdc"; >>> + pinctrl-0 = <&wf_2g_5g_pins>; >>> + pinctrl-1 = <&wf_dbdc_pins>; >>> +}; >>> + >>> &pio { >>> uart1_pins: uart1-pins { >>> mux { >>> @@ -129,4 +136,38 @@ mux { >>> groups = "uart2"; >>> }; >>> }; >>> + >>> + wf_2g_5g_pins: wf-2g-5g-pins { >>> + mux { >>> + function = "wifi"; >>> + groups = "wf_2g", "wf_5g"; >> >> yaml says: >> - if: >> properties: >> function: >> const: wifi >> then: >> properties: >> groups: >> enum: [wf_2g, wf_5g, wf_dbdc] >> >> >> Did you run the binding checker against this DTS? > The binding checker showed the groups setting is too long. We will send > a patch to fix yaml by setting groups as string-array. > Wait, does this mean the binding was wrong in the first place, as you can't set all three groups in one node? >> Why can't we just merge wf_2g_5g_pins with wf_dbdc_pins? > Since they use different pinmux settings on the same pin, we need to > distinguish them. > wf-2g-5g-pins and wf-dbdc-pins set the same drive-strength to the very same group of pins. What do you mean exactly? Sorry I'm not an expert on the pinctrl infrastructure. Regards, Matthias > Best Regards, > Peter Chiu >> >> Regards, >> Matthias >> >>> + }; >>> + conf { >>> + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", >>> "WF0_HB4", >>> + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", >>> "WF0_HB6", >>> + "WF0_HB7", "WF0_HB8", "WF0_HB9", >>> "WF0_HB10", >>> + "WF0_TOP_CLK", "WF0_TOP_DATA", >>> "WF1_HB1", >>> + "WF1_HB2", "WF1_HB3", "WF1_HB4", >>> "WF1_HB0", >>> + "WF1_HB5", "WF1_HB6", "WF1_HB7", >>> "WF1_HB8", >>> + "WF1_TOP_CLK", "WF1_TOP_DATA"; >>> + drive-strength = <4>; >>> + }; >>> + }; >>> + >>> + wf_dbdc_pins: wf-dbdc-pins { >>> + mux { >>> + function = "wifi"; >>> + groups = "wf_dbdc"; >>> + }; >>> + conf { >>> + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", >>> "WF0_HB4", >>> + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", >>> "WF0_HB6", >>> + "WF0_HB7", "WF0_HB8", "WF0_HB9", >>> "WF0_HB10", >>> + "WF0_TOP_CLK", "WF0_TOP_DATA", >>> "WF1_HB1", >>> + "WF1_HB2", "WF1_HB3", "WF1_HB4", >>> "WF1_HB0", >>> + "WF1_HB5", "WF1_HB6", "WF1_HB7", >>> "WF1_HB8", >>> + "WF1_TOP_CLK", "WF1_TOP_DATA"; >>> + drive-strength = <4>; >>> + }; >>> + }; >>> }; >>> diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi >>> b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi >>> index e3a407d..890ded0 100644 >>> --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi >>> +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi >>> @@ -7,6 +7,7 @@ >>> #include >>> #include >>> #include >>> +#include >>> >>> / { >>> interrupt-parent = <&gic>; >>> @@ -70,6 +71,11 @@ secmon_reserved: secmon@43000000 { >>> reg = <0 0x43000000 0 0x30000>; >>> no-map; >>> }; >>> + >>> + wmcpu_emi: wmcpu-reserved@4fc00000 { >>> + no-map; >>> + reg = <0 0x4fc00000 0 0x00100000>; >>> + }; >>> }; >>> >>> timer { >>> @@ -261,6 +267,23 @@ eth: ethernet@15100000 { >>> #size-cells = <0>; >>> status = "disabled"; >>> }; >>> + >>> + wifi: wifi@18000000 { >>> + compatible = "mediatek,mt7986-wmac"; >>> + resets = <&watchdog >>> MT7986_TOPRGU_CONSYS_SW_RST>; >>> + reset-names = "consys"; >>> + clocks = <&topckgen CLK_TOP_CONN_MCUSYS_SEL>, >>> + <&topckgen CLK_TOP_AP2CNN_HOST_SEL>; >>> + clock-names = "mcu", "ap2conn"; >>> + reg = <0 0x18000000 0 0x1000000>, >>> + <0 0x10003000 0 0x1000>, >>> + <0 0x11d10000 0 0x1000>; >>> + interrupts = , >>> + , >>> + , >>> + ; >>> + memory-region = <&wmcpu_emi>; >>> + }; >>> }; >>> >>> }; >>> diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts >>> b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts >>> index 0f49d57..7f21b10 100644 >>> --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts >>> +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts >>> @@ -98,3 +98,46 @@ fixed-link { >>> }; >>> }; >>> }; >>> + >>> +&wifi { >>> + status = "okay"; >>> + pinctrl-names = "default", "dbdc"; >>> + pinctrl-0 = <&wf_2g_5g_pins>; >>> + pinctrl-1 = <&wf_dbdc_pins>; >>> +}; >>> + >>> +&pio { >>> + wf_2g_5g_pins: wf-2g-5g-pins { >>> + mux { >>> + function = "wifi"; >>> + groups = "wf_2g", "wf_5g"; >>> + }; >>> + conf { >>> + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", >>> "WF0_HB4", >>> + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", >>> "WF0_HB6", >>> + "WF0_HB7", "WF0_HB8", "WF0_HB9", >>> "WF0_HB10", >>> + "WF0_TOP_CLK", "WF0_TOP_DATA", >>> "WF1_HB1", >>> + "WF1_HB2", "WF1_HB3", "WF1_HB4", >>> "WF1_HB0", >>> + "WF1_HB5", "WF1_HB6", "WF1_HB7", >>> "WF1_HB8", >>> + "WF1_TOP_CLK", "WF1_TOP_DATA"; >>> + drive-strength = <4>; >>> + }; >>> + }; >>> + >>> + wf_dbdc_pins: wf-dbdc-pins { >>> + mux { >>> + function = "wifi"; >>> + groups = "wf_dbdc"; >>> + }; >>> + conf { >>> + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", >>> "WF0_HB4", >>> + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", >>> "WF0_HB6", >>> + "WF0_HB7", "WF0_HB8", "WF0_HB9", >>> "WF0_HB10", >>> + "WF0_TOP_CLK", "WF0_TOP_DATA", >>> "WF1_HB1", >>> + "WF1_HB2", "WF1_HB3", "WF1_HB4", >>> "WF1_HB0", >>> + "WF1_HB5", "WF1_HB6", "WF1_HB7", >>> "WF1_HB8", >>> + "WF1_TOP_CLK", "WF1_TOP_DATA"; >>> + drive-strength = <4>; >>> + }; >>> + }; >>> +}; >