Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp963945iob; Fri, 13 May 2022 17:55:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0a7y7bjyHmZFhIYQD3/vig+CzYUYoaibvZuvuIW9DbwxM7BZFAYkci4+LIGo04kCHrfdo X-Received: by 2002:adf:fc52:0:b0:20a:e296:6e8a with SMTP id e18-20020adffc52000000b0020ae2966e8amr5763517wrs.432.1652489706937; Fri, 13 May 2022 17:55:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652489706; cv=none; d=google.com; s=arc-20160816; b=gMK9Rpo+1A5dCx9p9xSXS30RiKMRyK43PFYsuOQPhmV2CAj9UoSYcjMq5Hxu9GFIT+ Ta1TkrHre7K8AoohPUgMytcGfjJGKnbopjMz9FVxtmjLGeGT5LQ9WiX4LVzGHt/53mt4 Ym02A8+b1r0ly3r1TwZwB5dS4YBDV3rdTPoA77VOPC+y7nxwA9JNansT7STFbPyDjSfu LrmgfUI/C7IBICSVKfJTETdIIveOc30fCoq2YKLmbLCHWGfCG+9K0ywl//V2xRo0cL6/ qjPDV9LorFQ5fBLidvN0PZJMbgJEGGGMBHzW207T8EsB91Wwa81c0FTdzU10gvFhg6yG fbTQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=29jyfr6sFWEWEw+OPZLTCVLoYAJJ6a9OscW5oAehNYo=; b=mZ4a+SSlMnl7ojtU6NA0awuDYZ3S/hFN0be6dHKJNZo7S5z40+VhoM8ZyPEo+owAq6 hGMr1bUKW9aNPEADTJlrPi9UNBdaYNt0Vr7nc9El8TtGv+n9cpzK8MGlweF/UR7EqzIg NG1BkmMgym6MWKPvD2qkB6Q1VNYmR3zU6rn7WWGEUmym9NDhGquF1N0/wCnnYz62TZ1W ND8N7yVKSGTuYKC8zS0o7bCLX5EyyDi5AuZRId8sgURhJlEBjVB4JWemm/UKmpQnls85 1friUqBTtdeqUQ9aXyUwmGHnb/8OwqQPQ+I0Q15y9NPGEjnGINtEDBdsmeKFMJj0zJZ4 wHYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=l9+Fvbu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t5-20020a5d6a45000000b0020c7844fcb3si3273561wrw.903.2022.05.13.17.55.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:55:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=l9+Fvbu8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4EA6C34EEAE; Fri, 13 May 2022 16:30:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243689AbiELU5h (ORCPT + 99 others); Thu, 12 May 2022 16:57:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358613AbiELU5E (ORCPT ); Thu, 12 May 2022 16:57:04 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE91869CD5; Thu, 12 May 2022 13:56:45 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 79CEF1F45AAB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1652389004; bh=i7Z2W6YC5XDeB3fbg7wPBOxu/CQV/7/SaA7a+o0HOSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l9+Fvbu8wTUi1CFOOJfCnD2jxLfrwNzOZxzZ/fboIaNLXkDYcSHLCf6qL1o3C18MP 1JUo7sQqTr7QHGmPEbjUVG13aqSXCTfXR1syo/RPGzBsoZ/0C0QP4EkNthe/5aRExS AsFRMSEGaswkzPIx+uFdFuK8pmwa9juMTzWIwkSNe/8QueDTRDgixBVeHIDvq0CdUB CcFidUoXzQ72XxV25ZIRpRd1veVcO9J425Lm8bSbf03SRmBOzvqKooz0GpI91OHoaJ 4AIoYMeiADPJAyH09C1u1+b3eo5IM54g4Hf2AQp7sRTUbTDVd1RjrKWI4TyMKC/kmV vjUpXF4ijxuaw== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Matthias Brugger Cc: Chen-Yu Tsai , AngeloGioacchino Del Regno , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v3 14/16] arm64: dts: mediatek: asurada: Enable PCIe and add WiFi Date: Thu, 12 May 2022 16:56:00 -0400 Message-Id: <20220512205602.158273-15-nfraprado@collabora.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220512205602.158273-1-nfraprado@collabora.com> References: <20220512205602.158273-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=no 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 Enable MT8192's PCIe controller and add support for the MT7921e WiFi card that is present on that bus for the Asurada platform. Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai --- Changes in v3: - Renamed regulator node to be generic Changes in v2: - Added this patch .../boot/dts/mediatek/mt8192-asurada.dtsi | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi index ecae2730789e..dde4de27ec61 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -66,6 +66,19 @@ pp3300_u: regulator-3v3-u { vin-supply = <&pp3300_g>; }; + pp3300_wlan: regulator-3v3-wlan { + compatible = "regulator-fixed"; + regulator-name = "pp3300_wlan"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + pinctrl-names = "default"; + pinctrl-0 = <&pp3300_wlan_pins>; + enable-active-high; + gpio = <&pio 143 GPIO_ACTIVE_HIGH>; + }; + /* system wide switching 5.0V power rail */ pp5000_a: regulator-5v0-a { compatible = "regulator-fixed"; @@ -84,6 +97,17 @@ ppvar_sys: regulator-var-sys { regulator-always-on; regulator-boot-on; }; + + reserved_memory: reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + wifi_restricted_dma_region: wifi@c0000000 { + compatible = "restricted-dma-pool"; + reg = <0 0xc0000000 0 0x4000000>; + }; + }; }; &i2c0 { @@ -144,6 +168,28 @@ &i2c7 { pinctrl-0 = <&i2c7_pins>; }; +&pcie { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pins>; + + pcie0: pcie@0,0 { + device_type = "pci"; + reg = <0x0000 0 0 0 0>; + num-lanes = <1>; + bus-range = <0x1 0x1>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi: wifi@0,0 { + reg = <0x10000 0 0 0 0x100000>, + <0x10000 0 0x100000 0 0x100000>; + memory-region = <&wifi_restricted_dma_region>; + }; + }; +}; + &pio { /* 220 lines */ gpio-line-names = "I2S_DP_LRCK", @@ -434,6 +480,34 @@ pins-bus { }; }; + pcie_pins: pcie-default-pins { + pins-pcie-wake { + pinmux = ; + bias-pull-up; + }; + + pins-pcie-pereset { + pinmux = ; + }; + + pins-pcie-clkreq { + pinmux = ; + bias-pull-up; + }; + + pins-wifi-kill { + pinmux = ; /* WIFI_KILL_L */ + output-high; + }; + }; + + pp3300_wlan_pins: pp3300-wlan-pins { + pins-pcie-en-pp3300-wlan { + pinmux = ; + output-high; + }; + }; + spi1_pins: spi1-default-pins { pins-cs-mosi-clk { pinmux = , -- 2.36.1