From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48B24C433EF for ; Tue, 24 May 2022 09:50:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235875AbiEXJuZ (ORCPT ); Tue, 24 May 2022 05:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230354AbiEXJuX (ORCPT ); Tue, 24 May 2022 05:50:23 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76F2A6D4C2 for ; Tue, 24 May 2022 02:50:22 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id q1so10560339ljb.5 for ; Tue, 24 May 2022 02:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=G5WlWLi6CTURLGag3t+5CNRf4lZCgCTJvDTMTbTzQ5s=; b=M5ncORw3o6tH0W6GJp/VpORJZBt9q4377NZcTfDcKeo1/AQf38SDgEJiTum+C02xgc r4QaJJ+obzajUh+DovgWFW42ZkroAxdOoffR7GZhttn1jnPQp3TV5ZWcpJfqYQrCFV6L 57BRFW0TbWj5Oc5tZNBBqfpwr7W6AAgPIBI2pS8LZnAtnE+MEpd4xGPt6NXBEIR9McxM maGD+k8hr8IO056uwFRRKdMrsrk7dXrwIrpZQ0bokeNSqP+M3uMIsPiHmJ+FsyPUOiBL NibYJZfMinCiQEXphf+a1ecq+yd7bfS4GmXu5raI7xcXYVJliT7pFVK5U9jyEgqkBtOZ e7tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=G5WlWLi6CTURLGag3t+5CNRf4lZCgCTJvDTMTbTzQ5s=; b=d+0QL6vtRSm624r+M/y3Yg2STNl+RRUBn8r66wd88Adggp/FOknDU0OZ7zW1gxRJjs ie6TxQ6JZKspI1ODQMc0qaT83ZxsgX2DSJI9iNLzUn3F4xgP15NX++M55mzJY6zFmtr3 QuVbotyWjL2qi7mA8seJVLz1dFIU4KExiKUfX+4HRI5wxUrjqaDorNmDmpUhmJWKKyTd xL0BU2xRnfCuGkDMqN+SYtv1YMywQKzMPoFeBNszJarHAGZTz9Jo95trum/MDWmZon6E ilxFRm2UBafNJrK7820Hc+6qoSs9oOpeJVBR3Jle4oSfmS4/v6vzcl7mbTG5qBfT1IMW Y4OQ== X-Gm-Message-State: AOAM532vpU+lx5wvLH8pJ5IYv0xyjWREkOHFFsZWQqSXMcINDMWR5EBx pIrczcbJW0MkCLn7W7y0fbGasWzNvBW90g== X-Google-Smtp-Source: ABdhPJzADTR5ZRgZ2CtrdOGOpAvEuXwgcWWGhbFMTvfVxCiP3KAzV1YJN8j3H75tLbWtQ/a5Bfw4zg== X-Received: by 2002:a2e:91d9:0:b0:253:d761:130 with SMTP id u25-20020a2e91d9000000b00253d7610130mr14134812ljg.7.1653385820828; Tue, 24 May 2022 02:50:20 -0700 (PDT) Received: from [172.20.68.48] ([91.221.145.6]) by smtp.gmail.com with ESMTPSA id m10-20020a056512358a00b0047255d21152sm2441897lfr.129.2022.05.24.02.50.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 May 2022 02:50:20 -0700 (PDT) Message-ID: Date: Tue, 24 May 2022 11:50:17 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v2] arm64: dts: mt7986: add built-in Wi-Fi device nodes Content-Language: en-US To: Peter Chiu , Rob Herring , Krzysztof Kozlowski , Matthias Brugger 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: <20220524032430.6261-1-chui-hao.chiu@mediatek.com> From: Krzysztof Kozlowski In-Reply-To: <20220524032430.6261-1-chui-hao.chiu@mediatek.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 24/05/2022 05:24, 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 > --- > arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 41 +++++++++++++++++++ > arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 22 ++++++++++ > arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 43 ++++++++++++++++++++ > 3 files changed, 106 insertions(+) > > diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts > index 24c155c71f0d..359e14f8e9f1 100644 > --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts > +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts > @@ -57,6 +57,13 @@ > status = "okay"; > }; > > +&wmac { > + status = "okay"; > + pinctrl-names = "default", "dbdc"; > + pinctrl-0 = <&wf_2g_5g_pins>; > + pinctrl-1 = <&wf_dbdc_pins>; > +}; > + > &pio { > pcie_pins: pcie-pins { > mux { > @@ -99,6 +106,40 @@ > groups = "jtag"; > }; > }; > + > + 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>; > + }; > + }; > }; > > &spi0 { > diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi > index 9663a0779416..47d719fb66fb 100644 > --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi > +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > > / { > interrupt-parent = <&gic>; > @@ -80,6 +81,11 @@ > reg = <0 0x43000000 0 0x30000>; > no-map; > }; > + > + wmcpu_emi: wmcpu-reserved@4fc00000 { > + no-map; > + reg = <0 0x4fc00000 0 0x00100000>; > + }; > }; > > timer { > @@ -381,6 +387,22 @@ > #reset-cells = <1>; > }; > > + wmac: wmac@18000000 { This is wifi, right? If so, then generic node name - wifi. > + 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 d4078feb4aad..f25312c9a289 100644 > --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts > +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts > @@ -97,3 +97,46 @@ > &usb_phy { > status = "okay"; > }; > + > +&wmac { > + 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 { No underscores in node names, unless binding requires them... but it should not as this is not allowed character. Best regards, Krzysztof