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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB51CC44500 for ; Fri, 3 Jul 2026 11:04:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tsnzo2At2D22M9h7H+DZqNmRRrbT1zORZI6ZvXqk3jI=; b=nc5rcLaxipFhVntsNI+8HTBReO uhODHaFCov3EpBMWq9XAD8UXBc0+jexrUW8ehYBDyDSpm7V0oGTqRKPuNxBGnQfF1B1kOcgUdxEVe GaSxNxWx4CpCxLhyQss0DLlcNndTuEzaaD4sJOBB10UzjMhxQy4r+Q90m9A1NNbU1aRMIBHexNvJo iM1C2f0uKrHYZogoCZjZza2bods7EH09rko3lkXhdnUcEljzELgW8APLhD6fl0z9vzpNPMqzQTZPh idUA2Y/rxElOpZhyFQmA4mxfiz7zXLd0I6TwXfOFfGkFn+IF2HFgIJ3lBBnbIMaPFPOgq5vdG6slB eh/lhLNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wfbhG-00000006m2Z-0sFy; Fri, 03 Jul 2026 11:04:38 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wfbhC-00000006lwU-1SfQ for linux-arm-kernel@lists.infradead.org; Fri, 03 Jul 2026 11:04:36 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2ca7aaa4b85so3645615ad.3 for ; Fri, 03 Jul 2026 04:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1783076673; x=1783681473; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tsnzo2At2D22M9h7H+DZqNmRRrbT1zORZI6ZvXqk3jI=; b=H7AEwYZYyyc7msVGpS/ZbJQyprpciPGp7ZRikg3cJ1gM09P0NGkGlq0e1zGLe17PR6 YQGGnBDGMCB+7OBKSBgJTY9ZDqEk+INhUqJH5XFIytTORbso0FRfL6kaH7+TvnxHbKXC i8T6HCZCmn8CQidxYWs8fRlNBKFQ1nG4tjbhg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783076673; x=1783681473; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=tsnzo2At2D22M9h7H+DZqNmRRrbT1zORZI6ZvXqk3jI=; b=aNyTwOK6dqw2+BdgIb9KkC99Mq5cn3rmVPgPKpWP4WhMIkoMb9vmht2qIYPU49uAs/ jfjqXDVQjjEB+FXawiJAiQ+g/hgSGGj/ni3vfukvxX0+2JPHuQ5TaWOwdIYxWt8z6WUa UJ4QItP7FC7cqtne+lzPJrO5jF+zyCUdHlupXNYSeg86Rrp138MWK82fVkeMQpheorOH H96BJpSYA6wRqI/mt2B9WxHXFP+eP0gIAWsce5GATGYtMPxp0GP0cjjnzOJRooMbmtsm UTobcV4kH+JTotb7iQn7d9mMEnAu2m9IEZWdJjEQxW5kH1mx+OyL0SJz0Es2PLoVyMft bllA== X-Forwarded-Encrypted: i=1; AHgh+RoIE00ZLva5MlkvhMBpXLKqTuhZjyEuB4p7IIcu2x/MAlao852UIKpH6T1Ft+39yrVrRUEw83zem6tevOteoyCA@lists.infradead.org X-Gm-Message-State: AOJu0YwOP486Z6DRd+/NrRHx2uvT5Rswgm1RDP2cFQY7r/qW3WKO4PQG H0u3drwDzTcPNpidDbstTCXw+Ky4wV4+7D7UU+xYSnJUNmii29PKAwobesES/8dDyQ== X-Gm-Gg: AfdE7ckqnfqjKA4yceepPe+XziDxAKxqWOa+mM7525PUd3hgRWnmU8vxYV82Y+ydEx4 14b8hW5LmF33e/yghTbs0Um1MfRZRh/8TvqC2AFrMiUa8AjOoXtRodIvi1HyS20WhhJzK8V+OH/ 1IU2cPCCfCvqRXDfenO2D3z0TI8WzeHAhY20iaYU3dQvzcY0t9Wh0JN7Roj8v/wuaWDpmtVXwKP dXRRXYUf2ZqZDSCcHjhDnW89RvZCin1v5bOcKOUFQKuA7Vng5MabXLCL7O1Oezojt0hLP7QnSEv rRuJUGWRZv4dO7MfRptzUljjiaZMw3XN36h8IZ6HIrczPHwFr0vw5muK5nZgfKAvw4Z/41nkwg9 RgVsg85LLsKqYfw7GrPMVTE8mSR3SgttZMFyE6PGRq/FMBOZBgFm9d/ac8EjHZPSQ3lOOyeW/Jn Mp5MdzwSCLdHXdR9cc04Q8+BVLYJXqSsqzuqZ2WbKMmCM1j3tjVzgKm5dc1deOm2WalYMl+g== X-Received: by 2002:a17:903:2987:b0:2c9:97a7:f540 with SMTP id d9443c01a7336-2ca9120fef1mr94980545ad.38.1783076673338; Fri, 03 Jul 2026 04:04:33 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2a00:79e0:201d:8:7bc5:6c83:76cd:cbd6]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2cad6f25e15sm7785315ad.13.2026.07.03.04.04.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2026 04:04:32 -0700 (PDT) From: Chen-Yu Tsai To: Bartosz Golaszewski , Greg Kroah-Hartman , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , "Rafael J. Wysocki" , Danilo Krummrich , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , linux-acpi@vger.kernel.org, driver-core@lists.linux.dev, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam , Alan Stern Subject: [PATCH v3 13/13] arm64: dts: mediatek: mt8188-geralt: Add WiFi/BT as M.2 E-key slot Date: Fri, 3 Jul 2026 19:03:14 +0800 Message-ID: <20260703110317.1283411-14-wenst@chromium.org> X-Mailer: git-send-email 2.55.0.rc0.799.gd6f94ed593-goog In-Reply-To: <20260703110317.1283411-1-wenst@chromium.org> References: <20260703110317.1283411-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260703_040434_864487_9FDE33E3 X-CRM114-Status: GOOD ( 17.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The MT8188 Geralt design features a chip-on-board WiFi/BT solution. This is a M.2 E-key WiFi/BT board layout directly inserted into the mainboard design. The connections to the rest of the board are almost the same as if it were a separate M.2 card. The only addition is the PMU_EN pin on the chip; on M.2 cards this would be tied to the primary power source. Model the chip-on-board WiFi/BT solution as a M.2 E-key slot with PCIe, USB and auxiliary signals. The PMU_EN pin, which enables the internal power controls and regulators, is modeled as a regulator fed by the pp3300_wlan regulator. Since power sequencing is now correctly modeled using the M.2 E-key slot, drop the "regulator-always-on" property one pp3300_wlan regulator. Also drop the comment in xhci2 saying "MT7921's power is controlled by PCIe". Also drop the voltage range on the pp3300_wlan regulator. This "regulator" is just a load switch and does not provide any regulation. Signed-off-by: Chen-Yu Tsai --- Changes since v2: - Drop default GPIO output state from kill pins pinconfig --- .../boot/dts/mediatek/mt8188-geralt.dtsi | 92 ++++++++++++++++++- 1 file changed, 88 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi index f382f90c48f5..8316dd41ba23 100644 --- a/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8188-geralt.dtsi @@ -86,13 +86,11 @@ pp3300_z1: regulator-pp3300-z1 { pp3300_wlan: regulator-pp3300-wlan { compatible = "regulator-fixed"; regulator-name = "pp3300_wlan"; - regulator-always-on; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; enable-active-high; gpio = <&pio 12 GPIO_ACTIVE_HIGH>; pinctrl-0 = <&wlan_en>; pinctrl-names = "default"; + /* load switch */ vin-supply = <&pp3300_z1>; }; @@ -159,6 +157,17 @@ ppvar_mipi_disp_avee: regulator-ppvar-mipi-disp-avee { vin-supply = <&pp5000_z1>; }; + /* PMU_EN pin controls internal regulators and power sequence */ + wlan_pmu: regulator-wlan-pmu { + compatible = "regulator-fixed"; + regulator-name = "wlan-pmu"; + enable-active-high; + gpio = <&pio 145 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&wlan_pmu_en>; + pinctrl-names = "default"; + vin-supply = <&pp3300_wlan>; + }; + reserved_memory: reserved-memory { #address-cells = <2>; #size-cells = <2>; @@ -193,6 +202,39 @@ adsp_dma_mem: memory@61000000 { no-map; }; }; + + wifi-bt-connector { + compatible = "pcie-m2-e-connector"; + pinctrl-names = "default"; + pinctrl-0 = <&m2_e_key_kill_pins>; + vpcie1v8-supply = <&mt6359_vcn18_ldo_reg>; + vpcie3v3-supply = <&wlan_pmu>; + w-disable1-gpios = <&pio 13 GPIO_ACTIVE_LOW>; + w-disable2-gpios = <&pio 14 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + /* PCIe for WiFi */ + port@0 { + reg = <0>; + + wifi_ep: endpoint { + remote-endpoint = <&pcie_ep>; + }; + }; + + /* USB for Bluetooth */ + port@2 { + reg = <2>; + + bt_ep: endpoint { + remote-endpoint = <&usb2_ep>; + }; + }; + }; + }; }; &adsp { @@ -657,6 +699,22 @@ &pcie { pinctrl-names = "default"; pinctrl-0 = <&pcie_pins>; status = "okay"; + + pcie@0 { + compatible = "pciclass,0604"; + reg = <0 0 0 0 0>; + device_type = "pci"; + num-lanes = <1>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + port { + pcie_ep: endpoint { + remote-endpoint = <&wifi_ep>; + }; + }; + }; }; &pciephy { @@ -1000,6 +1058,13 @@ pins-bus { }; }; + m2_e_key_kill_pins: m2-e-key-kill-pins { + pins-kill { + pinmux = , + ; + }; + }; + mipi_disp_avdd_en: mipi-disp-avdd-en-pins { pins-en-ppvar-mipi-disp { pinmux = ; @@ -1164,6 +1229,13 @@ pins-bus { }; }; + wlan_pmu_en: wlan-pmu-en-pins { + pins-wlan-pmu-en { + pinmux = ; + output-low; + }; + }; + wlan_en: wlan-en-pins { pins-en-pp3300-wlan { pinmux = ; @@ -1343,10 +1415,22 @@ vdosys1_ep_ext: endpoint@1 { }; &xhci2 { - /* no power supply since MT7921's power is controlled by PCIe */ /* MT7921's USB BT has issues with USB2 LPM */ usb2-lpm-disable; status = "okay"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + usb2_ep: endpoint { + remote-endpoint = <&bt_ep>; + }; + }; + }; }; #include -- 2.55.0.rc0.799.gd6f94ed593-goog